header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
invoke-wmimethod
Last Post 20 Nov 2007 12: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:4
Avatar

--
19 Nov 2007 07:12 PM

    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:4
    Avatar

    --
    20 Nov 2007 12: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.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer