Skip to content

Commit

Permalink
Adding some more verbose logging
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Aug 24, 2021
1 parent b3af535 commit 8e8590c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Public/Invoke-O365Admin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
$RestSplat['Body'] = $Body | ConvertTo-Json -Depth 5
}
$RestSplat.Uri = $Uri
$WhatIfInformation = "Invoking [$Method] " + [System.Environment]::NewLine + $RestSplat['Body'] + [System.Environment]::NewLine
try {
Write-Verbose "Invoke-O365Admin - Querying [$Method] $($RestSplat.Uri)"
$WhatIfInformation = "Invoking [$Method] " + [System.Environment]::NewLine + $RestSplat['Body'] + [System.Environment]::NewLine
Write-Verbose "Invoke-O365Admin - $($WhatIfInformation)over URI $($RestSplat.Uri)"
if ($Method -eq 'GET') {
# We use separate check because WHATIF would sometimes trigger when GET was used inside a SET
$OutputQuery = Invoke-RestMethod @RestSplat -Verbose:$false
Expand Down

0 comments on commit 8e8590c

Please sign in to comment.