List of WMI Privileges

Microsoft has a published list of optional WMI privileges at the following link:

http://msdn.microsoft.com/en-us/library/aa392758(VS.85).aspx

These privileges are sometimes necessary for enabling certain operations in WMI. For example, if you do not specify the Security privilege when accessing instances of the Win32_NTLogEvent WMI class, you will not be able to view event log entries from the Windows security event log.

Prevent Installation of ConfigMgr Client

You may have some systems which you specifically want to exclude from installing the ConfigMgr client. There are a variety of automated methods in which a system may get the ConfigMgr client installed, desired or not. These methods could include:

  • Client push installation
  • Active Directory startup script
  • Centrally executed management / health check script

Recently, on the MyITforum ConfigMgr mailing list, someone posed the question of how to exclude a workstation from installing the ConfigMgr client. The reason for this was that the workstation in question was running some Cisco software, which would break if Microsoft patches were installed on it. A response to this post suggested the following method:

32-bit Platform

Create two blank files named ccm and ccmsetup under %WINDIR%System32

64-bit Platform

Create two blank files named ccm and ccmsetup under %WINDIR%SysWow64

Note: Credit goes to Max Campbell at Lancaster General Health for the solution.

AutoIT: Enumerating all Windows

Here is a short script I wrote using AutoIT, which enumerates all of the windows, to the StdOut stream:

ConsoleWrite(“Enumerating windows”)
$AllWindows = WinList()
ConsoleWrite(“Found ” & UBound($AllWindows) & ” windows”)
for $i = 0 to UBound($AllWindows) – 1
ConsoleWrite(@lf & “Name: ” & $AllWindows[$i][0])
ConsoleWrite(@lf & “HWND: ” & $AllWindows[$i][1])
next
ConsoleWrite(@lf & “Completed listing windows.”)

Note: Please ensure that you check the “console” option when compiling this script for execution. If you do not check this box, there will be no StdOut stream created, which means you will get no output.

Windows API Code Pack

There is some free code available on the MSDN Code Gallery, called the Windows API Code Pack for Microsoft .NET Framework, which enables .NET developers to access certain Windows 7 features that are not typically available via the .NET Base Class Library (BCL). Naturally, since this is .NET code, the same functionality ought to be available to PowerShell users!

Get it here: http://code.msdn.microsoft.com/WindowsAPICodePack

Among the feature set is:

  • Windows 7 Taskbar – Jump lists, icon overlay, progress bar, tabbed thumbnails, and thumbnail toolbars
  • Windows Shell
  • DirectX
  • Power Management APIs
  • Application Restart and Recovery APIs
  • … and much more!

Hope this helps!