Powershell: Output Variables passed from Manage Engine <p>I'm having some issues with making some changes to an existing working script I have, but I have run into an issue with some variables that are being passed from my Manage Engine Software.</p> <p>In order to better understand what the issue is i'm attempting to devise a simple script to output the variables to a text file so I can see what Manage Engine is spitting out for certain variables. However the script seems to fail when attempting to execute.</p> <p>Here is what I am using in an attempt to get to the bottom of this.</p> <p>Command: </p> <pre><code>Param( [string]$Department ) $Filepath = "\\fileserver\filename.txt" $Department | out-file -filepath $filepath </code></pre> <p>Any help is greatly appreciated!</p>