Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Check Logon Server for Client

$
0
0

Summary: Use Windows PowerShell to check the logon server of your clients.

Hey, Scripting Guy! Question How can I use Windows PowerShell to verify if my users are trying to sign in to their computers with a Windows account 
           instead of using their domain credentials?

Hey, Scripting Guy! Answer Check the value of the environmental LOGONSERVER variable:

$env:LOGONSERVER

If it reports \\MicrosoftAccount, they are using their Windows account to sign in instead of domain credentials.
You can check this by using the IF statement as shown here:

if($env:LOGONSERVER -match "MicrosoftAccount") {"Logged on with Windows account"}


Viewing all articles
Browse latest Browse all 3333

Trending Articles