Run scripts with a different account in PSE4.1

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 17 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
LarsLu
Posts: 10
Last visit: Thu Nov 30, 2023 9:01 am

Run scripts with a different account in PSE4.1

Post by LarsLu »

Hi!
"Run script on remote computer..." allow me to specify an account to be used.Is there another way to use a different user account than the one I'm logged on with when running scripts? Normally (for safety) I test scripts locally on my laptop, then against one server (need other permissions),and finally I move the completed script to the server where it's supposed to run.
Best regards,Lars
PS. Thanks for a wonderful product!
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

Run scripts with a different account in PSE4.1

Post by donj »

"Run Script on Remote Computer" uses PrimalScript's Remote Script Execution Engine. You *can* specify an account other than the one you're logged in with for REMOTE scripts. However, PLEASE read the manual on this, because how you set this up is pretty crucial.

You CANNOT use PrimalScript to launch a script on your LOCAL computer under remote credentials; you would need to use RunAs.exe to do that.

There is no other way to run a script against a remote computer using alternate credentials. However, if your script is making a WMI or ADSI connection to a remote computer, those technologies do allow alternate credentials - hop on www.scriptinganswers.com/essentials.asp for some examples in VBScript.
User avatar
LarsLu
Posts: 10
Last visit: Thu Nov 30, 2023 9:01 am

Run scripts with a different account in PSE4.1

Post by LarsLu »

Ok, thanks for your answer!

I've been using RunAs.exe and PSExec.exe (from PSTools), but then you need to exit PSE4.1 and reload the script etc. It would have been great if there was a built-in function in PSE4.1 for switching accounts. I will need to put it on the wish list for future releases of PSE4.1.

Integrating it into my scripts is not an option, I don't want to add it to all my scripts.


Regards,
Lars
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Run scripts with a different account in PSE4.1

Post by Alexander Riedel »

Ok, thanks. We'll add it to the list.
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 17 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.