Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $citrixsession = New-PSSession ServerName -Credential $ADMSCredential
- Invoke-Command -Session $citrixsession -ScriptBlock { add-pssnapin Citrix.XenApp.Commands }
- $Job = Invoke-Command -Session $citrixsession -ScriptBlock { Get-XASession -account "domain\$($args[0])" -full | Select-Object -Property SessionID,ServerName,AccountName,State } -argumentlist $global:UInit -AsJob
- Wait-Job $Job -Timeout 5 | Out-Null
- If ($Job.State -eq "completed") {
- }
- Else {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement