Public/New-SignRequest.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
<#
.SYNOPSIS Creates new sign request .EXAMPLE New-SignRequest -process '0d00000000000001' Creates new signing request with specific process id. To get process ids use Get-SignProcess command. #> function New-SignRequest { [CmdletBinding(SupportsShouldProcess)] param ( # Process id [Parameter(Mandatory=$true)] [string] $process ) begin { $api = "/request/$process" $body = @{} } process { if ($PSCmdlet.ShouldProcess("ShouldProcess?")) { $result = Invoke-SignApi -method POST -api $api -body $body if ($result.request) { $result.request } } } end { } } |