diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c564f9b..baf41820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 6.5.0 +- Merge all functions into 1 psm1 module. This yields much better performance, especially when running multithreaded. +- Add multithreading support on PS v5 with the Microsoft.PowerShell.ThreadJob module (installed separately). If the module isn't installed, multithreading will be disabled. Set `-ThrottleLimit` to 1 on the functions that support it to disable multithreading on PS v5 and v7. +- Module now available in the GitHub release. This is helpful for those without access to PowerShell Gallery, although that is the preferred option. +- PSSodium, needed for several TLSPC functions for encryption, is no longer directly included in the module. Install it from the Gallery. +- The VenafiSession class has been deprecated and replaced with a PSCustomObject equivalent +- Key based authentication on TLSPDC has been deprecated +- Default `Invoke-VdcCertificateAction -Push` to push to all applications and added an example to override and push to specific applications + ## 6.4.2 - Add batching to `Invoke-VcCertificateAction` with progress and verbose logging. Batches will be 1000 by default, but can be overridden with `-BatchSize`. Also added better use of ShouldProcess. @@ -718,5 +727,6 @@ This is a major release. Although every attempt has been made to be backwards c + diff --git a/VenafiPS/VenafiPS.psd1 b/VenafiPS/VenafiPS.psd1 index be8765f9..59a3d7e9 100644 --- a/VenafiPS/VenafiPS.psd1 +++ b/VenafiPS/VenafiPS.psd1 @@ -3,7 +3,7 @@ # # Generated by: Greg Brownstein # -# Generated on: 09/13/2024 +# Generated on: 10/01/2024 # @{ @@ -12,7 +12,7 @@ RootModule = 'VenafiPS.psm1' # Version number of this module. -ModuleVersion = '6.5' +ModuleVersion = '6.5.0' # Supported PSEditions # CompatiblePSEditions = @() @@ -57,11 +57,7 @@ PowerShellVersion = '5.1' # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = 'Classes\TppPermission.ps1', 'Classes\VenafiSession.ps1', -# 'Enum\TppCertificateStage.ps1', 'Enum\TppConfigResult.ps1', -# 'Enum\TppEventSeverity.ps1', 'Enum\TppIdentityType.ps1', -# 'Enum\TppManagementType.ps1', 'Enum\TppMetadataResult.ps1', -# 'Enum\TppSecretStoreResult.ps1', 'Enum\TppWorkflowResult.ps1' +# ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() diff --git a/docs/changelog.md b/docs/changelog.md index 42eda709..83063e5c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,12 @@ +## 6.5.0 +- Merge all functions into 1 psm1 module. This yields much better performance, especially when running multithreaded. +- Add multithreading support on PS v5 with the Microsoft.PowerShell.ThreadJob module (installed separately). If the module isn't installed, multithreading will be disabled. Set `-ThrottleLimit` to 1 on the functions that support it to disable multithreading on PS v5 and v7. +- Module now available in the GitHub release. This is helpful for those without access to PowerShell Gallery, although that is the preferred option. +- PSSodium, needed for several TLSPC functions for encryption, is no longer directly included in the module. Install it from the Gallery. +- The VenafiSession class has been deprecated and replaced with a PSCustomObject equivalent +- Key based authentication on TLSPDC has been deprecated +- Default `Invoke-VdcCertificateAction -Push` to push to all applications and added an example to override and push to specific applications + ## 6.4.2 - Add batching to `Invoke-VcCertificateAction` with progress and verbose logging. Batches will be 1000 by default, but can be overridden with `-BatchSize`. Also added better use of ShouldProcess. @@ -718,5 +727,6 @@ This is a major release. Although every attempt has been made to be backwards c + diff --git a/docs/functions/ConvertTo-PlaintextString.md b/docs/functions/ConvertTo-PlaintextString.md new file mode 100644 index 00000000..906d6669 --- /dev/null +++ b/docs/functions/ConvertTo-PlaintextString.md @@ -0,0 +1,64 @@ +# ConvertTo-PlaintextString + +## SYNOPSIS +Convert a SecureString or PSCredential to a plaintext string/password. + +## SYNTAX + +``` +ConvertTo-PlaintextString [-InputObject] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### EXAMPLE 1 +``` +ConvertTo-PlaintextString -InputObject $mySecureString +``` + +## PARAMETERS + +### -InputObject +{{ Fill InputObject Description }} + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.String +## NOTES + +## RELATED LINKS diff --git a/docs/functions/ConvertTo-UtcIso8601.md b/docs/functions/ConvertTo-UtcIso8601.md new file mode 100644 index 00000000..fb5aa1f0 --- /dev/null +++ b/docs/functions/ConvertTo-UtcIso8601.md @@ -0,0 +1,65 @@ +# ConvertTo-UtcIso8601 + +## SYNOPSIS +Convert datetime to UTC ISO 8601 format + +## SYNTAX + +``` +ConvertTo-UtcIso8601 [-InputObject] [-ProgressAction ] [] +``` + +## DESCRIPTION +Convert datetime to UTC ISO 8601 format + +## EXAMPLES + +### EXAMPLE 1 +``` +(get-date) | ConvertTo-UtcIso8601 +``` + +## PARAMETERS + +### -InputObject +DateTime object + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### InputObject +## OUTPUTS + +### System.String +## NOTES + +## RELATED LINKS diff --git a/docs/functions/ConvertTo-VcTeam.md b/docs/functions/ConvertTo-VcTeam.md new file mode 100644 index 00000000..3e8425ae --- /dev/null +++ b/docs/functions/ConvertTo-VcTeam.md @@ -0,0 +1,65 @@ +# ConvertTo-VcTeam + +## SYNOPSIS +Convert vaas team to standard format + +## SYNTAX + +``` +ConvertTo-VcTeam [-InputObject] [-ProgressAction ] [] +``` + +## DESCRIPTION +Convert vaas team to standard format + +## EXAMPLES + +### EXAMPLE 1 +``` +$teamObj | ConvertTo-VcTeam +``` + +## PARAMETERS + +### -InputObject +Team object + +```yaml +Type: PSObject[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### InputObject +## OUTPUTS + +### PSCustomObject +## NOTES + +## RELATED LINKS diff --git a/docs/functions/ConvertTo-VdcFullPath.md b/docs/functions/ConvertTo-VdcFullPath.md new file mode 100644 index 00000000..e11d5e52 --- /dev/null +++ b/docs/functions/ConvertTo-VdcFullPath.md @@ -0,0 +1,67 @@ +# ConvertTo-VdcFullPath + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +ConvertTo-VdcFullPath [-Path] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Path +{{ Fill Path Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/ConvertTo-VdcIdentity.md b/docs/functions/ConvertTo-VdcIdentity.md new file mode 100644 index 00000000..50fdd8f3 --- /dev/null +++ b/docs/functions/ConvertTo-VdcIdentity.md @@ -0,0 +1,65 @@ +# ConvertTo-VdcIdentity + +## SYNOPSIS +Convert identity to standard format + +## SYNTAX + +``` +ConvertTo-VdcIdentity [-InputObject] [-ProgressAction ] [] +``` + +## DESCRIPTION +Convert identity to standard format + +## EXAMPLES + +### EXAMPLE 1 +``` +$identityObj | ConvertTo-VdcIdentity +``` + +## PARAMETERS + +### -InputObject +Identity object + +```yaml +Type: PSObject[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### InputObject +## OUTPUTS + +### PSCustomObject +## NOTES + +## RELATED LINKS diff --git a/docs/functions/ConvertTo-VdcObject.md b/docs/functions/ConvertTo-VdcObject.md new file mode 100644 index 00000000..8489d0e9 --- /dev/null +++ b/docs/functions/ConvertTo-VdcObject.md @@ -0,0 +1,168 @@ +# ConvertTo-VdcObject + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +### Path (Default) +``` +ConvertTo-VdcObject -Path [-TypeName ] [-ProgressAction ] + [] +``` + +### ByObject +``` +ConvertTo-VdcObject -InputObject [-ProgressAction ] [] +``` + +### All +``` +ConvertTo-VdcObject -Path -Guid -TypeName [-ProgressAction ] + [] +``` + +### Guid +``` +ConvertTo-VdcObject -Guid [-TypeName ] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Guid +{{ Fill Guid Description }} + +```yaml +Type: Guid +Parameter Sets: All +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: Guid +Parameter Sets: Guid +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +{{ Fill InputObject Description }} + +```yaml +Type: PSObject +Parameter Sets: ByObject +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Path +{{ Fill Path Description }} + +```yaml +Type: String +Parameter Sets: Path +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: All +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -TypeName +{{ Fill TypeName Description }} + +```yaml +Type: String +Parameter Sets: Path, Guid +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: All +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.Management.Automation.PSObject +### System.String +### System.Guid +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Export-VcCertificate.md b/docs/functions/Export-VcCertificate.md index 5e37a767..0e9dba9f 100644 --- a/docs/functions/Export-VcCertificate.md +++ b/docs/functions/Export-VcCertificate.md @@ -169,8 +169,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Export-VdcCertificate.md b/docs/functions/Export-VdcCertificate.md index 5c9c02e8..843da534 100644 --- a/docs/functions/Export-VdcCertificate.md +++ b/docs/functions/Export-VdcCertificate.md @@ -322,8 +322,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Find-VcObject.md b/docs/functions/Find-VcObject.md new file mode 100644 index 00000000..9bdfbf46 --- /dev/null +++ b/docs/functions/Find-VcObject.md @@ -0,0 +1,228 @@ +# Find-VcObject + +## SYNOPSIS +Find different objects on TLSPC + +## SYNTAX + +### All (Default) +``` +Find-VcObject -Type [-Name ] [-Order ] [-First ] + [-VenafiSession ] [-ProgressAction ] [] +``` + +### Filter +``` +Find-VcObject -Type -Filter [-Order ] + [-First ] [-VenafiSession ] [-ProgressAction ] [] +``` + +### SavedSearch +``` +Find-VcObject -Type -SavedSearchName [-First ] [-VenafiSession ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Find objects of type ActivityLog, Machine, MachineIdentity, CertificateRequest, CertificateInstance on TLSPC. +Supports -First for page size; the max page size is 1000. +To find certificate objects, use Find-VcCertificate. + +## EXAMPLES + +### EXAMPLE 1 +``` +Find-VcObject -Type CertificateInstance +``` + +Get all records + +### EXAMPLE 2 +``` +Find-VcObject -Type CertificateInstance -First 50 +``` + +Get first 50 records + +### EXAMPLE 3 +``` +Find-VcObject -Type ActivityLog -Filter @('activityType', 'eq', 'Notifications') -First 10 +``` + +Retrieve 10 records matching the field name + +### EXAMPLE 4 +``` +Find-VcObject -Type Certificate -Name searchme +``` + +Get all certificates where the name has 'searchme' in it + +### EXAMPLE 5 +``` +Find-VcObject -type Certificate -filter @('selfSigned','eq','True') +``` + +Get all self signed certificates + +### EXAMPLE 6 +``` +Find-VcObject -Type ActivityLog -Filter @('activityType', 'eq', 'Notifications') -First 10 -Order @{'activityDate'='desc'} +``` + +Retrieve the most recent 10 records matching the field name + +### EXAMPLE 7 +``` +Find-VcObject -Filter @('and', @('activityDate', 'gt', (get-date).AddMonths(-1)), @('or', @('userId', 'eq', 'ab0feb46-8df7-47e7-8da9-f47ab314f26a'), @('userId', 'eq', '933c28de-6352-46f3-bc12-bd96077e8eae'))) +``` + +Advanced filtering of results. +This filter will find log entries by 1 of 2 people within the last month. + +## PARAMETERS + +### -Type +Type of object to retrieve, either Certificate, ActivityLog, Machine, MachineIdentity, CertificateRequest, or CertificateInstance. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Case sensitive name to search for. +The field to be searched is different for each object type. + +```yaml +Type: String +Parameter Sets: All +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +Array or multidimensional array of fields and values to filter on. +Each array should be of the format @('operator', @(field, comparison operator, value), @(field2, comparison operator2, value2)). +Nested filters are supported. +For a complete list of comparison operators, see https://docs.venafi.cloud/api/about-api-search-operators/. + +```yaml +Type: System.Collections.Generic.List`1[System.Object] +Parameter Sets: Filter +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Order +Array of fields to order on. +For each item in the array, you can provide a field name by itself; this will default to ascending. +You can also provide a hashtable with the field name as the key and either asc or desc as the value. + +```yaml +Type: PSObject[] +Parameter Sets: All, Filter +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SavedSearchName +{{ Fill SavedSearchName Description }} + +```yaml +Type: String +Parameter Sets: SavedSearch +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -First +Only retrieve this many records + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +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 TLSPC key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### PSCustomObject +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Find-VcObject/](http://VenafiPS.readthedocs.io/en/latest/functions/Find-VcObject/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Find-VcObject.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Find-VcObject.ps1) + diff --git a/docs/functions/Find-VdcCertificate.md b/docs/functions/Find-VdcCertificate.md index 897c0ae2..fbb635ae 100644 --- a/docs/functions/Find-VdcCertificate.md +++ b/docs/functions/Find-VdcCertificate.md @@ -56,7 +56,6 @@ Find-VdcCertificate -ExpireBefore "2018-01-01" -First 5 -Skip 2 ``` Find 5 certificates expiring before a certain date, starting at the 3rd certificate found. -Skip is only supported on TLSPDC. ### EXAMPLE 5 ``` diff --git a/docs/functions/Get-EnumValues.md b/docs/functions/Get-EnumValues.md new file mode 100644 index 00000000..79fcb4d5 --- /dev/null +++ b/docs/functions/Get-EnumValues.md @@ -0,0 +1,67 @@ +# Get-EnumValues + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +Get-EnumValues [-EnumName] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -EnumName +{{ Fill EnumName Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Get-VcData.md b/docs/functions/Get-VcData.md new file mode 100644 index 00000000..07189549 --- /dev/null +++ b/docs/functions/Get-VcData.md @@ -0,0 +1,164 @@ +# Get-VcData + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +### ID (Default) +``` +Get-VcData [-InputObject] -Type [-FailOnMultiple] [-ProgressAction ] + [] +``` + +### Object +``` +Get-VcData [-InputObject] -Type [-Object] [-FailOnMultiple] + [-ProgressAction ] [] +``` + +### Name +``` +Get-VcData [-InputObject] -Type [-Name] [-FailOnMultiple] + [-ProgressAction ] [] +``` + +### First +``` +Get-VcData -Type [-First] [-FailOnMultiple] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -FailOnMultiple +{{ Fill FailOnMultiple Description }} + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -First +Gets only the specified number of objects. +Enter the number of objects to get. + +```yaml +Type: SwitchParameter +Parameter Sets: First +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -InputObject +{{ Fill InputObject Description }} + +```yaml +Type: String +Parameter Sets: ID, Object, Name +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +{{ Fill Name Description }} + +```yaml +Type: SwitchParameter +Parameter Sets: Name +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Object +{{ Fill Object Description }} + +```yaml +Type: SwitchParameter +Parameter Sets: Object +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Type +{{ Fill Type Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: Application, MachineType, VSatellite, Certificate, IssuingTemplate, Team + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +### System.Management.Automation.SwitchParameter +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Get-VdcAttribute.md b/docs/functions/Get-VdcAttribute.md index 5c561676..bb5a2818 100644 --- a/docs/functions/Get-VdcAttribute.md +++ b/docs/functions/Get-VdcAttribute.md @@ -259,8 +259,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Get-VdcCertificate.md b/docs/functions/Get-VdcCertificate.md index c1ba2029..a75259ce 100644 --- a/docs/functions/Get-VdcCertificate.md +++ b/docs/functions/Get-VdcCertificate.md @@ -144,8 +144,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Get-VdcTeam.md b/docs/functions/Get-VdcTeam.md index 5afd6a79..c5bcb771 100644 --- a/docs/functions/Get-VdcTeam.md +++ b/docs/functions/Get-VdcTeam.md @@ -5,7 +5,7 @@ Get team info ## SYNTAX -### ID +### ID (Default) ``` Get-VdcTeam [-ID] [-VenafiSession ] [-ProgressAction ] [] diff --git a/docs/functions/Import-VdcCertificate.md b/docs/functions/Import-VdcCertificate.md index d605616d..370c5dd2 100644 --- a/docs/functions/Import-VdcCertificate.md +++ b/docs/functions/Import-VdcCertificate.md @@ -214,8 +214,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Initialize-PSSodium.md b/docs/functions/Initialize-PSSodium.md new file mode 100644 index 00000000..743fda63 --- /dev/null +++ b/docs/functions/Initialize-PSSodium.md @@ -0,0 +1,52 @@ +# Initialize-PSSodium + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +Initialize-PSSodium [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Invoke-VcWorkflow.md b/docs/functions/Invoke-VcWorkflow.md index 25c0a048..3b45af1f 100644 --- a/docs/functions/Invoke-VcWorkflow.md +++ b/docs/functions/Invoke-VcWorkflow.md @@ -92,8 +92,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Invoke-VdcCertificateAction.md b/docs/functions/Invoke-VdcCertificateAction.md index 0453c671..c521c0e5 100644 --- a/docs/functions/Invoke-VdcCertificateAction.md +++ b/docs/functions/Invoke-VdcCertificateAction.md @@ -82,6 +82,13 @@ Chain multiple actions together ### EXAMPLE 4 ``` +Invoke-VdcCertificateAction -Path '\VED\Policy\My folder\app.mycompany.com' -Push -AdditionalParameter @{'PushToAll'=$false; 'ApplicationDN'=@('\VED\Policy\My folder\app.mycompany.com\app1','\VED\Policy\My folder\app.mycompany.com\app2')} +``` + +Perform a push to a subset of associated applications overwriting the default of pushing to all. + +### EXAMPLE 5 +``` Invoke-VdcCertificateAction -Path '\VED\Policy\My folder\app.mycompany.com' -Revoke -AdditionalParameter @{'Comments'='Key compromised'; 'Reason'='3'} ``` @@ -165,6 +172,8 @@ Accept wildcard characters: False ### -Push Provisions the same certificate and private key to one or more devices or servers. The certificate must be associated with one or more Application objects. +By default, this will provision the certificate to all associated applications. +To specify a subset of applications, use the AdditionalParameter parameter as shown in the examples. ```yaml Type: SwitchParameter @@ -240,8 +249,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Invoke-VenafiParallel.md b/docs/functions/Invoke-VenafiParallel.md new file mode 100644 index 00000000..a5f1bfa1 --- /dev/null +++ b/docs/functions/Invoke-VenafiParallel.md @@ -0,0 +1,150 @@ +# Invoke-VenafiParallel + +## SYNOPSIS +Helper function to execute a scriptblock in parallel + +## SYNTAX + +``` +Invoke-VenafiParallel [-InputObject] [-ScriptBlock] [[-ThrottleLimit] ] + [[-ProgressTitle] ] [[-VenafiSession] ] [-ProgressAction ] + [] +``` + +## DESCRIPTION +Execute a scriptblock in parallel. +For PS v5, the ThreadJob module is required. + +## EXAMPLES + +### EXAMPLE 1 +``` +Invoke-VenafiParallel -InputObject $myObjects -ScriptBlock { Do-Something $PSItem } +``` + +Execute in parallel. +Reference each item in the scriptblock as $PSItem or $_. + +### EXAMPLE 2 +``` +Invoke-VenafiParallel -InputObject $myObjects -ScriptBlock { Do-Something $PSItem } -ThrottleLimit 5 +``` + +Only run 5 threads at a time instead of the default of 100. + +### EXAMPLE 3 +``` +$ProgressPreference = 'SilentlyContinue' +Invoke-VenafiParallel -InputObject $myObjects -ScriptBlock { Do-Something $PSItem } +``` + +Execute in parallel with no progress bar. + +## PARAMETERS + +### -InputObject +List of items to iterate over + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScriptBlock +Scriptblock to execute against the list of items + +```yaml +Type: ScriptBlock +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ThrottleLimit +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: 100 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressTitle +Message displayed on the progress bar + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: Performing action +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +In your ScriptBlock: +- Use either $PSItem or $_ to reference the current input object +- Remember hashtables are reference types so be sure to clone if 'using' from parent + +## RELATED LINKS diff --git a/docs/functions/New-HttpQueryString.md b/docs/functions/New-HttpQueryString.md new file mode 100644 index 00000000..71972757 --- /dev/null +++ b/docs/functions/New-HttpQueryString.md @@ -0,0 +1,84 @@ +# New-HttpQueryString + +## SYNOPSIS +Generate http query string + +## SYNTAX + +``` +New-HttpQueryString [-Uri] [-QueryParameter] [-ProgressAction ] + [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Uri +{{ Fill Uri Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -QueryParameter +{{ Fill QueryParameter Description }} + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + +[https://powershellmagazine.com/2019/06/14/pstip-a-better-way-to-generate-http-query-strings-in-powershell/](https://powershellmagazine.com/2019/06/14/pstip-a-better-way-to-generate-http-query-strings-in-powershell/) + diff --git a/docs/functions/New-VcSearchQuery.md b/docs/functions/New-VcSearchQuery.md new file mode 100644 index 00000000..5c81fd3b --- /dev/null +++ b/docs/functions/New-VcSearchQuery.md @@ -0,0 +1,103 @@ +# New-VcSearchQuery + +## SYNOPSIS +Build body for various vaas api calls + +## SYNTAX + +``` +New-VcSearchQuery [[-Filter] ] [[-Order] ] + [[-First] ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Build body for various api calls, typically for searching, eg. +certificates, logs. + +## EXAMPLES + +### EXAMPLE 1 +``` +New-VcSearchQuery -Filter @('authenticationType', 'eq', 'NONE') +Filter log results +``` + +## PARAMETERS + +### -Filter +Array or multidimensional array of fields and values to filter on. +Each array should be of the format @('operator', @(field, comparison operator, value), @(field2, comparison operator2, value2)). +Nested filters are supported. +For a complete list of comparison operators, see https://docs.venafi.cloud/api/about-api-search-operators/. + +```yaml +Type: System.Collections.Generic.List`1[System.Object] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Order +Array or multidimensional array of fields to Order on. +Each array should be of the format @(field, asc/desc). +If just the field name is provided, ascending will be used. + +```yaml +Type: PSObject[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -First +Gets only the specified number of objects. +Enter the number of objects to get. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Hashtable +## NOTES + +## RELATED LINKS diff --git a/docs/functions/New-VdcToken.md b/docs/functions/New-VdcToken.md index 691a40f7..7da1f36b 100644 --- a/docs/functions/New-VdcToken.md +++ b/docs/functions/New-VdcToken.md @@ -38,8 +38,8 @@ New-VdcToken -AuthServer -ClientId -Scope -Credent ### RefreshSession ``` -New-VdcToken [-SkipCertificateCheck] -VenafiSession [-ProgressAction ] - [-WhatIf] [-Confirm] [] +New-VdcToken [-SkipCertificateCheck] -VenafiSession [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -235,7 +235,7 @@ Accept wildcard characters: False VenafiSession object created from New-VenafiSession method. ```yaml -Type: VenafiSession +Type: PSObject Parameter Sets: RefreshSession Aliases: diff --git a/docs/functions/New-VenafiSession.md b/docs/functions/New-VenafiSession.md index efe9566f..f0b984f6 100644 --- a/docs/functions/New-VenafiSession.md +++ b/docs/functions/New-VenafiSession.md @@ -96,77 +96,65 @@ Tokens and TLSPC keys can be saved in a vault for future calls. ### EXAMPLE 1 ``` -New-VenafiSession -Server venafitpp.mycompany.com -Create key-based session using Windows Integrated authentication -``` - -### EXAMPLE 2 -``` -New-VenafiSession -Server venafitpp.mycompany.com -Credential $cred -Create key-based session using Windows Integrated authentication -``` - -### EXAMPLE 3 -``` New-VenafiSession -Server venafitpp.mycompany.com -ClientId MyApp -Scope @{'certificate'='manage'} Create token-based session using Windows Integrated authentication with a certain scope and privilege restriction ``` -### EXAMPLE 4 +### EXAMPLE 2 ``` New-VenafiSession -Server venafitpp.mycompany.com -Credential $cred -ClientId MyApp -Scope @{'certificate'='manage'} Create token-based session ``` -### EXAMPLE 5 +### EXAMPLE 3 ``` New-VenafiSession -Server venafitpp.mycompany.com -Certificate $myCert -ClientId MyApp -Scope @{'certificate'='manage'} Create token-based session using a client certificate ``` -### EXAMPLE 6 +### EXAMPLE 4 ``` New-VenafiSession -Server venafitpp.mycompany.com -AuthServer tppauth.mycompany.com -ClientId MyApp -Credential $cred Create token-based session using oauth authentication where the vedauth and vedsdk are hosted on different servers ``` -### EXAMPLE 7 +### EXAMPLE 5 ``` $sess = New-VenafiSession -Server venafitpp.mycompany.com -Credential $cred -PassThru Create session and return the session object instead of setting to script scope variable ``` -### EXAMPLE 8 +### EXAMPLE 6 ``` New-VenafiSession -Server venafitpp.mycompany.com -AccessToken $accessCred Create session using an access token obtained outside this module ``` -### EXAMPLE 9 +### EXAMPLE 7 ``` New-VenafiSession -Server venafitpp.mycompany.com -RefreshToken $refreshCred -ClientId MyApp Create session using a refresh token ``` -### EXAMPLE 10 +### EXAMPLE 8 ``` New-VenafiSession -Server venafitpp.mycompany.com -RefreshToken $refreshCred -ClientId MyApp -VaultRefreshTokenName TppRefresh Create session using a refresh token and store the newly created refresh token in the vault ``` -### EXAMPLE 11 +### EXAMPLE 9 ``` New-VenafiSession -VcKey $cred Create session against TLSPC ``` -### EXAMPLE 12 +### EXAMPLE 10 ``` New-VenafiSession -VcKey $cred -VcRegion 'eu' Create session against TLSPC in EU region ``` -### EXAMPLE 13 +### EXAMPLE 11 ``` New-VenafiSession -VaultVcKeyName vaas-key Create session against TLSPC with a key stored in a vault @@ -204,7 +192,7 @@ Accept wildcard characters: False ``` ### -Credential -Username and password used for key and token-based authentication. +Username and password used for token-based authentication. Not required for integrated authentication. ```yaml @@ -333,7 +321,7 @@ Accept wildcard characters: False ### -Jwt JSON web token. Available in TLSPDC v22.4 and later. -Ensure jwt mapping has been configured in VCC, Access Management-\>JWT Mappings. +Ensure JWT mapping has been configured in VCC, Access Management-\>JWT Mappings. ```yaml Type: String @@ -348,7 +336,7 @@ Accept wildcard characters: False ``` ### -Certificate -Certificate for token-based authentication +Certificate for TLSPDC token-based authentication ```yaml Type: X509Certificate diff --git a/docs/functions/Remove-VdcCertificate.md b/docs/functions/Remove-VdcCertificate.md index 5a96dcf4..968cc90e 100644 --- a/docs/functions/Remove-VdcCertificate.md +++ b/docs/functions/Remove-VdcCertificate.md @@ -68,8 +68,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Remove-VdcObject.md b/docs/functions/Remove-VdcObject.md index 024b6a90..26b5e131 100644 --- a/docs/functions/Remove-VdcObject.md +++ b/docs/functions/Remove-VdcObject.md @@ -75,8 +75,10 @@ Accept wildcard characters: False ``` ### -ThrottleLimit -Limit the number of threads when running in parallel; the default is 100. -Applicable to PS v7+ only. +Limit the number of threads when running in parallel; the default is 100. +Setting the value to 1 will disable multithreading. +On PS v5 the ThreadJob module is required. +If not found, multithreading will be disabled. ```yaml Type: Int32 diff --git a/docs/functions/Select-VenBatch.md b/docs/functions/Select-VenBatch.md new file mode 100644 index 00000000..3f72869c --- /dev/null +++ b/docs/functions/Select-VenBatch.md @@ -0,0 +1,133 @@ +# Select-VenBatch + +## SYNOPSIS +Batches pipeline input. + +## SYNTAX + +``` +Select-VenBatch [-InputObject ] -BatchSize [-BatchType] [-TotalCount ] + [-Activity ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Batches up pipeline input into consistently sized List\[T\]s of objects. +Used to ensure that processing occurs in specific sized batches. +Useful for not recieving API timouts due to sending more objects than can be processed in the connection timeout period. + +## EXAMPLES + +### EXAMPLE 1 +``` +1..6000 | Select-VenBatch -batchsize 1000 -BatchType string +``` + +## PARAMETERS + +### -InputObject +The pipeline input objects binds to this parameter one by one. +Do not use it directly. + +```yaml +Type: Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -BatchSize +The size of the batches to separate the pipeline input into. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BatchType +Type of object to group things into. +Defaults to a Powershell custom object + +Valid Values: "pscustomobject", "string", "int", "guid" + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: Pscustomobject +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TotalCount +The total number of items in the pipeline. +Used to calculate progress. +If you do not provide this value or ProgressPreference is set to 'SilentlyContinue', no progress will be displayed. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Activity +{{ Fill Activity Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Processing batches +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.Collections.Generic.List[T] +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Split-CertificateData.md b/docs/functions/Split-CertificateData.md new file mode 100644 index 00000000..8a3a3bcf --- /dev/null +++ b/docs/functions/Split-CertificateData.md @@ -0,0 +1,67 @@ +# Split-CertificateData + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +Split-CertificateData [-CertificateData] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -CertificateData +{{ Fill CertificateData Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Test-IsGuid.md b/docs/functions/Test-IsGuid.md new file mode 100644 index 00000000..3cd6e39f --- /dev/null +++ b/docs/functions/Test-IsGuid.md @@ -0,0 +1,65 @@ +# Test-IsGuid + +## SYNOPSIS +Validates a given input string and checks string is a valid GUID + +## SYNTAX + +``` +Test-IsGuid [-InputObject] [-ProgressAction ] [] +``` + +## DESCRIPTION +Validates a given input string and checks string is a valid GUID by using the .NET method Guid.TryParse + +## EXAMPLES + +### EXAMPLE 1 +``` +Test-Guid -InputObject "3363e9e1-00d8-45a1-9c0c-b93ee03f8c13" +``` + +## PARAMETERS + +### -InputObject +{{ Fill InputObject Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.Boolean +## NOTES +Uses .NET method \[guid\]::TryParse() + +## RELATED LINKS diff --git a/docs/functions/Test-TppDnPath.md b/docs/functions/Test-TppDnPath.md new file mode 100644 index 00000000..1124db57 --- /dev/null +++ b/docs/functions/Test-TppDnPath.md @@ -0,0 +1,83 @@ +# Test-TppDnPath + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +Test-TppDnPath [-Path] [[-AllowRoot] ] [-ProgressAction ] + [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -AllowRoot +{{ Fill AllowRoot Description }} + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Path +{{ Fill Path Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Test-VdcIdentityFormat.md b/docs/functions/Test-VdcIdentityFormat.md new file mode 100644 index 00000000..86ad545e --- /dev/null +++ b/docs/functions/Test-VdcIdentityFormat.md @@ -0,0 +1,92 @@ +# Test-VdcIdentityFormat + +## SYNOPSIS +Validate identity formats + +## SYNTAX + +``` +Test-VdcIdentityFormat [-ID] [[-Format] ] [-ProgressAction ] + [] +``` + +## DESCRIPTION +Validate the format for identities prefixed name, prefixed universal, and local. +As these formats are often interchangeable with api calls, you can validate multiple formats at once. +By default, prefixed name and prefixed universal will be validated. + +## EXAMPLES + +### EXAMPLE 1 +``` +Test-VdcIdentityFormat -ID "AD+BigSur:cypher" +``` + +Test the identity against all formats. +This would succeed for Name, but fail on Universal + +### EXAMPLE 2 +``` +Test-VdcIdentityFormat -ID "AD+BigSur:cypher" -Format Name +``` + +Test the identity against a specific format. + +## PARAMETERS + +### -ID +{{ Fill ID Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Format +Format to validate, Name, Universal, and/or Local. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.Boolean +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Test-VenafiSession.md b/docs/functions/Test-VenafiSession.md new file mode 100644 index 00000000..15722c9d --- /dev/null +++ b/docs/functions/Test-VenafiSession.md @@ -0,0 +1,108 @@ +# Test-VenafiSession + +## SYNOPSIS +Validate authentication session/key/token + +## SYNTAX + +### All (Default) +``` +Test-VenafiSession -VenafiSession [-ProgressAction ] [] +``` + +### Platform +``` +Test-VenafiSession -VenafiSession -Platform [-ProgressAction ] + [] +``` + +## DESCRIPTION +Validate authentication session from New-VenafiSession, a TLSPC key, or TLSPDC token. + +## EXAMPLES + +### EXAMPLE 1 +``` +Test-VenafiSession -VenafiSession $VenafiSession +Test a session +``` + +### EXAMPLE 2 +``` +Test-VenafiSession -VenafiSession $VenafiSession -PassThru +Test a session and return the platform type found +``` + +### EXAMPLE 3 +``` +Test-VenafiSession -VenafiSession $key +Test a TLSPC key +``` + +### EXAMPLE 4 +``` +Test-VenafiSession -VenafiSession $VenafiSession -Platform TLSPDC +Test session ensuring the platform is TLSPDC +``` + +## PARAMETERS + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TLSPDC token or TLSPC key can also provided. +If providing a TLSPDC token, an environment variable named VDC_SERVER must also be set. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: Key, AccessToken + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Platform +Platform, either TLSPDC or Vaas, to validate VenafiSession against. + +```yaml +Type: String +Parameter Sets: Platform +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### String - if PassThru provided +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Write-VerboseWithSecret.md b/docs/functions/Write-VerboseWithSecret.md new file mode 100644 index 00000000..b26e3d8a --- /dev/null +++ b/docs/functions/Write-VerboseWithSecret.md @@ -0,0 +1,88 @@ +# Write-VerboseWithSecret + +## SYNOPSIS +Remove sensitive information when writing verbose info + +## SYNTAX + +``` +Write-VerboseWithSecret [-InputObject] [[-PropertyName] ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Remove sensitive information when writing verbose info + +## EXAMPLES + +### EXAMPLE 1 +``` +@{'password'='foobar'} | Write-VerboseWithSecret +Hide password value from hashtable +``` + +### EXAMPLE 2 +``` +$jsonString | Write-VerboseWithSecret +Hide value(s) from JSON string +``` + +## PARAMETERS + +### -InputObject +JSON string or other object + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PropertyName +{{ Fill PropertyName Description }} + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: @('AccessToken', 'Password', 'RefreshToken', 'access_token', 'refresh_token', 'Authorization', 'KeystorePassword', 'tppl-api-key', 'CertificateData', 'certificate') +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### InputObject +## OUTPUTS + +### None +## NOTES + +## RELATED LINKS diff --git a/mkdocs.yml b/mkdocs.yml index 95d199a4..d80fd24c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -36,7 +36,13 @@ nav: - Add-VdcTeamMember: functions/Add-VdcTeamMember.md - Add-VdcTeamOwner: functions/Add-VdcTeamOwner.md - Convert-VdcObject: functions/Convert-VdcObject.md + - ConvertTo-PlaintextString: functions/ConvertTo-PlaintextString.md + - ConvertTo-UtcIso8601: functions/ConvertTo-UtcIso8601.md + - ConvertTo-VcTeam: functions/ConvertTo-VcTeam.md + - ConvertTo-VdcFullPath: functions/ConvertTo-VdcFullPath.md - ConvertTo-VdcGuid: functions/ConvertTo-VdcGuid.md + - ConvertTo-VdcIdentity: functions/ConvertTo-VdcIdentity.md + - ConvertTo-VdcObject: functions/ConvertTo-VdcObject.md - ConvertTo-VdcPath: functions/ConvertTo-VdcPath.md - Export-VcCertificate: functions/Export-VcCertificate.md - Export-VdcCertificate: functions/Export-VdcCertificate.md @@ -47,15 +53,18 @@ nav: - Find-VcLog: functions/Find-VcLog.md - Find-VcMachine: functions/Find-VcMachine.md - Find-VcMachineIdentity: functions/Find-VcMachineIdentity.md + - Find-VcObject: functions/Find-VcObject.md - Find-VdcCertificate: functions/Find-VdcCertificate.md - Find-VdcClient: functions/Find-VdcClient.md - Find-VdcEngine: functions/Find-VdcEngine.md - Find-VdcIdentity: functions/Find-VdcIdentity.md - Find-VdcObject: functions/Find-VdcObject.md - Find-VdcVaultId: functions/Find-VdcVaultId.md + - Get-EnumValues: functions/Get-EnumValues.md - Get-VcApplication: functions/Get-VcApplication.md - Get-VcCertificate: functions/Get-VcCertificate.md - Get-VcConnector: functions/Get-VcConnector.md + - Get-VcData: functions/Get-VcData.md - Get-VcIssuingTemplate: functions/Get-VcIssuingTemplate.md - Get-VcMachine: functions/Get-VcMachine.md - Get-VcMachineIdentity: functions/Get-VcMachineIdentity.md @@ -80,17 +89,21 @@ nav: - Get-VdcWorkflowTicket: functions/Get-VdcWorkflowTicket.md - Import-VcCertificate: functions/Import-VcCertificate.md - Import-VdcCertificate: functions/Import-VdcCertificate.md + - Initialize-PSSodium: functions/Initialize-PSSodium.md - Invoke-VcCertificateAction: functions/Invoke-VcCertificateAction.md - Invoke-VcWorkflow: functions/Invoke-VcWorkflow.md - Invoke-VdcCertificateAction: functions/Invoke-VdcCertificateAction.md + - Invoke-VenafiParallel: functions/Invoke-VenafiParallel.md - Invoke-VenafiRestMethod: functions/Invoke-VenafiRestMethod.md - Move-VdcObject: functions/Move-VdcObject.md + - New-HttpQueryString: functions/New-HttpQueryString.md - New-VcApplication: functions/New-VcApplication.md - New-VcCertificate: functions/New-VcCertificate.md - New-VcConnector: functions/New-VcConnector.md - New-VcMachine: functions/New-VcMachine.md - New-VcMachineCommonKeystore: functions/New-VcMachineCommonKeystore.md - New-VcMachineIis: functions/New-VcMachineIis.md + - New-VcSearchQuery: functions/New-VcSearchQuery.md - New-VcTeam: functions/New-VcTeam.md - New-VcWebhook: functions/New-VcWebhook.md - New-VdcCapiApplication: functions/New-VdcCapiApplication.md @@ -127,6 +140,7 @@ nav: - Revoke-VdcGrant: functions/Revoke-VdcGrant.md - Revoke-VdcToken: functions/Revoke-VdcToken.md - Search-VdcHistory: functions/Search-VdcHistory.md + - Select-VenBatch: functions/Select-VenBatch.md - Set-VcApplication: functions/Set-VcApplication.md - Set-VcConnector: functions/Set-VcConnector.md - Set-VcTeam: functions/Set-VcTeam.md @@ -134,8 +148,14 @@ nav: - Set-VdcCredential: functions/Set-VdcCredential.md - Set-VdcPermission: functions/Set-VdcPermission.md - Set-VdcWorkflowTicketStatus: functions/Set-VdcWorkflowTicketStatus.md + - Split-CertificateData: functions/Split-CertificateData.md + - Test-IsGuid: functions/Test-IsGuid.md + - Test-TppDnPath: functions/Test-TppDnPath.md - Test-VdcIdentity: functions/Test-VdcIdentity.md + - Test-VdcIdentityFormat: functions/Test-VdcIdentityFormat.md - Test-VdcObject: functions/Test-VdcObject.md - Test-VdcToken: functions/Test-VdcToken.md + - Test-VenafiSession: functions/Test-VenafiSession.md - Write-VdcLog: functions/Write-VdcLog.md + - Write-VerboseWithSecret: functions/Write-VerboseWithSecret.md