Jan, 2015

Time to participate in the Project VRC “State of the VDI and SBC union 2015” survey!

The independent R&D project ‘Virtual Reality Check’ (VRC) (www.projectvrc.com) was started in early 2009 by Ruben Spruijt (@rspruijt) and Jeroen van de Kamp (@thejeroen) and focuses on research in the desktop and application virtualization market. Several white papers with Login VSI (www.loginvsi.com) test results were published about the performance and best practices of different hypervisors, Microsoft Office versions, application virtualization solutions, Windows Operating Systems in server hosted desktop solutions and the impact of antivirus.

In 2013 and early 2014, Project VRC released the annual ‘State of the VDI and SBC union’ community survey (download for free at www.projectvrc.com/white-papers). Over 1300 people participated. The results of this independent and truly unique survey have provided many new insights into the usage of desktop virtualization around the world.

This year Project VRC would like to repeat this survey to see how our industry has changed and to take a look at the future of Virtual Desktop Infrastructures and Server Based Computing in 2015. To do this they need your help again. Everyone who is involved in building or maintaining VDI or SBC environments is invited to participate in this survey. Also if you participated in the previous two editions.

The questions of this survey are both functional and technical and range from “What are the most important design goals set for this environment”, to “Which storage is used”, to “How are the VM’s configured”. The 2015 VRC survey will only take 10 minutes of your time.

The success of the survey will be determined by the amount of the responses, but also by the quality of these responses. This led Project VRC to the conclusion that they should stay away from giving away iPads or other price draws for survey participants. Instead, they opted for the following strategy: only survey participants will receive the exclusive overview report with all results immediately after the survey closes.

The survey will be closed February 15th this year. I really hope you want to participate and enjoy the official Project VRC “State of the VDI and SBC union 2015” survey!

Visit www.projectvrc.com/blog/23-project-vrc-state-of-the-vdi-and-sbc-union-2015-survey to fill out the Project Virtual Reality Check “State of the VDI and SBC Union 2014” survey.

About Jens

My name is Jens Trendelkamp. I currently work as an IT Consultant at sepago GmbH. My fields of specialty are Application Delivery, SBC\VDI Solutions and Enterprise Mobility based on Products from Microsoft and Citrix.

NetScaler Backup by using Powershell

NetScaler Backup by using Powershell

For quite some time it is possible to interact with a NetScaler by using the NITRO API. Since i got some a spare time i took a closer look at this and thought this could be cool way to backup my NetScaler config regularly. On a side note: I do not like running bash scripts started by crontab on my Appliance 😉 As a result of this I created a little Powershell script which does the following: At first the script connects to the Appliance and creates a session for the following tasks. The script saves the current NetScaler configuration and creates a new full system backup. After that we have to use a third party tool to copy the file from the NetScaler to a desired location in the network.  Sadly it is currently not possible to transfer files from or to the NetScaler by using the NITRO API except following file formats: .txt, .cert, .req, .xml, .key. 

NetScaler Backup by using Powershell

In the end the script deletes the created system backup file (the NetScaler can only store up to 50 backups at the same time) disconnects the session and sends a mail.

If want to use SSL but haven´t had time yet to configure your certificates right you can disable the SSL check.

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

Citrix also published a nice blog about configuring the NetScaler by using Powershell which can be found here. You can find the NITRO API  documentation in the Citrix eDocs

 

