Skip to content

Instantly share code, notes, and snippets.

@rchaganti
Created February 26, 2018 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rchaganti/e635e5f90847780763fd61b6f6198863 to your computer and use it in GitHub Desktop.
Save rchaganti/e635e5f90847780763fd61b6f6198863 to your computer and use it in GitHub Desktop.
firewallconfig.ps1
Function Write-SerialPort ([string] $message) {
$port = new-Object System.IO.Ports.SerialPort COM1,9600,None,8,one
$port.open()
$port.WriteLine($message)
$port.Close()
}
Write-SerialPort ("Testing GCE Startup Script")
Set-NetFirewallRule -Name WINRM-HTTP-In-TCP-PUBLIC -RemoteAddress Any
Write-SerialPort ("Completed GCE Startup Script")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment