Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - stopping remote service from VM

Reply
 
Old 05-21-2009   #1 (permalink)
gacaccia


 
 

stopping remote service from VM

i am tring to set up an automation script using powershell v1.0. part of the
script involves shutting down and restarting a database service on a remote
computer. i accomplish this using the get-wmiobject cmdlet. the database
service resides on a computer that is on our company domain. i tested the
script from my own computer which is on the same domain. my problem is that
i need the script to work in a VM that is not part of the domain. i see that
the get-wmiobject can take a credential object (using get-credentials) as one
of its parameters, but i don't see a way to supply a password without getting
prompted for it. is there a way to do this?

thanks,

glenn

My System SpecsSystem Spec
Old 05-25-2009   #2 (permalink)
Phoenix


 
 

RE: stopping remote service from VM

You could use Export-Clixml / Import-Clixml to save credentials.
BTW. Export-Clixml - store username & password as plane text

"gacaccia" wrote:
Quote:

> i am tring to set up an automation script using powershell v1.0. part of the
> script involves shutting down and restarting a database service on a remote
> computer. i accomplish this using the get-wmiobject cmdlet. the database
> service resides on a computer that is on our company domain. i tested the
> script from my own computer which is on the same domain. my problem is that
> i need the script to work in a VM that is not part of the domain. i see that
> the get-wmiobject can take a credential object (using get-credentials) as one
> of its parameters, but i don't see a way to supply a password without getting
> prompted for it. is there a way to do this?
>
> thanks,
>
> glenn
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Re: Stopping service as non-admin PowerShell
Stopping the windows wireless service? Vista networking & sharing
stopping and starting service PowerShell
Get-WmiObject and starting/stopping remote services PowerShell
Stopping and Starting Audio Service in Vista Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46