header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

invoke-wmimethod
Last Post 20 Nov 2007 09:37 PM by pdirt. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
pdirtUser is Offline
New Member
New Member
Posts:2

--
20 Nov 2007 04:12 AM  

I am getting access deined when trying to use invoke-method create

This code works if I do not have to pass -cred ( meaning the account running on my local machine has local admin to the remote machine).  But, the point of my script is to run all get-wmi code towards machines that may not have pshell installed, and may not have shared accounts,etc.  I can get all other wmiobject cmdlets /functions working passing -cred in, but have not been able to get this to work.  I was stoked when I saw PSHELL 2.0 had this new cmdlet, but I am pretty frustrated trying to get it to work now ;)

Ex:

invoke-wmimethod -path win32_process -name Create -argumentlist notepad -computername $rc -credential $cred

returns : 

format-default : Exception retrieving members: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Again, Other parts of my script that pass this same cred work fine, but they are not invoking a method...

I have tried -Authority and -Impersonation parms to no avail.

Any help?

pdirtUser is Offline
New Member
New Member
Posts:2

--
20 Nov 2007 09:37 PM  
Just to add a note:

this function works when pointed at XPSP2 and windows 2008, just not win2kpro so far...

weird.
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer