really fix the disable computer command
This commit is contained in:
parent
ac5fac0b1c
commit
16ab068b68
|
@ -15,7 +15,7 @@ function Disable-Computer
|
|||
$date = Get-Date -format "yyyy-MM-dd"
|
||||
Get-ADComputer -Identity $samAccountName | Disable-ADAccount
|
||||
Set-ADComputer -Identity $samAccountName `
|
||||
-Description 'disabled by' $(whoami) $date
|
||||
-Description "disabled by $(whoami) $date"
|
||||
Write-Host
|
||||
Write-Host $samAccountName ' has been disabled' -backgroundcolor green
|
||||
Write-Host
|
||||
|
|
Reference in New Issue