Powershell权限和执行策略
在closures之前,请注意它不是一个代码问题,而是一个环境,特权和政策问题,我们如何在整个环境中实现这一点。 我们正在定期创buildVHD,服务器和客户端,很大一部分这个脚本是使用下面的batch file从一个提升的pipe理命令提示符下运行的。 该脚本不是一个问题,因为它在多个Win 8.1 Pro和Server计算机上运行良好。 对于Win 8.1机器和一些不工作的服务器。 我想弄清楚为什么并将环境设置,策略应用于所有机器。 最好是一种自动化的方式,或者如果没有select手动的话 它触发的错误消息: New-VHD : The term 'New-VHD' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At E:\VHD\VhdCreateFormat\VhdCreateFormat.ps1:4 char:1 […]