Skip to content

Commit

Permalink
Added Proxy for Rendezvous and user logon time
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Mohrmann authored and Dennis Mohrmann committed Jun 19, 2023
1 parent 69405c5 commit 9d21ccd
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
20 changes: 19 additions & 1 deletion BGInfo/BGInfo-Taskbar.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# *******************************************************************************************************
# D. Mohrmann, S&L Firmengruppe, Twitter: @mohrpheus78
# BGInfo powered by Powershell

# 05/12/19 DM Initial release
# 06/12/19 DM Added FSLogix
# 09/12/19 DM Added deviceTRUST
Expand All @@ -14,9 +15,11 @@
# 09/11/20 DM Added Regkeys for IP and DNS (Standard method didn't work wirh Citrix Hypervisor)
# 18/12/20 DM Added GPU Infos and Citrix Rendezvous protocol
# 08/03/21 DM Fixed FriendlyName to FileSystemLabel
# 06/19/23 DM Added Proxy for Rendezvous and user logon time
# *******************************************************************************************************



<#
.SYNOPSIS
Shows information about the user Citrix environment as BGInfo taskbar icon
Expand All @@ -38,6 +41,7 @@ Edit the $BGInfoDir (Directory with BGInfo.exe) and $BGInfoFile (BGI file to loa
#>



# *******************
# Scripts starts here
# *******************
Expand Down Expand Up @@ -68,6 +72,10 @@ New-ItemProperty -Path $RegistryPath -Name "DNSServer" -Value $DNSServer -Force
$CitrixSessionID = Get-ChildItem -Path "HKCU:\Volatile Environment" -Name
New-ItemProperty -Path $RegistryPath -Name "SessionID" -Value $CitrixSessionID -Force

# Logon time
$UserLogonTime = (Get-EventLog -LogName 'Application' -Source 'Citrix Desktop Service' -Newest 1 | Where EventID -EQ 1027).TimeWritten
New-ItemProperty -Path $RegistryPath -Name "LogonTime" -Value $UserLogonTime -Force

# Citrix Clientname
$CitrixClientName = Get-WmiObject -Namespace root\citrix\hdx -Class Citrix_Client_Enum | Where-Object {$_.SessionID -eq $CitrixSessionID} | Select-Object -ExpandProperty Name
New-ItemProperty -Path $RegistryPath -Name "Clientname" -Value $CitrixClientName -Force
Expand Down Expand Up @@ -130,6 +138,16 @@ New-ItemProperty -Path $RegistryPath -Name "MTU Size" -Value $MTUSize -Force
$Rendezvous = ((ctxsession -v | findstr "Rendezvous") | Select-Object -Last 1).split(":")[1].trimstart()
New-ItemProperty -Path $RegistryPath -Name "Rendezvous" -Value $Rendezvous -Force

# Proxy
$Proxytransport = ((ctxsession -v | findstr "Transport") | Select-Object -Last 1).split(":")[1].trimstart()
if ($Proxytransport -like "*PROXY*") {
$Proxy = "YES"
}
else {
$Proxy ="No"
}
New-ItemProperty -Path $RegistryPath -Name "Proxy" -Value $Proxy -Force

# WEM Version
$WEM = (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "*Citrix Workspace Environment*"}).DisplayVersion | Select-Object -First 1
New-ItemProperty -Path $RegistryPath -Name "WEM Version" -Value $WEM -Force
Expand Down Expand Up @@ -201,7 +219,7 @@ New-ItemProperty -Path $RegistryPath -Name "FSL Version" -Value $FSLVersion -For
# ************************

# GPU
$GPU = ((Get-WmiObject win32_videocontroller) | Where-Object {$_.Name -notlike "Citrix*"}).Name
$GPU = (Get-WmiObject win32_videocontroller).Name
New-ItemProperty -Path $RegistryPath -Name "GPU" -Value $GPU -Force

# Hardware Encoder
Expand Down
20 changes: 18 additions & 2 deletions BGInfo/BGInfo-User.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
# 09/12/19 DM Added deviceTRUST
# 11/12/19 DM Initial public release
# 11/12/19 DM Changed method to get session id
# 18/06/20 DM Added MTU Size, WEM and VDA Agent version
# 18/06/20 DM Added MTU Size, WEM and VDA Agent version
# 26/06/20 DM Added FSLogix Version
# 26/06/20 DM Changed BGInfo process handling
# 20/10/20 DM Added percent for FSL
# 21/10/20 DM Added WEM Cache date
# 09/11/20 DM Added Regkeys for IP and DNS (Standard method didn't work wirh Citrix Hypervisor)
# 09/11/20 DM Added Regkeys for IP and DNS (Standard method didn't work wirh Citrix Hypervisor)
# 06/19/23 DM Added Proxy for Rendezvous and user logon time
# *******************************************************************************************************

