【问题标题】:PowerShell throws "access is denied" exception when using Azure Active Directory authentication to Windows 10PowerShell 在对 Windows 10 使用 Azure Active Directory 身份验证时引发“访问被拒绝”异常
【发布时间】:2020-09-25 20:14:16
【问题描述】:

我有多个 Windows 10 系统加入了我的 Azure Active Directory (AzureAD) 租户。我正在尝试使用 PowerShell Get-WmiObject 命令远程查询其中的一些数据。当我尝试对远程系统进行身份验证时,我只会收到“拒绝访问”消息,即使我使用了适当的凭据。

Get-WmiObject -ComputerName remotepc -Credential azuread\adminuser -Class Win32_BIOS

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

【问题讨论】:

  • 我不熟悉 azure 但有 az login 命令吗?
  • 什么是“适当的凭据?”是您用来加入机器以进行 azure 广告的同一用户吗?
  • @alphaz18 是的,我用来加入系统的同一个用户,和我用来本地登录系统的同一个用户。

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


【解决方案1】:

远程系统是否已经准备好进行 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

【讨论】:

猜你喜欢
  • 2018-08-18
  • 1970-01-01
  • 2018-06-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-12-15
  • 1970-01-01
相关资源
最近更新 更多