Public/Set-PegasusAdminPositionRaw.ps1

<#
.SYNOPSIS
Connects to the Microsoft Graph and reads all users. Useful for joining.

.EXAMPLE
Set-PegasusAdminPosition

#>

function Set-PegasusAdminPositionUsingFullObject {
    [CmdletBinding()]

    Param
    (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
        [String] $id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
        [System.Collections.Hashtable] $Content
    )
    
    Process {
        $body = @{
            id               = $id
            source           = $source
            archived         = $archived
            archivaltime     = $archivaltime
            person           = $person
            manager          = $manager
            orgunit          = $orgunit
            jobtitle         = $jobtitle
            jobcode          = $jobcode
            company          = $company
            location         = $location
            jobtype          = $jobtype
            employeeid       = $employeeid
            employerid       = $employerid
            costcenter       = $costcenter
            primary          = $primary
            startdate        = $startdate
            enddate          = $enddate
            autoactive       = $autoactive
            manualactivation = $manualactivation
            sourceid         = $sourceid
            partition        = $partition
            customfields     = $customfields
        }

        Invoke-PegasusRequest -Endpoint "/admin/positions/$id" -Method PATCH -Body $body
    }
}