Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Experiencing a Chair 2 Keyboard interface issue when attempting to deploy using powershell

I am so new to powershell, I am still looking for the seashell to plug into the power, plus I am still missing DOS 6.  LOL!!!!

Seriously though... I am attempting to deploy my first powershell script.  I am trying to send a notification to users when their pc's haven't been restarted after X days.  The script runs fine from the computer.  When I attempt to run the script from deploy, the notification never appears on the remote computer and the deployment appears to hang because it never completes.  I am assuming I am missing something sooooo simple.  I have followed several PDQ how to video's but no joy.  I even set the execution policy to unrestricted (temporarily) but still no joy.  What in the world am I missing?

1

Comments

4 comments
Date Votes
  • Chad,

    The issue is probably that you are running the package as the deploy user, so that account is just sitting at that prompt indefinitely.

    You need to change the "Run As" field in the "Options" tab of that step to run as "Logged On User" instead.

    3
  • The powershell script will run as the logged on user. If it requires administrator rights and the user does not have them then, as far as I know, the script will fail.

    In most cases you should run all Deploy packages as the deploy user, the only time you should change it to Logged on User is if it needs to interact with the user.

    I hope that answers your question.

    2
  • That did it!!!  Thank you so much!!!  I knew it was a Chair 2 Keyboard issue.  Here is my next question: I thought I needed to run as deploy user so it would have local admin rights.  Will running powershell scripts as Logged on User work even if the user is not a local admin?

    1
  • Oh!!!! That makes sense.  I wasn't remembering that I am wanting the user to interact with the "script" by clicking on the OK button.  Yea, that makes perfect sense now.  Thanks again!

    1