Powershell: Azure submitting JIT Request via Powershell
Summary: If you make use of Azure Security Center w/ your VM's, you can enable Just in Time VM Access (JIT) . This allows you to open up ports for a finite period of time to access your VM via its public IP. I make use of this a lot working in my environments to sshuttle in. Connection will stay active as long as I maintain it, otherwise I get disconnected and have to go through JIT process again. Anyway, going through the portal can get very cumbersome requesting this access, so you can use the below powershell example to automate opening ports, setting time frame, and setting an allowed public IP address source.