Saturday, September 29, 2007

Overview:The Group Policy Management Console (GPMC) can be scripted by using a built-in COM object.

This package contains a great deal of script examples:BackupAllGPOs.wsfBackupGPO.wsfCopyGPO.wsfCreateEnvironmentFromXML.wsfCreateGPO.wsfCreateMigrationTable.wsfCreateXMLFromEnvironment.wsfDeleteGPO.wsfDumpGPOInfo.wsfDumpSOMInfo.wsfFindDisabledGPOs.wsfFindDuplicateNamedGPOs.wsfFindGPOsByPolicyExtension.wsfFindGPOsBySecurityGroup.wsfFindGPOsWithNoSecurityFiltering.wsffindorphanedGPOsInSYSVOL.wsfFindSOMsWithExternalGPOLinks.wsfFindUnlinkedGPOs.wsfGetReportsForAllGPOs.wsfGetReportsForGPO.wsfGrantPermissionOnAllGPOs.wsfImportAllGPOs.wsfImportGPO.wsfListAllGPOs.wsfListSOMPolicyTree.wsfQueryBackupLocation.wsfRestoreAllGPOs.wsfRestoreGPO.wsfSetGPOCreationPermissions.wsfSetGPOPermissions.wsfSetGPOPermissionsBySOM.wsfSetSOMPermissions.wsfSampleEnvironment.xmlScriptingReadme.rtfSampleMigrationTable.migtableLib_CommonGPMCFunctions.js

Sunday, September 02, 2007

Microsoft just gave us an updated version of the Windows Script engine that we all love so much... This version brings very few additions, but great many fixes.

From release notes:This release of Windows Script brings the improvements in scripting made during the Vista development cycle to downlevel platforms. During any release cycle we test with increasingly effective analysis tools designed to expose stability problems, memory leaks, and potential security weaknesses in code. The results from this testing comprise the vast majority of changes. Of course, we also include all the current security updates. This is the fastest, most robust, and secure release of Windows Script available.

Why Version 5.7?The primary reason for changing the version number from 5.6 to 5.7 is to simplify servicing and support by synchronizing the versioning to a consistent scheme based on Vista build number. The minor version increase does not indicate significant new features. The scripting feature set is substantially the same as 5.6, with only minor additions.

What’s NewIn addition to the general improvements noted above, the following are some of the notable changes in this release.

JScript• This package includes the improved garbage collector (GC) shipped with Internet Explorer 7 and Vista. The new GC can dramatically improve the performance of applications that create large numbers of objects, such as Ajax-style web applications. These performance improvements are now available to users of earlier browsers.This work replaces and improves upon KB919237. If you have implemented KB919237, we recommend removing the registry keys.• New progid JScript.Compact implements the JScript Compact Profile (ECMA 327). This is a profile of the ECMAScript language standard with a subset of features. See the ECMA 327 standard for more information.• Update for new Daylight Savings Time rules.

VBScript• VBScript defines a new global function GetUILanguage that returns the current default user interface language. This is the same value returned by the Windows API GetUserDefaultUILanguage. Script authors can now write code that is aware of the current user’s language preference.• Fix crash when calling VBScript class objects from JScript.• Fix problems with comparisons to NaN in some versions (KB901104).VBScript and JScript• Support for large address space on machines with > 2GB RAM (KB890048)• Improved stack checking makes script more robust in the face of stack overflows.• Fix miscellaneous TLS leaks and memory leaks, including using the RegEx object with more than 10 sub-matches.Windows Scripting Host• Fixed rare deadlocks in remote scripting. Prevents occasional hangs in remote scripts.• Fixed propagation of error return codes in remote scripting. Error codes produced by remote scripts are more reliably returned to the client.• Fixed attempting to load nonexistent wshenu.dll which created performance problem in login scripts.

Included KB’sThis release also contains fixes described in the following knowledgebase articles.KB831191KB834742KB836863KB890048KB892296KB901104KB903648KB906092KB917344KB919237 (superceded by new GC)KB925753KB933811KB933812KB933873KB940284

Read more here:Microsoft KB 940122 article: "How to use the Microsoft Group Policy Diagnostic Best Practice Analyzer (GPDBPA) tool to collect and to analyze data"

Quote from KB article:You can use the Microsoft Group Policy Diagnostic Best Practice Analyzer (GPDBPA) tool to collect data about an environment's Group Policy configuration. For example, you can use this tool to analyze a Group Policy configuration for the following purposes:

• To search for common configuration errors• To discover and to diagnose problems• To collect data for archiving

The account that you use to run the tool must have the appropriate permissions to access both the Active Directory database on an environment's domain controllers and the SYSVOL file structure that is maintained on those domain controllers. Additionally, the account must have local Administrator permissions on the Group Policy client.

There are two additional prerequisites for using the GPDBPA tool:•The Microsoft .NET Framework version 1.1 or a later version must be installed on the computer on which the GPDBPA tool is installed.•The Windows Management Instrumentation (WMI) service must be running on the environment's domain controllers.