Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Use Command Line to Query a User's Workstation Logon Restrictions (Log On To...)

$
0
0

Hi,

I'd like to write a simple batch file that will allow me to input a specific user ID which returns the computer name it is restricted to (as set in the "Log On To..." settings in Active Directory). I should mention at this stage that all our users are restricted to one single computer each.

For example, I know that the user "Barbara" is restricted to only be able to log on to "Computer1". What would I need to enter into command prompt to be able to get the result: Computer1 ?

BONUS: This goes out of the scope of my question, but how could I then use the result (e.g. Computer1) as a parameter in a new line in my batch file?

Thank you!


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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