![]() This is sort of a magic number, and it takes a bit of searching on the Internet to find the information (it is not in the MSDN article for the WMI class). I am going to use the Get-CimInstance cmdlet to query the SoftwareLicensingProduct WMI class, and to find the ApplicationID for my version of Windows. For output, I would probably pipe the results to Export-CSV to create a nice file that I can open in Microsoft Excel for my documentation. That is how I might modify things to run against all of the computers on my network. I can then feed that list to the New-CimSession cmdlet to create CIM sessions, and then I can use Get-CimInstance to retrieve my information. I can easily query Active Directory Domain Services (AD DS) by using the Get-Computer cmdlet to retrieve a list of the computers I want to check. If you have been using Windows PowerShell for a while to manage your network, chances are good that you already have WinRM enabled. This means that it is automatically activated and it simply works in Windows Server 2012 R2 and Windows Server 2012.įor desktop operating systems, WinRM needs to be enabled, but that is easy enough to do via Group Policy (in larger environments) or via a logon script (for smaller environments). It uses the same remoting technology as other Windows PowerShell remoting. This is because it relies on WINRM for remoting. One reason for using the Get-CimInstance cmdlet is that I can create a CIM session pretty much automatically. Two of the more useful methods (for me anyway) are the Active and the UninstallProductKey methods, both of which are pretty much self-explanatory as to what they do. ![]() The SoftwareLicensingProduct class is documented on MSDN, and it contains numerous methods that permit network administrators to completely manage Windows licensing. (For versions earlier than Windows 7, other WMI classes are required). To find information about current versions of Windows, I can use the SoftwareLicensingProduct WMI class. The WMI team wrote a great article about CIM cmdlets on the Windows PowerShell Blog that you may want to read: Introduction to CIM Cmdlets. The CIM cmdlets shipped in Windows PowerShell 3.0 (with Windows 8 and Windows Server 2012), so they have been around for a while. There are numerous ways to access Windows Management Instrumentation (WMI) information by using Windows PowerShell. There is no need to mess around with something that is already perfect. The Oolong has a very complex flavor, and I can close my eyes and taste the natural sweetness of the tea. No cinnamon stick, no lemon, no milk, and especially no sugar. With Oolong, especially a very nice Oolong, I do not add anything to the tea. I feel like this morning is a special occasion. I brought back some very nice Oolong tea from Leipzi, Germany earlier this year, and I have been saving it for special occasions. Normally, I would have a black tea in the morning, but this morning, for some reason, I thought that Oolong would do the trick. I am sipping a cup of Oolong tea this morning. I guess that means it is working…we will see. In fact, I am pretty sure that I am sore in muscles that I did not know that I had. This morning I am still sore from my session with my new personal trainer. Microsoft Scripting Guy, Ed Wilson, is here. I want to produce a list of desktop systems, get the names and versions of the operating systems, and find out if the system is activated properly. I suspect that many of our desktop operating systems are not activated properly. I think he was a professional Internet surfer. ![]() I am not sure what he actually did for a living, but it certainly was not network administration. ![]() Hey, Scripting Guy! The previous network administrator at my company was not attentive to his work. ![]() Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell and WMI to display Windows activation status. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |