We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40cb7fc commit 24fcd6bCopy full SHA for 24fcd6b
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