Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $OS = Get-CimInstance -ClassName Win32_OperatingSystem
- ## Find the "The Citrix Desktop Service successfully registered with delivery controller ..." event
- if( $OS -and ( $registered = Get-WinEvent -Oldest -FilterHashtable @{ 'ProviderName' = 'Citrix Desktop Service' ; id = 1012 ; starttime = $OS.LastBootUpTime} -ErrorAction SilentlyContinue | Select-Object -First 1 ) )
- {
- New-TimeSpan -Start $OS.LastBootUpTime -End $registered.TimeCreated
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement