Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AL13
Engaged Sweeper

I have a PowerShell script that shuts down all PCs within a specified time. The script consists of 2 scenarios;

1. A pop-up message to inform the user that the PC will be shut down in 10 minutes and allow a user to cancel the shutdown task if they click on the Cancel button. 

and 

2. The PC will auto-shutdown if no one is signed in.

Scenario 1 will work if I select "currently logged on" in the deployment. It doesn't work with other selections like "System account" or "Scanning credentials" as the pop-up did not appear. 

Scenario 2 will work if I select "System account" in the deployment.

I can't make the deployment work on both scenarios. Is there other way to achieve it? Thank you

 

1 REPLY 1
Tim_N
Lansweeper Employee
Lansweeper Employee

Hello @AL13 

That's a good question -- I think it will require a little testing as I'm not 100% confident. 

If you're scanning credential has rights on that computer, you may want to try using the "Scanning Credential" option to see if that makes it run. 

But, if you want to ensure the pop-up appears for the logged in user... you may need to do some PowerShell magic. You may need to use specific credentials inside PowerShell. I just don't like that option much at all because it means your creds are in plain text. 

Do some testing and let us know how it goes -- I look forward to hearing of what you discover. 

 

Tim N.
Lansweeper Employee

General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now