Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # AD Manager
- #
- $VERSION = "1.0"
- # Module Active Directory
- #Import-Module ActiveDirectory
- $SERVER = "ad"
- Function Show-ADMenu()
- {
- Clear-Host
- Write-Output("","AD Manager V$VERSION","")
- Write-Output("[1] - Gestion des utilisateurs")
- Write-Output("[2] - Gestion des unités d'organisation")
- Write-Output("[0] - Quitter","")
- $choice = Read-Host "AD Manager"
- switch($choice)
- {
- 0 { }
- 1 { Set-ADCreateUsers }
- 2 { Set-ADCreateOU }
- }
- }
- Function Set-ADCreateUsers()
- {
- Clear-Host
- Invoke-Command -ComputerName $SERVER -Credential "GSB\admin.gsb" { Restart-Computer -ComputerName $SERVER }
- }
- Function Set-ADCreateOU()
- {
- }
- Show-ADMenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement