Upload files to "AD Scripts"
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
#Import-Module ActiveDirectory
|
||||||
|
$users = Get-ADUser -Filter 'enabled -eq $true' -Properties ProfilePath, HomeDirectory, HomeDrive | Select-Object -ExpandProperty Name
|
||||||
|
foreach($user in $users) {
|
||||||
|
SET-ADUSER -Identity $user.SamAccountName -clear homeDirectory,homeDrive
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user