Powershell: Difference between revisions
From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
== List local users == | |||
Get-LocalUser | |||
Name Enabled Description | |||
---- ------- ----------- | |||
Administrator True Built-in account for administering the computer/domain | |||
arcgis True ArcGIS Data Store | |||
DefaultAccount False A user account managed by the system. | |||
Guest False Built-in account for guest access to the computer/domain | |||
sshd True | |||
WDAGUtilityAccount False A user account managed and used by the system for Windows Defender Application Guard scen... | |||
== Test a login == | == Test a login == | ||
Grabbed from https://serverfault.com/questions/410240/is-there-a-windows-command-line-utility-to-verify-user-credentials | Grabbed from https://serverfault.com/questions/410240/is-there-a-windows-command-line-utility-to-verify-user-credentials |
Revision as of 17:48, 17 June 2022
List local users
Get-LocalUser Name Enabled Description ---- ------- ----------- Administrator True Built-in account for administering the computer/domain arcgis True ArcGIS Data Store DefaultAccount False A user account managed by the system. Guest False Built-in account for guest access to the computer/domain sshd True WDAGUtilityAccount False A user account managed and used by the system for Windows Defender Application Guard scen...
Test a login
Grabbed from https://serverfault.com/questions/410240/is-there-a-windows-command-line-utility-to-verify-user-credentials
Create a function in PS
Function Test-ADAuthentication { param($username,$password) (new-object directoryservices.directoryentry "",$username,$password).psbase.name -ne $null }
Apply it
Test-AdAuthentication "MYDOMAIN\brian" "password123" True