Session Recording 提供了靈活的策略以自動觸發應用程式和桌面會話的錄製,還支援動態會話錄製。Session Recording 允許 IT 人員監視和檢查使用者活動,從而支持內部控制來實現法規遵從性和安全監視。
在 PVS 池桌面中,所有的 VM 會從範本拿到相同的 QMId,導致會話錄製無法成功問題,需要用腳本在每次開機時自動修改本機 QMId,步驟如下:
1. 運行 PowerShell 命令,允許 PS 腳本運行
Set-ExecutionPolicyRemoteSigned
2. 創建一個Windows的計畫任務,使用SYSTEM許可權,選擇正確的OS版本
3. Triggers 方式選擇 At startup
4. Action 選擇 Start a program,詳情寫 powershell.exe -file
C:\GenRandomQMID.ps1,腳本的路徑根據實際情況填寫
5. 腳本內容如下
# Remove old QMId from registry and set SysPrepflag for MSMQ
Remove-Itemproperty -PathHKLM:Software\Microsoft\MSMQ\Parameters\MachineCache -Name QMId -Force
Set-ItemProperty -PathHKLM:Software\Microsoft\MSMQ\Parameters -Name “SysPrep” -Type DWord-Value
1# Get dependent services$depServices = Get-Service -name MSMQ-dependentservices | Select -Property Name
# Restart MSMQ to get a new QMId
Restart-Service -force MSMQ
# Start dependent services
if ($depServices -ne $null) {
foreach ($depService in$depServices) {
$startMode =Get-WmiObject win32_service -filter “NAME = ‘$($depService.Name)'” |Select -Property StartMode
if ($startMode.StartMode-eq “Auto”) {
Start-Service $depService.Name
}
}
}
6. 單獨運行腳本效果
7. QMID發送變化
https://discover-thefutureofwork-tw.cloud/2022/07/21/citrix-pvs-session-recording/
返回