Im working on a Ducky Script winRM backdoor and to set winRM up, the User must be connected to a network on a Private connection. How can I automate this with powershell commands?
Get-NetConnectionProfile shows all the currently connected network. I would like to make a loop that filters that output and puts every network name in this command Set-NetConnectionProfile -Name "NetworkName" -NetworkCategory Private

The Question is answered easily with the following: