Take the guess work out of which WMI counters to use when scripting the operating system, Active Directory or Exchange Server. Download your free copy of WMI Monitor On Error Resume Next For a quick fix, try adding the command 'On Error Resume Next'.
This tells the script to ignore the error and continue.
In my opinion this is seldom a permanent solution, however it will allow the script to get past the fault and possibly execute useful commands.
One possible use would me mapping zillions of network drives, if the script maps all the drives except one then you may have a satisfactory outcome.
However, when I login with an administrator it doesn't get executed. The policy is supposed to be applied to all authenticated domain users.
Is there a limitation for admin users or am I doing something wrong?
I have a Windows 2008 DC with a logon script in the default policy.
This script has been tested and works if executed manually for admins and users.The way I narrow the search area is to ask a series of questions, for example, is the error a syntax error or a logical error.A logical error would be trying to connect to a server or share that does not exist, whereas a syntax error would be a missing bracket or ampersand.Option Explicit This command forces you declare all variables.Where Option Explicit helps with troubleshooting is where you misspell a variable later in the script.Simply double click the VBScript in isolation, away from a Group Policy.