From f1fdf5c078d5ddfd95b2640c2667f629e72c70cf Mon Sep 17 00:00:00 2001 From: Mikael Karlsson <43226266+Micke-K@users.noreply.github.com> Date: Wed, 15 Oct 2025 09:54:33 +1100 Subject: [PATCH] 3.10.1.5 Issue 367 --- CloudAPIPowerShellManagement.psm1 | 9 +++++++++ Start _PS7.cmd | 2 +- Start-WithApp_PS7.cmd | 1 + Start-WithConsole.cmd | 2 +- Start-WithConsole _PS7.cmd => Start-WithConsole_PS7.cmd | 2 +- Start-WithJson.cmd | 2 +- Start.cmd | 2 +- 7 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 Start-WithApp_PS7.cmd rename Start-WithConsole _PS7.cmd => Start-WithConsole_PS7.cmd (76%) diff --git a/CloudAPIPowerShellManagement.psm1 b/CloudAPIPowerShellManagement.psm1 index d8859e1..a8d312f 100644 --- a/CloudAPIPowerShellManagement.psm1 +++ b/CloudAPIPowerShellManagement.psm1 @@ -149,6 +149,15 @@ function Initialize-CloudAPIManagement Write-Host "Using Graph Environment type: $($global:UseGCCType)" } } + elseif($secret) + { + $global:ClientSecret = $secret + } + if($certificate) + { + $global:ClientCert = $certificate + } + if($global:hideUI -ne $true) { diff --git a/Start _PS7.cmd b/Start _PS7.cmd index 63c35d1..3f254b2 100644 --- a/Start _PS7.cmd +++ b/Start _PS7.cmd @@ -1 +1 @@ -cmd /c pwsh -ex bypass -File "%~DP0Start-IntuneManagement.ps1" \ No newline at end of file +cmd /c pwsh -ex bypass -File "%~DP0Start-IntuneManagement.ps1" %* \ No newline at end of file diff --git a/Start-WithApp_PS7.cmd b/Start-WithApp_PS7.cmd new file mode 100644 index 0000000..619e23d --- /dev/null +++ b/Start-WithApp_PS7.cmd @@ -0,0 +1 @@ +cmd /c pwsh -ex bypass -File "%~DP0Start-IntuneManagement.ps1" -tenantId "" -appid "" -secret "" \ No newline at end of file diff --git a/Start-WithConsole.cmd b/Start-WithConsole.cmd index 0e38192..829ce7b 100644 --- a/Start-WithConsole.cmd +++ b/Start-WithConsole.cmd @@ -1,2 +1,2 @@ -cmd /c powershell -version 5 -ex bypass -file "%~DP0Start-IntuneManagement.ps1" -ShowConsoleWindow +cmd /c powershell -version 5 -ex bypass -file "%~DP0Start-IntuneManagement.ps1" -ShowConsoleWindow %* pause \ No newline at end of file diff --git a/Start-WithConsole _PS7.cmd b/Start-WithConsole_PS7.cmd similarity index 76% rename from Start-WithConsole _PS7.cmd rename to Start-WithConsole_PS7.cmd index 2dfa030..a395732 100644 --- a/Start-WithConsole _PS7.cmd +++ b/Start-WithConsole_PS7.cmd @@ -1,2 +1,2 @@ -cmd /c pwsh -ex bypass -File "%~DP0Start-IntuneManagement.ps1" -ShowConsoleWindow +cmd /c pwsh -ex bypass -File "%~DP0Start-IntuneManagement.ps1" -ShowConsoleWindow %* pause \ No newline at end of file diff --git a/Start-WithJson.cmd b/Start-WithJson.cmd index 0f0c25b..caea16c 100644 --- a/Start-WithJson.cmd +++ b/Start-WithJson.cmd @@ -1 +1 @@ -cmd /c powershell -version 5 -ex bypass -File "%~DP0Start-IntuneManagement.ps1" -JSonSettings +cmd /c powershell -version 5 -ex bypass -File "%~DP0Start-IntuneManagement.ps1" -JSonSettings %* diff --git a/Start.cmd b/Start.cmd index 724c1e1..9fec1b6 100644 --- a/Start.cmd +++ b/Start.cmd @@ -1 +1 @@ -cmd /c powershell -version 5 -ex bypass -File "%~DP0Start-IntuneManagement.ps1" \ No newline at end of file +cmd /c powershell -version 5 -ex bypass -File "%~DP0Start-IntuneManagement.ps1" %* \ No newline at end of file