Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # return information about the current Windows / Citrix session in an object.
- function SessionInfo
- {
- $result = New-Object System.Object
- # collect Computer Information
- $result | Add-Member -MemberType NoteProperty -Name "ComputerName" -Value $env:COMPUTERNAME
- # collect Citrix Information
- $registry = (Get-ItemProperty -Path HKLM:\SOFTWARE\Citrix\ICA\Session -ErrorAction SilentlyContinue )
- $result | Add-Member -MemberType NoteProperty -Name "ClientName" -Value $registry.ClientName
- $result | Add-Member -MemberType NoteProperty -Name "ClientAddress" -Value $registry.ClientAddress
- $result | Add-Member -MemberType NoteProperty -Name "PublishedName" -Value $registry.PublishedName
- return $result
- }
- SessionInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement