Basic Powershell question

I need to run a Powershell script that is usually invoked by a command and switch. How should I set up my steps to achieve this? I have zero Powershell experience.

.\Installerscript.ps1 -organization encryptionkeyhere

I've tried typing the above in the script window, and adding the switch to the command line box but neither worked. Both times the error returned was that -organization was not a recognised command.




Date Votes
  • Using a PowerShell step in a deployment package, you can copy the contents of the script and run it that way.

    Without knowing anything about your script (is it just a bunch of standalone cmdlets? is it a function?) it's hard to troubleshoot meaningfully. I would say check to make sure the default command line settings in the deploy package aren't going to interfere with the way the script runs.

    Perhaps try something like the below in a PowerShell step in PDQ Deploy:

    Import-Module <script path>

    Installerscript -organization encryptionkeyhere
  • Hi Monica, Chris from PDQ support suggested using an install step, with the PS1 added and my parameters in the parameters field. This worked fine, for most hosts at least.


Please sign in to leave a comment.

Didn't find what you were looking for?

New post