Last active
August 29, 2015 14:02
-
-
Save ProTip/a2301025cfc4d8b9500f 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
powershell_script "set_interface_addr" do | |
cwd Chef::Config[:file_cache_path] | |
code <<-EOH | |
New-NetIPAddress –InterfaceAlias “Wired Ethernet Connection” –IPv4Address #{node[ip_address]} –PrefixLength #{node[prefix]} -DefaultGateway #{node[gateway]} | |
EOH | |
end | |
ps = powershell_script "set_interface_addr" do | |
cwd Chef::Config[:file_cache_path] | |
code <<-EOH | |
New-NetIPAddress –InterfaceAlias “Wired Ethernet Connection” –IPv4Address #{node[ip_address]} –PrefixLength #{node[prefix]} -DefaultGateway #{node[gateway]} | |
EOH | |
end | |
ps.run_action(:run) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment