This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Set Computer Name (HOSTNAME) and Description without rebooting. Author M Quick Date.24/06/2021 Ver. 20210624 | |
.DESCRIPTION | |
Script sets environment variables and other needed values to change the hostname on a Windows 10 Workstation. The | |
script also sets the 'description' of the system. The result of the function calls return boolean results. The script | |
prints out HOSTNAME-DESCRIPTION-CONFIG-SUCCESSFUL if both values were set correctly. This is done so the text can be | |
captures by the AutoIT script running it and determine pass or fail (easier than getting the exit value). | |
.EXAMPLE | |
Rename.ps1 -CN NEWHOSTNAME -DS 'The host description goes here' |