Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


run powershell scripts with service account + profile

 
Logged in as: Guest
arrSession:exec spGetSession 2,5,60313
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Windows PowerShell >> run powershell scripts with service account + profile
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 run powershell scripts with service account + profile - 5/16/2008 11:37:18 PM   
  Bezerk

 

Posts: 22
Score: 0
Joined: 6/20/2005
From: Netherlands
Status: offline
I want to run powershell scripts with a service account. That's no problem exept that the objects i want to use i have to add-pssnapin in the profile to get some cmd-lets to work. Do i need a custom profile wih i can refere to when i run scripts with the service account?
And furthermore i need to read a file that will have a username and password, so i can login in to some services. How can i protect the file or encrypt it so i can use it in the scripts?

Thanks in advance.
 
 
Post #: 1
 
 RE: run powershell scripts with service account + profile - 6/1/2008 2:17:14 PM   
  SAPIENScripter


Posts: 275
Score: 2
Joined: 11/1/2006
From: SAPIEN Technologies
Status: offline
Your service account will likely need a profile script just like a regular user.  Or simply add the commands to your script. Is this part of a scheduled task?  How is the service account running the script? If you don't have a "real" person running the script then there's no way to enter a password. If you absolutely have to embed credentials, then consider packaging your script with a product like PrimalScript.

_____________________________

Jeffery Hicks
Windows PowerShell MVP
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com

Follow Me: http://www.twitter.com/JeffHicks

(in reply to Bezerk)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Windows PowerShell >> run powershell scripts with service account + profile Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts