Quantcast
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Check Logon Server for Client

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

Image may be NSFW.
Clik here to view.
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?

Image may be NSFW.
Clik here to view.
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"}

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>