We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8e15298 + 24fcd6b commit 0e5ea21Copy full SHA for 0e5ea21
1 file changed
Modules/CIPPCore/Public/Invoke-CIPPRestMethod.ps1
@@ -89,9 +89,11 @@ function Invoke-CIPPRestMethod {
89
)
90
91
# ------------------------------------------------------------------
92
- # Escape hatch — env var kill switch or per-call legacy switch
+ # Escape hatch — env var kill switch, missing pooled client type,
93
+ # or per-call legacy switch
94
- if ($UseLegacyInvokeRestMethod -or $env:DisableCIPPRestMethod -eq 'true') {
95
+ $HasCippRestClient = $null -ne ('CIPP.CIPPRestClient' -as [type])
96
+ if ($UseLegacyInvokeRestMethod -or $env:DisableCIPPRestMethod -eq 'true' -or -not $HasCippRestClient) {
97
$LegacyParams = @{
98
Uri = $Uri
99
Method = $Method
0 commit comments