NAME ConvertTo-LockedScript SYNOPSIS Converts a script to an encrypted version of the script. SYNTAX ConvertTo-LockedScript [-Path] [-Destination] [-Embedded []] [-Author []] [-Description []] [-Version []] [-StartDat e []] [-EndDate []] [-DPScope []] [-Secret []] [-AllowView []] [-WhatIf []] [-Confirm [] ] [] ConvertTo-LockedScript [-Embedded []] -Value [-Author []] [-Description []] [-Version []] [-StartDate []] [-EndDate []] [-DPScope []] [-Secret []] [-AllowView []] [-WhatIf []] [-Confirm []] [] DETAILED DESCRIPTION Converts a normal ps1 script to an encrypted version of the script. The resulting script will require a password to run depending on encryption type selected. If DataProtectio n mode is selected (the default), the resulting script can only be run by the same Windows user account. Using -DPScope parameter will also allow any account on same machine. If Password mode is selected by using -Secret parameter, the resulting script can only be run if user has the same password used to encrypt the script. PARAMETERS -Path Specifies the path to the script to encrypt. Required? true Position? 2 Default value N/A - The path must be specified. Accept pipeline input? true (ByPropertyName) Accept wildcard characters? false -Destination Specifies the path to where to create the PowerLocker encrypted script. Required? true Position? 3 Default value N/A - The path must be specified. Accept pipeline input? true (ByPropertyName) Accept wildcard characters? false -Embedded [] Specifies to embed Decrypt logic in the script. This allows user to run the script without having first to installed PowerLocker snap-in. This does increase the script siz e. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Author [] Specifies the author of the script. Will be added to the PowerLocker script. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Description [] Specifies a description of the script. This can contain any useful information such as help and/or copyright information. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Version [] Specifies the script version. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -StartDate [] Specifies the start date the script will run. Before this date/time, the script will not run. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -EndDate [] Specifies the end date of the script. After this date/time, the script will not run. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -DPScope [] Specifies the encryption method will be Data Protection API (DPAPI). Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Secret [] The secret (i.e. password) used to encrypt the script. This will use AES encryption. Required? false Position? named Default value N/A - The secret must be specified. Accept pipeline input? false Accept wildcard characters? false -AllowView [] Specifies end user can view the script with the correct password. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -WhatIf [] Describes what would happen if you executed the command without actually executing the command. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Confirm [] Prompts you for confirmation before executing the command. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Value Specifies the script string to encrypt. Required? true Position? named Default value Accept pipeline input? true (ByValue) Accept wildcard characters? false This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer and -OutVariable. For more information, type, "get-help about_commonparameters". INPUT TYPE RETURN TYPE NOTES -------------- Example 1 -------------- C:\PS>convertTo-LockedScript myScript.ps1 locked.ps1 This command will read the script myScript.ps1, encrypt its' contents, and create a "Locked" version of the script in locked.ps1. The original script is not changed. -------------- Example 2 -------------- C:\PS>'echo $pwd' | ConvertTo-LockedScript This command will take the script as input from the pipeline, encrypt it using DPIAPI (the default) and send the results to the console. RELATED LINKS http://www.PowerLocker.com