Connecting to WMI via PowerShell
There are two methods to interact with WMI through PowerShell
- DCOM: RPC over IP will be used for connecting to WMI.
- ports 135/TCP, 49152-65535/TCP like sc.exe
- Wsman: WinRM will be used for connecting to WMI.
- ports 5985/TCP (WinRM HTTP) or 5986/TCP (WinRM HTTPS).