testing new script
This commit is contained in:
@@ -76,7 +76,6 @@ ForEach ($computer in $ComputerName)
|
|||||||
Continue
|
Continue
|
||||||
}
|
}
|
||||||
|
|
||||||
If ($PSCmdlet.ShouldProcess($account)) {
|
|
||||||
Try {
|
Try {
|
||||||
$profile.Delete()
|
$profile.Delete()
|
||||||
Write-Host "Profile deleted successfully" -ForegroundColor Green
|
Write-Host "Profile deleted successfully" -ForegroundColor Green
|
||||||
@@ -85,7 +84,6 @@ ForEach ($computer in $ComputerName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
If($profilesFound -eq 0){
|
If($profilesFound -eq 0){
|
||||||
Write-Warning "No profiles found on $ComputerName with Name $UserName"
|
Write-Warning "No profiles found on $ComputerName with Name $UserName"
|
||||||
|
|||||||
Reference in New Issue
Block a user