New-UserLockProtectedAccount
Creates a protected account.
Creates a protected account.
New-UserLockProtectedAccount [-Name] <string[]> [-Type <ProtectedAccountType>] [-StartDate <DateTime>] [-EndDate <DateTime>] [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]
New-UserLockProtectedAccount [-InputObject] <ProtectedAccount[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]The New-UserLockProtectedAccount cmdlet creates one or several protected accounts. Without parameters, New-UserLockProtectedAccount will create no protected account. You can specify a particular protected account by its account name, specify a particular account type (user, group or OU) or create temporary protected accounts specifying dates of such protected accounts. Caution: PowerShell 3.0 is required.
Specifies the name of the account for which to create a protected account. You can type multiple account names (separated by commas). For a temporary name, either enter its account name and specify StartDate and EndDate parameters, or enter here its identifier. The syntax for this parameter is [Domain\]Account. If the cmdlet is run from a DC, there is no need to specify the domain name: UserLock will try to create the protected account from the concerned domain account. If the cmdlet is run from a non DC computer and no domain name is specified, then UserLock will try to create the protected account from the concerned local account of the local computer.
Required | false |
Position | 1 |
Accepts pipeline input | true (ByValue, ByPropertyName) |
Accepts wildcard characters | true |
Type of the account(s) to create. Possible values for this parameter include: User or 1 Group or 2 Ou or 3 The default protected account type is User.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Default Value | User |
Specifies the start date of temporary protected account(s). This parameter is optional.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Specifies the end date of temporary protected account(s). This parameter is optional.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Specifies the protected accounts objects that represent protected accounts to be created. Enter a variable that contains the protected account objects or a cmdlet that gets the protected accounts objects, such as the Get-UserLockProtectedAccount one. You can also pipe the objects to New-UserLockProtectedAccount.
Required | true |
Position | named |
Accepts pipeline input | true (ByValue) |
Accepts wildcard characters | false |
Specifies the name of the UserLock server. The default is the localhost name.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Default Value | '.' |
Returns the created protected account object(s). By default, this cmdlet does not generate any output.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Creates the protected account(s) with no confirmation.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Prompts you for confirmation before executing the command.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
Describes what would happen if you executed the command without actually executing the command.
Required | false |
Position | named |
Accepts pipeline input | false |
Accepts wildcard characters | false |
For more information about common parameters, type "Get-Help about_commonparameters".
ISDecisions.UserLockLibrary.ProtectedAccount, ISDecisions.UserLockLibrary.PaTmp
None, ISDecisions.UserLockLibrary.ProtectedAccount, ISDecisions.UserLockLibrary.PaTmp
You can also refer to New-UserLockProtectedAccount by its alias, "nulpa". For more information, see about_Aliases. To use New-UserLockProtectedAccount, you must have the "Protected account" UserLock administrative access right. New-UserLockProtectedAccount prompts to confirm creation by default. To prevent from prompting, use -Force.
New-UserLockProtectedAccount -Name 'Alice', 'Bob' -UserLockServerName 'MyUlSrv'Creates the 'Alice' and 'Bob' user protected accounts through the 'MyUlSrv' UserLock server.
$pas = gulpa -UserLockServerName 'MyUlSrv1'
nulpa -UserLockServerName 'MyUlSrv2' -Inp $pasGets all protected accounts from the 'MyUlSrv1' UserLock server then creates the same protected accounts in the 'MyUlSrv2' UserLock server.
[DateTime]$StartDate = '2014-06-01 00:00:00'
[DateTime]$EndDate = '2014-07-01 00:00:00'
nulpa MyUser -StartDate $StartDate -EndDate $EndDate -ForceCreates a temporary protected account specifying its start and end dates.