$path = "c:\temp\LDIF$(get-date -Format yyyyMMdd).txt"
New-Item -Path $path -ItemType File -Force
Add-Content -Value "version: 1" -Path $path
100..600 | Foreach {
$value = @"
dn: cn=PSFTTest$_,ou=users,o=OSUMC
changetype: add
userPassword: P@ssw0rd
uid: PSFTTest$_
givenName: First$_
fullName: First$_ Last$_
sn: Last$_
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: Person
objectClass: Top
cn: PSFTTest$_
"@
Add-Content -Value $value -Path $path
}
Enjoy!
No comments:
Post a Comment