Hey All,
So I'm in the process of developing a PowerShell based Sync Project for a REST API endpoint.
I'm at the stage where I need create custom cmdlet definitions for the Insert/Update activities (POST action with a JSON based body)
From what I can see; you pass in a number of parameters to the custom defined cmdlet so that they can be used as variables in the activities you'd like to perform.
When defining this cmdlet and the parameters - do i need to define each attribute of the object I'm trying to send out as parameter or is there a way to pass in the whole object as a single parameter?
Alternatively is there already an underlying variable predefined that can be used (Similar to how the base variable works in Process Orchestration).
Example from ADSample.xml to show what I mean:
<CustomCommand Name="Set-D1IMADUserEnabled">
<![CDATA[
param(
[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[ValidateNotNullOrEmpty()]
[String]$Identity,
[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[Bool]$Enabled
)
if($Enabled) {
Enable-ADAccount -Identity $identity
} else {
Disable-ADAccount -Identity $identity
}
]]>
Thanks!