Public/Add-PegasusSyncWrapperObject.ps1
<# .SYNOPSIS Removes a position from the API. .EXAMPLE $Objects | Add-PegasusSyncWrapperObject #> function Add-PegasusSyncWrapperObject { [CmdletBinding()] Param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $InputObject ) Process { if($InputObject.ObjectType -notin "person","position","orgunit","genericdata") { throw "Wrong object type '$($InputObject.ObjectType)'" } if(!$InputObject.Object) { throw "Missing object" } Add-PegasusSyncObject -InputObject $InputObject.Object -ObjectType $InputObject.ObjectType } } |