在Windows 10上使用Azure Active Directory身份验证时,PowerShell会引发``访问被拒绝''异常

时间:2020-06-06 17:25:04

标签: powershell windows-10 azure-active-directory

我有多个Windows 10系统加入了我的Azure Active Directory(AzureAD)租户。我正在尝试使用PowerShell func checkPicture() { if ext == "ee" { // chestnut } else if ago == "aa" { // black } else { // bay } } 命令从其中远程查询一些数据。当我尝试对远程系统进行身份验证时,即使我正在使用适当的凭据,也只会收到“访问被拒绝”消息。

Get-WmiObject

问题:如何使用PowerShell中的Azure Active Directory用户帐户对远程系统进行正确的身份验证?

1 个答案:

答案 0 :(得分:0)

远程系统是否已经准备好进行PS远程处理?

在远程计算机上尝试此操作,以确保正确设置WinRM:

Enable-PSRemoting -Force

关于远程故障排除:

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_troubleshooting?view=powershell-7

关于远程要求:

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_requirements?view=powershell-7

相关问题