Check whether a user account is enabled or not using a
simple query in PowerShell.
Query a computer account using PowerShell whether the
computer account is disabled or enabled.
The user or computer will not be able to access services on an
Active Directory environment if those objects are disabled.
Here's the simple code snippet:
======================
Get-ADComputer "Computer_Name" | Select-Object
"Enabled", "Name" |
ft -AutoSize
Get-ADUser "AD_User_Account" | Select-Object
"Enabled", "GivenName" | ft -AutoSize
Replace Computer_Name with the actual computer name and also
the AD_User_Account.
Sample Output:
Enabled Name
------- ----
True Computer007
Enabled GivenName
------- ---------
True James007
Cheers!!!
Hope it helps!!!
================================
Free Android App with No Ads.
Heaven's Dew Fall
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Android Catholic Rosary App - Guide
================================
Free Android App with No Ads.
Heaven's Dew Fall
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Android Catholic Rosary App - Guide
Comments
Post a Comment