An age-old server administration best practice is to make sure that everyone who is administering servers on your network are doing it with their own “admin” credentials.
Up until this point, I’ve done all my remote Azure sessions (PS-Session) with the built-in administrator account. This works fine if you are only person connecting remotely to a server. But what if you want to grant others administrative rights to your machine and they would also like to connect remotely?
Your first step would likely be to add them to the local administrators group. Since you’ve already turned on the “remote management” feature for yourself, you might expect this to work out of the box.
But you probably overlooked this little note in the “Configure Remote Management” box when you enabled remote management – “Local Administrator accounts other than the built-in admin may not have rights to manage this computer remotely, even if remote management is enabled.”
That would be your hint that some other force might be at work here. Turns out that UAC is configured to filter out everyone except the built-in administrator for remote tasks.
A review of this TechNet information gives a little more detail:
“Local administrator accounts other than the built-in Administrator account may not have rights to manage a server remotely, even if remote management is enabled. The Remote User Account Control (UAC) LocalAccountTokenFilterPolicy registry setting must be configured to allow local accounts of the Administrators group other than the built-in administrator account to remotely manage the server.”
To open up UAC to include everyone in your local Admins group for remote access, you’ll need to make some registry changes.
- Click Start, type regedit in the Start Search box, and then click regedit.exe in the Programs list.
- Locate and then click the following registry subkey:
- On the Edit menu, point to New, and then click DWORD Value.
- Type LocalAccountTokenFilterPolicy for the name of the DWORD, and then press ENTER.
- Right-click LocalAccountTokenFilterPolicy, and then click Modify.
- In the Value data box, type 1, and then click OK.
- Exit Registry Editor.
Now you will be able to remotely connect and administer your server using PowerShell with any account you’ve give Admin rights too for that particular server. This would hold true for servers in Azure, as well as servers on your local network.
Special shout out to Bret Stateham for bringing this “remote admin road-bump” to my attention. Sometimes what looks like an “Azure” problem, is really a “Server” feature. 🙂