Functions/Set-IAGroup.ps1
Function Set-IAGroup { <# .SYNOPSIS This is used to change a Group. .DESCRIPTION This function is used to change the properties of a Group. .EXAMPLE Get-IAGroup -All $IAGroup = Get-IAGroup -Name 'Awesome Group' $IAGroup.Title = 'Something else' Set-IAGroup -IAGroup $IAGroup #> Param( [Parameter(Mandatory = $true)] [PSObject] $IAGroup ) $Uri = "Groups($($IAGroup.Id))" $Body = $IAGroup | ConvertTo-Json Write-Verbose "Body: $Body" $response = Invoke-IAQuery -QueryUrl $Uri -Method Patch -Body $Body if ($null -eq $response.value) { return $null } return $response.value } |