-
-
Save schisamo/761eae49a1145aa3133e to your computer and use it in GitHub Desktop.
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
include_recipe 'powershell' | |
powershell "rename hostname" do | |
code <<-EOH | |
$computer_name = Get-Content env:computername | |
$new_name = 'test-hostname' | |
$sysInfo = Get-WmiObject -Class Win32_ComputerSystem | |
$sysInfo.Rename($new_name) | |
EOH | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment