RSOP_ScriptPolicySetting class

Represents a script policy setting. The order of the RSOP_ScriptCmd objects is the order in which the scripts execute.

Note  Classes that derive from the RSOP_PolicySetting class must define the id, precedence, and scriptorder properties to be keys.

The following syntax is simplified from MOF code and includes all inherited properties.

Syntax

class RSOP_ScriptPolicySetting : RSOP_PolicySetting
{
  string         id;
  uint32         precedence;
  string         GPOID = "";
  string         SOMID = "";
  datetime       creationTime;
  uint32         scriptType = 0;
  RSOP_ScriptCmd scriptList[];
  uint32         scriptorder = 0;
  uint32         psScriptOrder = 0;
};

Members

The RSOP_ScriptPolicySetting class has these types of members:

Properties

The RSOP_ScriptPolicySetting class has these properties.

creationTime
Data type: datetime
Access type: Read-only

Time the policy object was created.

This property is inherited from the RSOP_PolicySetting class.

GPOID
Data type: string
Access type: Read-only

Identifies the GPO that contains the policy object. You can obtain this value from PGROUP_POLICY_OBJECT->lpDSPath. You must remove the prefix LDAP://CN=Machine from lpDSPath.

This property is inherited from the RSOP_PolicySetting class.

id
Data type: string
Access type: Read-only
Qualifiers: Key

Unique identifier for objects of this class.

This property is inherited from the RSOP_PolicySetting class.

precedence
Data type: uint32
Access type: Read-only
Qualifiers: Key

The order or precedence in which the policy object should be applied.

This property is inherited from the RSOP_PolicySetting class.

psScriptOrder
Data type: uint32
Access type: Read-only

Whether Windows Powershell scripts in the GPO will run before or after non-Windows Powershell scripts in the GPO.

Windows Server 2003 and Windows Vista:  This property is not available before Windows Server 2008 R2 and Windows 7.

This property can have one of the following values.

Not Configured ("1")
Windows PowerShell scripts will run first ("2")
Windows PowerShell scripts will run last ("3")
scriptList
Data type: RSOP_ScriptCmd array
Access type: Read-only

List of RSOP_ScriptCmd objects containing information about the scripts to run.

scriptorder
Data type: uint32
Access type: Read-only
Qualifiers: Key

Relative order of instantiation of RSOP_ScriptPolicySetting objects.

scriptType
Data type: uint32
Access type: Read-only

Type that indicates when to run the scripts identified by the scriptList property.

This property can have one of the following values.

Logon ("1")
Logoff ("2")
Startup ("3")
Shutdown ("4")
SOMID
Data type: string
Access type: Read-only

The scope of management (SOM) associated with the GPO that contains this policy object. You can obtain this value from PGROUP_POLICY_OBJECT->lpLink. You must remove the prefix LDAP:// from lpLink.

This property is inherited from the RSOP_PolicySetting class.

Remarks

The RSOP_ScriptPolicySetting class is derived from RSOP_PolicySetting.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\\.\root\RSOP\Computer, \\.\root\RSOP\User

MOF

Rsop.mof

DLL

GPSvc.dll

See also

Group Policy Overview
Group Policy RSoP WMI Classes
RSOP_ScriptCmd

 

 

Show:
© 2015 Microsoft