It is possible decode (or show what to do) command Powershell?
I try use command connect-msolservice, but i get exceptions:
So maybe if I get content command, i can configure system to this connection.
Yes, you can use ILSpy to decode powershell dll. Download ILSpy. For find path .dll with your cmdlets, use powershell command:
Get-Command connect-msolservice | fl DLL,ImplementingType
Or you can use a native solution to view the Metadata of the builtin (or any other cmdlets)
$Metadata = New-Object System.Management.Automation.CommandMetaData (Get-Command Connect-MSOLService)
$Contents = [System.Management.Automation.ProxyCommand]::Create($Metadata)
credit to http://windowsitpro.com/blog/powershell-proxy-functions
write-host, write-warning, write-error etc. cmdlets to add a -log $logfile parameter this makes logging boilerplate less intrusive in the code