New-TppPolicy¶
SYNOPSIS¶
Add a new policy folder
SYNTAX¶
NameWithPolicyAttribute¶
New-TppPolicy -Path <String> -Name <String[]> -Attribute <Hashtable> -Class <String> [-Lock] [-Force]
[-PassThru] [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]
PathWithPolicyAttribute¶
New-TppPolicy -Path <String> -Attribute <Hashtable> -Class <String> [-Lock] [-Force] [-PassThru]
[-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]
Name¶
New-TppPolicy -Path <String> -Name <String[]> [-Description <String>] [-Attribute <Hashtable>] [-Force]
[-PassThru] [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]
Path¶
New-TppPolicy -Path <String> [-Description <String>] [-Attribute <Hashtable>] [-Force] [-PassThru]
[-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION¶
Add a new policy folder(s). Add object attributes or policy attributes at the same time.
EXAMPLES¶
EXAMPLE 1¶
Create a new policy folder
EXAMPLE 2¶
Create multiple policy folders
EXAMPLE 3¶
Create a new policy folder named new3 and create new1 and new2 if they do not exist
EXAMPLE 4¶
Create a new policy folder setting attributes on the object at creation time
EXAMPLE 5¶
Create a new policy folder setting policy attributes (not object attributes)
EXAMPLE 6¶
Create a new policy folder setting policy attributes (not object attributes) and locking them
EXAMPLE 7¶
Create a new policy folder returning the policy object created
PARAMETERS¶
-Path¶
Full path to the new policy folder. If the root path is excluded, \ved\policy will be prepended. If used with -Name, this will be the root path and subfolders will be created.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Name¶
One of more policy folders to create under -Path.
Type: String[]
Parameter Sets: NameWithPolicyAttribute, Name
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description¶
Deprecated. Use -Attribute @{''Description''=''my description''} instead.
Type: String
Parameter Sets: Name, Path
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Attribute¶
Hashtable with names and values to be set on the policy itself. If used with -Class, this will set policy attributes. If setting a custom field, you can use either the name or guid as the key. To clear a value overwriting policy, set the value to $null.
Type: Hashtable
Parameter Sets: NameWithPolicyAttribute, PathWithPolicyAttribute
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Hashtable
Parameter Sets: Name, Path
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Class¶
Use with -Attribute to set policy attributes at policy creation time. If unsure of the class name, add the value through the TPP UI and go to Support->Policy Attributes to find it.
Type: String
Parameter Sets: NameWithPolicyAttribute, PathWithPolicyAttribute
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Lock¶
Use with -PolicyAttribute and -Class to lock the policy attribute
Type: SwitchParameter
Parameter Sets: NameWithPolicyAttribute, PathWithPolicyAttribute
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Force¶
Force the creation of missing parent policy folders
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-PassThru¶
Return a TppObject representing the newly created policy.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-VenafiSession¶
Authentication for the function. The value defaults to the script session object $VenafiSession created by New-VenafiSession. A TPP token or VaaS key can also provided. If providing a TPP token, an environment variable named TPP_SERVER must also be set.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $script:VenafiSession
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf¶
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm¶
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
Path¶
OUTPUTS¶
TppObject, if PassThru provided¶
NOTES¶
RELATED LINKS¶
http://VenafiPS.readthedocs.io/en/latest/functions/New-TppPolicy/
https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/New-TppPolicy.ps1
http://VenafiPS.readthedocs.io/en/latest/functions/New-TppObject/
https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/New-TppObject.ps1