//******************************************************************************
//
//  Copyright (c) Microsoft Corporation.  All rights reserved.
//
//  File: TaskSequenceProvider.mof
//
//  <<Description>>
//
//******************************************************************************
#pragma autorecover

#pragma namespace("\\\\.\\root")

// SMS Root Storage
REPLACESDDLSDKROOT
instance of __Namespace
{
    Name = "SMS";
};

#pragma namespace("\\\\.\\root\\SMS")


// SMS Database name for this machine
REPLACESDDLSDK
instance of __Namespace
{
    Name = "site_REPLACESITECODE";
};

#pragma namespace("\\\\.\\root\\SMS\\site_REPLACESITECODE")

#pragma classflags("forceupdate")


//******************************************************************************
//
//  Provider registration
//
//******************************************************************************

instance of __Win32Provider as $TSProvider
{
    Name = "TaskSequenceProvider";
    Clsid = "{9B70A61F-4082-4364-92CD-E3910276491B}";

	HostingModel="LocalSystemHost:TaskSequenceProvider";
};

instance of __MethodProviderRegistration
{
    Provider = $TSProvider;
};

//******************************************************************************
//
//  SMS_TaskSequence
//
//******************************************************************************

[dynamic, provider("TaskSequenceProvider")]
class SMS_TaskSequence
{
    string          SchemaVersion = "3.00";

    SMS_TaskSequence_Step Steps[];
    
    [static, implemented]
    SMS_TaskSequence LoadFromXml(
                    [in]    string      Xml
                    );

    [static, implemented]
    string SaveToXml(
                    [in]    SMS_TaskSequence TaskSequence,
                    [out]   SMS_TaskSequence_Reference References[],
                    [out]   uint32 Flags                                //  0x00000001 = Sequence deploys an OS image
                    );

    [static, implemented]
    string ExportXml(
                    [in]    string  Xml
                    );

    [static, implemented]
    string UpdateNestedSequenceReferences(
                    [in]    string      Xml,
                    [in]    string      NestedSequencePkgId,
                    [in]    string      NestedSequencePkgRefs,
                    [in]    string      NestedSequenceAppRefs,
                    [out]   SMS_TaskSequence_Reference References[],
                    [out]   uint32 Flags
                    );
};

//******************************************************************************
//
//  SMS_TaskSequence_Reference
//
//******************************************************************************

class SMS_TaskSequence_Reference
{
    string      Package;
    string      Program;        //Used only for Package program
    uint32      Type;           // 0 - Package reference, 1 - App reference
};

//******************************************************************************
//
//  SMS_TaskSequence_ApplicationInfo
//
//******************************************************************************

class SMS_TaskSequence_ApplicationInfo
{
    string      Name;
    string      DisplayName;
    string      Description;
};

//******************************************************************************
//
//  SMS_TaskSequence_PackageInfo
//
//******************************************************************************

class SMS_TaskSequence_PackageInfo
{
    // package name
    string      Name;
    
    // package type
    uint32      PkgType;
    
    // size (KB)
    uint32      Size;
    
    string      PackageId;
};


//******************************************************************************
//
//  SMS_TaskSequence_Step
//
//******************************************************************************

[abstract]
class SMS_TaskSequence_Step
{
    [AllowedLen("1-100")]
    string          Name;
    [AllowedLen("0-255")]
    string          Description;
    boolean         ContinueOnError;
    boolean         Enabled;


    SMS_TaskSequence_Condition Condition;
};

//******************************************************************************
//
//  SMS_TaskSequence_Action
//
//******************************************************************************

[abstract]
class SMS_TaskSequence_Action : SMS_TaskSequence_Step
{
    uint32          Timeout;
    [ValueMap{"WinPE", "FullOS", "WinPEandFullOS"}, Not_Null:ToInstance]
    string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_Group
//
//******************************************************************************

class SMS_TaskSequence_Group : SMS_TaskSequence_Step
{
    SMS_TaskSequence_Step Steps[];
};

//******************************************************************************
//
//  SMS_TaskSequence_Pointer
//
//******************************************************************************
[abstract]
class SMS_TaskSequence_Pointer : SMS_TaskSequence_Step
{
    [ValueMap{"WinPE", "FullOS", "WinPEandFullOS"}, Not_Null:ToInstance]
    string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_SubTasksequence
//  
//******************************************************************************

[   CommandLine("SubTasksequence.exe"),  
    VariablePrefix("OSDSubTasksequence"),
    ActionCategory{"General,9,1"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "SubTasksequenceControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_SubTasksequence : SMS_TaskSequence_Pointer
{
    [Not_Null, TaskSequencePackage("subtasksequence"), VariableName("OSDSubTasksequencePackageID")]
    string          TsPackageID;
    string          TsName;

    // Comma separated list of package references for this sub-tasksequence 
    [TaskSequencePackageList]
    string          TsReferencePackages;

    // Comma separated list of application references for this sub-tasksequence 
    [TaskSequenceApplication]
    string          TsReferenceApplications;
};


//******************************************************************************
//
//  SMS_TaskSequence_Condition
//
//******************************************************************************

class SMS_TaskSequence_Condition
{
    [Not_Null:ToInstance]
    SMS_TaskSequence_ConditionOperand   Operands[];
};

//******************************************************************************
//
//  SMS_TaskSequence_ConditionOperand
//
//******************************************************************************

[abstract]
class SMS_TaskSequence_ConditionOperand
{
};

//******************************************************************************
//
//  SMS_TaskSequence_ConditionOperator
//
//******************************************************************************

class SMS_TaskSequence_ConditionOperator : SMS_TaskSequence_ConditionOperand
{
    [ValueMap{"and","or","not"}, Not_Null:ToInstance]
    string      OperatorType;

    [Not_Null:ToInstance]
    SMS_TaskSequence_ConditionOperand Operands[];
};

//******************************************************************************
//
//  SMS_TaskSequence_ConditionExpression
//
//******************************************************************************

[abstract]
class SMS_TaskSequence_ConditionExpression : SMS_TaskSequence_ConditionOperand
{
};

//******************************************************************************
//
//  SMS_TaskSequence_FileConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_FileConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string      Path;

    [ValueMap{"equals", "notEquals", "less", "lessEqual", "greater", "greaterEqual"}]
    string      VersionOperator;
    string      Version;

    [ValueMap{"equals", "notEquals", "less", "lessEqual", "greater", "greaterEqual"}]
    string      DateTimeOperator;
    datetime    DateTime;
};

//******************************************************************************
//
//  SMS_TaskSequence_FolderConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_FolderConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string      Path;

    [ValueMap{"equals", "notEquals", "less", "lessEqual", "greater", "greaterEqual"}]
    string      DateTimeOperator;
    datetime    DateTime;
};

//******************************************************************************
//
//  SMS_TaskSequence_VariableConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_VariableConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string      Variable;
    string      Value;
    [Not_Null, ValueMap{"exists", "notExists", "equals", "notEquals", "less", "lessEqual", "greater", "greaterEqual", "like"}]
    string      Operator;
};

//******************************************************************************
//
//  SMS_TaskSequence_OSConditionExpression
// 
//  DEPRECATED BEFORE SCCM 2007 RTM; REMOVED CLASS AFTER RTM.
//  Replaced by SMS_TaskSequence_OSConditionGroup and SMS_TaskSequence_ExpressionGroup
//  See bug #137356 (and related bugs)
//
//******************************************************************************



//******************************************************************************
//
//  SMS_TaskSequence_OSExpressionGroup
//
//******************************************************************************
// This represents a set of WMI queries that identifies an OS flavor.
// The OS flavor can be specific (x86 Vista Original release), or a bit 
// generic (x86 Vista, any release)

class SMS_TaskSequence_OSExpressionGroup : SMS_TaskSequence_ConditionOperator
{
    // Platform keys that map to the keys for SMS_SupportedPlatforms instances
    // The platform strings are only used on the server side, behind the scenes,
    // to identify the OS in the supported platform table.  The UI uses these
    // to look up the OS name and condition in the table.
    // These are not used on client side.
    [Not_Null]
    string  PlatformArchKey = "";
    
