/
githubmirror
/
sssd
Обзор
Документация
Войти
/
githubmirror
/
sssd
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/tests/multihost/ipa/remove-users.ps1
20 строк
452 B
Steeve Goveas
Add ipa test code
13 ноя 2020, 13:19
13 ноя 2020, 13:19
3c06709
Код
Авторство
О чём код?
#Add the Active Directory module Import-Module ActiveDirectory #set default password $defpassword = (ConvertTo-SecureString "pass@word1" -AsPlainText -force) $users = Import-Csv .\users.csv foreach ($user in $users) { try { Write-Output "We are removing $($user.SamAccountName)" Remove-ADUser -Identity -Confirm:$false $user.SamAccountName } catch [System.Object] { Write-Output "Could not delete users $($user.SamAccountName), $_" } }