Checking a valid user name of an account in Windows 7
hi
when creating account in windows 7, how check if user typed valid user name , if name exists on local computer?
thanks
bye
balubeto
this started:
$user = "user" $computer = "computer" $colusers = ([adsi]("winnt://$c,computer")).children | ? {$_.psbase.schemaclassname -eq "user"} | select -expand name if ($colusers -contains $user) { "$($user) exists" }
Windows Server > Windows PowerShell
Comments
Post a Comment