![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | win32_process type name not found in system.management.managementc I am new to powershell and was trying to use powershell to install/uninstall services on a remote machine. the command i was using to create a win32_process is: PS C:\> $mc = new-object system.management.managementclass \root\cimv2:win32_process This command was working fine untill earlier today and i was messing around. I found out that i executed this line: PS C:\> $mc.delete() and now when i try to create a new win32_process i get this exception: New-Object : Exception retrieving the type name hierarchy: "Not found ". At line:1 char:11 + new-object <<<< system.management.managementclass \root\cimv2:win32_process This is really weird, has anybody seen this before? i dont know what to do. Thanks for the help. |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: win32_process type name not found in system.management.managementc You did remove the win32_progress CLASS from the WMI repository. one option is to stop the WMI service and delete the following directory : %windir%\system32\wbem\repository and restart WMI service, the repository will be re-build again or you can just re-compile the cimwin32.mof file to add the classes in there again the first option is a bit more brute-force but easier without the WMI knowledge Greetings /\/\o\/\/ http:\\thePowerShellGuy.com "Alan" wrote: > I am new to powershell and was trying to use powershell to install/uninstall > services on a remote machine. the command i was using to create a > win32_process is: > > PS C:\> $mc = new-object system.management.managementclass > \root\cimv2:win32_process > > This command was working fine untill earlier today and i was messing around. > I found out that i executed this line: > > PS C:\> $mc.delete() > > and now when i try to create a new win32_process i get this exception: > > New-Object : Exception retrieving the type name hierarchy: "Not found ". > At line:1 char:11 > + new-object <<<< system.management.managementclass \root\cimv2:win32_process > > This is really weird, has anybody seen this before? i dont know what to do. > > Thanks for the help. |
My System Specs![]() |
| | #3 (permalink) |
| Guest | RE: win32_process type name not found in system.management.managem It worked. I have another quick question for you. I am using powershell for automation and after i uninstall the windows service how can i delete the ..exe file afterwards? Thanks again for the help /\/\o\/\/ ![]() "/\/\o\/\/ [MVP]" wrote: > You did remove the win32_progress CLASS from the WMI repository. > > one option is to stop the WMI service and delete the following directory : > > %windir%\system32\wbem\repository > > and restart WMI service, the repository will be re-build again > > or you can just re-compile the cimwin32.mof file to add the classes in there > again > > the first option is a bit more brute-force but easier without the WMI > knowledge > > Greetings /\/\o\/\/ > http:\\thePowerShellGuy.com > > > "Alan" wrote: > > > I am new to powershell and was trying to use powershell to install/uninstall > > services on a remote machine. the command i was using to create a > > win32_process is: > > > > PS C:\> $mc = new-object system.management.managementclass > > \root\cimv2:win32_process > > > > This command was working fine untill earlier today and i was messing around. > > I found out that i executed this line: > > > > PS C:\> $mc.delete() > > > > and now when i try to create a new win32_process i get this exception: > > > > New-Object : Exception retrieving the type name hierarchy: "Not found ". > > At line:1 char:11 > > + new-object <<<< system.management.managementclass \root\cimv2:win32_process > > > > This is really weird, has anybody seen this before? i dont know what to do. > > > > Thanks for the help. |
My System Specs![]() |
| | #4 (permalink) |
| Guest | RE: win32_process type name not found in system.management.managem I forgot to add that I am doing on a remote machine from a build server. "Alan" wrote: > It worked. I have another quick question for you. I am using powershell for > automation and after i uninstall the windows service how can i delete the > .exe file afterwards? > > Thanks again for the help /\/\o\/\/ ![]() > > "/\/\o\/\/ [MVP]" wrote: > > > You did remove the win32_progress CLASS from the WMI repository. > > > > one option is to stop the WMI service and delete the following directory : > > > > %windir%\system32\wbem\repository > > > > and restart WMI service, the repository will be re-build again > > > > or you can just re-compile the cimwin32.mof file to add the classes in there > > again > > > > the first option is a bit more brute-force but easier without the WMI > > knowledge > > > > Greetings /\/\o\/\/ > > http:\\thePowerShellGuy.com > > > > > > "Alan" wrote: > > > > > I am new to powershell and was trying to use powershell to install/uninstall > > > services on a remote machine. the command i was using to create a > > > win32_process is: > > > > > > PS C:\> $mc = new-object system.management.managementclass > > > \root\cimv2:win32_process > > > > > > This command was working fine untill earlier today and i was messing around. > > > I found out that i executed this line: > > > > > > PS C:\> $mc.delete() > > > > > > and now when i try to create a new win32_process i get this exception: > > > > > > New-Object : Exception retrieving the type name hierarchy: "Not found ". > > > At line:1 char:11 > > > + new-object <<<< system.management.managementclass \root\cimv2:win32_process > > > > > > This is really weird, has anybody seen this before? i dont know what to do. > > > > > > Thanks for the help. |
My System Specs![]() |
| | #5 (permalink) |
| Guest | RE: win32_process type name not found in system.management.managem I can not give a faultproof solution, becouse of the way services work : there is a way to list the exes called directly, but it would only work for Own Process services and for the command that get's invoked gwmi win32_service | group ServiceType to find out and list startup path for all 'Own Process' services : gwmi win32_service |? {$_.ServiceType -eq 'Own Process'} | ft name,pathname look for youself if this will work in our case h.t.h. Greetings /\/\o\/\/ "Alan" wrote: > It worked. I have another quick question for you. I am using powershell for > automation and after i uninstall the windows service how can i delete the > .exe file afterwards? > > Thanks again for the help /\/\o\/\/ ![]() > > "/\/\o\/\/ [MVP]" wrote: > > > You did remove the win32_progress CLASS from the WMI repository. > > > > one option is to stop the WMI service and delete the following directory : > > > > %windir%\system32\wbem\repository > > > > and restart WMI service, the repository will be re-build again > > > > or you can just re-compile the cimwin32.mof file to add the classes in there > > again > > > > the first option is a bit more brute-force but easier without the WMI > > knowledge > > > > Greetings /\/\o\/\/ > > http:\\thePowerShellGuy.com > > > > > > "Alan" wrote: > > > > > I am new to powershell and was trying to use powershell to install/uninstall > > > services on a remote machine. the command i was using to create a > > > win32_process is: > > > > > > PS C:\> $mc = new-object system.management.managementclass > > > \root\cimv2:win32_process > > > > > > This command was working fine untill earlier today and i was messing around. > > > I found out that i executed this line: > > > > > > PS C:\> $mc.delete() > > > > > > and now when i try to create a new win32_process i get this exception: > > > > > > New-Object : Exception retrieving the type name hierarchy: "Not found ". > > > At line:1 char:11 > > > + new-object <<<< system.management.managementclass \root\cimv2:win32_process > > > > > > This is really weird, has anybody seen this before? i dont know what to do. > > > > > > Thanks for the help. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Unable to cast COM object of type 'ADODB.RecordsetClass' to class type 'System.Object[]' | Michel Posseth [MCP] | .NET General | 2 | 03-27-2008 10:04 AM |
| The type or namespace 'PSSnapIn' could not be found | junker37 | PowerShell | 7 | 03-23-2008 12:49 AM |
| RC2 - where has System.Management.Automation.dll gone? | =?Utf-8?B?QW5kcmV3IFdlYmI=?= | PowerShell | 5 | 01-10-2008 12:43 AM |
| Win32_Process create method | mpriem | PowerShell | 5 | 07-16-2007 07:04 AM |
| Issues with System drive in Disk Management on a Dual Boot system | =?Utf-8?B?dGhpbHRvbg==?= | Vista General | 4 | 07-09-2006 06:26 PM |