######################################################################################################
#		Purpose:
#				Automatically create and save a NetScaler Backup
#		Scriptname:
#				ns-backup.ps1
#		$ScriptVersion =        "0.1"
#		Prerequisites:
#				- Powershell 3.0
#               - pscp.exe http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
#		Author:
#				Jens Trendelkamp, Jens.Trendelkamp@sepago.de, sepago GmbH
#		Change history:
#				06.01.2015, Jens Trendelkamp, Jens.Trendelkamp@sepago.de
#					- Initial version
#######################################################################################################
# $nsip = NetScaler NS IP Address
# $nsprotocol = HTTP or HTTPS 
# $nsuser = User 
# $nspass = Password
# $filename = How the backup file will be named
# $level = full or basic | http://support.citrix.com/proddocs/topic/ns-system-10-5-map/ns-system-backup1-tsk.html
# $pathtopscp = Where to find pscp.exe 
# $savelocation = Where to save the backup 
# $psemailserver = SMTP Address in case a mail should be send. If not leave this field empty
# $mailto = Mail Recipient
#######################################################################################################
$nsip = "10.0.0.0"
$nsprotocol = "https://"
$nsuser = "nsroot"
$nspass = "nsroot"
$filename = "ns-backup-$(get-date -uformat "%d-%m-%Y-%H-%M")"
$level = "full"
$pathtopscp = "C:\temp"
$savelocation = "\\10.0.0.2\Backups\NetScaler"
$psemailserver = "10.0.0.3"
$mailto = "jens@trendelkamp.net"

$payload = @{"login" = @{"username"=$nsuser;"password"=$nspass;"timeout"=60}}
$payloadjson = ConvertTo-Json $payload
Invoke-RestMethod -Uri "$nsprotocol$nsip/nitro/v1/config/login" -Body $payloadjson -Method POST -SessionVariable saveSession -ContentType application/json | out-null 
$nssession = New-Object -TypeName PSObject
$nssession | Add-Member -NotePropertyName WebSession  -NotePropertyValue $saveSession -TypeName Microsoft.PowerShell.Commands.WebRequestSession
$payload = @{"nsconfig"=@{}}
$payloadjson = ConvertTo-Json $payload
Invoke-RestMethod -Uri "$nsprotocol$nsip/nitro/v1/config/nsconfig?action=save" -Body $payloadjson -Method POST -ContentType application/json -WebSession $nssession.WebSession | out-null 
$payload = @{"systembackup"=@{"level"="$level";"filename"="$filename"}}
$payloadjson = ConvertTo-Json $payload
Invoke-RestMethod -Uri "$nsprotocol$nsip/nitro/v1/config/systembackup?action=create" -Body $payloadjson -Method POST -ContentType application/json -WebSession $nssession.WebSession | out-null 
& $pathtopscp\pscp.exe -pw $NSPASS $nsuser@"$nsip":/var/ns_sys_backup/$filename.tgz $savelocation | out-null 
$payload = @{"systembackup"=@{"filename"="$filename.tgz"}}
$payloadjson = ConvertTo-Json $payload
Invoke-RestMethod -Uri "$nsprotocol$nsip/nitro/v1/config/systembackup?action=rm" -Body $payloadjson -Method POST -ContentType application/json -WebSession $nssession.WebSession | out-null 
$payload = @{"logout"=@{}}
$payloadjson = ConvertTo-Json $payload
Invoke-RestMethod -Uri "$nsprotocol$nsip/nitro/v1/config/logout" -Body $payloadjson -Method POST -ContentType application/json -WebSession $nssession.WebSession | out-null 
$pathnfile = $savelocation + "\" + $filename + ".tgz"
if ($psemailserver) {
if (test-path $pathnfile){
Send-MailMessage -to "$mailto" -from "NetScaler Backup <nsbackup@trendelkamp.net>" -Subject "NetScaler Backup successfull" -body "The scheduled NetScaler Backup has successfully finished and can be found here : $pathnfile"}
else {
Send-MailMessage -to "$mailto" -from "NetScaler Backup <nsbackup@trendelkamp.net>" -Subject "NetScaler Backup failed" -body "The NetScaler Backup has failed!"}}

About Jens

My name is Jens Trendelkamp. I currently work as an IT Consultant at sepago GmbH. My fields of specialty are Application Delivery, SBC\VDI Solutions and Enterprise Mobility based on Products from Microsoft and Citrix.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close