login vsi company logo login vsi company logo 250x40

 

Get the best possible VDI performance, density and availability with Login VSI
Our Solutions

  • Home
  • Blog
  • Login VSI
  • Scheduling automatic Login VSI performance tests for your virtualized desktop environment

Scheduling automatic Login VSI performance tests for your virtualized desktop environment

Scheduling automatic Login VSI performance tests for your virtualized desktop environment

Wouldn’t it be great to exactly know the maximum capacity of your virtualized desktop environment on a week-to-week basis? Recently a customer asked us if it is possible to schedule a Login VSI load test to automatically start running during the weekends. One of the reasons for this was that the company wanted to have a performance overview of the environment every Monday morning. Although we do not recommend simulating thousands of virtual users in your live production environment, it is not only possible to schedule tests but doing so can save you time while you regularly gauge performance.

In this example, I will configure Login VSI to run every Sunday at 4:00 a.m. I’m going to do this by using a PowerShell script. This script makes sure that all the launchers are running the launcher agent and will start the test by using the LoginVSICMD tool.

First we are going to create a configuration profile for the scheduled test.

  • Open the Management Console.
  • Configure Login VSI just as you would normally do.
  • Click on Save Profile when everything is set.
  • Enter a name for this configuration profile.

scheduling automatic login vsi performance tests for your virtualized desktop environment save profile

Now we are going to create the PowerShell script for the task scheduler.

  • Create a text file with the following code:
<#
This script will:
A. Makes sure the Session Monitor is running.
B. Connect to every launcher machine (by PSremoting) and logs off every user. Then logs on with the Launcher-v4 user account
    to make sure the launcher agent is running.
C. Start the actual test. 
Usage
1. Edit the variables under "Set variables".
2. Search for this part below and enter your launcher host names.
   
    # Launcher Workflow
    $launchers = @("Launcher01","Launcher02","Launcher03")
3. Search for this line below and adjust the fileserver and domain name. \\fileserver\VSIshare\_VSI_Binaries\Connectors\RDPConnect.exe /server $launcher /user domain\Launcher-v4 /password MySecretPassword /nowarning /display 1024x768. 4. Logon to your VSI fileserver to enable client-side CredSSP to allow user credential delegation to all computers in the domain run the command: Enable-WSManCredSSP -Role client -DelegateComputer * 5. Logon to your launchers to enable the server to accept delegated credentials: Enable-PSRemoting -Force Enable-WSManCredSSP -Role Server -Force 6. Reboot both the launcher and VSI fileserver. 7. Create a Scheduled task to run this script at you prefered interval. #> # Set variables $testname = Get-Date -Format yyyy-MM-dd-HHmm $profilename = "Weekly Sunday 4AM" $vsi_share = "\\fileserver\VSIshare" # Checking if Session Monitor is running. $ProcessActive = Get-Process SessionMonitor -ErrorAction SilentlyContinue if($ProcessActive -eq $null) { # Starting the Session Monitor. Write-host "Starting the Session Monitor." $SessionMointor = Join-Path -ChildPath \_VSI_Binaries\Launcher\SessionMonitor.exe -Path $vsi_share Invoke-Expression -Command $SessionMointor } else { # Session Monitor is already running. Write-host "Session Monitor is already running." } # Start Launcher Workflow $launchers = @("Launcher01","Launcher02","Launcher03") foreach ($launcher in $launchers) { # Connect to the launcher with PowerShell Enter-PSSession -ComputerName $launcher # Log off all logged on users. try { query user /server:$launcher 2>&1 | select -skip 1 | foreach { logoff ($_ -split "\s+")[-6] /server:$launcher } } catch {} Start-Sleep -s 2 # Close the connection to the Launcher. Exit-PSSession # Start a new RDP connection to trigger the launcher logon script. \\fileserver\VSIshare\_VSI_Binaries\Connectors\RDPConnect.exe /server $launcher /user domain\Launcher-v4 /password MySecretPassword /nowarning /display 1024x768 } # End Launcher Workflow # Starting the Login VSI test. \\DC01\VSIshare\_VSI_ManagementConsole\LoginVSICMD.exe -testname $testname -profile $profilename
  • Edit the variables under Set variables.
  • Add the launcher host names to match your setup.
  • Save the file as LoginVSIscheduledStart.ps1.
  • Log on to the VSI file server.
  • Start an elevated PowerShell console.
  • Enable client-side CredSSP to allow user credential delegation to all computers in the domain. This is because we connect to the launcher machine to logoff any logged on users.
