@dkorns
I think I understand what are you looking for. Do the following.
1. Open Powershell ISE
2. Copy paste the below Code and execute it. Or save it in a file and execute it. Its a LOCAL definition of Get-WfaLogger. The Other definition present in the module WFA will NOT be used in Powershell ISE and this local one which calls write-output will be used.
3. Now you can copy-paste the Command Code directly from a WFA command into Powershell ISE and execute. No modification needed of any kind. The Get-WfaLogger present in the command code will call the local function definition and start printing the output on your Powershell console.
When inside the WFA command, the code will call the Get-WfaLogger definition present in the WFA module and does what its doing currently.
The same code works seamlessly in and out of WFA.
=====
function
Get-WfaLogger
{
param (
[parameter(Mandatory=$true, HelpMessage="Message to print")]
[string]$Message,
[parameter(Mandatory=$false, HelpMessage="Info")]
[switch]$Info,
[parameter(Mandatory=$false, HelpMessage="Warn")]
[switch]$Warn,
[parameter(Mandatory=$false, HelpMessage="Error")]
[switch]$Error
)
Write-Output $Message
}
====
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.