Import-Post.ps1
function Import-Post { <# .SYNOPSIS This function ... .DESCRIPTION A bit more description .PARAMETER FromPipeline Shows how to process input from the pipeline, remaining parameters or by named parameter. .EXAMPLE Import-Post 'abc' Description of the example. #> <# Enable -Confirm and -WhatIf. #> [CmdletBinding(SupportsShouldProcess = $true)] param( [parameter(Mandatory=$true,Position=0)] [string]$path, [parameter(Position=1,ValueFromPipeline=$true)] [string]$body, [string]$contentType = "application/json" ) begin { } process { $params = @{ ContentType = $contentType Body = $body } return CallRestEndPoint Post $path $params } end { } } if ($loadingModule) { Export-ModuleMember -Function 'Import-Post' } |