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 - executing powershell scripts on server

Reply
 
Old 10-02-2008   #1 (permalink)
how to display variable value?


 
 

executing powershell scripts on server

Hi ,

I want to execute powershell script on the server where I am not added as
the admin and Powershell "ExecutionPolicy" is set to "Restcrited" and when I
try to change the ExecutionPolicy to unrestricted by Set-ExecutionPolicy it
throws me an error like

Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))

is there other way to execute that script.

Thnx in advance

My System SpecsSystem Spec
Old 10-03-2008   #2 (permalink)


Vista Ultimate 32bit
 
 

Re: executing powershell scripts on server

If you are running your script on your machine that uses Get-WMIObject to manage a remote machine, the remote machine's execution policy is irrelevant. But if you have an interactive session and the policy is set to restricted you're out of luck running a script. you can try copying and pasting the contents of the script into a PowerShell session, but if you don't have admin rights to begin with, I doubt you'll be any more successful.
My System SpecsSystem Spec
Old 10-03-2008   #3 (permalink)
techjohnny


 
 

Re: executing powershell scripts on server

On Oct 2, 5:32*pm, how to display variable value?
<howtodisplayvariableva...@xxxxxx> wrote:
Quote:

> Hi ,
>
> I want to execute powershell script on the server where I am not added as
> the admin and Powershell "ExecutionPolicy" is set to "Restcrited" and when I
> try to change the ExecutionPolicy to unrestricted by Set-ExecutionPolicy it
> throws me an error like
>
> Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005
> (E_ACCESSDENIED))
>
> is there other way to execute that script.
>
> Thnx in advance
Which OS are you running PS on? If it's Vista/08 you'll need to "Run
as Administrator" in some cases.

--tj
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
executing scripts within a web browser control under the system ac .NET General
Executing PowerShell Scripts with IIS PowerShell
Executing batch files in PS scripts PowerShell
Running scripts from powershell on exchange server PowerShell
Executing scripts in the current directory PowerShell


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