下面的PowerShell脚本在我在一台机器上手动运行时可以正常运行,但是在使用Intune部署时无法运行。它只是显示一个错误。
我已使用带有以下设置的Intune部署了此脚本- (1)使用登录的凭据运行此脚本:否。 (2) 强制执行脚本签名检查:否。 (3) 在64位PowerShell主机中运行脚本:否
通过以管理员身份启动CMD在Windows 10计算机中测试了脚本,它可以正常工作。创建本地帐户(如果不存在),如果存在,则更改密码。
foo
在Intune注册的Windows 10计算机中,我找不到任何事件日志(在DeviceManagement-Enterprise-Diagnostics-Provider下)或MDMDiagnostics日志下的错误。
dic = {
"br": "red",
"comp": "green"
}
fig, axs = plt.subplots(nrows = 4, ncols = 2, sharex = True, sharey = True, figsize = (20,20))
axs = axs.flatten()
for j in range(5):
axs[j].scatter([i[2] for i in devs[j]], [i[4] for i in devs[j]], c = [dic[str(i[3])] for i in devs[j]])
plt.show()