Starting on dbatools version 1.0.31 we introduced better coverage for commands that make use of PowerShell Remoting.
Which commands?
Commands like Get-DbaComputerCertificate
, Get-DbaPrivilege
, Get-DbaClientAlias
, just to mention a few of them, make use of the internal function Invoke-Command2
which uses New-PSSession
when we run it against a remote computer.
“Why have you changed it?”
Let me give you a little bit of background…
At my company, I found that some dbatools commands were not working. They were returning errors related with WinRM configurations, as seen here when attempting to create a new session using New-PSSession
: