Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PowerShell script settings are ineffective after you delete VBScript logon or logoff settings from the Script tab


View products that this article applies to.

Symptoms

Assume that you have VBScript scripts and Windows PowerShell scripts configured in a Group Policy logon or logoff script. You edit this Group Policy Object (GPO) by opening the properties dialog box for the logon or logoff script, deleting all VBScript settings from the Script tab, and then clicking OK or Apply followed by OK. After that, you notice that the PowerShell scripts are ineffective, even if you did not delete any settings from the PowerShell Scripts tab.

↑ Back to the top


Cause

Deleting all VBScript settings from the Script tab removes the value of the gPCUserExtensionNames property of the GPO. (To determine this value, see the "More information" section.) This causes all logon and logoff scripts to be ineffective. 

This operation does not delete the PowerShell script files or the PowerShell script settings in the Psscripts.ini file. Therefore, you can still see the settings in Group Policy Management Editor. 

↑ Back to the top


Resolution

To resolve this issue, install September 19, 2017 update, KB4038774 for Windows Server 2012 R2.

↑ Back to the top


Workaround

To work around this issue, open the logon or logoff script properties dialog box, select the PowerShell Scripts tab, and then click OK. This restores the correct value of the gPCUserExtensionNames property.

↑ Back to the top


More Information

Microsoft recognized this behavior as a product bug and will consider fixing this problem in future operating system versions.

To determine the value of the gPCUserExtensionNames property of the GPO, follow these steps:
  1. Open Adsiedit.msc. 
  2. Expand the domain NC->DC=domain, DC=ext -> CN=System -> CN=Policies
  3. Right-click the GUID of the GPO, and then click Properties on the shortcut menu. You can see the gPCUserExtensionNames value on the Attributes tab.
 

↑ Back to the top


Keywords: kb, kbexpertiseadvanced, kbsurveynew, kbtshoot

↑ Back to the top

Article Info
Article ID : 3071417
Revision : 2
Created on : 10/11/2017
Published on : 10/13/2017
Exists online : False
Views : 378