Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
- $Title = "Amb Meow Meow - Ver 1"
- $host.UI.RawUI.WindowTitle = $Title
- Write-Host -ForegroundColor Green "
- ===========================================
- Team KV Automate Script Ver 1
- ===========================================
- "
- Write-Host -Fore Yellow " Features : Semi-automated task. Some feature might not work properly for -wait argument"
- Write-Host -Fore Yellow " [*] Change computer name & join domain "
- Write-Host -Fore Yellow " [*] Activate Windows Enterprise "
- Write-Host -Fore Yellow " [*] Enable services APPM & BES Client "
- Write-Host -Fore Yellow " [*] Uninstall java "
- Write-Host -Fore Yellow " [*] Install SEP "
- echo ""
- Write-Host -Fore Cyan ">>>>> Press any key to begin...."
- [void][System.Console]::ReadKey($TRUE)
- ########################################################################
- $ServiceName = "Print Spooler", "XboxNetApiSvc"
- Write-Host "Updating APPM & BES Client Services. Please wait."
- ForEach ( $service in $ServiceName ) {
- $serviceStatus = Get-Service $service
- if ($ServiceStatus.Status -ne "Running") {
- Get-Service $service | Start-Service -PassThru | Set-Service -StartupType Automatic
- }
- if ($ServiceStatus.status -eq "Running") {
- Write-Host "$service is already running"
- }
- }
- ####################################################################################
- #reboot - macam biasa promt restart
- $reboot = Read-Host -Prompt "Reboot? y/n"
- if ($reboot -eq "y" -or $reboot -eq "Y")
- {
- Restart-Computer
- }
- #sila tambah yang mana tak cukup. terima kasih
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement