# Specify target OU. This is where users will be moved.
$TargetOU = "OU=Districts,OU=IT,DC=enterprise,DC=com"
# Specify CSV path. Import CSV file and assign it to a variable.
$Imported_csv = Import-Csv -Path "C:\temp\MoveList.csv"
$Imported_csv | ForEach-Object {
# Retrieve DN of user.
$UserDN = (Get-ADUser -Identity $_.Name).distinguishedName
# Move user to target OU.
Move-ADObject -Identity $UserDN -TargetPath $TargetOU
}
Moving users to OU - powershell
Apt error Could not get lock /var/lib/apt/lists/lock
sudo fuser -vik -TERM /var/lib/apt/lists/lock
Mais vistos
-
A few cmds to help with the DFS troubleshooting aspects, keep in mind all should be run from an elevated PowerShell Dfsdiag /TestDCs D...
-
Java Keytool Command These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. A...
-
Find Users Who Have Never Logged On Use the following PowerShell Command; Get-ADUser -Filter { LastLogonDate -notlike "*" -and En...