Functions Returns Boolean in PowerShell Functions Returns Boolean in PowerShell powershell powershell

Functions Returns Boolean in PowerShell


Functions return whatever each command spits out to the output stream. Try eliminating that output like so:

    [void]WriteTrace "[TryDisableClientForCredSSP]. Disable-WSManCredSSP -Role Client "    $script=Convert-StringToScriptBlock("Disable-WSManCredSSP -Role Client ")    [void]Caller($script)    [void]WriteTrace "[TryDisableClientForCredSSP]. winrm get winrm/config/client/auth [($env:COMPUTERNAME)]"    $script=Convert-StringToScriptBlock("winrm get winrm/config/client/auth")    [void]Caller($script);    return $true;