Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Function to rename and restart the server###
- ## Variable to store computer name##
- $COMPUTERNAME = Read-Host "Enter computer name:"
- ##Command to rename computer##
- Rename-Computer $COMPUTERNAME
- ##Command to restart computer##
- Restart-Computer -Confirm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement