New Question

Revision history [back]

click to hide/show revision 1
initial version

Can UserDataPlugin be used to add firewall rule on windows instance?

Hi - I am trying to use chef to bootstrap a windows VM on openstack. The issue I am running into is that chef needs winRM to work. I need to run the following command -

netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow

I have been reading about couldbase-init and how a PS script can be run on first boot using the UserDataPlugin. But I cannot seem to find where exactly I should specify the above command? says to pass it in as user_data but I cannot find any documentation that explains how this plugin works. Can someone explain? Will this approach work to create a firewall rule? Or if there is a better way to do this? Thanks!