What secure port does PowerShell remote utilize by default?
- 445
- 5927
- 5986
- 443
EXPLANATION
By default PowerShell will use the following ports for communication (They are the same ports as WinRM)
TCP/5985 = HTTP
TCP/5986 = HTTPS
$splat = @{ ParameterOne = 'Value to pass'; ParameterTwo = 'Another value'; ParameterThree = 'Still more values'; } Get-Cmdlet @splat # The above is equivalent to this: Get-Cmdlet -ParameterOne 'Value to pass' -ParameterTwo 'Another value' -ParameterThree 'Still more values'This method can be useful for making a cmdlet with a lot of parameters easier to manage. It can also be useful for logically adding and removing parameters as needed without having to call the cmdlet multiple times, which can lead to cleaner code and faster execution time.
$ADUserSplat = @{ Department = "IT Department"; Description = "Person in IT"; City = "Awesometown"; } Set-ADUser -Identity ituser @ADUserSplat