    [Not_Null]
    string PlatformTypeKey = "Win_NT";
    
    [Not_Null]
    string PlatformMinVerKey = "";
    
    [Not_Null]
    string PlatformMaxVerKey = "";


    // Optional - but useful for seeing what we think we are detecting
    // From SMS_SupportedPlatforms.DisplayText property.
    // NOT LOCALIZED - JUST USED FOR INFO/LOGGING/TROUBLESHOOTING
    // The localized value is accessed on the server via the 
    // SMS_SupportedPlatforms resource dll and string id properties.
    string 	Name = "";

    [Not_NULL, ValueMap{"and"}]
    string      OperatorType = "and";

    // Inherit operands array from SMS_TaskSequence_ConditionOperand class
    // Each element is a WMIConditionExpression class
    // This should match the wql query for a SMS_SupportedPlatforms instance
    // (the one indexed by the platform keys).  These expressions are typically 
    // built from the wql query stored in SMS_SupportedPlatforms.Condition.

    [Not_NULL]
    SMS_TaskSequence_WMIConditionExpression Operands[];

        
};

//******************************************************************************
//
//  SMS_TaskSequence_OSConditionGroup
//
//******************************************************************************
// This represents the set of OS's that we are detecting...
// ala.... "vista" OR "longhorn"
class SMS_TaskSequence_OSConditionGroup : SMS_TaskSequence_ConditionOperator
{
    [Not_NULL, ValueMap{"or"}]
    string      OperatorType = "or";

    [Not_NULL]
    SMS_TaskSequence_OSExpressionGroup Operands[];

};

//******************************************************************************
//
//  SMS_TaskSequence_RegistryConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_RegistryConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string      KeyPath;
    [AllowedLen("0-250")]
    string      Value;
    string      Data;
    [ValueMap{"REG_BINARY","REG_DWORD","REG_EXPAND_SZ","REG_MULTI_SZ","REG_NONE","REG_QWORD","REG_SZ"}]
    string      Type;
    [Not_Null, ValueMap{"exists","notExists","equals", "notEquals", "less", "lessEqual", "greater", "greaterEqual"}]
    string      Operator;
};

//******************************************************************************
//
//  SMS_TaskSequence_WMIConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_WMIConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string      Namespace;
    [Not_Null, AllowedLen("1-16384")]
    string      Query;
};

//******************************************************************************
//
//  SMS_TaskSequence_SoftwareConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_SoftwareConditionExpression : SMS_TaskSequence_ConditionExpression
{
    string      ProductName;
    [Not_Null]
    string      ProductCode;
    string      UpgradeCode;

    string      Version;

    [Not_Null, ValueMap{"AnyVersion","ThisVersion"}]
    string      Operator;
};

//******************************************************************************
//
//  SMS_TaskSequence_RunCommandLineAction
//
//******************************************************************************

