From 47c48bcbecb424c370217d2c8dfec132dde1eb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=B6tz=20Jensen?= Date: Sat, 2 Mar 2024 20:36:09 +0100 Subject: [PATCH] Fix: Missing output type declaration --- d365bap.tools/functions/Compare-BapEnvironmentD365App.ps1 | 4 ++-- d365bap.tools/functions/Get-BapEnvironment.ps1 | 1 + d365bap.tools/functions/Get-BapEnvironmentApplicationUser.ps1 | 1 + d365bap.tools/functions/Get-BapEnvironmentD365App.ps1 | 1 + .../functions/Invoke-BapEnvironmentInstallD365App.ps1 | 2 -- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/d365bap.tools/functions/Compare-BapEnvironmentD365App.ps1 b/d365bap.tools/functions/Compare-BapEnvironmentD365App.ps1 index 645657f..e0e88ac 100644 --- a/d365bap.tools/functions/Compare-BapEnvironmentD365App.ps1 +++ b/d365bap.tools/functions/Compare-BapEnvironmentD365App.ps1 @@ -106,8 +106,8 @@ function Compare-BapEnvironmentD365App { if (Test-PSFFunctionInterrupt) { return } - $appsSourceEnvironment = Get-BapEnvironmentD365App -EnvironmentId $SourceEnvironmentId -InstallState Installed - $appsDestinationEnvironment = Get-BapEnvironmentD365App -EnvironmentId $DestinationEnvironmentId + $appsSourceEnvironment = Get-BapEnvironmentD365App -EnvironmentId $SourceEnvironmentId -InstallState Installed -$GeoRegion $GeoRegion + $appsDestinationEnvironment = Get-BapEnvironmentD365App -EnvironmentId $DestinationEnvironmentId -$GeoRegion $GeoRegion } process { diff --git a/d365bap.tools/functions/Get-BapEnvironment.ps1 b/d365bap.tools/functions/Get-BapEnvironment.ps1 index 0964cce..0a2edb6 100644 --- a/d365bap.tools/functions/Get-BapEnvironment.ps1 +++ b/d365bap.tools/functions/Get-BapEnvironment.ps1 @@ -50,6 +50,7 @@ #> function Get-BapEnvironment { [CmdletBinding()] + [OutputType('System.Object[]')] param ( [string] $EnvironmentId = "*", diff --git a/d365bap.tools/functions/Get-BapEnvironmentApplicationUser.ps1 b/d365bap.tools/functions/Get-BapEnvironmentApplicationUser.ps1 index a8ff474..04740a2 100644 --- a/d365bap.tools/functions/Get-BapEnvironmentApplicationUser.ps1 +++ b/d365bap.tools/functions/Get-BapEnvironmentApplicationUser.ps1 @@ -42,6 +42,7 @@ #> function Get-BapEnvironmentApplicationUser { [CmdletBinding()] + [OutputType('System.Object[]')] param ( [parameter (mandatory = $true)] [string] $EnvironmentId, diff --git a/d365bap.tools/functions/Get-BapEnvironmentD365App.ps1 b/d365bap.tools/functions/Get-BapEnvironmentD365App.ps1 index ea3e241..26bb77f 100644 --- a/d365bap.tools/functions/Get-BapEnvironmentD365App.ps1 +++ b/d365bap.tools/functions/Get-BapEnvironmentD365App.ps1 @@ -139,6 +139,7 @@ #> function Get-BapEnvironmentD365App { [CmdletBinding()] + [OutputType('System.Object[]')] param ( [parameter (mandatory = $true)] [string] $EnvironmentId, diff --git a/d365bap.tools/functions/Invoke-BapEnvironmentInstallD365App.ps1 b/d365bap.tools/functions/Invoke-BapEnvironmentInstallD365App.ps1 index ac45b7c..159051f 100644 --- a/d365bap.tools/functions/Invoke-BapEnvironmentInstallD365App.ps1 +++ b/d365bap.tools/functions/Invoke-BapEnvironmentInstallD365App.ps1 @@ -86,8 +86,6 @@ function Invoke-BapEnvironmentInstallD365App { ) begin { - $tenantId = (Get-AzContext).Tenant.Id - # Make sure all *BapEnvironment* cmdlets will validate that the environment exists prior running anything. $envObj = Get-BapEnvironment -EnvironmentId $EnvironmentId | Select-Object -First 1