Public/New-PegasusSyncObject.ps1
<# .SYNOPSIS Creates an object that can be sent to Add-PegasusSyncObject .EXAMPLE New-PegasusSyncPerson #> function New-PegasusSyncObject { [CmdletBinding()] Param( [Parameter(Mandatory = $true, Position = 0)] [ValidateSet("person", "position", "orgunit", "genericdata")] [String] $ObjectType ) Process { if ($ObjectType -eq "person") { @{ anchor = $null ssn = $null firstname = $null lastname = $null displayname = $null customfields = @{} } } if ($ObjectType -eq "position") { @{ sourceid = $null person = $null orgunit = $null startdate = [DateTime]::MinValue enddate = [DateTime]::MaxValue primary = $true jobtitle = $null jobcode = $null employeeid = $null customfields = @{} } } if ($ObjectType -eq "orgunit") { @{ sourceid = $null displayname = $null shortname = $null longname = $null parent = $null managers = @() customfields = @{} } } if ($ObjectType -eq "genericdata") { @{ person = $null customfields = @{} } } } } |