Move to PowerShell for WinRM Management

As most people are aware, PowerShell provides two ways of managing the Windows Remote Management (WinRM) infrastructure: the WSMan Provider and the WS-Management Cmdlets. (As you are no doubt aware, WinRM is the Windows implementation of the WS-Management standard, which is why these cmdlets are named Ws-Management.) Together, the WSMan Provider and WS-Management cmdlets give…


WS-Man (Web Services for Management) 1.2 Published

The DMTF recently published the Web Services for Management (WS-Man) standard version 1.2. This release of the WS-Man specification clarifies support for the latest encryption protocols, which has been required by organizations and governmental agencies such as the US Government NIST program. WS-Man is a SOAP-based protocol that can be used with any transport, although…


Enumerating and getting WMI provider class instances with performance in mind

  Performance of CIM_DataFile and Win32_Directory enumeration depends on the number of files or directories that are being enumerated, and, hence, can be very slow and can take hours. In following example, we run the Get-CimInstance cmdlet to enumerate all the instances of the class CIM_DataFile. On a brand-new virtual machine, the operation took 38…

0

Performing management tasks using CIM Cmdlets [4] – Files and Folders

  As a part of the ongoing blog series Performing Management tasks using CIM Cmdlets we are sharing PowerShell snippets for a few computer management tasks. In this post, we will be going over the PowerShell snippets for file and folder management. The corresponding Visual Basic samples are in the MSDN article, WMI Tasks for…

2

Performing Management tasks using Cimcmdlets [3] – Operating System

  As a part of the ongoing blog series “Performing Management tasks using Cimcmdlets” we are sharing PowerShell snippets for a few Computer Management tasks. In this post we will be going over the PS snippets for Operating System Management. The corresponding Visual Basic samples are at: http://msdn.microsoft.com/en-us/library/aa394596(v=vs.85).aspx 1. Determine if a service pack has…

0

Performing Management tasks using Cimcmdlets [2] – Computer Hardware

As part of this blog series we are sharing PowerShell snippets for a few Computer Management tasks. In this post we will be going over the samples for Computer Hardware management. The Visual Basic samples for Computer Hardware Management are at: http://msdn.microsoft.com/en-us/library/aa394587(v=vs.85).aspx The corresponding PowerShell samples are below: 1. Determine how much free memory a…

1

Performing Management tasks using Cimcmdlets – Processes

WMI provides a standardized system management infrastructure that can be leveraged by a number of different clients. WMI providers and the classes exposed by the providers help in various management tasks. Our MSDN documentation lists a bunch of management scenarios and the corresponding Visual Basic samples, but it is much easier for an IT administrator…

2

Implementing MI Provider (6) – Build, Register, and Debug

This blog discusses how to build, register and debug MI provider. Build To build MI provider, open visual studio 2012, create an empty Visual C++ project named “process”, set type to DLL, and add all generated files into the project. Open project property dialog box, navigate to linker page, click input option, Set Module Definition…


Implementing MI Provider (5) – Implement

As discussed in Implementing MI Provider (4) – Generate Code (continute), Convert-MofToProvider.exe tool generates <class name>.c file for each target class, which contains stub functions to place the business logic of each operation, such as enumerate/get/delete/modify/new/<extrinsic methods>. This blog discusses how to implement stub functions of normal (instance) classes, while association and indication class will be discussed…


Implementing MI Provider (4) – Generate Code (continute)

As described in Implementing MI Provider (3), Convert-MofToProvider.exe tool generates a set of code files, including schema.c, module.c, WMIAdapter.c, Provider.DEF, <class name>.h, and <class name>.c. There is one header file for each target class and all of it’s ancestor class(es) if have. And one c file for each target class (specified by -ClassList parameter). Header files…