Using Powershell to autostart a program, in minimised mode and autologin

DonKwizote
DonKwizote used Ask the Experts™
on
Hello,
Are there any Powershell experts out there?
I would like to create a Powershell script do to the three functions below. Please provide clear steps for doing this as I am a novice with Powershell

1. Start a program when Windows starts
2. The powershell script must start the programs by autologon using the programs stored usernames and passwords in the Powershell script (see attached files)
3. The programs must be started in minimised mode (in the taskbar)

My reason for doing this
* I don't want the programs to start in full mode or be launched manually for people to see the usernames or click SHOW to see the password. I also do not want to give out the usernames/passwords for these programs.

Both programs have the option of saving the passwords but after a few Windows reboots, the passwords are no longer remembered and require manual entry. I want to avoid this by not using the save passwords option but using Powershell instead.

If you're aware of any other scripting language that can do this, please let me know but I ask that you're clear with your instructions. I have ZERO knowledge of scripting.
steam.PNG
Origin.PNG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Consultant
Commented:
Hi Don,

Whilst this might be possible, I am not sure it makes sense.

There is already functionality built-in via Group Policy to run applications at login, and if required, they can run in the 'Local System' context, so would have a high level of privileges.

To do that, you would configure:

Computer Configuration
Policies
Administrative Templates
System
Logon
Run These Programs at User Logon

If you enable that policy, you can specific any exe on the domain workstation (I usually put in the full path).


Have you looked at that option?  If so, and you rejected it in favour of the PowerShell method you are asking for, please can you explain why, and perhaps we can find a way to make it work for you without risking compromise of credentials.

Thanks,

Alan.

Author

Commented:
Thanks Alan! I was not aware of that option. I'll test it in a few minutes and let you know the result

Author

Commented:
Hi Alan,
The programs require their own separate usernames/passwords to actually login. The accounts to login are not Windows accounts. I need a way to specify the usernames and passwords for the programs to login.
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

AlanConsultant

Commented:
Hi Don,

Depending on other GPOs, you might need to enable 'loopback processing' on the GPO you create for this.

Try it without, and if it doesn't work, try enabling that option.

Alan.
AlanConsultant

Commented:
Hi Don,

The programs require their own separate usernames/passwords to actually login. The accounts to login are not Windows accounts. I need a way to specify the usernames and passwords for the programs to login.

The Group Policy option won't work for that, except perhaps to kick off a script.

I don't know that I am up to the PowerShell approach - I'll have a think, but no promises!


Alan.

Author

Commented:
Hi All,
Thanks for your input. Apologies for the delay. I have been trying lots of ideas. I tried several password managers like Keepass, One Password, Lastpass, Sticky Password but none could store and input the password into the application. In the end, I have published the password but restricted what users can do. That seems to be working for now.
AlanConsultant

Commented:
Hi DonKwizote,

I guess if those credentials can't do anything other than the minimum required to get it to work, then the risk is probably quite low, so should be fine.  You might want to contact the software vendor, and ask how other businesses have set this up - maybe you could replicate one of their solutions?

However, if you are okay now, please can you close the question.

Thanks,

Alan.
AlanConsultant

Commented:
Hi DonKwizote,

How are you gong on this?  Is there anything else we can help with?

If all done, please can you close the question.

Thanks,

Alan.
PberSolutions Architect

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Alan (https:#a42346930)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Pber
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial