Tuesday, March 11, 2014

Citrix and Powershell Remoting

Created a script to run Citrix Powershell command remotely from any windows machine with Powershell installed

Code:-
----------------------------------------------------------

MODE CON: COLS=300 LINES=100

$s = New-PSSession -ComputerName CTXSERVER

Invoke-Command -Session $s -ScriptBlock {Add-PSSnapin citrix* -ErrorAction silentlycontinue; Get-XAApplicationReport *} | Format-Table -AutoSize | Out-File .\xenappreport.txt

Remove-PSSession -Session $s
--------------------------------------------------------------

No comments:

Post a Comment