通过遵循这些步骤,我创建了带有PSD扩展的MDT环境。
运行powershell脚本(配置)有一个默认步骤。
我复制了它并创建了Configure1。
并在DeploymentShare脚本文件夹中创建了一个脚本。
刚将下面的内容添加到我创建的powershell脚本中。
#PSDConfigure1.ps1
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
但似乎上述内容并没有应用于机器后的任务序列。
请建议如何执行powershell脚本。
发布于 2021-11-20 00:42:34
可能是因为执行策略。
试试这个:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Noninteractive -Executionpolicy bypass -Noprofile -File {pathToFile.ps1}
https://serverfault.com/questions/1084072
复制相似问题