Enable-WSManCredSSP -Role client -DelegateComputer *
  • Reboot the VSI file server.
  • Logon to every launcher machine.
  • Start an elevated PowerShell console.
  • Enable the server to accept delegated credentials:
Enable-PSRemoting –Force
Enable-WSManCredSSP -Role Server –Force
  • Reboot the Launcher machines.
  • Logon to the VSI file server.
  • Open the Task Scheduler
  • Create a new task. In this example I’ll call mine Login VSI weekly – Sunday 4am.
  • You can choose run whether user is logged or not. If you are going to test run the task in this case it runs in the background. To check if it is working it might be easier to set it to Run only when user is logged on.
  • Create a new trigger for this task.

scheduling automatic login vsi performance tests for your virtualized desktop environment new trigger

  • Then create an action. The argument is pointing to the PowerShell script you saved in a previous step.

scheduling automatic login vsi performance tests for your virtualized desktop environment edit action

  • Hit OK and manually kick off the task to see if everything works!

Conclusion

As you can see, it’s pretty straightforward to automatically schedule a Login VSI test with this Powershell script. Just configure it once and you’re good to go. Enjoy your weekend while Login VSI is automatically simulating thousands of virtual users for you. To your VSImax!

 


 

Start using Login VSI today

Our industry-standard software is built to help you avoid problems, lower costs and improve performance. Request a Quote or get your free Trial below, and benefit from our award-winning services.

Free Price Request  Your Free Trial

 


About the company Login VSI

The company Login VSI provides end-user performance insights for virtualized desktop and server-based computing environments. Enterprise IT departments use flagship product Login VSI (for load testing) and Login PI (for continuity testing) in all phases of their virtual desktop deployment—from planning to deployment to change management—to build and safeguard a good performance, a high availability, and (as a result) a good and consistent end-user experience. For more information about Login VSI or for a free test license contact us.

Tags: How-to, Login VSI, Load Testing, Support, Scripts

Popular Blogs

Login VSI Blog - Ongoing Effects CPU Flaws

The Ongoing Effects of Intel CPU Flaws

The Ongoing Effects of Intel CPU Flaws Over the last year, we’ve seen many Intel CPU hardware flaws come to light and when news first broke about Meltdown & Spectre there was a lot of panic: "should we patch?", "What’s the performance impact?", "Can we still rely on this hardware?" Continue Reading
Login VSI Blog - How-To Update, Protect Against RIDL, Fallout MDS Vulnerability

How-To: Update, Protect Against RIDL, Fallout MDS Vulnerability

RIDL & Fallout MDS vulnerabilities, impact on VDI performance & actions to take. FAQs we’re receiving & updates on performance tests executed to patch flaws Intel calls “Microarchitectural Data Sampling (M.D.S.)” aka: Rogue In-Flight Data Load (RIDL), Fallout, ZombieLoad & Store-to-Leak Forwarding. Continue Reading
Login AT Express offers Application Compatibility Testing for up to 50 applications for FREE

[Press Release] Login VSI introduces free license for award winning solution, Login AT

Login AT Express offers Application Compatibility Testing for up to 50 applications for FREE Atlanta, USA, May 22, 2019: Login VSI, the industry standard for VDI and SBC performance testing, announced today the availability of a new, free version of Login AT for Bulk Application Compatibility Testing. Continue Reading
Login VSI Blog - Updating to Windows 10 1903? Make Sure to Test!

Updating to Windows 10 1903? Make Sure to Test!

Updating to Windows 10 1903? Make Sure to Test! It’s that time of the year again. Microsoft have released their spring update and the first IT-Pro’s are getting ready to move their VDI environment over. Continue Reading
Login VSI - Blog - Login VSI Help Center Blog Teaser Image - Improvements & Update Notifications

Login VSI Help Center – Improvements & Update Notifications

Login VSI announced the release of the Knowledge Center in June of 2017. Since then the utilization of the platform has evolved dramatically. In this blogpost we introduce a few of these improvements and updates. Continue Reading
Login VSI Blog - LVTE 2109 - Technology Advocates & Experts

Login VSI Technology Advocates and Experts 2019

About a year ago Login VSI, the industry standard in VDI performance testing, announced a new program Recognizing those individuals that have built and displayed extensive knowledge of the Login VSI software solutions, and visibly contribute to the End-User Computing (EUC) Community. Continue Reading
Cookie Settings