Skip to content

Commit 3c92de1

Browse files
author
root
committed
export_user_login_using_csvde.md v1 added
1 parent ba1d6ed commit 3c92de1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Export users logins residing in an OU and outputs to .csv file using csvde
2+
3+
4+
'''
5+
#Define the OU we're looking in (-d) and output to file (-f)
6+
csvde -d "ou=Finance,ou=users,ou=Kingston,dc=meridian,dc=local" -f .\users.csv
7+
8+
#Import the previous .csv file, select the UserPrincipalName and export to a new .csv file. -NoTypeInformation is included for backwards compatibility
9+
Import-Csv .\users.csv | select UserPrincipalName | Export-Csv -Path .\output.csv –NoTypeInformation
10+
11+
#Simple "press any key to continue" prompt
12+
Write-Host "Press any key to continue ..."
13+
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
14+
'''

0 commit comments

Comments
 (0)