locked
Powershell Remoting with pure AzureAD joined machine RRS feed

  • Question

  • Hi, I've looked high and low with no answer to the following - hoping someone can help.

    I want to be able to Enter-PSSession to a Windows 10 Pro machine on the same local network using Azure AD credentials (with Azure Administrator privileges). Both machines are Windows 10 Pro and both machines are Azure AD joined. They are both pure Azure AD - no AD Connect to an on-premises AD.

    Enter-PSSession -ComputerName "192.168.230.134" -Credential $cred
     

    I can enter a PSSession normally when the $cred is set to a local administrator account on the remote machine, however receive an error when $cred is set to AzureAD account

    (AzureAD\user@domain.onmicrosoft.com)

    I have tried adding the AzureAD account to the local Administrators Group (net localgroup administrators AzureAD\user@domain.onmicrosoft.com /add) but it still does not work.

    Error message is:

    Enter-PSSession : Connecting to remote server 192.168.230.134 failed with the following error message : Access isdenied. For more information, see the about_Remote_Troubleshooting Help topic.At line:1 char:1+ Enter-PSSession -ComputerName "192.168.230.134" -Credential $cred+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : InvalidArgument: (192.168.230.134:String) [Enter-PSSession], PSRemotingTransportExceptio   n    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

    Is it possible?

    Thanks to anyone who replies.


    • Moved by Bill_Stewart Monday, March 12, 2018 9:27 PM Off-topic
    Tuesday, February 6, 2018 7:26 PM

All replies

  • You must use an account that is part of the local administrators group.  Place the Azure account in the local admins group.

    You may also have issues when forwarding credentials through remoting.  Post in Azure PowerShell forum for assistance with setting up Azure and the local system for correct access to Azure authentication.


    \_(ツ)_/

    Tuesday, February 6, 2018 7:56 PM