[   CommandLine("smsswd.exe /run:%1 %2"),
    ActionCategory("General,1,1"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "RunCommandLineControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_RunCommandLineAction : SMS_TaskSequence_Action
{
    [Not_Null, CommandLineArg(2), AllowedLen("1-32000")]
    string          CommandLine;

    [AllowedLen("0-255")]
    string          WorkingDirectory;

    [SuccessCodes, Not_Null]
    string          SuccessCodes = "0 3010";

    [TaskSequencePackage, CommandLineArg(1)]
    string          PackageID;

    [Not_Null, VariableName("SMSTSDisableWow64Redirection")]
    boolean         DisableWow64Redirection = false;

    [VariableName("_SMSTSRunCommandLineAsUser"), RequireR2]
    boolean         RunAsUser = false;

    [VariableName("SMSTSRunCommandLineUserName")]
    string          UserName;

    [VariableName("SMSTSRunCommandLineUserPassword"), Secret]
    string          UserPassword;

    string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_RebootAction
//
//******************************************************************************

[   CommandLine("smsboot.exe /target:%1"),
    VariablePrefix("SMSReboot"),
    ActionCategory("General,6,1"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "RebootComputerControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_RebootAction : SMS_TaskSequence_Action
{
    [VariableName("SMSRebootTimeout")]
    uint32          MessageTimeout;
    [AllowedLen("0-512")]
    string          Message;

    [Not_Null, CommandLineArg(1), ValueMap{"HD", "WinPE"}]
    string          Target;

    string          SupportedEnvironment = "WinPEandFullOS";

};


//******************************************************************************
//
//  SMS_TaskSequence_InstallUpdateAction
//
//******************************************************************************
[
    CommandLine("TSInstallSWUpdate.exe /target:%%SMSInstallUpdateTarget%%"),
    ActionCategory{"Software,3,2"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "InstallSoftwareUpdateControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_InstallUpdateAction : SMS_TaskSequence_Action
{
    [Not_Null, VariableName("SMSInstallUpdateTarget"), ValueMap{"All", "Mandatory"}]
    string          Target;
    [Not_Null, VariableName("SMSTSSoftwareUpdateScanUseCache")]
    boolean         UseCache = true;

    [RetryCount]
    string          RetryCount = "2";

    string          SupportedEnvironment = "FullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_InstallSoftwareAction
//
//******************************************************************************

[   CommandLine("smsswd.exe /pkg:%1 /install /basevar:%3 /continueOnError:%4"),
    ActionCategory{"Software,2,2"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "InstallSoftwareDistributionControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_InstallSoftwareAction : SMS_TaskSequence_Action
{
    [CommandLineArg(1), TaskSequencePackage]
    string          PackageID;

    [RequiredIfNotNull("PackageID"), VariableName("_SMSSWDProgramName"), TaskSequenceProgram("PackageID")]
    string          ProgramName;

    [RequiredIfNull("PackageID"), CommandLineArg(3)]
    string          BaseVariableName;

    [RequiredIfNotNull("BaseVariableName"), CommandLineArg(4)]
    boolean         ContinueOnInstallError;

    string          SupportedEnvironment = "FullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_InstallApplicationAction
//
//******************************************************************************

[   CommandLine("smsappinstall.exe /app:%1 /basevar:%2 /continueOnError:%3"),
    ActionCategory{"Software,1,2"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "InstallApplicationControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_InstallApplicationAction : SMS_TaskSequence_Action
{
    [CommandLineArg(1), TaskSequenceApplication]
    string          ApplicationName;

    [VariableName("OSDApp")]
    SMS_TaskSequence_ApplicationInfo    AppInfo[];

    [VariableName("OSDAppCount")]
    uint32          NumApps;

    [RequiredIfNull("ApplicationName"), CommandLineArg(2)]
    string          BaseVariableName;

    [RequiredIfNotNull("BaseVariableName"), CommandLineArg(3)]
    boolean         ContinueOnInstallError;

    [VariableName("OSDAppClearCache")]
    boolean ClearCache = false;

    [RetryCount]
    string          RetryCount = "2";

    string          SupportedEnvironment = "FullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_ApplyOperatingSystemAction
//
//******************************************************************************

[   CommandLine(
    "OSDApplyOS.exe<?1: /image:%1,%%OSDImageIndex%%><?3: /install:%3,%%OSDInstallEditionIndex%%><?4: \"/config:%4,%%OSDConfigFileName%%\"><?6: /target:%6,%7><?8: /target:%8><?9: /target:%%%9%%><?10: /runfromnet:%10>"
    ),
    ActionCategory{"Images,1,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ApplyOperatingSystemControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_ApplyOperatingSystemAction : SMS_TaskSequence_Action
{
    //
    //  Image-based install
    //
    [CommandLineArg(1), TaskSequencePackage("image"),RequiredIfNull("InstallPackageID")]
    string          ImagePackageID;
    [RequiredIfNotNull("ImagePackageID"), ValueRange("1-2147483647"), VariableName("OSDImageIndex")]
    uint32          ImageIndex;

    //
    //  Scripted install
    //
    [CommandLineArg(3), TaskSequencePackage("image"), RequiredIfNull("ImagePackageID")]
    string          InstallPackageID;
    [RequiredIfNotNull("InstallPackageID"), VariableName("OSDInstallEditionIndex")]
    uint32          InstallEditionIndex = 0;

    //
    //  Configuration file
    //
    [CommandLineArg(4), TaskSequencePackage]
    string          ConfigFilePackage;
    [RequiredIfNotNull("ConfigFilePackage"), VariableName("OSDConfigFileName")]
    string          ConfigFileName;

    //
    //  Destination. If these are all NULL then next available partition is used
    //
    [CommandLineArg(6), ValueRange("0-99")]
    uint32          DestinationDisk;
    [CommandLineArg(7), RequiredIfNotNull("DestinationDisk"), ValueRange("1-99")]
    uint32          DestinationPartition;
    [CommandLineArg(8), ValueMap{"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string          DestinationLogicalDrive;
    [CommandLineArg(9)]
    string          DestinationVariable;

    [RunFromNet, CommandLineArg(10)]
    boolean         RunFromNet = false;

    string          SupportedEnvironment = "WinPE";
};

//******************************************************************************
//
//  SMS_TaskSequence_ApplyDataImageAction
//
//******************************************************************************

[   CommandLine(
    "OSDApplyOS.exe /data:%1,%%OSDDataImageIndex%% <?6: /target:%6,%7><?8: /target:%8><?9: /target:%%%9%%>"
    ),
    ActionCategory{"Images,2,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ApplyDataImageControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_ApplyDataImageAction : SMS_TaskSequence_Action
{
    //
    //  Image to install
    //
    [Not_Null, CommandLineArg(1), TaskSequencePackage("image")]
    string          ImagePackageID;
    [Not_Null, ValueRange("1-2147483647"),VariableName("OSDDataImageIndex")]
    uint32          ImageIndex;

    //
    //  Destination. If these are all NULL then next available partition is used
    //
    [CommandLineArg(6), ValueRange("0-99")]
    uint32          DestinationDisk;
    [CommandLineArg(7), RequiredIfNotNull("DestinationDisk"), ValueRange("1-99")]
    uint32          DestinationPartition;
    [CommandLineArg(8), ValueMap{"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string          DestinationLogicalDrive;
    [CommandLineArg(9)]
    string          DestinationVariable;
    [not_null, VariableName("OSDWipeDestinationPartition")]
    boolean         WipeDestinationPartition = true;

    string          SupportedEnvironment = "WinPE";

};

//******************************************************************************
//
//  SMS_TaskSequence_SetupWindowsAndSMSAction
//
//******************************************************************************

[   CommandLine("OSDSetupWindows.exe"),
    ActionCategory{"Images,3,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "SetupWindowsAndSmsControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_SetupWindowsAndSMSAction : SMS_TaskSequence_Action
{
    [Not_Null, TaskSequencePackage, VariableName("_SMSClientPackageID")]
    string          ClientPackageID;

    [TaskSequencePackage, VariableName("_SMSClientPreProductionPackageID")]
    string          ClientPreProductionPackageID = NULL;

    [VariableName("SMSClientInstallProperties")]
    string          ClientInstallProperties;

    string          SupportedEnvironment = "WinPEandFullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_CaptureSystemImageAction
//
//******************************************************************************

[   CommandLine("osdcapturesystemimage.exe"),
    VariablePrefix("OSD"),
    ActionCategory{"Images,8,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "CaptureSystemImageControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_CaptureSystemImageAction : SMS_TaskSequence_Action
{
    [not_null, AllowedLen("1-255")]
    string          CaptureDestination;

    [not_null, AllowedLen("0-32")]
    string          ImageVersion;
    [AllowedLen("0-255")]
    string          ImageDescription;
    [AllowedLen("0-255")]
    string          ImageCreator;

    [VariableName("OSDCaptureAccount")]
    string          CaptureUsername;
    [VariableName("OSDCaptureAccountPassword"), Secret]
    string          CapturePassword;

    string          SupportedEnvironment = "WinPE";

};

//******************************************************************************
//
//  SMS_TaskSequence_NetworkAdapterSettings
//
//******************************************************************************

class SMS_TaskSequence_NetworkAdapterSettings
{
    [AllowedLen("0-255")]
    string          Name;
    uint32          Index;
    [not_null]
    string          MACAddress;

    string          Gateways[];
    uint32          GatewayCostMetric;

    [not_null]
    boolean         EnableDHCP;
    string          IPAddressList[];
    string          SubnetMask[];
    string          DNSServerList[];
    [not_null]
    boolean         EnableDNSRegistration;
    [not_null]
    boolean         EnableFullDNSRegistration;

    [not_null]
    boolean         EnableWINS;
    string          WINSServerList[];
    [not_null]
    boolean         EnableLMHOSTS;
    uint32          TcpipNetbiosOptions;

    [not_null]
    boolean         EnableTCPFiltering;
    sint32          TCPFilterPortList[];

    [not_null]
    boolean         EnableUDPFiltering;
    sint32          UDPFilterPortList[];

    [not_null]
    boolean         EnableIPProtocolFiltering;
    string          IPProtocolFilterList[];
};

//******************************************************************************
//
//  SMS_TaskSequence_CaptureNetworkSettingsAction
//
//******************************************************************************

[   CommandLine("osdnetsettings.exe capture netmembership:%%OSDMigrateNetworkMembership%% adapters:%%OSDMigrateAdapterSettings%%"),
    ActionCategory{"Settings,1,7"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "CaptureNetworkSettingsControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_CaptureNetworkSettingsAction : SMS_TaskSequence_Action
{
    [not_null, VariableName("OSDMigrateNetworkMembership")]
    boolean         MigrateNetworkMembership = false;

    [not_null, VariableName("OSDMigrateAdapterSettings")]
    boolean         MigrateAdapterSettings = true;

    string          SupportedEnvironment = "FullOS";


};

//******************************************************************************
//
//  SMS_TaskSequence_ApplyNetworkSettingsAction
//
//******************************************************************************

[   CommandLine("osdnetsettings.exe configure"),
    VariablePrefix("OSD"),
    ActionCategory{"Settings,3,7"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ApplyNetworkSettingsControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_ApplyNetworkSettingsAction : SMS_TaskSequence_Action
{
    //
    //  Domain/workgroup settings
    //
    [Not_Null]
    uint32          NetworkJoinType;   // 0=Domain, 1=Workgroup
    [RequiredIfNull("DomainName"), AllowedLen("1-32")]
    string          WorkgroupName;
    [RequiredIfNull("WorkgroupName"), AllowedLen("1-255")]
    string          DomainName;
    [AllowedLen("0-32767")]
    string          DomainOUName;
    [VariableName("OSDJoinAccount")]
    string          DomainUsername;
    [VariableName("OSDJoinPassword"), Secret]
    string          DomainPassword;

    //
    //  Networking/adapter settings - must be global so they are visible in finalize mode
    //
    [Global]
    string          DNSDomain;
    [Global]
    string          DNSSuffixSearchOrder[];
    [Global]
    boolean         EnableTCPIPFiltering = false;

    [Global, VariableName("OSDAdapter")]
    SMS_TaskSequence_NetworkAdapterSettings Adapters[];

    [Global, VariableName("OSDAdapterCount")]
    uint32          NumAdapters;

    string          SupportedEnvironment = "WinPE";
};

//******************************************************************************
//
//  SMS_TaskSequence_InstallDeployToolsAction
//
//******************************************************************************

[   CommandLine("osdprepareos.exe /install:%1"),
    ActionCategory{"Images,5,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "DeploymentToolsControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_InstallDeployToolsAction : SMS_TaskSequence_Action
{
    [Not_null, CommandLineArg(1), TaskSequencePackage]
    string          SysprepPackageID;

    string          SupportedEnvironment = "FullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_PrepareOSAction
//
//******************************************************************************

[   CommandLine("osdprepareos.exe /activate:%%OSDKeepActivation%% /bmsd:%%OSDBuildStorageDriverList%% /shutdown:%%OSDShutdownPreparedOs%%"),
    ActionCategory{"Images,7,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "WindowsCaptureControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_PrepareOSAction : SMS_TaskSequence_Action
{
    [not_null, VariableName("OSDKeepActivation")]
    boolean         KeepActivation = false;

    [not_null, VariableName("OSDBuildStorageDriverList")]
    boolean         BuildStorageDriverList = false;
    
    [VariableName("OSDShutdownPreparedOs")]
    boolean         ShutdownPreparedOs = false;

    string          SupportedEnvironment = "FullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_PrepareSMSClientAction
//
//******************************************************************************

[   CommandLine("osdpreparesmsclient.exe"),
    VariablePrefix("OSD"),
    ActionCategory{"Images,6,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "PrepareClientControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_PrepareSMSClientAction : SMS_TaskSequence_Action
{
    string          SupportedEnvironment = "FullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_CaptureUserStateAction
//
//******************************************************************************

[   CommandLine("osdmigrateuserstate.exe /collect /continueOnError:%%OSDMigrateContinueOnLockedFiles%% /skipefs:%%OSDMigrateSkipEncryptedFiles%%"),
    VariablePrefix("OSDMigrate"),
    ActionCategory{"UserState,2,4"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "CaptureUserStateControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_CaptureUserStateAction : SMS_TaskSequence_Action
{
    [Not_Null, VariableName("_OSDMigrateUsmtPackageID"), TaskSequencePackage]
    string          UsmtPackageID;

    [Not_Null, ValueMap{"Simple", "Advanced"}]
    string          Mode = "Simple";

    [Not_Null, VariableName("OSDMigrateContinueOnLockedFiles")]
    boolean         ContinueOnLockedFiles = true;

    [Not_Null]
    boolean         EnableVerboseLogging = false;

    [Not_Null, VariableName("OSDMigrateSkipEncryptedFiles")]
    boolean         SkipEncryptedFiles = false;

    string          ConfigFiles[];

    [Not_Null, ValueMap{"Normal", "VSS"}]
    string          FileAccess = "Normal";

    [Not_Null, VariableName("_OSDMigrateUseHardlinks")]
    boolean         UseHardlinks = false;

    [Not_Null, VariableName("_OSDMigrateOfflineUserState")]
    boolean         OfflineUserState = false;

    string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_RestoreUserStateAction
//
//******************************************************************************

[   CommandLine("osdmigrateuserstate.exe /apply /continueOnError:%%OSDMigrateContinueOnRestore%%"),
    VariablePrefix("OSDMigrate"),
    ActionCategory{"UserState,3,4"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "RestoreUserStateControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_RestoreUserStateAction : SMS_TaskSequence_Action
{
    [not_null, VariableName("OSDMigrateContinueOnRestore")]
    boolean         ContinueOnRestore = true;

    [Not_Null, ValueMap{"Simple", "Advanced"}]
    string          Mode = "Simple";

    [VariableName("OSDMigrateLocalAccounts"), Not_Null]
    boolean         LocalAccounts = false;

    [VariableName("OSDMigrateLocalAccountPassword"), Secret]
    string          LocalAccountPassword;

    string          ConfigFiles[];

    [Not_Null]
    boolean         EnableVerboseLogging = false;

    [Not_Null, TaskSequencePackage, VariableName("_OSDMigrateUsmtRestorePackageID")]
    string          UsmtRestorePackageID;

    string          SupportedEnvironment = "FullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_RequestStateStoreAction
//
//******************************************************************************

[   CommandLine("osdsmpclient.exe /%1"),
    VariablePrefix("OSDState"),
    ActionCategory("UserState,1,4"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "RequestStateStoreControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_RequestStateStoreAction : SMS_TaskSequence_Action
{
    [CommandLineArg(1), Not_Null, ValueMap{"capture", "restore"}]
    string      RequestType;

    [Global, ValueRange("0-600")]
    uint32      SMPRetryTime;
    [Global, ValueRange("0-30")]
    uint32      SMPRetryCount;
    boolean     FallbackToNAA = false;

    string      SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_ReleaseStateStoreAction
//
//******************************************************************************

[   CommandLine("osdsmpclient.exe /release"),
    VariablePrefix("OSDState"),
    ActionCategory("UserState,4,4"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ReleaseStateStoreControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_ReleaseStateStoreAction : SMS_TaskSequence_Action
{
    string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_PartitionSettings
//
//******************************************************************************

class SMS_TaskSequence_PartitionSettings
{
    [not_null, ValueMap{"Primary", "Extended", "Logical", "Hidden", "EFI", "Recovery", "MSR"}]
    string          Type;
    [ValueMap{"FAT32", "NTFS"}]
    string          FileSystem;
    [not_null]
    boolean         Bootable = false;
    [not_null]
    boolean         QuickFormat;
    string          VolumeName;

    uint32          Size;
    [ValueMap{"MB","GB","Percent"}]
    string          SizeUnits;

    string          VolumeLetterVariable;

    boolean         AssignVolumeLetter = true;
};

//******************************************************************************
//
//  SMS_TaskSequence_PartitionDiskAction
//
//******************************************************************************

[   CommandLine("osddiskpart.exe"),
    VariablePrefix("OSD"),
    ActionCategory{"Disks,1,3"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "PartitionDiskControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_PartitionDiskAction : SMS_TaskSequence_Action
{
    [Not_Null]
    uint32          DiskIndex;
    [ValueMap{"DYNAMIC", "BASIC"}]
    string          DiskType;
    [Not_null, ValueMap{"GPT", "MBR"}]
    string          PartitionStyle;

    boolean         GPTBootDisk = false;
    
    boolean         DiskpartBiosCompatibilityMode = false;

    [Not_null]
    SMS_TaskSequence_PartitionSettings Partitions[];

    string          SupportedEnvironment = "WinPE";
};

//******************************************************************************
//
//  SMS_TaskSequence_ConvertDiskAction
//
//******************************************************************************

[   CommandLine("osddiskpart.exe convert %%OSDConvertDiskIndex%%"),
    VariablePrefix("OSD"),
    ActionCategory{"Disks,2,3"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ConvertDiskToDynamicControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_ConvertDiskAction : SMS_TaskSequence_Action
{
    [Not_Null, VariableName("OSDConvertDiskIndex")]
    uint32          DiskIndex;

    string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_SetVariableAction
//
//******************************************************************************

[   CommandLine("tsenv.exe \"%1=%2\" /hiddenflag:%3"),
    ActionCategory{"General,7,1"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "SetSequenceVariableControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_SetVariableAction : SMS_TaskSequence_Action
{
    [CommandLineArg(1), Not_Null, AllowedLen("1-256")]
    string      VariableName;

    [CommandLineArg(2), Not_Null, AllowedLen("0-65536")]
    string      VariableValue;

    [CommandLineArg(3)]
    boolean DoNotShowVariableValue= false;

    [Secret, AllowedLen("0-65536"), VariableName("SetVariableActionHiddenVariableValue")]
    string HiddenVariableValue;

    string      SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_ConnectNetworkFolderAction
//
//******************************************************************************

[   CommandLine("smsnetuse.exe %SMSConnectNetworkFolderPath%"),
    VariablePrefix("SMSConnectNetworkFolder"),
    ActionCategory{"General,5,1"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ConnectNetworkFolderControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_ConnectNetworkFolderAction : SMS_TaskSequence_Action
{
    [Not_Null]
    string      Path;

    [VariableName("SMSConnectNetworkFolderAccount"), Not_Null]
    string      Username;
    [VariableName("SMSConnectNetworkFolderPassword"), Secret]
    string      Password;

    [ValueMap{"D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string      DriveLetter;

    string      SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_JoinDomainWorkgroupAction
//
//******************************************************************************

[   CommandLine("osdjoin.exe /type:%%OSDJoinType%%"),
    VariablePrefix("OSDJoin"),
    ActionCategory{"General,4,1"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "JoinDomainControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_JoinDomainWorkgroupAction : SMS_TaskSequence_Action
{
    [not_null, VariableName("OSDJoinType")]
    uint32          Type;   // 0=Domain, 1=Workgroup

    [AllowedLen("1-32")]
    string          WorkgroupName;
    [AllowedLen("1-255")]
    string          DomainName;
    [AllowedLen("0-32767")]
    string          DomainOUName;
    boolean         SkipReboot;

    [VariableName("OSDJoinAccount")]
    string          DomainUsername;
    [VariableName("OSDJoinPassword"), Secret]
    string          DomainPassword;

    string          SupportedEnvironment = "FullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_CaptureWindowsSettingsAction
//
//******************************************************************************

[   CommandLine("osdwinsettings.exe /capture /name:%%OSDMigrateComputerName%% /reginfo:%%OSDMigrateRegistrationInfo%% /timezone:%%OSDMigrateTimeZone%%"),
    ActionCategory{"Settings,2,7"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "CaptureWindowsSettingsControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_CaptureWindowsSettingsAction : SMS_TaskSequence_Action
{
    [not_null, VariableName("OSDMigrateComputerName")]
    boolean         MigrateComputerName = true;

    [not_null, VariableName("OSDMigrateRegistrationInfo")]
    boolean         MigrateRegistrationInfo = true;

    [not_null, VariableName("OSDMigrateTimeZone")]
    boolean         MigrateTimeZone = true;

    string          SupportedEnvironment = "WinPEandFullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_ApplyWindowsSettingsAction
//
//******************************************************************************

[   CommandLine("osdwinsettings.exe /config"),
    VariablePrefix("OSD"),
    ActionCategory{"Settings,4,7"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ApplyWindowsSettingsControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_ApplyWindowsSettingsAction : SMS_TaskSequence_Action
{
    string          ComputerName = "%_SMSTSMachineName%";

    [QuasiSecret]
    string          ProductKey;

    [Not_Null, AllowedLen("1-255")]
    string          RegisteredUserName;
    [Not_Null, AllowedLen("1-255")]
    string          RegisteredOrgName;

    [Not_Null]
    string          TimeZone;

    [not_null]
    boolean         RandomAdminPassword = true;
    [VariableName("OSDLocalAdminPassword"), Secret, AllowedLen("0-255")]
    string          AdminPassword;

    [ValueMap{"PerSeat", "PerServer"}]
    string          ServerLicenseMode;
    [ValueRange("5-9999")]
    uint32          ServerLicenseConnectionLimit;

    string          SupportedEnvironment = "WinPE";

};

//******************************************************************************
//
//  SMS_TaskSequence_AutoApplyAction
//
//******************************************************************************
[   CommandLine("osddriverclient.exe /auto /bestmatch:%%OSDAutoApplyDriverBestMatch%% /unsigned:%%OSDAllowUnsignedDriver%%"),
    ActionCategory{"Drivers,1,6"},
    VariablePrefix("OSDAutoApplyDriver"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "AutoApplyDriverControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]

class SMS_TaskSequence_AutoApplyAction : SMS_TaskSequence_Action
{
    string      CategoryList[] = NULL;

    [Not_Null, VariableName("OSDAllowUnsignedDriver")]
    boolean     UnsignedDriver = false;

    [Not_Null]
    boolean     BestMatch = true;
    
    string      SupportedEnvironment = "WinPE";
};

//******************************************************************************
//
//  SMS_TaskSequence_ApplyDriverPackageAction
//
//******************************************************************************
[   CommandLine("osddriverclient.exe /install:%1 <?2:\"/bootcritical:%%OSDApplyDriverBootCriticalContentUniqueID%%,%%OSDApplyDriverBootCriticalINFFile%%,%%OSDApplyDriverBootCriticalHardwareComponent%%,%%OSDApplyDriverBootCriticalID%%\"> /unsigned:%%OSDAllowUnsignedDriver%% /recurse:%%OSDRecurse%%"),
    ActionCategory{"Drivers,2,6"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "ApplyDriverPackageControl", "TaskSequenceOptionControl"},
    VariablePrefix("OSDApplyDriver"),
    SequenceCategory("OSD")
    ]

class SMS_TaskSequence_ApplyDriverPackageAction : SMS_TaskSequence_Action
{
    // Driver package to install
    [CommandLineArg(1), TaskSequencePackage, Not_Null]
    string      DriverPackageID;

    // Optional boot critical driver installation information
    [CommandLineArg(2)]
    string      BootCriticalDriverID = NULL;

    [RequiredIfNotNull("BootCriticalDriverID")]
    string      BootCriticalContentUniqueID = NULL;
    [RequiredIfNotNull("BootCriticalDriverID")]
    string      BootCriticalINFFile = NULL;
    [RequiredIfNotNull("BootCriticalDriverID")]
    string      BootCriticalHardwareComponent = NULL;
    [RequiredIfNotNull("BootCriticalDriverID")]
    string      BootCriticalID = NULL;

    [Not_Null, VariableName("OSDAllowUnsignedDriver")]
    boolean     UnsignedDriver = false;
    
    // run DISM to recurse drivers in package
    [Not_Null, VariableName("OSDRecurse")]
    boolean     Recurse = false;

    string      SupportedEnvironment = "WinPE";
};

//******************************************************************************
//
//  SMS_TaskSequence_DisableBitLockerAction
//
//******************************************************************************

[   CommandLine(
    "OSDBitLocker.exe /disable <?1: /drive:%1>"
    ),
    ActionCategory{"Disks,5,3"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "DisableBitLockerControl", "TaskSequenceOptionControl"},
    VariablePrefix("OSDBitLocker")
    ]
class SMS_TaskSequence_DisableBitLockerAction : SMS_TaskSequence_Action
{
    //
    //  Volume on which to disable BitLocker protection
    //  If not specified, use current operating system volume
    //
    [CommandLineArg(1), ValueMap{"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string          TargetDrive;
    
    [ValueRange("0-15")]
    uint32 RebootCount = 1;

    string      SupportedEnvironment = "FullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_EnableBitLockerAction
//
//******************************************************************************

[   CommandLine(
    "OSDBitLocker.exe /enable <?1: /drive:%1><?2: /wait:%2><?3: /mode:%3><?4: /keydrive:%4><?5: /pwd:%5><?6: /full:%6>"
    ),
    ActionCategory{"Disks,4,3"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "EnableBitLockerControl", "TaskSequenceOptionControl"},
    VariablePrefix("OSDBitLocker")
    ]
class SMS_TaskSequence_EnableBitLockerAction : SMS_TaskSequence_Action
{
    //
    //  Volume on which to enable BitLocker protection
    //  If not specified, use current operating system volume
    //
    [CommandLineArg(1), ValueMap{"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string          TargetDrive = NULL;

    //
    // Wait for encryption to complete before proceeding
    //
    [CommandLineArg(2), Not_Null]
    boolean         WaitForEncryption = false;

    //
    // Key protector methods
    //
    [CommandLineArg(3), RequiredIfNull("TargetDrive"), ValueMap{"TPM","Key","TPMAndKey", "TPMAndPIN"}]
    string          Mode = NULL;

    //
    // Startup key drive
    // If not specified and Mode != "TPM", then use first available USB drive
    // Not valid if Mode == "TPM"
    //
    [CommandLineArg(4), ValueMap{"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string          StartupKeyDrive = NULL;

    //
    // Create a recovery password
    //
    [CommandLineArg(5), Not_Null, ValueMap{"None","AD"}]
    string          CreateRecoveryPassword = "AD";
    
    [CommandLineArg(6)]
    boolean         EncryptFullDisk = false;

    //
    // PIN for BitLocker encryption
    // Only valid if Mode == "TPMAndPIN"
    //
    [VariableName("OSDBitLockerPIN"), Secret, AllowedLen("0-255")]
    string          PIN = NULL;

    string      SupportedEnvironment = "FullOS";

};

//******************************************************************************
//
//  SMS_TaskSequence_OfflineEnableBitLockerAction
//
//******************************************************************************

[   CommandLine(
    "OSDOfflineBitlocker.exe /enable <?1: /disk:%1><?2: /part:%2><?3: /drive:%3><?4: /drive:%%%4%%><?5: /ignoretpm:%5><?6: /full:%6>"
    ),
    ActionCategory{"Disks,6,3"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "OfflineBitlockerControl", "TaskSequenceOptionControl"},
    VariablePrefix("OSDBitLocker")
    ]
class SMS_TaskSequence_OfflineEnableBitLockerAction : SMS_TaskSequence_Action
{
    //
    //  Destination. If these are all NULL then next available partition is used
    //
    [CommandLineArg(1), ValueRange("0-99")]
    uint32          DestinationDisk;
    [CommandLineArg(2), RequiredIfNotNull("DestinationDisk"), ValueRange("1-99")]
    uint32          DestinationPartition;
    [CommandLineArg(3), ValueMap{"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:"}]
    string          DestinationLogicalDrive;
    [CommandLineArg(4)]
    string          DestinationVariable;

    //
    // If TPM can't be found or not enabled, skip this action.
    //
    [CommandLineArg(5), Not_Null]
    boolean         SkipWhenTPMInvalid = true;
    
    [CommandLineArg(6)]
    boolean         EncryptFullDisk = false;

    string      SupportedEnvironment = "WinPE";
};

//******************************************************************************
//
//  SMS_TaskSequence_PrestartCheckAction
//
//******************************************************************************

[   CommandLine("OSDPrestartCheck.exe "),
    ActionCategory("General,8,1"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "PrestartCheckControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_PrestartCheckAction: SMS_TaskSequence_Action
{
        [VariableName("OSDCheckMemory"), Not_Null]
        boolean         CheckMemory = true;
        [VariableName("OSDMemory")]
        uint32          Memory = 512;

        [VariableName("OSDCheckProcessorSpeed"), Not_Null]
        boolean         CheckProcessorSpeed = true;
        [VariableName("OSDProcessorSpeed")]
        uint32          ProcessorSpeed = 800;

        [VariableName("OSDCheckFreeDiskSpace"), Not_Null]
        boolean         CheckFreeDiskSpace = true;
        [VariableName("OSDFreeDiskSpace")]
        uint32          FreeDiskSpace = 25000;

        [VariableName("OSDCheckOSType"), Not_Null]
        boolean         CheckOSType = true;
        [VariableName("OSDOSType"), ValueMap{"CLIENT","SERVER"}]
        string          OSType = "CLIENT";

        string          SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_RunPowerShellScriptAction
//
//******************************************************************************

[   CommandLine("OSDRunPowerShellScript.exe"),
    ActionCategory("General,2,1"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "RunPowerShellScriptControl", "TaskSequenceOptionControl"},
    VariablePrefix("OSDRunPowerShellScript")
    ]
class SMS_TaskSequence_RunPowerShellScriptAction : SMS_TaskSequence_Action
{
    [RequiredIfNull("SourceScript")]
    string ScriptName;
    
    [Not_Null]
    string Parameters;
    
    [RequiredIfNull("SourceScript"), TaskSequencePackage]
    string PackageID;
    
    [SuccessCodes, Not_Null]
    string SuccessCodes = "0 3010";
    
    [RequiredIfNull("PackageID")]
    string SourceScript;
    
    string OutputVariableName;
    
    [ValueMap{"Restricted", "AllSigned", "RemoteSigned", "Unrestricted", "Bypass", "Undefined"}, Not_Null:ToInstance]
    string ExecutionPolicy = "Restricted";
    
    [VariableName("SMSTSRunPowerShellWorkingDirectory"), AllowedLen("0-255")]
    string WorkingDirectory;
    
    [VariableName("_SMSTSRunPowerShellAsUser"), RequireR2]
    boolean RunAsUser = false;

    [VariableName("SMSTSRunPowerShellUserName")]
    string UserName;

    [VariableName("SMSTSRunPowerShellUserPassword"), Secret]
    string UserPassword;

    string SupportedEnvironment = "WinPEandFullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_UpgradeOperatingSystemAction
//
//******************************************************************************

[   CommandLine("OSDUpgradeOS.exe "),
    VariablePrefix("OSDUpgrade"),
    ActionCategory{"Images,4,5"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "UpgradeOperatingSystemControl", "TaskSequenceOptionControl"},
    SequenceCategory("OSD")
    ]
class SMS_TaskSequence_UpgradeOperatingSystemAction : SMS_TaskSequence_Action
{
    // Upgrade using OS installation package
    [TaskSequencePackage("image"), RequiredIfNull("InstallPath")]
    string InstallPackageID;
    
    // Upgrade using path to content or environment variable %variable% with the content to use in the upgrade
    [RequiredIfNull("InstallPackageID")]
    string InstallPath;
   
    uint32 InstallEditionIndex = 1;
    
    //  License key for the OS upgrade content
    [QuasiSecret]
    string OsProductKey;
    
    //  package ID of driver package to use during upgrade
    [TaskSequencePackage]
    string DriverPackageID;
    
    //  Upgrade using path to driver content or environment variable %variable% with the driver content to use in the upgrade
    string StagedContent;
    
    // Specify what to keep during upgrade
    [ValueMap{"Upgrade", "DataOnly", "DataSetting", "Clean" }]
    string PreserveSettings = "Upgrade";
    
    // Specify whether to dynamically update windows setup with Windows Update
    [ValueMap {"Disable", "UsingPolicy", "OveridePolicy", "PreDownload"}]
    string DynamicUpdateSettings = "Disable";
    
    // Ignore any dismissible compatibility messages
    boolean IgnoreMessages = false;
    
    // perform Windows Setup compatibility scan without starting upgrade
    boolean ScanOnly = false;
    
    // timeout to use when running command line which does Windows upgrade setup
    uint32 SetupTimeout;
    
    string SupportedEnvironment = "FullOS";
};

//******************************************************************************
//
//  SMS_TaskSequence_DownloadPackageContentAction
//  Use cases:
//  Stage driver package content, pass variable to /InstallDrivers setup parameter
//  Stage language pack content for /InstallLangPacks parameter consumption
//  Stage install media content, pass variable to /InstallFrom setup parameter
//******************************************************************************

[   CommandLine("OsdDownloadContent.exe "),
    VariablePrefix("OSDDownload"),
    ActionCategory{"Software,4,2"},
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "DownloadPackageContentControl", "TaskSequenceOptionControl"}
    ]
class SMS_TaskSequence_DownloadPackageContentAction : SMS_TaskSequence_Action
{

    // Comma separated list of package Ids to be downloaded
    [Not_Null, TaskSequencePackageList]
    string          DownloadPackages;

    [Not_Null, ValueMap{"TSCache","CCMCache","Custom"}]
    string          DestinationLocationType = "TSCache";

    [VariableName("OSDDownloadDestinationPath")]
    string          DestinationCustomPath;
    
    string          DestinationVariable;
    
    boolean         ContinueDownloadOnError = true;

    string          SupportedEnvironment = "WinPEandFullOS";

    [VariableName("OSDPackage")]
    SMS_TaskSequence_PackageInfo    PackageInfo[];

    [VariableName("OSDPackageCount")]
    uint32          NumPackages;
};

//******************************************************************************
//
//  SMS_TaskSequence_LocationConditionExpression
//
//******************************************************************************

class SMS_TaskSequence_LocationConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string     DefaultGateway;
};

//******************************************************************************
//
//  SMS_TaskSequence_ComputerConditionExpression
//
//******************************************************************************
class SMS_TaskSequence_ComputerConditionExpression : SMS_TaskSequence_ConditionExpression
{
    string      SerialNumber;
    string      MACAddress;
    string      UUID;
    string      AssetTag;
};

//******************************************************************************
//
//  SMS_TaskSequence_MakeModelConditionExpression
//
//******************************************************************************
class SMS_TaskSequence_MakeModelConditionExpression : SMS_TaskSequence_ConditionExpression
{
    [Not_Null]
    string          Make;
    [Not_Null]
    string          Model;
};


//******************************************************************************
//
//  SMS_TaskSequence_Variable
//
//******************************************************************************

class SMS_TaskSequence_Variable
{
    [Not_Null]
    string      Name;
    string      Value;
};

//******************************************************************************
//
//  SMS_TaskSequence_SecuredVariable
//
//******************************************************************************

class SMS_TaskSequence_SecuredVariable: SMS_TaskSequence_Variable
{
    [Not_Null]
    string      Name;
    [Secret]
    string      Value;
};

//******************************************************************************
//
//  SMS_TaskSequence_Rule
//
//******************************************************************************

class SMS_TaskSequence_Rule
{
    SMS_TaskSequence_Condition         Condition;
    [Not_Null]
    SMS_TaskSequence_Variable          Variables[];
};

//******************************************************************************
//
//  SMS_TaskSequence_SetDynamicVariablesAction
//
//******************************************************************************

[   CommandLine("OSDSetDynamicVariables.exe"),
    ActionCategory("General,3,1"),
    ActionUI{"AdminUI.TaskSequenceEditor.dll", "Microsoft.ConfigurationManagement.AdminConsole.TaskSequenceEditor", "SetDynamicVariablesControl", "TaskSequenceOptionControl"},
    VariablePrefix("OSDSetDynamicVariables")
    ]
class SMS_TaskSequence_SetDynamicVariablesAction : SMS_TaskSequence_Action
{
    [Not_Null, DynamicRules]
    SMS_TaskSequence_Rule         Rules[];
    string                        SupportedEnvironment = "WinPEandFullOS";
};

