Public/Get-ADPAssociateOID.ps1
function Get-ADPAssociateOID { <# .SYNOPSIS Get a user's Associate ID from ADP .DESCRIPTION Get a user's Associate ID from ADP .PARAMETER ADPObject Object which holds the AssociateOID .EXAMPLE Input Object: ADP Object Return String: <Associate OID> .NOTES This is used when passing the full adp worker object from ADP's APID .LINK https://google.com .FUNCTIONALITY Powershell Language #> param ( [Parameter( Mandatory = $true, Position = 0, ValueFromPipeline = $true )] $ADPObject ) $localAssociateOID = $null try { $localAssociateOID = $ADPObject.associateOID } catch {} return ( $localAssociateOID | Get-ValidADPReturn ) } |