0
votes

How generate C# class using mgmtclassgen command for IISWebInfo ??

I test like this:

C:\Temp>mgmtclassgen Win32_LogicalDisk /n root\cimv2 /l CS /p c:\disk.cs Microsoft (R) .NET Framework Version 3.5.21022.8 Copyright (C) Microsoft Corporation. All rights reserved. Generating Code for WMI Class Win32_LogicalDisk ... Code Generated Successfully!!!!

C:\Temp>mgmtclassgen IISWebInfo /n root\cimv2 /l CS /p c:\disk2.cs Microsoft (R) .NET Framework Version 3.5.21022.8 Copyright (C) Microsoft Corporation. All rights reserved. Getting the given class Failed

C:\Temp>mgmtclassgen IIsWebInfo /n root\cimv2 /l CS /p c:\disk2.cs Microsoft (R) .NET Framework Version 3.5.21022.8 Copyright (C) Microsoft Corporation. All rights reserved. Getting the given class Failed

C:\Temp>mgmtclassgen IIsWebInfo /n root\MicrosoftIISv2 /l CS /p c:\disk2.cs Microsoft (R) .NET Framework Version 3.5.21022.8 Copyright (C) Microsoft Corporation. All rights reserved. Errors Occurred!!!! Reason : Espacio de nombres no válido

1

1 Answers

1
votes

the IIsWebInfo class is present in the root\MicrosoftIISv2 namespace. so you must check which this namespace exist in your system.

this error message Errors Occurred!!!! Reason : Espacio de nombres no válido means which the namespace does not exist in your system.

you can found more information in this link