#Sending the request$request=Send-UnityRequest-uri$URL-Session$Sess-Method'POST'

If($request.StatusCode-eq$StatusCode){

Write-Host"$Type send to $($Object.destinationEmails)"}# End If ($request.StatusCode -eq $StatusCode)}else{Write-Warning-Message"$Type with ID $i does not exist on the array $($sess.Name)"}# End If ($ObjectID)}# End Foreach ($i in $ID)}# End If ($Sess.TestConnection()) }# End Foreach ($sess in $session)}# End Process}# End Function