<#
Expand Down Expand Up @@ -62,6 +63,10 @@ New-ItemProperty -Path $RegistryPath -Name "DNSServer" -Value $DNSServer -Force
$CitrixSessionID = Get-ChildItem -Path "HKCU:\Volatile Environment" -Name
New-ItemProperty -Path $RegistryPath -Name "SessionID" -Value $CitrixSessionID -Force

# Logon time
$UserLogonTime = (Get-EventLog -LogName 'Application' -Source 'Citrix Desktop Service' -Newest 1 | Where EventID -EQ 1027).TimeWritten
New-ItemProperty -Path $RegistryPath -Name "LogonTime" -Value $UserLogonTime -Force

# Citrix Clientname
$CitrixClientName = Get-WmiObject -Namespace root\citrix\hdx -Class Citrix_Client_Enum | Where-Object {$_.SessionID -eq $CitrixSessionID} | Select-Object -ExpandProperty Name
New-ItemProperty -Path $RegistryPath -Name "Clientname" -Value $CitrixClientName -Force
Expand All @@ -86,6 +91,17 @@ New-ItemProperty -Path $RegistryPath -Name "MTU Size" -Value $MTUSize -Force
$Rendezvous = ((ctxsession -v | findstr "Rendezvous") | Select-Object -Last 1).split(":")[1].trimstart()
New-ItemProperty -Path $RegistryPath -Name "Rendezvous" -Value $Rendezvous -Force

# Proxy
$Proxytransport = ((ctxsession -v | findstr "Transport") | Select-Object -Last 1).split(":")[1].trimstart()
if ($Proxytransport -like "*PROXY*") {
$Proxy = "YES"
}
else {
$Proxy ="No"
}
New-ItemProperty -Path $RegistryPath -Name "Proxy" -Value $Proxy -Force



# BGInfo #
# Start BGInfo
Expand Down
15 changes: 15 additions & 0 deletions BGInfo/BGInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# 09/11/20 DM Added Regkeys for IP and DNS (Standard method didn't work wirh Citrix Hypervisor)
# 18/12/20 DM Added GPU Infos and Citrix Rendezvous protocol
# 08/03/21 DM Fixed FriendlyName to FileSystemLabel
# 06/19/23 DM Added Proxy for Rendezvous and user logon time
# *******************************************************************************************************


Expand Down Expand Up @@ -67,6 +68,10 @@ New-ItemProperty -Path $RegistryPath -Name "DNSServer" -Value $DNSServer -Force
$CitrixSessionID = Get-ChildItem -Path "HKCU:\Volatile Environment" -Name
New-ItemProperty -Path $RegistryPath -Name "SessionID" -Value $CitrixSessionID -Force

# Logon time
$UserLogonTime = (Get-EventLog -LogName 'Application' -Source 'Citrix Desktop Service' -Newest 1 | Where EventID -EQ 1027).TimeWritten
New-ItemProperty -Path $RegistryPath -Name "LogonTime" -Value $UserLogonTime -Force

# Citrix Clientname
$CitrixClientName = Get-WmiObject -Namespace root\citrix\hdx -Class Citrix_Client_Enum | Where-Object {$_.SessionID -eq $CitrixSessionID} | Select-Object -ExpandProperty Name
New-ItemProperty -Path $RegistryPath -Name "Clientname" -Value $CitrixClientName -Force
Expand Down Expand Up @@ -129,6 +134,16 @@ New-ItemProperty -Path $RegistryPath -Name "MTU Size" -Value $MTUSize -Force
$Rendezvous = ((ctxsession -v | findstr "Rendezvous") | Select-Object -Last 1).split(":")[1].trimstart()
New-ItemProperty -Path $RegistryPath -Name "Rendezvous" -Value $Rendezvous -Force

# Proxy
$Proxytransport = ((ctxsession -v | findstr "Transport") | Select-Object -Last 1).split(":")[1].trimstart()
if ($Proxytransport -like "*PROXY*") {
$Proxy = "YES"
}
else {
$Proxy ="No"
}
New-ItemProperty -Path $RegistryPath -Name "Proxy" -Value $Proxy -Force

# WEM Version
$WEM = (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "*Citrix Workspace Environment*"}).DisplayVersion | Select-Object -First 1
New-ItemProperty -Path $RegistryPath -Name "WEM Version" -Value $WEM -Force
Expand Down
Binary file modified BGInfo/Citrix.bgi
Binary file not shown.
Binary file modified BGInfo/User.bgi
Binary file not shown.

0 comments on commit 9d21ccd

Please sign in to comment.