Tech Notes
Friday, September 28, 2012
PowerShell - get users from OU
$ulist=get-aduser -filter * -SearchBase "ou=?,dc=?,dc=?"
foreach ($user in $ulist)
{
$user.samaccountname
add-content -path c:\temp\?.csv $user.samaccountname
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment