0
votes

I have several Windows 10 systems joined to my Azure Active Directory (AzureAD) tenant. I am trying to use the PowerShell Get-WmiObject command to remotely query some data from them. When I try to authenticate to the remote systems, I simply get an "Access is Denied" message, even though I'm using the appropriate credentials.

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

Question: How can I properly authenticate to the remote systems, using my Azure Active Directory user account from PowerShell?

1
I'm not familiar with azure but is there an az login command? - Nico Nekoru
what is "appropriate credentials?" is that the same user you used to join the machine to azure ad? - alphaz18
@alphaz18 Yes, same user that I used to join the system, and same user that I use to login to the system locally. - Trevor Sullivan

1 Answers

0
votes

Is the remote system already prepared for PS remoting?

Try this on the remote machine to ensure that WinRM is set up correctly:

Enable-PSRemoting -Force

About Remote Troubleshooting:

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

About Remote Requirements:

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