Note: the PowerShell script referenced herein is not officially supported. However, it's being provided as-is for convenience. Make sure utilizing this script will comply with internal security policy before use.
Summary
If launchers or target sessions are affected by a policy which will logout a user or disconnect a session after a certain amount of time, the test might not successfully complete. For launchers, if the session loses interactivity, new target sessions will stop being connected to. For targets, if the session loses interactivity, the virtual user will stop performing actions and results data won't get uploaded to the Login VSI share.
Steps
- Download the attached script and adjust the variables if need be
- Implement a "one-liner" batch (.cmd) script to automatically run, which will run the "prevent idling" script, on the affected component(s) (launcher(s) or targets). The easiest way to do this would be by utilizing the Windows startup directory
-
The "one-liner" script in the Windows startup directory would look like:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -WindowStyle Minimized -ExecutionPolicy Bypass -File ""<path to the no idle script>""' -Verb RunAs}"
Note the double double quotes.
-
Script breakdown - contents:
param($minutes = 600)
$myshell = New-Object -com "Wscript.Shell"
for ($i = 0; $i -lt $minutes; $i++) {
Start-Sleep -Seconds 60
$myshell.sendkeys("{f15}")
}
Set $minutes to how long the PowerShell script can potentially run. This won't affect Login VSI logging users off at ends of tests
Set Start-Sleep -Seconds to how often the $myshell.sendkeys value should be "pressed"
Properties
See also
Disconnected Sessions - Login VSI Support Perspective
Comments
0 comments
Article is closed for comments.