Created
June 29, 2019 15:33
-
-
Save itpropro/172ff0461c6713ab5ff7e6569543eadc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test to write messages to current pipeline. Can be used when in other scope or runspace. | |
param($msg) | |
$runspace = [System.Management.Automation.Runspaces.Runspace]::DefaultRunspace | |
$command = 'Write-Verbose "{0}"' -f $msg | |
$runspace.CreateNestedPipeline($command, $false).Invoke() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment