![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | WMI remote permissions error If I run this: gwmi win32_process -computer "COMPUTER" -credential "DOMAIN\USER" And provide the proper password then I get a permission denied error. However if I do essentially the exact same thing in VBScript: On Error Resume Next Dim strComputer Dim objWMIService Dim propValue Dim objItem Dim SWBemlocator Dim UserName Dim Password Dim colItems strComputer = "COMPUTER" UserName = "DOMAIN\USER" Password = "PASSWORD" Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) Set colItems = objWMIService.ExecQuery("Select * from Win32_Process",,48) For Each objItem in colItems WScript.Echo "Caption: " & objItem.Caption WScript.Echo "CommandLine: " & objItem.CommandLine WScript.Echo "CreationClassName: " & objItem.CreationClassName WScript.Echo "CreationDate: " & objItem.CreationDate WScript.Echo "CSCreationClassName: " & objItem.CSCreationClassName WScript.Echo "CSName: " & objItem.CSName WScript.Echo "Description: " & objItem.Description WScript.Echo "ExecutablePath: " & objItem.ExecutablePath WScript.Echo "ExecutionState: " & objItem.ExecutionState WScript.Echo "Handle: " & objItem.Handle WScript.Echo "HandleCount: " & objItem.HandleCount WScript.Echo "InstallDate: " & objItem.InstallDate WScript.Echo "KernelModeTime: " & objItem.KernelModeTime WScript.Echo "MaximumWorkingSetSize: " & objItem.MaximumWorkingSetSize WScript.Echo "MinimumWorkingSetSize: " & objItem.MinimumWorkingSetSize WScript.Echo "Name: " & objItem.Name WScript.Echo "OSCreationClassName: " & objItem.OSCreationClassName WScript.Echo "OSName: " & objItem.OSName WScript.Echo "OtherOperationCount: " & objItem.OtherOperationCount WScript.Echo "OtherTransferCount: " & objItem.OtherTransferCount WScript.Echo "PageFaults: " & objItem.PageFaults WScript.Echo "PageFileUsage: " & objItem.PageFileUsage WScript.Echo "ParentProcessId: " & objItem.ParentProcessId WScript.Echo "PeakPageFileUsage: " & objItem.PeakPageFileUsage WScript.Echo "PeakVirtualSize: " & objItem.PeakVirtualSize WScript.Echo "PeakWorkingSetSize: " & objItem.PeakWorkingSetSize WScript.Echo "Priority: " & objItem.Priority WScript.Echo "PrivatePageCount: " & objItem.PrivatePageCount WScript.Echo "ProcessId: " & objItem.ProcessId WScript.Echo "QuotaNonPagedPoolUsage: " & objItem.QuotaNonPagedPoolUsage WScript.Echo "QuotaPagedPoolUsage: " & objItem.QuotaPagedPoolUsage WScript.Echo "QuotaPeakNonPagedPoolUsage: " & objItem.QuotaPeakNonPagedPoolUsage WScript.Echo "QuotaPeakPagedPoolUsage: " & objItem.QuotaPeakPagedPoolUsage WScript.Echo "ReadOperationCount: " & objItem.ReadOperationCount WScript.Echo "ReadTransferCount: " & objItem.ReadTransferCount WScript.Echo "SessionId: " & objItem.SessionId WScript.Echo "Status: " & objItem.Status WScript.Echo "TerminationDate: " & objItem.TerminationDate WScript.Echo "ThreadCount: " & objItem.ThreadCount WScript.Echo "UserModeTime: " & objItem.UserModeTime WScript.Echo "VirtualSize: " & objItem.VirtualSize WScript.Echo "WindowsVersion: " & objItem.WindowsVersion WScript.Echo "WorkingSetSize: " & objItem.WorkingSetSize WScript.Echo "WriteOperationCount: " & objItem.WriteOperationCount WScript.Echo "WriteTransferCount: " & objItem.WriteTransferCount Next Then it works just fine. Is this a known issue with powershell? Is there some Powershell setting that is preventing this? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WMI remote permissions error Try this $creds = get-credential "DOMAIN\USER" # type password, then gwmi win32_process -computer "COMPUTER" -credential $creds I had a n access denied problem too. It isnt like yours, but search this group for a post with "WMI Access Denied" in the title. I posted it and replied to my self ![]() Shay http://scriptolog.blogspot.com Quote: > If I run this: > > gwmi win32_process -computer "COMPUTER" -credential "DOMAIN\USER" > > And provide the proper password then I get a permission denied error. > However if I do essentially the exact same thing in VBScript: > > On Error Resume Next > Dim strComputer > Dim objWMIService > Dim propValue > Dim objItem > Dim SWBemlocator > Dim UserName > Dim Password > Dim colItems > strComputer = "COMPUTER" > UserName = "DOMAIN\USER" > Password = "PASSWORD" > Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") > Set objWMIService = > SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) > Set colItems = objWMIService.ExecQuery("Select * from > Win32_Process",,48) > For Each objItem in colItems > WScript.Echo "Caption: " & objItem.Caption > WScript.Echo "CommandLine: " & objItem.CommandLine > WScript.Echo "CreationClassName: " & objItem.CreationClassName > WScript.Echo "CreationDate: " & objItem.CreationDate > WScript.Echo "CSCreationClassName: " & objItem.CSCreationClassName > WScript.Echo "CSName: " & objItem.CSName > WScript.Echo "Description: " & objItem.Description > WScript.Echo "ExecutablePath: " & objItem.ExecutablePath > WScript.Echo "ExecutionState: " & objItem.ExecutionState > WScript.Echo "Handle: " & objItem.Handle > WScript.Echo "HandleCount: " & objItem.HandleCount > WScript.Echo "InstallDate: " & objItem.InstallDate > WScript.Echo "KernelModeTime: " & objItem.KernelModeTime > WScript.Echo "MaximumWorkingSetSize: " & > objItem.MaximumWorkingSetSize > WScript.Echo "MinimumWorkingSetSize: " & > objItem.MinimumWorkingSetSize > WScript.Echo "Name: " & objItem.Name > WScript.Echo "OSCreationClassName: " & objItem.OSCreationClassName > WScript.Echo "OSName: " & objItem.OSName > WScript.Echo "OtherOperationCount: " & objItem.OtherOperationCount > WScript.Echo "OtherTransferCount: " & objItem.OtherTransferCount > WScript.Echo "PageFaults: " & objItem.PageFaults > WScript.Echo "PageFileUsage: " & objItem.PageFileUsage > WScript.Echo "ParentProcessId: " & objItem.ParentProcessId > WScript.Echo "PeakPageFileUsage: " & objItem.PeakPageFileUsage > WScript.Echo "PeakVirtualSize: " & objItem.PeakVirtualSize > WScript.Echo "PeakWorkingSetSize: " & objItem.PeakWorkingSetSize > WScript.Echo "Priority: " & objItem.Priority > WScript.Echo "PrivatePageCount: " & objItem.PrivatePageCount > WScript.Echo "ProcessId: " & objItem.ProcessId > WScript.Echo "QuotaNonPagedPoolUsage: " & > objItem.QuotaNonPagedPoolUsage > WScript.Echo "QuotaPagedPoolUsage: " & objItem.QuotaPagedPoolUsage > WScript.Echo "QuotaPeakNonPagedPoolUsage: " & > objItem.QuotaPeakNonPagedPoolUsage > WScript.Echo "QuotaPeakPagedPoolUsage: " & > objItem.QuotaPeakPagedPoolUsage > WScript.Echo "ReadOperationCount: " & objItem.ReadOperationCount > WScript.Echo "ReadTransferCount: " & objItem.ReadTransferCount > WScript.Echo "SessionId: " & objItem.SessionId > WScript.Echo "Status: " & objItem.Status > WScript.Echo "TerminationDate: " & objItem.TerminationDate > WScript.Echo "ThreadCount: " & objItem.ThreadCount > WScript.Echo "UserModeTime: " & objItem.UserModeTime > WScript.Echo "VirtualSize: " & objItem.VirtualSize > WScript.Echo "WindowsVersion: " & objItem.WindowsVersion > WScript.Echo "WorkingSetSize: " & objItem.WorkingSetSize > WScript.Echo "WriteOperationCount: " & objItem.WriteOperationCount > WScript.Echo "WriteTransferCount: " & objItem.WriteTransferCount > Next > Then it works just fine. Is this a known issue with powershell? Is > there some Powershell setting that is preventing this? > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: WMI remote permissions error Thanks Shay. Still get access denied though. ![]() format-default : Exception retrieving members: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" "Shay Levi" wrote: Quote: > > Try this > > $creds = get-credential "DOMAIN\USER" > # type password, then > > gwmi win32_process -computer "COMPUTER" -credential $creds > > I had a n access denied problem too. It isnt like yours, but search this > group for a post > with "WMI Access Denied" in the title. I posted it and replied to my self ![]() > > Shay > http://scriptolog.blogspot.com > > > Quote: > > If I run this: > > > > gwmi win32_process -computer "COMPUTER" -credential "DOMAIN\USER" > > > > And provide the proper password then I get a permission denied error. > > However if I do essentially the exact same thing in VBScript: > > > > On Error Resume Next > > Dim strComputer > > Dim objWMIService > > Dim propValue > > Dim objItem > > Dim SWBemlocator > > Dim UserName > > Dim Password > > Dim colItems > > strComputer = "COMPUTER" > > UserName = "DOMAIN\USER" > > Password = "PASSWORD" > > Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") > > Set objWMIService = > > SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) > > Set colItems = objWMIService.ExecQuery("Select * from > > Win32_Process",,48) > > For Each objItem in colItems > > WScript.Echo "Caption: " & objItem.Caption > > WScript.Echo "CommandLine: " & objItem.CommandLine > > WScript.Echo "CreationClassName: " & objItem.CreationClassName > > WScript.Echo "CreationDate: " & objItem.CreationDate > > WScript.Echo "CSCreationClassName: " & objItem.CSCreationClassName > > WScript.Echo "CSName: " & objItem.CSName > > WScript.Echo "Description: " & objItem.Description > > WScript.Echo "ExecutablePath: " & objItem.ExecutablePath > > WScript.Echo "ExecutionState: " & objItem.ExecutionState > > WScript.Echo "Handle: " & objItem.Handle > > WScript.Echo "HandleCount: " & objItem.HandleCount > > WScript.Echo "InstallDate: " & objItem.InstallDate > > WScript.Echo "KernelModeTime: " & objItem.KernelModeTime > > WScript.Echo "MaximumWorkingSetSize: " & > > objItem.MaximumWorkingSetSize > > WScript.Echo "MinimumWorkingSetSize: " & > > objItem.MinimumWorkingSetSize > > WScript.Echo "Name: " & objItem.Name > > WScript.Echo "OSCreationClassName: " & objItem.OSCreationClassName > > WScript.Echo "OSName: " & objItem.OSName > > WScript.Echo "OtherOperationCount: " & objItem.OtherOperationCount > > WScript.Echo "OtherTransferCount: " & objItem.OtherTransferCount > > WScript.Echo "PageFaults: " & objItem.PageFaults > > WScript.Echo "PageFileUsage: " & objItem.PageFileUsage > > WScript.Echo "ParentProcessId: " & objItem.ParentProcessId > > WScript.Echo "PeakPageFileUsage: " & objItem.PeakPageFileUsage > > WScript.Echo "PeakVirtualSize: " & objItem.PeakVirtualSize > > WScript.Echo "PeakWorkingSetSize: " & objItem.PeakWorkingSetSize > > WScript.Echo "Priority: " & objItem.Priority > > WScript.Echo "PrivatePageCount: " & objItem.PrivatePageCount > > WScript.Echo "ProcessId: " & objItem.ProcessId > > WScript.Echo "QuotaNonPagedPoolUsage: " & > > objItem.QuotaNonPagedPoolUsage > > WScript.Echo "QuotaPagedPoolUsage: " & objItem.QuotaPagedPoolUsage > > WScript.Echo "QuotaPeakNonPagedPoolUsage: " & > > objItem.QuotaPeakNonPagedPoolUsage > > WScript.Echo "QuotaPeakPagedPoolUsage: " & > > objItem.QuotaPeakPagedPoolUsage > > WScript.Echo "ReadOperationCount: " & objItem.ReadOperationCount > > WScript.Echo "ReadTransferCount: " & objItem.ReadTransferCount > > WScript.Echo "SessionId: " & objItem.SessionId > > WScript.Echo "Status: " & objItem.Status > > WScript.Echo "TerminationDate: " & objItem.TerminationDate > > WScript.Echo "ThreadCount: " & objItem.ThreadCount > > WScript.Echo "UserModeTime: " & objItem.UserModeTime > > WScript.Echo "VirtualSize: " & objItem.VirtualSize > > WScript.Echo "WindowsVersion: " & objItem.WindowsVersion > > WScript.Echo "WorkingSetSize: " & objItem.WorkingSetSize > > WScript.Echo "WriteOperationCount: " & objItem.WriteOperationCount > > WScript.Echo "WriteTransferCount: " & objItem.WriteTransferCount > > Next > > Then it works just fine. Is this a known issue with powershell? Is > > there some Powershell setting that is preventing this? > > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: WMI remote permissions error I even tried running Powershell with -noprofile to make sure there wasn't something ****y in my profile...no joy. "Shay Levi" wrote: Quote: > > Try this > > $creds = get-credential "DOMAIN\USER" > # type password, then > > gwmi win32_process -computer "COMPUTER" -credential $creds > > I had a n access denied problem too. It isnt like yours, but search this > group for a post > with "WMI Access Denied" in the title. I posted it and replied to my self ![]() > > Shay > http://scriptolog.blogspot.com > > > Quote: > > If I run this: > > > > gwmi win32_process -computer "COMPUTER" -credential "DOMAIN\USER" > > > > And provide the proper password then I get a permission denied error. > > However if I do essentially the exact same thing in VBScript: > > > > On Error Resume Next > > Dim strComputer > > Dim objWMIService > > Dim propValue > > Dim objItem > > Dim SWBemlocator > > Dim UserName > > Dim Password > > Dim colItems > > strComputer = "COMPUTER" > > UserName = "DOMAIN\USER" > > Password = "PASSWORD" > > Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") > > Set objWMIService = > > SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) > > Set colItems = objWMIService.ExecQuery("Select * from > > Win32_Process",,48) > > For Each objItem in colItems > > WScript.Echo "Caption: " & objItem.Caption > > WScript.Echo "CommandLine: " & objItem.CommandLine > > WScript.Echo "CreationClassName: " & objItem.CreationClassName > > WScript.Echo "CreationDate: " & objItem.CreationDate > > WScript.Echo "CSCreationClassName: " & objItem.CSCreationClassName > > WScript.Echo "CSName: " & objItem.CSName > > WScript.Echo "Description: " & objItem.Description > > WScript.Echo "ExecutablePath: " & objItem.ExecutablePath > > WScript.Echo "ExecutionState: " & objItem.ExecutionState > > WScript.Echo "Handle: " & objItem.Handle > > WScript.Echo "HandleCount: " & objItem.HandleCount > > WScript.Echo "InstallDate: " & objItem.InstallDate > > WScript.Echo "KernelModeTime: " & objItem.KernelModeTime > > WScript.Echo "MaximumWorkingSetSize: " & > > objItem.MaximumWorkingSetSize > > WScript.Echo "MinimumWorkingSetSize: " & > > objItem.MinimumWorkingSetSize > > WScript.Echo "Name: " & objItem.Name > > WScript.Echo "OSCreationClassName: " & objItem.OSCreationClassName > > WScript.Echo "OSName: " & objItem.OSName > > WScript.Echo "OtherOperationCount: " & objItem.OtherOperationCount > > WScript.Echo "OtherTransferCount: " & objItem.OtherTransferCount > > WScript.Echo "PageFaults: " & objItem.PageFaults > > WScript.Echo "PageFileUsage: " & objItem.PageFileUsage > > WScript.Echo "ParentProcessId: " & objItem.ParentProcessId > > WScript.Echo "PeakPageFileUsage: " & objItem.PeakPageFileUsage > > WScript.Echo "PeakVirtualSize: " & objItem.PeakVirtualSize > > WScript.Echo "PeakWorkingSetSize: " & objItem.PeakWorkingSetSize > > WScript.Echo "Priority: " & objItem.Priority > > WScript.Echo "PrivatePageCount: " & objItem.PrivatePageCount > > WScript.Echo "ProcessId: " & objItem.ProcessId > > WScript.Echo "QuotaNonPagedPoolUsage: " & > > objItem.QuotaNonPagedPoolUsage > > WScript.Echo "QuotaPagedPoolUsage: " & objItem.QuotaPagedPoolUsage > > WScript.Echo "QuotaPeakNonPagedPoolUsage: " & > > objItem.QuotaPeakNonPagedPoolUsage > > WScript.Echo "QuotaPeakPagedPoolUsage: " & > > objItem.QuotaPeakPagedPoolUsage > > WScript.Echo "ReadOperationCount: " & objItem.ReadOperationCount > > WScript.Echo "ReadTransferCount: " & objItem.ReadTransferCount > > WScript.Echo "SessionId: " & objItem.SessionId > > WScript.Echo "Status: " & objItem.Status > > WScript.Echo "TerminationDate: " & objItem.TerminationDate > > WScript.Echo "ThreadCount: " & objItem.ThreadCount > > WScript.Echo "UserModeTime: " & objItem.UserModeTime > > WScript.Echo "VirtualSize: " & objItem.VirtualSize > > WScript.Echo "WindowsVersion: " & objItem.WindowsVersion > > WScript.Echo "WorkingSetSize: " & objItem.WorkingSetSize > > WScript.Echo "WriteOperationCount: " & objItem.WriteOperationCount > > WScript.Echo "WriteTransferCount: " & objItem.WriteTransferCount > > Next > > Then it works just fine. Is this a known issue with powershell? Is > > there some Powershell setting that is preventing this? > > > > |
My System Specs![]() |
| | #5 (permalink) |
| | RE: WMI remote permissions error Just to add more info, I checked on the remote machine and remote DCOM was enabled. "ebgreen" wrote: Quote: > If I run this: > > gwmi win32_process -computer "COMPUTER" -credential "DOMAIN\USER" > > And provide the proper password then I get a permission denied error. > However if I do essentially the exact same thing in VBScript: > > On Error Resume Next > Dim strComputer > Dim objWMIService > Dim propValue > Dim objItem > Dim SWBemlocator > Dim UserName > Dim Password > Dim colItems > > strComputer = "COMPUTER" > UserName = "DOMAIN\USER" > Password = "PASSWORD" > Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") > Set objWMIService = > SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) > Set colItems = objWMIService.ExecQuery("Select * from Win32_Process",,48) > For Each objItem in colItems > WScript.Echo "Caption: " & objItem.Caption > WScript.Echo "CommandLine: " & objItem.CommandLine > WScript.Echo "CreationClassName: " & objItem.CreationClassName > WScript.Echo "CreationDate: " & objItem.CreationDate > WScript.Echo "CSCreationClassName: " & objItem.CSCreationClassName > WScript.Echo "CSName: " & objItem.CSName > WScript.Echo "Description: " & objItem.Description > WScript.Echo "ExecutablePath: " & objItem.ExecutablePath > WScript.Echo "ExecutionState: " & objItem.ExecutionState > WScript.Echo "Handle: " & objItem.Handle > WScript.Echo "HandleCount: " & objItem.HandleCount > WScript.Echo "InstallDate: " & objItem.InstallDate > WScript.Echo "KernelModeTime: " & objItem.KernelModeTime > WScript.Echo "MaximumWorkingSetSize: " & objItem.MaximumWorkingSetSize > WScript.Echo "MinimumWorkingSetSize: " & objItem.MinimumWorkingSetSize > WScript.Echo "Name: " & objItem.Name > WScript.Echo "OSCreationClassName: " & objItem.OSCreationClassName > WScript.Echo "OSName: " & objItem.OSName > WScript.Echo "OtherOperationCount: " & objItem.OtherOperationCount > WScript.Echo "OtherTransferCount: " & objItem.OtherTransferCount > WScript.Echo "PageFaults: " & objItem.PageFaults > WScript.Echo "PageFileUsage: " & objItem.PageFileUsage > WScript.Echo "ParentProcessId: " & objItem.ParentProcessId > WScript.Echo "PeakPageFileUsage: " & objItem.PeakPageFileUsage > WScript.Echo "PeakVirtualSize: " & objItem.PeakVirtualSize > WScript.Echo "PeakWorkingSetSize: " & objItem.PeakWorkingSetSize > WScript.Echo "Priority: " & objItem.Priority > WScript.Echo "PrivatePageCount: " & objItem.PrivatePageCount > WScript.Echo "ProcessId: " & objItem.ProcessId > WScript.Echo "QuotaNonPagedPoolUsage: " & objItem.QuotaNonPagedPoolUsage > WScript.Echo "QuotaPagedPoolUsage: " & objItem.QuotaPagedPoolUsage > WScript.Echo "QuotaPeakNonPagedPoolUsage: " & > objItem.QuotaPeakNonPagedPoolUsage > WScript.Echo "QuotaPeakPagedPoolUsage: " & objItem.QuotaPeakPagedPoolUsage > WScript.Echo "ReadOperationCount: " & objItem.ReadOperationCount > WScript.Echo "ReadTransferCount: " & objItem.ReadTransferCount > WScript.Echo "SessionId: " & objItem.SessionId > WScript.Echo "Status: " & objItem.Status > WScript.Echo "TerminationDate: " & objItem.TerminationDate > WScript.Echo "ThreadCount: " & objItem.ThreadCount > WScript.Echo "UserModeTime: " & objItem.UserModeTime > WScript.Echo "VirtualSize: " & objItem.VirtualSize > WScript.Echo "WindowsVersion: " & objItem.WindowsVersion > WScript.Echo "WorkingSetSize: " & objItem.WorkingSetSize > WScript.Echo "WriteOperationCount: " & objItem.WriteOperationCount > WScript.Echo "WriteTransferCount: " & objItem.WriteTransferCount > Next > > > > Then it works just fine. Is this a known issue with powershell? Is there > some Powershell setting that is preventing this? > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: WMI remote permissions error On Sep 17, 3:10 pm, ebgreen <ebgr...@xxxxxx> wrote: Quote: > Thanks Shay. Still get access denied though. ![]() > > format-default : Exception retrieving members: "Access is denied. (Exception > from HRESULT: 0x80070005 (E_ACCESSDENIED))" > > this looks like the known bug detailed at: https://connect.microsoft.com/feedba...6942&SiteID=99 regards, - Oisin / x0n |
My System Specs![]() |
| | #7 (permalink) |
| | RE: WMI remote permissions error Edgreen, Oisin is correct. I experienced a similar back on the 13th. I suggest you create a bug report and link it to the bug which Oisin refereneced below. For now the work around are either to run the powershell process under the credentials of someone which is able to access the WMI classes remotely or use the VBscript you already have. Impersonation is busted in a number of places when usingg WMI bob "ebgreen" wrote: Quote: > Just to add more info, I checked on the remote machine and remote DCOM was > enabled. > > "ebgreen" wrote: > Quote: > > If I run this: > > > > gwmi win32_process -computer "COMPUTER" -credential "DOMAIN\USER" > > > > And provide the proper password then I get a permission denied error. > > However if I do essentially the exact same thing in VBScript: > > > > On Error Resume Next > > Dim strComputer > > Dim objWMIService > > Dim propValue > > Dim objItem > > Dim SWBemlocator > > Dim UserName > > Dim Password > > Dim colItems > > > > strComputer = "COMPUTER" > > UserName = "DOMAIN\USER" > > Password = "PASSWORD" > > Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator") > > Set objWMIService = > > SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password) > > Set colItems = objWMIService.ExecQuery("Select * from Win32_Process",,48) > > For Each objItem in colItems > > WScript.Echo "Caption: " & objItem.Caption > > WScript.Echo "CommandLine: " & objItem.CommandLine > > WScript.Echo "CreationClassName: " & objItem.CreationClassName > > WScript.Echo "CreationDate: " & objItem.CreationDate > > WScript.Echo "CSCreationClassName: " & objItem.CSCreationClassName > > WScript.Echo "CSName: " & objItem.CSName > > WScript.Echo "Description: " & objItem.Description > > WScript.Echo "ExecutablePath: " & objItem.ExecutablePath > > WScript.Echo "ExecutionState: " & objItem.ExecutionState > > WScript.Echo "Handle: " & objItem.Handle > > WScript.Echo "HandleCount: " & objItem.HandleCount > > WScript.Echo "InstallDate: " & objItem.InstallDate > > WScript.Echo "KernelModeTime: " & objItem.KernelModeTime > > WScript.Echo "MaximumWorkingSetSize: " & objItem.MaximumWorkingSetSize > > WScript.Echo "MinimumWorkingSetSize: " & objItem.MinimumWorkingSetSize > > WScript.Echo "Name: " & objItem.Name > > WScript.Echo "OSCreationClassName: " & objItem.OSCreationClassName > > WScript.Echo "OSName: " & objItem.OSName > > WScript.Echo "OtherOperationCount: " & objItem.OtherOperationCount > > WScript.Echo "OtherTransferCount: " & objItem.OtherTransferCount > > WScript.Echo "PageFaults: " & objItem.PageFaults > > WScript.Echo "PageFileUsage: " & objItem.PageFileUsage > > WScript.Echo "ParentProcessId: " & objItem.ParentProcessId > > WScript.Echo "PeakPageFileUsage: " & objItem.PeakPageFileUsage > > WScript.Echo "PeakVirtualSize: " & objItem.PeakVirtualSize > > WScript.Echo "PeakWorkingSetSize: " & objItem.PeakWorkingSetSize > > WScript.Echo "Priority: " & objItem.Priority > > WScript.Echo "PrivatePageCount: " & objItem.PrivatePageCount > > WScript.Echo "ProcessId: " & objItem.ProcessId > > WScript.Echo "QuotaNonPagedPoolUsage: " & objItem.QuotaNonPagedPoolUsage > > WScript.Echo "QuotaPagedPoolUsage: " & objItem.QuotaPagedPoolUsage > > WScript.Echo "QuotaPeakNonPagedPoolUsage: " & > > objItem.QuotaPeakNonPagedPoolUsage > > WScript.Echo "QuotaPeakPagedPoolUsage: " & objItem.QuotaPeakPagedPoolUsage > > WScript.Echo "ReadOperationCount: " & objItem.ReadOperationCount > > WScript.Echo "ReadTransferCount: " & objItem.ReadTransferCount > > WScript.Echo "SessionId: " & objItem.SessionId > > WScript.Echo "Status: " & objItem.Status > > WScript.Echo "TerminationDate: " & objItem.TerminationDate > > WScript.Echo "ThreadCount: " & objItem.ThreadCount > > WScript.Echo "UserModeTime: " & objItem.UserModeTime > > WScript.Echo "VirtualSize: " & objItem.VirtualSize > > WScript.Echo "WindowsVersion: " & objItem.WindowsVersion > > WScript.Echo "WorkingSetSize: " & objItem.WorkingSetSize > > WScript.Echo "WriteOperationCount: " & objItem.WriteOperationCount > > WScript.Echo "WriteTransferCount: " & objItem.WriteTransferCount > > Next > > > > > > > > Then it works just fine. Is this a known issue with powershell? Is there > > some Powershell setting that is preventing this? > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| error msg, think its about permissions | Vista file management | |||
| Error was 80070005 - permissions. | Windows Updates | |||
| Remote registry key permissions | PowerShell | |||
| Trying to understand Remote WMI permissions | PowerShell | |||
| Vista Permissions Questions (including Remote Desktop) | Vista General | |||