对应用程序部署types使用SCCM powershell脚本检测时,是否可以使脚本/模糊不清以致SCCM控制台用户无法读取?
我正在尝试解决SCCM控制台用户过多的问题,他们可以查看应用程序检测规则/值,然后窃取他们的工作站以避免强制部署。
这可以使用-EncodedCommand参数完成。 您将脚本导出到base64编码文件,然后调用另一个powershell exe来运行它。 这是一个非常基本的例子:
$string = 'If (Get-Process) {$true}' $encodedcommand = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($string)) $encodedcommand | Out-File c:\temp\Encoded.txt $encodedcommand = Get-Content c:\temp\Encoded.txt powershell.exe -EncodedCommand $encodedcommand
检测脚本将是最后两行。 参考: PowerTip:编码string并执行PowerShell