0
点赞
收藏
分享

微信扫一扫

PVS池桌面配置Session Recording

Session Recording 提供了灵活的策略以自动触发应用程序和桌面会话的录制,还支持动态会话录制。Session Recording 允许 IT 人员监视和检查用户活动,从而支持内部控制来实现法规遵从性和安全监视。

在PVS池桌面中,所有的VM会从模板拿到相同的QMId,导致会话录制无法成功问题,需要用脚本在每次开机时自动修改本机QMId,

步骤如下:

  1. 运行PowerShell命令,允许PS脚本运行

Set-ExecutionPolicyRemoteSigned

  1. 创建一个Windows的计划任务,使用SYSTEM权限,选择正确的OS版本

PVS池桌面配置Session Recording_microsoft

  1. Triggers方式选择At startup

PVS池桌面配置Session Recording_shell命令_02

4.Action 选择Start a program,详情写 powershell.exe -file C:\GenRandomQMID.ps1,脚本的路径根据实际情况填写

PVS池桌面配置Session Recording_shell命令_03

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发送变化 图片

PVS池桌面配置Session Recording_shell命令_04

举报

相关推荐

0 条评论