We can't manage printers with WMI in a clustered environment

Hi all,   Some time ago a customer of mine wanted to develop PowerShell scripts to manage printers in their clustered environment. They wanted to use WMI for that. The problem they found is that while they could list the printers on a stand-alone server by executing “get-wmi-object -class Win32_printer”, they didn’t get any result…

3

How to change ownership and give full permissions to a user on a folder (VBScript)

Hi all, Some time ago we faced an issue where a customer renamed users in their domain, but their profile folders didn’t get renamed. So they wanted to automate the following process which worked for them when doing it manually: take ownership of a user’s profile folder with an administrator, give full permissions to that admin…

0

WMI Diag won't work well in non-English Windows

Hi all, If you ever use WMI Diag script (The WMI Diagnosis Utility — Version 2.0) on a non-English version of Windows (i.e. Spanish, French, Italian, German…), you will get tons of errors when the script checks out default permissions on WMI namespaces or DCOM components related to WMI, for instance. The cause is simple: the script checks…

2

How to get Antivirus information with WMI (VBScript)

Hi all, welcome back, As we read in Windows Security Center – Managing the State of Security, the vast majority of antivirus Independent Software Vendors (ISVs) support WMI integration. Windows Security Center uses it to detect antivirus and firewall solutions. The following script shows how to get some information from those solutions:  strComputer = “.”…

37

Win32_Process.Create fails if user profile is not loaded

Hi all, welcome back, The other day I worked on an issue which happened when using WMI method Win32_Process.Create to spawn a process from an ASP.NET application. This method was returning an UNKNOWN FAILURE (8) and the new process wasn’t created. The application was running as Network Service and WMI was impersonating a special user when launching the…

11

How to change the Security Descriptor of WMI objects

Hi all, welcome back, You may want to give users or groups access to perform read/modify WMI operations on WMI objects, and for that you need to change the Security Descriptor (SD) for WMI objects. There are several ways to achieve this: 1) Manually with wmimgmt.msc: 325353 HOW TO: Set WMI Namespace Security in Windows Server…

2