#------------------------------------------------------------------------------------------------------------------------------------------------------------------
#PowerShell variabelen gebruikt in taken
#https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrading-cumulative-update-v22#powershell-variables-used-in-tasks
#------------------------------------------------------------------------------------------------------------------------------------------------------------------
$BaseAppPath = "C:\NAV\Software\BC"+"$Version"+"."+"$CURelease\$Release\Applications\BaseApp\Source\Microsoft_Base Application.app"
$SystemAppPath = "C:\NAV\Software\BC"+"$Version"+"."+"$CURelease\$Release\Applications\system application\Source\\Microsoft_System Application.app"
$ApplicationAppPath = "C:\NAV\Software\BC"+"$Version"+"."+"$CURelease\$Release\Applications\Application\Source\Microsoft_Application.app"
$AddinsFolder = "$env:ProgramFiles\Microsoft Dynamics 365 Business Central\$Version\Service\Add-ins\"
$PartnerLicense= "C:\NAV\License\BC"+"$Version"+"\CSS Support License - BCOP v22.bclicense"
$CustomerLicense= "C:\NAV\License\BC"+"$Version"+"\CSS Support License - BCOP v22.bclicense"
#------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Laden van variabelen voor de configuratie van CustomSettings.config en NavSettings.json
#------------------------------------------------------------------------------------------------------------------------------------------------------------------
$Module = "$env:ProgramFiles\Microsoft Dynamics 365 Business Central\$Version\Service\NavAdminTool.ps1"
$ServicesCertificateThumbprint = "e705aab68c59b0527d277364927772c1882d5b66"
$Destination = "C:\TEMP"
$ApplicationClientId = "2363362f-2103-4901-bc41-625a56d8e4af"
$NSTClientServicesCredentialType = "AccessControlService"
$ValidAudiencesServer = "$ApplicationClientId;https://api.businesscentral.dynamics.com"
$TenantAadId = "d9028ecb-8f48-44c1-ad8b-b6fc54f404fe"
$TenantDomain = "melsbergmans.nl"
$ODataServicesPort = "22048"
$ManagementServicesPort = "22045"
$SnapshotDebuggerServicesPort = "22083"
$ClientServicesPort = "22085"
$DeveloperServicesPort = "22049"
$SOAPServicesPort = "22047"
$ManagementApiServicesPort = "22086"
$PublicODataBaseUrl = "https://d365bc."+"$TenantDomain"+":"+"$ODataServicesPort/$BcServerInstance/ODataV4/"
$AppIdUri = "api://$ApplicationClientId"
$ClientServicesFederationMetadataLocation = "https://login.microsoftonline.com/$TenantAadId/FederationMetadata/2007-06/FederationMetadata.xml"
$ExcelAddInAzureActiveDirectoryClientId = "6ad8562c-0d43-4ddc-9d86-f78d233f461d"
$ExtendedSecurityTokenLifetime = "9"
$NASServicesStartupCodeunit = "450"
$PublicSOAPBaseUrl = "https://d365bc."+"$TenantDomain"+":"+"$SOAPServicesPort/$BcServerInstance/WS/"
$PublicWebBaseUrl = "https://d365bc."+"$TenantDomain"+":"+"$WebSitePort/$BcServerInstance/"
$ServicesCertificateThumbprint = "e705aab68c59b0527d277364927772c1882d5b66"
$ServicesDefaultCompany = "$Company"
$WSFederationLoginEndpoint = "https://login.microsoftonline.com/$TenantAadId/wsfed?wa=wsignin1.0%26wtrealm=$AppIdUri"
$DnsIdentity = "*.melsbergmans.nl"
$WebClientServicesCredentialType = "AccessControlService"
$AadApplicationId = "$ApplicationClientId"
$AadAuthorityUri = "https://login.microsoftonline.com/$TenantAadId"
$WebSitePort = "443"
$DeveloperServicesEnabled = "true"
$SOAPServicesEnabled = "true"
$ODataServicesEnabled = "true"
$DeveloperServicesSSLEnabled = "true"
$SOAPServicesSSLEnabled = "true"
$ODataServicesSSLEnabled = "true"
$ManagementApiServicesPort = "22086"
$Multitenant = "true"
$AddinsFolder = "$env:ProgramFiles\Microsoft Dynamics 365 Business Central\$Version\Service\Add-ins"
$ClientServicesCredentialType = "AccessControlService"
$ADOpenIdMetadataLocation = "https://login.microsoftonline.com/$TenantAadId/.well-known/openid-configuration"