So I've tried wrapping one of my scripts into an exe using PS2EXE, and it works great! But for some reason, when using AD functions, it gives me a whole bunch of background text which makes interacting with the script nearly impossible! See the pictures below:
I've done my research, and have only found one other forum where anybody had this issue, and there was no resolution. This only seems to happen when using AD functions, and after importing the AD Module. I've tried resetting all of my error and warning action preferences and it does not affect this in any way. I think it's just informative, but it makes it difficult to see the text requiring acknowledgement or input unless I go back and change the foreground color on all of my write-host text.
Has anybody seen this before, or have any ideas on how to suppress the informative output?
Thanks!
I am not familiar with PS2EXE but looking at the screenshot, I think it's echoing data from the progress stream. Two things I would recommend:
$Env:ADPS_LoadDefaultDrive = 0
$ProgressPreference = SilentlyContinue