From 4d25e5bf6041d7437e4d4f730e40141392ea174e Mon Sep 17 00:00:00 2001 From: Fabien Tschanz Date: Sun, 15 Jun 2025 17:24:42 +0200 Subject: [PATCH 1/3] Remove read-only `SupportsScopeTags` property from all resources --- CHANGELOG.md | 1 + .../MSFT_AADActivityBasedTimeoutPolicy.psm1 | 4 ++-- .../MSFT_AADAdministrativeUnit.psm1 | 2 +- .../MSFT_AADApplication.psm1 | 2 +- .../MSFT_AADAttributeSet.psm1 | 4 ++-- ..._AADAuthenticationContextClassReference.psm1 | 4 ++-- .../MSFT_AADAuthenticationFlowPolicy.psm1 | 2 +- .../MSFT_AADAuthenticationMethodPolicy.psm1 | 2 +- ...AuthenticationMethodPolicyAuthenticator.psm1 | 4 ++-- ...MSFT_AADAuthenticationMethodPolicyEmail.psm1 | 4 ++-- ...T_AADAuthenticationMethodPolicyExternal.psm1 | 4 ++-- ...MSFT_AADAuthenticationMethodPolicyFido2.psm1 | 4 ++-- ...T_AADAuthenticationMethodPolicyHardware.psm1 | 4 ++-- .../MSFT_AADAuthenticationMethodPolicySms.psm1 | 4 ++-- ...T_AADAuthenticationMethodPolicySoftware.psm1 | 4 ++-- ..._AADAuthenticationMethodPolicyTemporary.psm1 | 4 ++-- ...MSFT_AADAuthenticationMethodPolicyVoice.psm1 | 4 ++-- .../MSFT_AADAuthenticationMethodPolicyX509.psm1 | 4 ++-- .../MSFT_AADAuthenticationRequirement.psm1 | 4 ++-- .../MSFT_AADAuthenticationStrengthPolicy.psm1 | 4 ++-- .../MSFT_AADAuthorizationPolicy.psm1 | 2 +- .../MSFT_AADConditionalAccessPolicy.psm1 | 4 ++-- .../MSFT_AADCrossTenantAccessPolicy.psm1 | 2 +- ...sTenantAccessPolicyConfigurationDefault.psm1 | 2 +- ...sTenantAccessPolicyConfigurationPartner.psm1 | 2 +- .../MSFT_AADDeviceRegistrationPolicy.psm1 | 4 ++-- ...T_AADEntitlementManagementAccessPackage.psm1 | 4 ++-- ...ManagementAccessPackageAssignmentPolicy.psm1 | 2 +- ...titlementManagementAccessPackageCatalog.psm1 | 4 ++-- ...itlementManagementConnectedOrganization.psm1 | 4 ++-- ..._AADEntitlementManagementRoleAssignment.psm1 | 6 +++--- .../MSFT_AADExternalIdentityPolicy.psm1 | 2 +- .../MSFT_AADGroup/MSFT_AADGroup.psm1 | 4 ++-- ...SFT_AADGroupEligibilityScheduleSettings.psm1 | 2 +- .../MSFT_AADGroupLifecyclePolicy.psm1 | 4 ++-- .../MSFT_AADGroupsNamingPolicy.psm1 | 4 ++-- .../MSFT_AADGroupsSettings.psm1 | 4 ++-- .../MSFT_AADNamedLocationPolicy.psm1 | 4 ++-- .../MSFT_AADPIMGroupSetting.psm1 | 2 +- .../MSFT_AADPasswordRuleSettings.psm1 | 4 ++-- .../MSFT_AADRoleAssignmentScheduleRequest.psm1 | 2 +- .../MSFT_AADRoleDefinition.psm1 | 4 ++-- .../MSFT_AADRoleEligibilityScheduleRequest.psm1 | 2 +- .../MSFT_AADRoleManagementPolicyRule.psm1 | 2 +- .../MSFT_AADRoleSetting.psm1 | 2 +- .../MSFT_AADSecurityDefaults.psm1 | 4 ++-- .../MSFT_AADServicePrincipal.psm1 | 4 ++-- .../MSFT_AADSocialIdentityProvider.psm1 | 4 ++-- .../MSFT_AADTokenLifetimePolicy.psm1 | 4 ++-- .../DSCResources/MSFT_AADUser/MSFT_AADUser.psm1 | 4 ++-- .../MSFT_AADUserFlowAttribute.psm1 | 2 +- .../MSFT_AADVerifiedIdAuthority.psm1 | 2 +- .../MSFT_AADVerifiedIdAuthorityContract.psm1 | 2 +- .../MSFT_EXOAcceptedDomain.psm1 | 4 ++-- .../MSFT_EXOActiveSyncDeviceAccessRule.psm1 | 4 ++-- .../MSFT_EXOAddressBookPolicy.psm1 | 4 ++-- .../MSFT_EXOAddressList.psm1 | 4 ++-- .../MSFT_EXOAntiPhishPolicy.psm1 | 4 ++-- .../MSFT_EXOAntiPhishRule.psm1 | 4 ++-- .../MSFT_EXOApplicationAccessPolicy.psm1 | 4 ++-- .../MSFT_EXOAtpPolicyForO365.psm1 | 4 ++-- .../MSFT_EXOAuthenticationPolicy.psm1 | 4 ++-- .../MSFT_EXOAuthenticationPolicyAssignment.psm1 | 4 ++-- .../MSFT_EXOAvailabilityAddressSpace.psm1 | 4 ++-- .../MSFT_EXOAvailabilityConfig.psm1 | 4 ++-- .../MSFT_EXOCASMailboxPlan.psm1 | 4 ++-- .../MSFT_EXOCASMailboxSettings.psm1 | 4 ++-- .../MSFT_EXOCalendarProcessing.psm1 | 4 ++-- .../MSFT_EXOClientAccessRule.psm1 | 4 ++-- .../MSFT_EXODataEncryptionPolicy.psm1 | 4 ++-- .../MSFT_EXODistributionGroup.psm1 | 4 ++-- .../MSFT_EXODkimSigningConfig.psm1 | 4 ++-- .../MSFT_EXOEmailAddressPolicy.psm1 | 4 ++-- .../MSFT_EXOEmailTenantSettings.psm1 | 4 ++-- .../MSFT_EXOGlobalAddressList.psm1 | 4 ++-- .../MSFT_EXOGroupSettings.psm1 | 2 +- .../MSFT_EXOHostedConnectionFilterPolicy.psm1 | 4 ++-- .../MSFT_EXOHostedContentFilterPolicy.psm1 | 4 ++-- .../MSFT_EXOHostedContentFilterRule.psm1 | 4 ++-- .../MSFT_EXOHostedOutboundSpamFilterRule.psm1 | 4 ++-- .../MSFT_EXOIRMConfiguration.psm1 | 4 ++-- .../MSFT_EXOInboundConnector.psm1 | 4 ++-- .../MSFT_EXOIntraOrganizationConnector.psm1 | 4 ++-- .../MSFT_EXOJournalRule.psm1 | 4 ++-- .../MSFT_EXOMailContact.psm1 | 4 ++-- .../MSFT_EXOMailboxAutoReplyConfiguration.psm1 | 4 ++-- .../MSFT_EXOMailboxCalendarFolder.psm1 | 4 ++-- .../MSFT_EXOMailboxIRMAccess.psm1 | 2 +- .../MSFT_EXOMailboxPermission.psm1 | 4 ++-- .../MSFT_EXOMailboxPlan.psm1 | 4 ++-- .../MSFT_EXOMailboxSettings.psm1 | 4 ++-- .../MSFT_EXOMalwareFilterPolicy.psm1 | 4 ++-- .../MSFT_EXOMalwareFilterRule.psm1 | 4 ++-- .../MSFT_EXOManagementRole.psm1 | 4 ++-- .../MSFT_EXOManagementRoleAssignment.psm1 | 4 ++-- .../MSFT_EXOManagementRoleEntry.psm1 | 2 +- .../MSFT_EXOMessageClassification.psm1 | 4 ++-- .../MSFT_EXOMobileDeviceMailboxPolicy.psm1 | 4 ++-- .../MSFT_EXOOMEConfiguration.psm1 | 4 ++-- .../MSFT_EXOOfflineAddressBook.psm1 | 4 ++-- .../MSFT_EXOOnPremisesOrganization.psm1 | 4 ++-- .../MSFT_EXOOrganizationConfig.psm1 | 4 ++-- .../MSFT_EXOOrganizationRelationship.psm1 | 4 ++-- .../MSFT_EXOOutboundConnector.psm1 | 4 ++-- .../MSFT_EXOOwaMailboxPolicy.psm1 | 4 ++-- .../MSFT_EXOPartnerApplication.psm1 | 4 ++-- .../MSFT_EXOPerimeterConfiguration.psm1 | 4 ++-- .../MSFT_EXOPlace/MSFT_EXOPlace.psm1 | 4 ++-- .../MSFT_EXOPolicyTipConfig.psm1 | 4 ++-- .../MSFT_EXOQuarantinePolicy.psm1 | 6 +++--- .../MSFT_EXORecipientPermission.psm1 | 4 ++-- .../MSFT_EXORemoteDomain.psm1 | 4 ++-- .../MSFT_EXOReportSubmissionPolicy.psm1 | 4 ++-- .../MSFT_EXOReportSubmissionRule.psm1 | 4 ++-- .../MSFT_EXOResourceConfiguration.psm1 | 4 ++-- .../MSFT_EXORoleAssignmentPolicy.psm1 | 4 ++-- .../MSFT_EXORoleGroup/MSFT_EXORoleGroup.psm1 | 4 ++-- .../MSFT_EXOSafeAttachmentPolicy.psm1 | 4 ++-- .../MSFT_EXOSafeAttachmentRule.psm1 | 4 ++-- .../MSFT_EXOSafeLinksPolicy.psm1 | 4 ++-- .../MSFT_EXOSafeLinksRule.psm1 | 4 ++-- .../MSFT_EXOSharedMailbox.psm1 | 4 ++-- .../MSFT_EXOSharingPolicy.psm1 | 4 ++-- .../MSFT_EXOSmtpDaneInbound.psm1 | 4 ++-- .../MSFT_EXOTeamsProtectionPolicy.psm1 | 4 ++-- .../MSFT_EXOTransportConfig.psm1 | 4 ++-- .../MSFT_EXOTransportRule.psm1 | 4 ++-- .../MSFT_IntuneASRRulesPolicyWindows10.psm1 | 2 +- .../MSFT_IntuneAccountProtectionPolicy.psm1 | 2 +- ...tuneAndroidManagedStoreAppConfiguration.psm1 | 4 ++-- .../MSFT_IntuneAppConfigurationPolicy.psm1 | 4 ++-- .../MSFT_IntuneAppProtectionPolicyAndroid.psm1 | 2 +- .../MSFT_IntuneAppProtectionPolicyiOS.psm1 | 4 ++-- ...IntuneApplicationControlPolicyWindows10.psm1 | 2 +- ...uctionRulesPolicyWindows10ConfigManager.psm1 | 2 +- ...eDeviceAndAppManagementAssignmentFilter.psm1 | 2 +- .../MSFT_IntuneDeviceCategory.psm1 | 4 ++-- .../MSFT_IntuneDeviceCleanupRule.psm1 | 4 ++-- ...SFT_IntuneDeviceCompliancePolicyAndroid.psm1 | 4 ++-- ...eviceCompliancePolicyAndroidDeviceOwner.psm1 | 4 ++-- ...eviceCompliancePolicyAndroidWorkProfile.psm1 | 4 ++-- .../MSFT_IntuneDeviceCompliancePolicyMacOS.psm1 | 4 ++-- ...T_IntuneDeviceCompliancePolicyWindows10.psm1 | 2 +- .../MSFT_IntuneDeviceCompliancePolicyiOs.psm1 | 4 ++-- ...onAdministrativeTemplatePolicyWindows10.psm1 | 4 ++-- ...eviceConfigurationCustomPolicyWindows10.psm1 | 13 ------------- ...onfigurationCustomPolicyWindows10.schema.mof | 1 - ...ntuneDeviceConfigurationCustomPolicyiOS.psm1 | 4 ++-- ...derForEndpointOnboardingPolicyWindows10.psm1 | 4 ++-- ...tionDeliveryOptimizationPolicyWindows10.psm1 | 17 ++--------------- ...liveryOptimizationPolicyWindows10.schema.mof | 1 - ...eConfigurationDomainJoinPolicyWindows10.psm1 | 17 ++--------------- ...gurationDomainJoinPolicyWindows10.schema.mof | 1 - ...onfigurationEmailProfilePolicyWindows10.psm1 | 4 ++-- ...rationEndpointProtectionPolicyWindows10.psm1 | 17 ++--------------- ...EndpointProtectionPolicyWindows10.schema.mof | 1 - ...urationFirmwareInterfacePolicyWindows10.psm1 | 17 ++--------------- ...nFirmwareInterfacePolicyWindows10.schema.mof | 1 - ...hMonitoringConfigurationPolicyWindows10.psm1 | 17 ++--------------- ...oringConfigurationPolicyWindows10.schema.mof | 1 - ...rationIdentityProtectionPolicyWindows10.psm1 | 17 ++--------------- ...IdentityProtectionPolicyWindows10.schema.mof | 1 - ...onImportedPfxCertificatePolicyWindows10.psm1 | 4 ++-- ...DeviceConfigurationKioskPolicyWindows10.psm1 | 4 ++-- ...igurationNetworkBoundaryPolicyWindows10.psm1 | 17 ++--------------- ...ionNetworkBoundaryPolicyWindows10.schema.mof | 1 - ...igurationPkcsCertificatePolicyWindows10.psm1 | 4 ++-- ...urationPolicyAndroidDeviceAdministrator.psm1 | 4 ++-- ...ceConfigurationPolicyAndroidDeviceOwner.psm1 | 4 ++-- ...igurationPolicyAndroidOpenSourceProject.psm1 | 4 ++-- ...ceConfigurationPolicyAndroidWorkProfile.psm1 | 4 ++-- ...FT_IntuneDeviceConfigurationPolicyMacOS.psm1 | 4 ++-- ...ntuneDeviceConfigurationPolicyWindows10.psm1 | 17 ++--------------- ...eviceConfigurationPolicyWindows10.schema.mof | 1 - ...MSFT_IntuneDeviceConfigurationPolicyiOS.psm1 | 4 ++-- ...igurationSCEPCertificatePolicyWindows10.psm1 | 4 ++-- ...gurationSecureAssessmentPolicyWindows10.psm1 | 4 ++-- ...urationSharedMultiDevicePolicyWindows10.psm1 | 4 ++-- ...rationTrustedCertificatePolicyWindows10.psm1 | 4 ++-- ...neDeviceConfigurationVpnPolicyWindows10.psm1 | 4 ++-- ...ConfigurationWindowsTeamPolicyWindows10.psm1 | 17 ++--------------- ...urationWindowsTeamPolicyWindows10.schema.mof | 1 - ...onfigurationWiredNetworkPolicyWindows10.psm1 | 2 +- ...tuneDeviceEnrollmentStatusPageWindows10.psm1 | 2 +- ...uneDeviceFeaturesConfigurationPolicyIOS.psm1 | 4 ++-- ...ntuneDeviceManagementComplianceSettings.psm1 | 4 ++-- ...ointDetectionAndResponsePolicyWindows10.psm1 | 2 +- .../MSFT_IntunePolicySets.psm1 | 4 ++-- ...tuneSettingCatalogCustomPolicyWindows10.psm1 | 4 ++-- ...rustedRootCertificateAndroidDeviceOwner.psm1 | 4 ++-- ...TrustedRootCertificateAndroidEnterprise.psm1 | 4 ++-- ...IntuneTrustedRootCertificateAndroidWork.psm1 | 4 ++-- .../MSFT_IntuneTrustedRootCertificateIOS.psm1 | 4 ++-- ...PNConfigurationPolicyAndroidDeviceOwner.psm1 | 4 ++-- ...VPNConfigurationPolicyAndroidEnterprise.psm1 | 4 ++-- ...IntuneVPNConfigurationPolicyAndroidWork.psm1 | 4 ++-- .../MSFT_IntuneVPNConfigurationPolicyIOS.psm1 | 4 ++-- ...urationPolicyAndroidDeviceAdministrator.psm1 | 4 ++-- ...ationPolicyAndroidEnterpriseDeviceOwner.psm1 | 4 ++-- ...ationPolicyAndroidEnterpriseWorkProfile.psm1 | 4 ++-- ...neWifiConfigurationPolicyAndroidForWork.psm1 | 4 ++-- ...igurationPolicyAndroidOpenSourceProject.psm1 | 4 ++-- .../MSFT_IntuneWifiConfigurationPolicyIOS.psm1 | 2 +- ...MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 | 4 ++-- ..._IntuneWifiConfigurationPolicyWindows10.psm1 | 4 ++-- ...lotDeploymentProfileAzureADHybridJoined.psm1 | 2 +- ...AutopilotDeploymentProfileAzureADJoined.psm1 | 4 ++-- ...ionProtectionPolicyWindows10MdmEnrolled.psm1 | 4 ++-- ...teForBusinessRingUpdateProfileWindows10.psm1 | 4 ++-- .../MSFT_O365AdminAuditLogConfig.psm1 | 4 ++-- .../MSFT_O365Group/MSFT_O365Group.psm1 | 4 ++-- .../MSFT_O365OrgSettings.psm1 | 4 ++-- .../MSFT_ODSettings/MSFT_ODSettings.psm1 | 4 ++-- .../MSFT_SCRoleGroup/MSFT_SCRoleGroup.psm1 | 4 ++-- .../MSFT_SPOAccessControlSettings.psm1 | 4 ++-- .../DSCResources/MSFT_SPOApp/MSFT_SPOApp.psm1 | 4 ++-- .../MSFT_SPOBrowserIdleSignout.psm1 | 4 ++-- .../MSFT_SPOHomeSite/MSFT_SPOHomeSite.psm1 | 4 ++-- .../MSFT_SPOHubSite/MSFT_SPOHubSite.psm1 | 4 ++-- .../MSFT_SPOOrgAssetsLibrary.psm1 | 4 ++-- .../MSFT_SPOPropertyBag.psm1 | 4 ++-- .../MSFT_SPOSearchManagedProperty.psm1 | 4 ++-- .../MSFT_SPOSearchResultSource.psm1 | 4 ++-- .../MSFT_SPOSharingSettings.psm1 | 4 ++-- .../DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1 | 2 +- .../MSFT_SPOSiteAuditSettings.psm1 | 4 ++-- .../MSFT_SPOSiteDesign/MSFT_SPOSiteDesign.psm1 | 2 +- .../MSFT_SPOSiteDesignRights.psm1 | 4 ++-- .../MSFT_SPOSiteGroup/MSFT_SPOSiteGroup.psm1 | 4 ++-- .../MSFT_SPOSiteScript/MSFT_SPOSiteScript.psm1 | 4 ++-- .../MSFT_SPOStorageEntity.psm1 | 4 ++-- .../MSFT_SPOTenantCdnEnabled.psm1 | 4 ++-- .../MSFT_SPOTenantCdnPolicy.psm1 | 6 +++--- .../MSFT_SPOTenantSettings.psm1 | 4 ++-- .../MSFT_SPOTheme/MSFT_SPOTheme.psm1 | 2 +- .../MSFT_SPOUserProfileProperty.psm1 | 4 ++-- .../1-Create.ps1 | 2 +- .../2-Update.ps1 | 2 +- .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 3 +-- .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 3 +-- .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - .../1-Create.ps1 | 1 - .../2-Update.ps1 | 1 - ...ConfigurationCustomPolicyWindows10.Tests.ps1 | 10 ---------- ...eliveryOptimizationPolicyWindows10.Tests.ps1 | 10 ---------- ...igurationDomainJoinPolicyWindows10.Tests.ps1 | 10 ---------- ...nEndpointProtectionPolicyWindows10.Tests.ps1 | 11 ----------- ...onFirmwareInterfacePolicyWindows10.Tests.ps1 | 10 ---------- ...toringConfigurationPolicyWindows10.Tests.ps1 | 7 ------- ...nIdentityProtectionPolicyWindows10.Tests.ps1 | 10 ---------- ...tionNetworkBoundaryPolicyWindows10.Tests.ps1 | 10 ---------- ...DeviceConfigurationPolicyWindows10.Tests.ps1 | 10 ---------- ...gurationWindowsTeamPolicyWindows10.Tests.ps1 | 10 ---------- 268 files changed, 419 insertions(+), 676 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fffd0ef04b..3862666e74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * MISC * Added `deviceAndAppManagementAssignmentFilterDisplayName` property to Intune assignments. FIXES [#4609](https://github.com/microsoft/Microsoft365DSC/issues/4609) + * [BREAKING CHANGE] Remove `SupportsScopeTags` property from all resources because it's read-only. * AADGroupElegibilityScheduleSettings * New resource AADGroupElegibilityScheduleSettings diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADActivityBasedTimeoutPolicy/MSFT_AADActivityBasedTimeoutPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADActivityBasedTimeoutPolicy/MSFT_AADActivityBasedTimeoutPolicy.psm1 index e0a398d016..f9fee3ef00 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADActivityBasedTimeoutPolicy/MSFT_AADActivityBasedTimeoutPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADActivityBasedTimeoutPolicy/MSFT_AADActivityBasedTimeoutPolicy.psm1 @@ -114,7 +114,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -528,7 +528,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAdministrativeUnit/MSFT_AADAdministrativeUnit.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAdministrativeUnit/MSFT_AADAdministrativeUnit.psm1 index fadd65275f..48cda9303b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAdministrativeUnit/MSFT_AADAdministrativeUnit.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAdministrativeUnit/MSFT_AADAdministrativeUnit.psm1 @@ -152,7 +152,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 index 4102d68c67..fca7986dbe 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 @@ -1619,7 +1619,7 @@ function Export-TargetResource DisplayName = $AADApp.DisplayName ObjectID = $AADApp.Id Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } try diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAttributeSet/MSFT_AADAttributeSet.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAttributeSet/MSFT_AADAttributeSet.psm1 index 98752ddcdd..c4a62c0820 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAttributeSet/MSFT_AADAttributeSet.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAttributeSet/MSFT_AADAttributeSet.psm1 @@ -101,7 +101,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -364,7 +364,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationContextClassReference/MSFT_AADAuthenticationContextClassReference.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationContextClassReference/MSFT_AADAuthenticationContextClassReference.psm1 index ea21fe089a..bd8e32030e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationContextClassReference/MSFT_AADAuthenticationContextClassReference.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationContextClassReference/MSFT_AADAuthenticationContextClassReference.psm1 @@ -107,7 +107,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -388,7 +388,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationFlowPolicy/MSFT_AADAuthenticationFlowPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationFlowPolicy/MSFT_AADAuthenticationFlowPolicy.psm1 index 7e13f04961..9d59b526c4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationFlowPolicy/MSFT_AADAuthenticationFlowPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationFlowPolicy/MSFT_AADAuthenticationFlowPolicy.psm1 @@ -95,7 +95,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicy/MSFT_AADAuthenticationMethodPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicy/MSFT_AADAuthenticationMethodPolicy.psm1 index 6a2d1cfaff..99e59a3c5c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicy/MSFT_AADAuthenticationMethodPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicy/MSFT_AADAuthenticationMethodPolicy.psm1 @@ -263,7 +263,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyAuthenticator/MSFT_AADAuthenticationMethodPolicyAuthenticator.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyAuthenticator/MSFT_AADAuthenticationMethodPolicyAuthenticator.psm1 index 78c9842095..5ff74d7d7d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyAuthenticator/MSFT_AADAuthenticationMethodPolicyAuthenticator.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyAuthenticator/MSFT_AADAuthenticationMethodPolicyAuthenticator.psm1 @@ -485,7 +485,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -923,7 +923,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyEmail/MSFT_AADAuthenticationMethodPolicyEmail.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyEmail/MSFT_AADAuthenticationMethodPolicyEmail.psm1 index 6465ffe810..5a92a779bc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyEmail/MSFT_AADAuthenticationMethodPolicyEmail.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyEmail/MSFT_AADAuthenticationMethodPolicyEmail.psm1 @@ -209,7 +209,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -583,7 +583,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyExternal/MSFT_AADAuthenticationMethodPolicyExternal.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyExternal/MSFT_AADAuthenticationMethodPolicyExternal.psm1 index fb6742ed7f..a7379f8791 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyExternal/MSFT_AADAuthenticationMethodPolicyExternal.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyExternal/MSFT_AADAuthenticationMethodPolicyExternal.psm1 @@ -215,7 +215,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -567,7 +567,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyFido2/MSFT_AADAuthenticationMethodPolicyFido2.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyFido2/MSFT_AADAuthenticationMethodPolicyFido2.psm1 index 252be2adc0..925a9c7300 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyFido2/MSFT_AADAuthenticationMethodPolicyFido2.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyFido2/MSFT_AADAuthenticationMethodPolicyFido2.psm1 @@ -227,7 +227,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -608,7 +608,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyHardware/MSFT_AADAuthenticationMethodPolicyHardware.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyHardware/MSFT_AADAuthenticationMethodPolicyHardware.psm1 index 16e325ffd4..c034b748e6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyHardware/MSFT_AADAuthenticationMethodPolicyHardware.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyHardware/MSFT_AADAuthenticationMethodPolicyHardware.psm1 @@ -196,7 +196,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -553,7 +553,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySms/MSFT_AADAuthenticationMethodPolicySms.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySms/MSFT_AADAuthenticationMethodPolicySms.psm1 index 4c0a68cf56..fbf2b3a76f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySms/MSFT_AADAuthenticationMethodPolicySms.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySms/MSFT_AADAuthenticationMethodPolicySms.psm1 @@ -199,7 +199,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -557,7 +557,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySoftware/MSFT_AADAuthenticationMethodPolicySoftware.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySoftware/MSFT_AADAuthenticationMethodPolicySoftware.psm1 index 13128c0a53..4a48e76327 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySoftware/MSFT_AADAuthenticationMethodPolicySoftware.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicySoftware/MSFT_AADAuthenticationMethodPolicySoftware.psm1 @@ -198,7 +198,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -556,7 +556,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyTemporary/MSFT_AADAuthenticationMethodPolicyTemporary.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyTemporary/MSFT_AADAuthenticationMethodPolicyTemporary.psm1 index c6a7952e26..67588008cd 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyTemporary/MSFT_AADAuthenticationMethodPolicyTemporary.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyTemporary/MSFT_AADAuthenticationMethodPolicyTemporary.psm1 @@ -227,7 +227,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -630,7 +630,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyVoice/MSFT_AADAuthenticationMethodPolicyVoice.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyVoice/MSFT_AADAuthenticationMethodPolicyVoice.psm1 index 45f4c0e8cd..f14e1fa001 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyVoice/MSFT_AADAuthenticationMethodPolicyVoice.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyVoice/MSFT_AADAuthenticationMethodPolicyVoice.psm1 @@ -203,7 +203,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -569,7 +569,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyX509/MSFT_AADAuthenticationMethodPolicyX509.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyX509/MSFT_AADAuthenticationMethodPolicyX509.psm1 index 0e9536c539..18659e6e93 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyX509/MSFT_AADAuthenticationMethodPolicyX509.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyX509/MSFT_AADAuthenticationMethodPolicyX509.psm1 @@ -265,7 +265,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -633,7 +633,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationRequirement/MSFT_AADAuthenticationRequirement.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationRequirement/MSFT_AADAuthenticationRequirement.psm1 index 16b546cf00..c7823b9682 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationRequirement/MSFT_AADAuthenticationRequirement.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationRequirement/MSFT_AADAuthenticationRequirement.psm1 @@ -88,7 +88,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -346,7 +346,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationStrengthPolicy/MSFT_AADAuthenticationStrengthPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationStrengthPolicy/MSFT_AADAuthenticationStrengthPolicy.psm1 index 1948a7e2b8..2a962bfa08 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationStrengthPolicy/MSFT_AADAuthenticationStrengthPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationStrengthPolicy/MSFT_AADAuthenticationStrengthPolicy.psm1 @@ -109,7 +109,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -402,7 +402,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthorizationPolicy/MSFT_AADAuthorizationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthorizationPolicy/MSFT_AADAuthorizationPolicy.psm1 index 5f2c0668e1..0558a0ff3f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthorizationPolicy/MSFT_AADAuthorizationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthorizationPolicy/MSFT_AADAuthorizationPolicy.psm1 @@ -176,7 +176,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 index c2faa0ef46..32d14bc426 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 @@ -749,7 +749,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -2360,7 +2360,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Script:exportedInstance = $Policy diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicy/MSFT_AADCrossTenantAccessPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicy/MSFT_AADCrossTenantAccessPolicy.psm1 index 329fe1a82a..72515411e4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicy/MSFT_AADCrossTenantAccessPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicy/MSFT_AADCrossTenantAccessPolicy.psm1 @@ -349,7 +349,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationDefault/MSFT_AADCrossTenantAccessPolicyConfigurationDefault.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationDefault/MSFT_AADCrossTenantAccessPolicyConfigurationDefault.psm1 index a47882e23f..ceb2d7e338 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationDefault/MSFT_AADCrossTenantAccessPolicyConfigurationDefault.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationDefault/MSFT_AADCrossTenantAccessPolicyConfigurationDefault.psm1 @@ -475,7 +475,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationPartner/MSFT_AADCrossTenantAccessPolicyConfigurationPartner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationPartner/MSFT_AADCrossTenantAccessPolicyConfigurationPartner.psm1 index 586773777b..e52b3d4fd4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationPartner/MSFT_AADCrossTenantAccessPolicyConfigurationPartner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADCrossTenantAccessPolicyConfigurationPartner/MSFT_AADCrossTenantAccessPolicyConfigurationPartner.psm1 @@ -499,7 +499,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADDeviceRegistrationPolicy/MSFT_AADDeviceRegistrationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADDeviceRegistrationPolicy/MSFT_AADDeviceRegistrationPolicy.psm1 index 44900d614d..3fdde505c7 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADDeviceRegistrationPolicy/MSFT_AADDeviceRegistrationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADDeviceRegistrationPolicy/MSFT_AADDeviceRegistrationPolicy.psm1 @@ -231,7 +231,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -612,7 +612,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 index bacb66d7de..76208d3199 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 @@ -192,7 +192,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -956,7 +956,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy.psm1 index 832dcb0e62..90b83ee75e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy/MSFT_AADEntitlementManagementAccessPackageAssignmentPolicy.psm1 @@ -944,7 +944,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 index 86d299e292..bcf978146a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 @@ -135,7 +135,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -487,7 +487,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 index fc4bd12237..5cf5ff58c0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 @@ -244,7 +244,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -800,7 +800,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementRoleAssignment/MSFT_AADEntitlementManagementRoleAssignment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementRoleAssignment/MSFT_AADEntitlementManagementRoleAssignment.psm1 index 25cb08fd15..56178429be 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementRoleAssignment/MSFT_AADEntitlementManagementRoleAssignment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementRoleAssignment/MSFT_AADEntitlementManagementRoleAssignment.psm1 @@ -117,7 +117,7 @@ function Get-TargetResource } else { - $getValue = $Script:exportedInstance + $getValue = $Script:exportedInstance $user = Get-MgUser -UserId $Principal } @@ -142,7 +142,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -471,7 +471,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADExternalIdentityPolicy/MSFT_AADExternalIdentityPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADExternalIdentityPolicy/MSFT_AADExternalIdentityPolicy.psm1 index e5772fd783..1497b484ad 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADExternalIdentityPolicy/MSFT_AADExternalIdentityPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADExternalIdentityPolicy/MSFT_AADExternalIdentityPolicy.psm1 @@ -105,7 +105,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroup/MSFT_AADGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroup/MSFT_AADGroup.psm1 index 91ada76f68..be3866e89b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroup/MSFT_AADGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroup/MSFT_AADGroup.psm1 @@ -280,7 +280,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $result += $policySettings @@ -1223,7 +1223,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Script:exportedInstance = $group diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupEligibilityScheduleSettings/MSFT_AADGroupEligibilityScheduleSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupEligibilityScheduleSettings/MSFT_AADGroupEligibilityScheduleSettings.psm1 index 476798f676..7994b57ce5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupEligibilityScheduleSettings/MSFT_AADGroupEligibilityScheduleSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupEligibilityScheduleSettings/MSFT_AADGroupEligibilityScheduleSettings.psm1 @@ -564,7 +564,7 @@ function Export-TargetResource CertificateThumbprint = $CertificateThumbprint ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupLifecyclePolicy/MSFT_AADGroupLifecyclePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupLifecyclePolicy/MSFT_AADGroupLifecyclePolicy.psm1 index 194a3a1487..02d12101b7 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupLifecyclePolicy/MSFT_AADGroupLifecyclePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupLifecyclePolicy/MSFT_AADGroupLifecyclePolicy.psm1 @@ -108,7 +108,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -460,7 +460,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsNamingPolicy/MSFT_AADGroupsNamingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsNamingPolicy/MSFT_AADGroupsNamingPolicy.psm1 index 952424bf80..6a26121c98 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsNamingPolicy/MSFT_AADGroupsNamingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsNamingPolicy/MSFT_AADGroupsNamingPolicy.psm1 @@ -93,7 +93,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -376,7 +376,7 @@ function Export-TargetResource IsSingleInstance = 'Yes' ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsSettings/MSFT_AADGroupsSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsSettings/MSFT_AADGroupsSettings.psm1 index 8c99fe9be4..3b82cf11f5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsSettings/MSFT_AADGroupsSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADGroupsSettings/MSFT_AADGroupsSettings.psm1 @@ -144,7 +144,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } if (-not [System.String]::IsNullOrEmpty($valueNewUnifiedGroupWritebackDefault.Value)) @@ -534,7 +534,7 @@ function Export-TargetResource IsSingleInstance = 'Yes' ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $dscContent = '' diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 index cc3013bd93..2baa138fac 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 @@ -155,7 +155,7 @@ function Get-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -541,7 +541,7 @@ function Export-TargetResource DisplayName = $AADNamedLocation.DisplayName ID = $AADNamedLocation.ID Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Script:exportedInstance = $AADNamedLocation diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/MSFT_AADPIMGroupSetting.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/MSFT_AADPIMGroupSetting.psm1 index bd8ac82e55..12e938278f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/MSFT_AADPIMGroupSetting.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/MSFT_AADPIMGroupSetting.psm1 @@ -1527,7 +1527,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret Credential = $Credential AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADPasswordRuleSettings/MSFT_AADPasswordRuleSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADPasswordRuleSettings/MSFT_AADPasswordRuleSettings.psm1 index 1b8e7b0017..abf3c5ba5f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADPasswordRuleSettings/MSFT_AADPasswordRuleSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADPasswordRuleSettings/MSFT_AADPasswordRuleSettings.psm1 @@ -118,7 +118,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -446,7 +446,7 @@ function Export-TargetResource IsSingleInstance = 'Yes' ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $dscContent = '' diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleAssignmentScheduleRequest/MSFT_AADRoleAssignmentScheduleRequest.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleAssignmentScheduleRequest/MSFT_AADRoleAssignmentScheduleRequest.psm1 index 40c261ac71..15aee07308 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleAssignmentScheduleRequest/MSFT_AADRoleAssignmentScheduleRequest.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleAssignmentScheduleRequest/MSFT_AADRoleAssignmentScheduleRequest.psm1 @@ -271,7 +271,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } return $results diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleDefinition/MSFT_AADRoleDefinition.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleDefinition/MSFT_AADRoleDefinition.psm1 index e476de0c94..b0e431c260 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleDefinition/MSFT_AADRoleDefinition.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleDefinition/MSFT_AADRoleDefinition.psm1 @@ -131,7 +131,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" @@ -463,7 +463,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent DisplayName = $AADRoleDefinition.DisplayName Id = $AADRoleDefinition.Id IsEnabled = $true diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 index d3c70c5b5a..a5ee0b3274 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleEligibilityScheduleRequest/MSFT_AADRoleEligibilityScheduleRequest.psm1 @@ -261,7 +261,7 @@ TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } return $results diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleManagementPolicyRule/MSFT_AADRoleManagementPolicyRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleManagementPolicyRule/MSFT_AADRoleManagementPolicyRule.psm1 index 9d1f880d0a..ebc34dc6bd 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleManagementPolicyRule/MSFT_AADRoleManagementPolicyRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleManagementPolicyRule/MSFT_AADRoleManagementPolicyRule.psm1 @@ -513,7 +513,7 @@ function Export-TargetResource CertificateThumbprint = $CertificateThumbprint ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 index ece475bd7a..68430899b2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 @@ -1486,7 +1486,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret Credential = $Credential AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADSecurityDefaults/MSFT_AADSecurityDefaults.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADSecurityDefaults/MSFT_AADSecurityDefaults.psm1 index 63c49e127f..a6008f179a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADSecurityDefaults/MSFT_AADSecurityDefaults.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADSecurityDefaults/MSFT_AADSecurityDefaults.psm1 @@ -85,7 +85,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } @@ -342,7 +342,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent IsSingleInstance = 'Yes' ApplicationSecret = $ApplicationSecret Credential = $Credential diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 index d9b0e9772d..b1c4960aa4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 @@ -339,7 +339,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" @@ -1084,7 +1084,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AppID = $AADServicePrincipal.AppId AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADSocialIdentityProvider/MSFT_AADSocialIdentityProvider.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADSocialIdentityProvider/MSFT_AADSocialIdentityProvider.psm1 index 18ae0015c3..378e3f9d7c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADSocialIdentityProvider/MSFT_AADSocialIdentityProvider.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADSocialIdentityProvider/MSFT_AADSocialIdentityProvider.psm1 @@ -109,7 +109,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -402,7 +402,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADTokenLifetimePolicy/MSFT_AADTokenLifetimePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADTokenLifetimePolicy/MSFT_AADTokenLifetimePolicy.psm1 index d01ae4c954..0d1d756d88 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADTokenLifetimePolicy/MSFT_AADTokenLifetimePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADTokenLifetimePolicy/MSFT_AADTokenLifetimePolicy.psm1 @@ -128,7 +128,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -414,7 +414,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent DisplayName = $AADPolicy.DisplayName ID = $AADPolicy.ID AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADUser/MSFT_AADUser.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADUser/MSFT_AADUser.psm1 index 238422603d..122b879441 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADUser/MSFT_AADUser.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADUser/MSFT_AADUser.psm1 @@ -173,7 +173,7 @@ function Get-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret Ensure = 'Absent' AccessTokens = $AccessTokens @@ -1101,7 +1101,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADUserFlowAttribute/MSFT_AADUserFlowAttribute.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADUserFlowAttribute/MSFT_AADUserFlowAttribute.psm1 index c3c8722a3b..9bdc0cc8b9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADUserFlowAttribute/MSFT_AADUserFlowAttribute.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADUserFlowAttribute/MSFT_AADUserFlowAttribute.psm1 @@ -393,7 +393,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret Credential = $Credential AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthority/MSFT_AADVerifiedIdAuthority.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthority/MSFT_AADVerifiedIdAuthority.psm1 index 1c696fdf37..c69a2019ac 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthority/MSFT_AADVerifiedIdAuthority.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthority/MSFT_AADVerifiedIdAuthority.psm1 @@ -444,7 +444,7 @@ function Export-TargetResource CertificateThumbprint = $CertificateThumbprint ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthorityContract/MSFT_AADVerifiedIdAuthorityContract.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthorityContract/MSFT_AADVerifiedIdAuthorityContract.psm1 index 601f9e78cb..af0312f5da 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthorityContract/MSFT_AADVerifiedIdAuthorityContract.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADVerifiedIdAuthorityContract/MSFT_AADVerifiedIdAuthorityContract.psm1 @@ -490,7 +490,7 @@ function Export-TargetResource CertificateThumbprint = $CertificateThumbprint ApplicationSecret = $ApplicationSecret Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 index 65116ea3c0..02f5a654d5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 @@ -111,7 +111,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -407,7 +407,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 index 2433e468dd..4894d79743 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOActiveSyncDeviceAccessRule/MSFT_EXOActiveSyncDeviceAccessRule.psm1 @@ -116,7 +116,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -427,7 +427,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 index 15b297fcd4..b7afbf00de 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 @@ -115,7 +115,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -437,7 +437,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 index 58f0ab7b00..bfe9849f17 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 @@ -211,7 +211,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -750,7 +750,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 index e1e2d96f06..1da7a8d906 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 @@ -295,7 +295,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -875,7 +875,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 index 1971082881..2139f8e9f1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 @@ -158,7 +158,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -562,7 +562,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 index 9bb20c027c..fa461fe59f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 @@ -153,7 +153,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -495,7 +495,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 index a4c49a9044..72e1f067be 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 @@ -115,7 +115,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -423,7 +423,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicy/MSFT_EXOAuthenticationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicy/MSFT_EXOAuthenticationPolicy.psm1 index 876a07b951..0d835a57d1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicy/MSFT_EXOAuthenticationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicy/MSFT_EXOAuthenticationPolicy.psm1 @@ -166,7 +166,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -560,7 +560,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicyAssignment/MSFT_EXOAuthenticationPolicyAssignment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicyAssignment/MSFT_EXOAuthenticationPolicyAssignment.psm1 index fa17763776..6d38a3f48f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicyAssignment/MSFT_EXOAuthenticationPolicyAssignment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAuthenticationPolicyAssignment/MSFT_EXOAuthenticationPolicyAssignment.psm1 @@ -90,7 +90,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -372,7 +372,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 index 8c76b11ecc..0097f28b4a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 @@ -144,7 +144,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -530,7 +530,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 index 5ca0f13be8..3970e2dd32 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 @@ -96,7 +96,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -368,7 +368,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 index 919d0f6df1..94ff8de51b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 @@ -132,7 +132,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -436,7 +436,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxSettings/MSFT_EXOCASMailboxSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxSettings/MSFT_EXOCASMailboxSettings.psm1 index 62f90c6d00..33af1120b2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxSettings/MSFT_EXOCASMailboxSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxSettings/MSFT_EXOCASMailboxSettings.psm1 @@ -275,7 +275,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -803,7 +803,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 index c9b48a86fa..c22f546b59 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 @@ -315,7 +315,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -914,7 +914,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 index 71b5b36e2b..f74005c942 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 @@ -163,7 +163,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -582,7 +582,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODataEncryptionPolicy/MSFT_EXODataEncryptionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODataEncryptionPolicy/MSFT_EXODataEncryptionPolicy.psm1 index c4b40c600b..1801a317ad 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODataEncryptionPolicy/MSFT_EXODataEncryptionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODataEncryptionPolicy/MSFT_EXODataEncryptionPolicy.psm1 @@ -124,7 +124,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -453,7 +453,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 index 1a49b59fc3..a5d7e629f4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1 @@ -379,7 +379,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -1097,7 +1097,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 index 3fae6daf39..d15c591df0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 @@ -132,7 +132,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -440,7 +440,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 index 553450a74b..be928d6f24 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 @@ -116,7 +116,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -462,7 +462,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailTenantSettings/MSFT_EXOEmailTenantSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailTenantSettings/MSFT_EXOEmailTenantSettings.psm1 index 857576e731..a3633dd3d1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailTenantSettings/MSFT_EXOEmailTenantSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailTenantSettings/MSFT_EXOEmailTenantSettings.psm1 @@ -106,7 +106,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -389,7 +389,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 index 3d20409a48..dc09d2c9fd 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 @@ -206,7 +206,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -730,7 +730,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGroupSettings/MSFT_EXOGroupSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGroupSettings/MSFT_EXOGroupSettings.psm1 index 1a6a5760ea..246ae3bd53 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGroupSettings/MSFT_EXOGroupSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGroupSettings/MSFT_EXOGroupSettings.psm1 @@ -1082,7 +1082,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 index ecb8a56fda..edc5246e83 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 @@ -128,7 +128,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -479,7 +479,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 index 3277edbc1f..d284b6cfe2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 @@ -405,7 +405,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -1183,7 +1183,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 index 4b5eb97650..e09dc966a1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 @@ -161,7 +161,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -563,7 +563,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterRule/MSFT_EXOHostedOutboundSpamFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterRule/MSFT_EXOHostedOutboundSpamFilterRule.psm1 index becd061a8e..b714d8b7a5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterRule/MSFT_EXOHostedOutboundSpamFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterRule/MSFT_EXOHostedOutboundSpamFilterRule.psm1 @@ -154,7 +154,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -546,7 +546,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIRMConfiguration/MSFT_EXOIRMConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIRMConfiguration/MSFT_EXOIRMConfiguration.psm1 index 43b7943f15..0260977a02 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIRMConfiguration/MSFT_EXOIRMConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIRMConfiguration/MSFT_EXOIRMConfiguration.psm1 @@ -168,7 +168,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -548,7 +548,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 index 6f6b235501..4930c103ad 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 @@ -181,7 +181,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -609,7 +609,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 index 679d244f20..a85891896a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 @@ -125,7 +125,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -436,7 +436,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOJournalRule/MSFT_EXOJournalRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOJournalRule/MSFT_EXOJournalRule.psm1 index 79bed3c720..cf450bbe26 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOJournalRule/MSFT_EXOJournalRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOJournalRule/MSFT_EXOJournalRule.psm1 @@ -113,7 +113,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -446,7 +446,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 index 8a6fd10616..b5bf18a16e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailContact/MSFT_EXOMailContact.psm1 @@ -250,7 +250,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -846,7 +846,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxAutoReplyConfiguration/MSFT_EXOMailboxAutoReplyConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxAutoReplyConfiguration/MSFT_EXOMailboxAutoReplyConfiguration.psm1 index bd6fc0a10b..074979d8da 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxAutoReplyConfiguration/MSFT_EXOMailboxAutoReplyConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxAutoReplyConfiguration/MSFT_EXOMailboxAutoReplyConfiguration.psm1 @@ -166,7 +166,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -545,7 +545,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxCalendarFolder/MSFT_EXOMailboxCalendarFolder.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxCalendarFolder/MSFT_EXOMailboxCalendarFolder.psm1 index c4d19c94ba..a1c74984bd 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxCalendarFolder/MSFT_EXOMailboxCalendarFolder.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxCalendarFolder/MSFT_EXOMailboxCalendarFolder.psm1 @@ -127,7 +127,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -456,7 +456,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxIRMAccess/MSFT_EXOMailboxIRMAccess.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxIRMAccess/MSFT_EXOMailboxIRMAccess.psm1 index 9168ca7435..97ea3ccc18 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxIRMAccess/MSFT_EXOMailboxIRMAccess.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxIRMAccess/MSFT_EXOMailboxIRMAccess.psm1 @@ -351,7 +351,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPermission/MSFT_EXOMailboxPermission.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPermission/MSFT_EXOMailboxPermission.psm1 index 687c654060..6c3f95dae4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPermission/MSFT_EXOMailboxPermission.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPermission/MSFT_EXOMailboxPermission.psm1 @@ -124,7 +124,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -448,7 +448,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPlan/MSFT_EXOMailboxPlan.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPlan/MSFT_EXOMailboxPlan.psm1 index ffb137e887..f550130b4d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPlan/MSFT_EXOMailboxPlan.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxPlan/MSFT_EXOMailboxPlan.psm1 @@ -150,7 +150,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -485,7 +485,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 index 131bae7d75..5dab0849d1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 @@ -135,7 +135,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -476,7 +476,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 index b50b9285b7..1d50b4afe9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 @@ -185,7 +185,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -614,7 +614,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 index 9edd20a168..551eb2b863 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 @@ -147,7 +147,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -516,7 +516,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 index f08c493313..544786915a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 @@ -103,7 +103,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -403,7 +403,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath Parent = $ManagementRole.Parent AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleAssignment/MSFT_EXOManagementRoleAssignment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleAssignment/MSFT_EXOManagementRoleAssignment.psm1 index 3702a120e1..fce4d0261f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleAssignment/MSFT_EXOManagementRoleAssignment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleAssignment/MSFT_EXOManagementRoleAssignment.psm1 @@ -157,7 +157,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -592,7 +592,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleEntry/MSFT_EXOManagementRoleEntry.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleEntry/MSFT_EXOManagementRoleEntry.psm1 index 522fadafa3..c954d004a8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleEntry/MSFT_EXOManagementRoleEntry.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRoleEntry/MSFT_EXOManagementRoleEntry.psm1 @@ -423,7 +423,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 index cc2ea0bf26..a7654c565e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMessageClassification/MSFT_EXOMessageClassification.psm1 @@ -138,7 +138,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -519,7 +519,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 index 91b267d2e0..ef8cf8ed11 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 @@ -374,7 +374,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -1162,7 +1162,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 index f73a264285..f92014e532 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOMEConfiguration/MSFT_EXOOMEConfiguration.psm1 @@ -150,7 +150,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -517,7 +517,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 index aafa5e63df..f40d493a3c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 @@ -120,7 +120,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -450,7 +450,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 index c52a386e78..36347841e4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 @@ -130,7 +130,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -486,7 +486,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 index 1902b05dab..0013ad8818 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 @@ -625,7 +625,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -1760,7 +1760,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 index 40403adf7f..686093e318 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 @@ -195,7 +195,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -725,7 +725,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 index 2c4eda00bd..13c4cd1a6f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 @@ -183,7 +183,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -605,7 +605,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 index 09c5a8fc1c..bfc0b3d441 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 @@ -530,7 +530,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -1526,7 +1526,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 index 066235e6c3..6d2fb99dfe 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 @@ -121,7 +121,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -464,7 +464,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPerimeterConfiguration/MSFT_EXOPerimeterConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPerimeterConfiguration/MSFT_EXOPerimeterConfiguration.psm1 index cdc0f4fa88..6918da4695 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPerimeterConfiguration/MSFT_EXOPerimeterConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPerimeterConfiguration/MSFT_EXOPerimeterConfiguration.psm1 @@ -97,7 +97,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -364,7 +364,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 index a7f016af46..9b30c53f73 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPlace/MSFT_EXOPlace.psm1 @@ -217,7 +217,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -656,7 +656,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 index 8a16ce517f..1dc5f97a03 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 @@ -108,7 +108,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -402,7 +402,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOQuarantinePolicy/MSFT_EXOQuarantinePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOQuarantinePolicy/MSFT_EXOQuarantinePolicy.psm1 index 98686f54c9..1be4c99229 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOQuarantinePolicy/MSFT_EXOQuarantinePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOQuarantinePolicy/MSFT_EXOQuarantinePolicy.psm1 @@ -160,7 +160,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -261,7 +261,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -656,7 +656,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath QuarantinePolicyType = $QuarantinePolicy.QuarantinePolicyType AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORecipientPermission/MSFT_EXORecipientPermission.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORecipientPermission/MSFT_EXORecipientPermission.psm1 index f02fd59871..0efafffd58 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORecipientPermission/MSFT_EXORecipientPermission.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORecipientPermission/MSFT_EXORecipientPermission.psm1 @@ -134,7 +134,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -474,7 +474,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 index 51ea926c84..ed28900ecf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 @@ -208,7 +208,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -697,7 +697,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionPolicy/MSFT_EXOReportSubmissionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionPolicy/MSFT_EXOReportSubmissionPolicy.psm1 index 53fead911b..ec3727f7ea 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionPolicy/MSFT_EXOReportSubmissionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionPolicy/MSFT_EXOReportSubmissionPolicy.psm1 @@ -225,7 +225,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -712,7 +712,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath IsSingleInstance = 'Yes' AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionRule/MSFT_EXOReportSubmissionRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionRule/MSFT_EXOReportSubmissionRule.psm1 index b91d122040..5d423b0d5c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionRule/MSFT_EXOReportSubmissionRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOReportSubmissionRule/MSFT_EXOReportSubmissionRule.psm1 @@ -110,7 +110,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -418,7 +418,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath IsSingleInstance = 'Yes' AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 index 2604a71ca7..a0a7928c50 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 @@ -97,7 +97,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -366,7 +366,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 index 5d2206c89c..3a28e198f3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 @@ -109,7 +109,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -446,7 +446,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleGroup/MSFT_EXORoleGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleGroup/MSFT_EXORoleGroup.psm1 index 7ca0ebe30f..898785ca02 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleGroup/MSFT_EXORoleGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleGroup/MSFT_EXORoleGroup.psm1 @@ -130,7 +130,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -517,7 +517,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 index ca8d714ee2..059a214172 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 @@ -130,7 +130,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -549,7 +549,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 index 4490451a52..477c987727 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 @@ -153,7 +153,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -534,7 +534,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 index 5210930c71..bad437a499 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 @@ -172,7 +172,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -572,7 +572,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 index e39e1e6403..d61d34df55 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 @@ -143,7 +143,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -528,7 +528,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 index 7776660755..621cb9cd42 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 @@ -149,7 +149,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -547,7 +547,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 index ad678c7364..1686696310 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 @@ -110,7 +110,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -426,7 +426,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSmtpDaneInbound/MSFT_EXOSmtpDaneInbound.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSmtpDaneInbound/MSFT_EXOSmtpDaneInbound.psm1 index 979e041df7..1b01264e13 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSmtpDaneInbound/MSFT_EXOSmtpDaneInbound.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSmtpDaneInbound/MSFT_EXOSmtpDaneInbound.psm1 @@ -80,7 +80,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -352,7 +352,7 @@ function Export-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTeamsProtectionPolicy/MSFT_EXOTeamsProtectionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTeamsProtectionPolicy/MSFT_EXOTeamsProtectionPolicy.psm1 index d1c5bcf593..86fe71b5d6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTeamsProtectionPolicy/MSFT_EXOTeamsProtectionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTeamsProtectionPolicy/MSFT_EXOTeamsProtectionPolicy.psm1 @@ -106,7 +106,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -387,7 +387,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportConfig/MSFT_EXOTransportConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportConfig/MSFT_EXOTransportConfig.psm1 index ada8cb280e..f11583adea 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportConfig/MSFT_EXOTransportConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportConfig/MSFT_EXOTransportConfig.psm1 @@ -216,7 +216,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -673,7 +673,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 index 0d0059ad5c..16ea9dc39d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 @@ -961,7 +961,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -2711,7 +2711,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 index c0dea28725..c5d66fcb31 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 @@ -883,7 +883,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionPolicy/MSFT_IntuneAccountProtectionPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionPolicy/MSFT_IntuneAccountProtectionPolicy.psm1 index 517e7e279f..61ccf65faa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionPolicy/MSFT_IntuneAccountProtectionPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAccountProtectionPolicy/MSFT_IntuneAccountProtectionPolicy.psm1 @@ -750,7 +750,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAndroidManagedStoreAppConfiguration/MSFT_IntuneAndroidManagedStoreAppConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAndroidManagedStoreAppConfiguration/MSFT_IntuneAndroidManagedStoreAppConfiguration.psm1 index 306674d950..4e9aaa2ee7 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAndroidManagedStoreAppConfiguration/MSFT_IntuneAndroidManagedStoreAppConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAndroidManagedStoreAppConfiguration/MSFT_IntuneAndroidManagedStoreAppConfiguration.psm1 @@ -170,7 +170,7 @@ TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens version = $getValue.AdditionalProperties.version } @@ -669,7 +669,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppConfigurationPolicy/MSFT_IntuneAppConfigurationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppConfigurationPolicy/MSFT_IntuneAppConfigurationPolicy.psm1 index 3e22a5da68..c3eecab6c2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppConfigurationPolicy/MSFT_IntuneAppConfigurationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppConfigurationPolicy/MSFT_IntuneAppConfigurationPolicy.psm1 @@ -186,7 +186,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens RoleScopeTagIds = $configPolicy.RoleScopeTagIds TargetedAppManagementLevels = [String]$configPolicy.TargetedAppManagementLevels @@ -679,7 +679,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyAndroid/MSFT_IntuneAppProtectionPolicyAndroid.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyAndroid/MSFT_IntuneAppProtectionPolicyAndroid.psm1 index efb201223b..35dbb7c043 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyAndroid/MSFT_IntuneAppProtectionPolicyAndroid.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyAndroid/MSFT_IntuneAppProtectionPolicyAndroid.psm1 @@ -1974,7 +1974,7 @@ function Get-InputParameters Apps = @{Type = 'ComplexParameter' ; ExportFileType = 'NA'; } Assignments = @{Type = 'ComplexParameter' ; ExportFileType = 'NA'; } CertificateThumbprint = @{Type = 'Credential' ; ExportFileType = 'NA'; } - Managedidentity = @{Type = 'ComplexParameter' ; ExportFileType = 'NA'; } + ManagedIdentity = @{Type = 'ComplexParameter' ; ExportFileType = 'NA'; } ContactSyncBlocked = @{Type = 'Parameter' ; ExportFileType = 'NA'; } Credential = @{Type = 'Credential' ; ExportFileType = 'NA'; } CustomBrowserDisplayName = @{Type = 'ComplexParameter' ; ExportFileType = 'NA'; } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyiOS/MSFT_IntuneAppProtectionPolicyiOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyiOS/MSFT_IntuneAppProtectionPolicyiOS.psm1 index 7892a26da5..9dfb1e6dde 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyiOS/MSFT_IntuneAppProtectionPolicyiOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyiOS/MSFT_IntuneAppProtectionPolicyiOS.psm1 @@ -592,7 +592,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -1604,7 +1604,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 index 3890d4c3da..7b37291d18 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 @@ -526,7 +526,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 index 4960209b4c..8ccb0d59a5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 @@ -835,7 +835,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceAndAppManagementAssignmentFilter/MSFT_IntuneDeviceAndAppManagementAssignmentFilter.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceAndAppManagementAssignmentFilter/MSFT_IntuneDeviceAndAppManagementAssignmentFilter.psm1 index 8c7aafa7cc..b3b12ed403 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceAndAppManagementAssignmentFilter/MSFT_IntuneDeviceAndAppManagementAssignmentFilter.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceAndAppManagementAssignmentFilter/MSFT_IntuneDeviceAndAppManagementAssignmentFilter.psm1 @@ -445,7 +445,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCategory/MSFT_IntuneDeviceCategory.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCategory/MSFT_IntuneDeviceCategory.psm1 index 0ceca3335d..14dd6082ba 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCategory/MSFT_IntuneDeviceCategory.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCategory/MSFT_IntuneDeviceCategory.psm1 @@ -92,7 +92,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -355,7 +355,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCleanupRule/MSFT_IntuneDeviceCleanupRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCleanupRule/MSFT_IntuneDeviceCleanupRule.psm1 index c8386fb6ec..84df1427f7 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCleanupRule/MSFT_IntuneDeviceCleanupRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCleanupRule/MSFT_IntuneDeviceCleanupRule.psm1 @@ -91,7 +91,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -371,7 +371,7 @@ function Export-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroid/MSFT_IntuneDeviceCompliancePolicyAndroid.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroid/MSFT_IntuneDeviceCompliancePolicyAndroid.psm1 index 32601ffb22..3d3f0d9ff8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroid/MSFT_IntuneDeviceCompliancePolicyAndroid.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroid/MSFT_IntuneDeviceCompliancePolicyAndroid.psm1 @@ -247,7 +247,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -841,7 +841,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner.psm1 index ee77290b1a..75aa6023c0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner/MSFT_IntuneDeviceCompliancePolicyAndroidDeviceOwner.psm1 @@ -266,7 +266,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -880,7 +880,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile.psm1 index 56a7838e36..f7973b95ff 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile/MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile.psm1 @@ -315,7 +315,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -1004,7 +1004,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyMacOS/MSFT_IntuneDeviceCompliancePolicyMacOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyMacOS/MSFT_IntuneDeviceCompliancePolicyMacOS.psm1 index 4a8e3544b2..45c68fcb22 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyMacOS/MSFT_IntuneDeviceCompliancePolicyMacOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyMacOS/MSFT_IntuneDeviceCompliancePolicyMacOS.psm1 @@ -218,7 +218,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -766,7 +766,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 index 33adfc156d..97ea6a2b02 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 @@ -347,7 +347,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 index e4a510388b..e54fda0475 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 @@ -207,7 +207,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -747,7 +747,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.psm1 index 3f7818e079..71d2dab0fc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10/MSFT_IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.psm1 @@ -246,7 +246,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -852,7 +852,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.psm1 index 61eaed4925..9e7ae42e18 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.psm1 @@ -21,10 +21,6 @@ function Get-TargetResource [System.String[]] $RoleScopeTagIds, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -182,7 +178,6 @@ function Get-TargetResource Description = $getValue.Description DisplayName = $getValue.DisplayName RoleScopeTagIds = $getValue.RoleScopeTagIds - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id Ensure = 'Present' Credential = $Credential @@ -241,10 +236,6 @@ function Set-TargetResource [System.String[]] $RoleScopeTagIds, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -429,10 +420,6 @@ function Test-TargetResource [System.String[]] $RoleScopeTagIds, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.schema.mof index 539daaebc6..f3579f8462 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10/MSFT_IntuneDeviceConfigurationCustomPolicyWindows10.schema.mof @@ -30,7 +30,6 @@ class MSFT_IntuneDeviceConfigurationCustomPolicyWindows10 : OMI_BaseResource [Write, Description("OMA settings. This collection can contain a maximum of 1000 elements."), EmbeddedInstance("MSFT_MicrosoftGraphomaSetting")] String OmaSettings[]; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; [Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyiOS/MSFT_IntuneDeviceConfigurationCustomPolicyiOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyiOS/MSFT_IntuneDeviceConfigurationCustomPolicyiOS.psm1 index 4cd04099e4..93c8e26a50 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyiOS/MSFT_IntuneDeviceConfigurationCustomPolicyiOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationCustomPolicyiOS/MSFT_IntuneDeviceConfigurationCustomPolicyiOS.psm1 @@ -142,7 +142,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -565,7 +565,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.psm1 index eda7e15b5d..937bd90997 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10/MSFT_IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.psm1 @@ -172,7 +172,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -636,7 +636,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.psm1 index fd1e0093d9..1785e72531 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.psm1 @@ -84,10 +84,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -304,7 +300,6 @@ function Get-TargetResource VpnPeerCaching = $enumVpnPeerCaching Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -313,7 +308,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -425,10 +420,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -644,10 +635,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -850,7 +837,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.schema.mof index 1fa8b64f7c..0586a39a7a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.schema.mof @@ -65,7 +65,6 @@ class MSFT_IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10 : OMI_Ba [Write, Description("Specifies whether the device is allowed to participate in Peer Caching while connected via VPN to the domain network."), ValueMap{"notConfigured","enabled","disabled"}, Values{"notConfigured","enabled","disabled"}] String VpnPeerCaching; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.psm1 index ba54f31fd8..0316693ce4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.psm1 @@ -29,10 +29,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -153,7 +149,6 @@ function Get-TargetResource OrganizationalUnit = $getValue.AdditionalProperties.organizationalUnit Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -162,7 +157,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -220,10 +215,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -386,10 +377,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -591,7 +578,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.schema.mof index a051dec824..56aae0cc52 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10/MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10.schema.mof @@ -19,7 +19,6 @@ class MSFT_IntuneDeviceConfigurationDomainJoinPolicyWindows10 : OMI_BaseResource [Write, Description("Organizational unit (OU) where the computer account will be created. If this parameter is NULL, the well known computer object container will be used as published in the domain.")] String OrganizationalUnit; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10.psm1 index 8aa84ebe99..689acf1053 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10/MSFT_IntuneDeviceConfigurationEmailProfilePolicyWindows10.psm1 @@ -247,7 +247,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -753,7 +753,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.psm1 index b03aff1703..c58141810d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.psm1 @@ -978,10 +978,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -2637,7 +2633,6 @@ function Get-TargetResource XboxServicesLiveNetworkingServiceStartupMode = $enumXboxServicesLiveNetworkingServiceStartupMode Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -2646,7 +2641,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -3654,10 +3649,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -4794,10 +4785,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -5000,7 +4987,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.schema.mof index 78a794f7a9..d7d97c68bb 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.schema.mof @@ -350,7 +350,6 @@ class MSFT_IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 : OMI_Base [Write, Description("This setting determines whether Networking service's start type is Automatic(2), Manual(3), Disabled(4). Default: Manual. Possible values are: manual, automatic, disabled."), ValueMap{"manual","automatic","disabled"}, Values{"manual","automatic","disabled"}] String XboxServicesLiveNetworkingServiceStartupMode; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.psm1 index 315608e752..0d7203edb1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.psm1 @@ -118,10 +118,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -382,7 +378,6 @@ function Get-TargetResource WirelessWideAreaNetwork = $enumWirelessWideAreaNetwork Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags RoleScopeTagIds = $getValue.RoleScopeTagIds Id = $getValue.Id Ensure = 'Present' @@ -391,7 +386,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -539,10 +534,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -794,10 +785,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -998,7 +985,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.schema.mof index 64ddf0bfaf..44e04e1763 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.schema.mof @@ -36,7 +36,6 @@ class MSFT_IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10 : OMI_BaseR [Write, Description("Defines whether a user is allowed to enable Wireless Wide Area Network. Possible values are: notConfigured, enabled, disabled."), ValueMap{"notConfigured","enabled","disabled"}, Values{"notConfigured","enabled","disabled"}] String WirelessWideAreaNetwork; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.psm1 index c87a2924df..5b7ee9d6e2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.psm1 @@ -27,10 +27,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -157,7 +153,6 @@ function Get-TargetResource ConfigDeviceHealthMonitoringScope = $enumConfigDeviceHealthMonitoringScope Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -166,7 +161,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -223,10 +218,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -389,10 +380,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -593,7 +580,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.schema.mof index 829c610e3f..924966b854 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.schema.mof @@ -18,7 +18,6 @@ class MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10 [Write, Description("Specifies set of events collected from the device where health monitoring is enabled. Possible values are: undefined, healthMonitoring, bootPerformance, windowsUpdates, privilegeManagement."), ValueMap{"undefined","healthMonitoring","bootPerformance","windowsUpdates","privilegeManagement"}, Values{"undefined","healthMonitoring","bootPerformance","windowsUpdates","privilegeManagement"}] String ConfigDeviceHealthMonitoringScope[]; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.psm1 index 255e2dddae..6283491693 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.psm1 @@ -72,10 +72,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -219,7 +215,6 @@ function Get-TargetResource WindowsHelloForBusinessBlocked = $getValue.AdditionalProperties.windowsHelloForBusinessBlocked Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -228,7 +223,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -330,10 +325,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -541,10 +532,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -746,7 +733,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.schema.mof index 4af3b331cd..901ba25398 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.schema.mof @@ -29,7 +29,6 @@ class MSFT_IntuneDeviceConfigurationIdentityProtectionPolicyWindows10 : OMI_Base [Write, Description("Boolean value that blocks Windows Hello for Business as a method for signing into Windows.")] Boolean WindowsHelloForBusinessBlocked; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.psm1 index 107fd2c619..579d9822d7 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.psm1 @@ -204,7 +204,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -659,7 +659,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10.psm1 index 3a94c1b59f..854ef2f275 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10/MSFT_IntuneDeviceConfigurationKioskPolicyWindows10.psm1 @@ -356,7 +356,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -825,7 +825,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.psm1 index 01e03a867f..2681213b48 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.psm1 @@ -17,10 +17,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -175,7 +171,6 @@ function Get-TargetResource WindowsNetworkIsolationPolicy = $complexWindowsNetworkIsolationPolicy Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -184,7 +179,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -231,10 +226,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -384,10 +375,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -588,7 +575,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.schema.mof index fe61fe4e54..a97411a66f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.schema.mof @@ -42,7 +42,6 @@ class MSFT_IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10 : OMI_BaseRes [Write, Description("Windows Network Isolation Policy"), EmbeddedInstance("MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy")] String WindowsNetworkIsolationPolicy; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.psm1 index 6fc8b4962c..dcbdf838cf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.psm1 @@ -268,7 +268,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -779,7 +779,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 index 74df0d9121..def12285e9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 @@ -459,7 +459,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -1297,7 +1297,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner.psm1 index b5992f159a..42823dacb3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceOwner.psm1 @@ -976,7 +976,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -2542,7 +2542,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 index 7d48c85e2e..867739716b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 @@ -204,7 +204,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -759,7 +759,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile.psm1 index d1907e0a4c..58aff91e2b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile/MSFT_IntuneDeviceConfigurationPolicyAndroidWorkProfile.psm1 @@ -339,7 +339,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -1080,7 +1080,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 index 24f188b775..3c83425d7f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 @@ -428,7 +428,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } if ($getValue.additionalProperties.compliantAppsList) @@ -1351,7 +1351,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.psm1 index a09f017925..0b6d14b047 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.psm1 @@ -1192,10 +1192,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -1985,7 +1981,6 @@ function Get-TargetResource WirelessDisplayRequirePinForPairing = $getValue.AdditionalProperties.wirelessDisplayRequirePinForPairing Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags Id = $getValue.Id RoleScopeTagIds = $getValue.RoleScopeTagIds Ensure = 'Present' @@ -1994,7 +1989,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -3215,10 +3210,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -4587,10 +4578,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -4790,7 +4777,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.schema.mof index 28aba4c3c2..87b61c49aa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.schema.mof @@ -332,7 +332,6 @@ class MSFT_IntuneDeviceConfigurationPolicyWindows10 : OMI_BaseResource [Write, Description("Indicates whether or not to require a PIN for new devices to initiate pairing.")] Boolean WirelessDisplayRequirePinForPairing; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyiOS/MSFT_IntuneDeviceConfigurationPolicyiOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyiOS/MSFT_IntuneDeviceConfigurationPolicyiOS.psm1 index 9acf9589ea..499ea5a983 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyiOS/MSFT_IntuneDeviceConfigurationPolicyiOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyiOS/MSFT_IntuneDeviceConfigurationPolicyiOS.psm1 @@ -1046,7 +1046,7 @@ function Get-TargetResource WiFiConnectOnlyToConfiguredNetworks = $getValue.AdditionalProperties.wiFiConnectOnlyToConfiguredNetworks WiFiConnectToAllowedNetworksOnlyForced = $getValue.AdditionalProperties.wiFiConnectToAllowedNetworksOnlyForced WifiPowerOnForced = $getValue.AdditionalProperties.wifiPowerOnForced - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' Credential = $Credential ApplicationId = $ApplicationId @@ -3094,7 +3094,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.psm1 index ea60d54c84..5182cc1b93 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.psm1 @@ -308,7 +308,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -928,7 +928,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.psm1 index 31afe7d925..d9b4c084b9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10/MSFT_IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.psm1 @@ -181,7 +181,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -636,7 +636,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.psm1 index f6ba64f118..125911fbae 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10/MSFT_IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.psm1 @@ -300,7 +300,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -859,7 +859,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.psm1 index 0a0ef4e616..cfeb687f12 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10/MSFT_IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.psm1 @@ -156,7 +156,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -571,7 +571,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10.psm1 index 28d48a12b2..3e03694fe5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10/MSFT_IntuneDeviceConfigurationVpnPolicyWindows10.psm1 @@ -484,7 +484,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -1099,7 +1099,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.psm1 index 28964a378e..077073006c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.psm1 @@ -95,10 +95,6 @@ function Get-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -252,7 +248,6 @@ function Get-TargetResource WelcomeScreenMeetingInformation = $enumWelcomeScreenMeetingInformation Description = $getValue.Description DisplayName = $getValue.DisplayName - SupportsScopeTags = $getValue.SupportsScopeTags RoleScopeTagIds = $getValue.RoleScopeTagIds Id = $getValue.Id Ensure = 'Present' @@ -261,7 +256,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -386,10 +381,6 @@ function Set-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -618,10 +609,6 @@ function Test-TargetResource [System.String] $DisplayName, - [Parameter()] - [System.Boolean] - $SupportsScopeTags, - [Parameter()] [System.String] $Id, @@ -822,7 +809,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.schema.mof index 69e9b2f0af..bafc3a1e19 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10/MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10.schema.mof @@ -35,7 +35,6 @@ class MSFT_IntuneDeviceConfigurationWindowsTeamPolicyWindows10 : OMI_BaseResourc [Write, Description("The welcome screen meeting information shown. Possible values are: userDefined, showOrganizerAndTimeOnly, showOrganizerAndTimeAndSubject."), ValueMap{"userDefined","showOrganizerAndTimeOnly","showOrganizerAndTimeAndSubject"}, Values{"userDefined","showOrganizerAndTimeOnly","showOrganizerAndTimeAndSubject"}] String WelcomeScreenMeetingInformation; [Write, Description("Admin provided description of the Device Configuration.")] String Description; [Key, Description("Admin provided name of the device configuration.")] String DisplayName; - [Write, Description("Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only.")] Boolean SupportsScopeTags; [Write, Description("The unique identifier for an entity. Read-only.")] String Id; [Write, Description("List of Scope Tags for this Entity instance.")] String RoleScopeTagIds[]; [Write, Description("Represents the assignment to the Intune policy."), EmbeddedInstance("MSFT_DeviceManagementConfigurationPolicyAssignments")] String Assignments[]; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 index f549f853cb..acf5ac0b90 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 @@ -1134,7 +1134,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceEnrollmentStatusPageWindows10/MSFT_IntuneDeviceEnrollmentStatusPageWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceEnrollmentStatusPageWindows10/MSFT_IntuneDeviceEnrollmentStatusPageWindows10.psm1 index c01f473716..bb81923e7b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceEnrollmentStatusPageWindows10/MSFT_IntuneDeviceEnrollmentStatusPageWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceEnrollmentStatusPageWindows10/MSFT_IntuneDeviceEnrollmentStatusPageWindows10.psm1 @@ -777,7 +777,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS.psm1 index 23010b595f..9759a50a86 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS/MSFT_IntuneDeviceFeaturesConfigurationPolicyIOS.psm1 @@ -197,7 +197,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens AirPrintDestinations = Convert-ComplexObjectToHashtableArray $getValue.AdditionalProperties.airPrintDestinations AssetTagTemplate = $getValue.AdditionalProperties.assetTagTemplate @@ -828,7 +828,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceManagementComplianceSettings/MSFT_IntuneDeviceManagementComplianceSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceManagementComplianceSettings/MSFT_IntuneDeviceManagementComplianceSettings.psm1 index e4780b034c..73ee8c0bc5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceManagementComplianceSettings/MSFT_IntuneDeviceManagementComplianceSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceManagementComplianceSettings/MSFT_IntuneDeviceManagementComplianceSettings.psm1 @@ -79,7 +79,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -306,7 +306,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } $Results = Get-TargetResource @Params diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10.psm1 index 158cec677a..3137a6c80f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10/MSFT_IntuneEndpointDetectionAndResponsePolicyWindows10.psm1 @@ -620,7 +620,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntunePolicySets/MSFT_IntunePolicySets.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntunePolicySets/MSFT_IntunePolicySets.psm1 index 98f1c0ab50..7951920170 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntunePolicySets/MSFT_IntunePolicySets.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntunePolicySets/MSFT_IntunePolicySets.psm1 @@ -149,7 +149,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -587,7 +587,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSettingCatalogCustomPolicyWindows10/MSFT_IntuneSettingCatalogCustomPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSettingCatalogCustomPolicyWindows10/MSFT_IntuneSettingCatalogCustomPolicyWindows10.psm1 index 53515b1c95..bba2ee70c3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSettingCatalogCustomPolicyWindows10/MSFT_IntuneSettingCatalogCustomPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSettingCatalogCustomPolicyWindows10/MSFT_IntuneSettingCatalogCustomPolicyWindows10.psm1 @@ -179,7 +179,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -604,7 +604,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner.psm1 index 673856bb59..58322e4140 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner/MSFT_IntuneTrustedRootCertificateAndroidDeviceOwner.psm1 @@ -137,7 +137,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens version = $getValue.AdditionalProperties.version } @@ -585,7 +585,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidEnterprise/MSFT_IntuneTrustedRootCertificateAndroidEnterprise.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidEnterprise/MSFT_IntuneTrustedRootCertificateAndroidEnterprise.psm1 index 3dbc4823c4..03a9bbacf8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidEnterprise/MSFT_IntuneTrustedRootCertificateAndroidEnterprise.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidEnterprise/MSFT_IntuneTrustedRootCertificateAndroidEnterprise.psm1 @@ -136,7 +136,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens version = $getValue.AdditionalProperties.version } @@ -584,7 +584,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidWork/MSFT_IntuneTrustedRootCertificateAndroidWork.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidWork/MSFT_IntuneTrustedRootCertificateAndroidWork.psm1 index c30d22ec8c..bb62a7d7ee 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidWork/MSFT_IntuneTrustedRootCertificateAndroidWork.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateAndroidWork/MSFT_IntuneTrustedRootCertificateAndroidWork.psm1 @@ -137,7 +137,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens version = $getValue.AdditionalProperties.version } @@ -585,7 +585,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateIOS/MSFT_IntuneTrustedRootCertificateIOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateIOS/MSFT_IntuneTrustedRootCertificateIOS.psm1 index f8bca46bb3..dcf4ad7d82 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateIOS/MSFT_IntuneTrustedRootCertificateIOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneTrustedRootCertificateIOS/MSFT_IntuneTrustedRootCertificateIOS.psm1 @@ -138,7 +138,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens version = $getValue.AdditionalProperties.version } @@ -586,7 +586,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner.psm1 index f945430455..ed08f12607 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner/MSFT_IntuneVPNConfigurationPolicyAndroidDeviceOwner.psm1 @@ -268,7 +268,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -848,7 +848,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise.psm1 index 4edf12cba3..b4e9332143 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise/MSFT_IntuneVPNConfigurationPolicyAndroidEnterprise.psm1 @@ -268,7 +268,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -848,7 +848,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidWork/MSFT_IntuneVPNConfigurationPolicyAndroidWork.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidWork/MSFT_IntuneVPNConfigurationPolicyAndroidWork.psm1 index c2b6188d5a..40880d26c9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidWork/MSFT_IntuneVPNConfigurationPolicyAndroidWork.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyAndroidWork/MSFT_IntuneVPNConfigurationPolicyAndroidWork.psm1 @@ -268,7 +268,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -848,7 +848,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 index 5907824d28..a9d6d0c623 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 @@ -326,7 +326,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens version = $getValue.AdditionalProperties.version loginGroupOrDomain = $getValue.AdditionalProperties.loginGroupOrDomain @@ -1060,7 +1060,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator.psm1 index d1b181f4ea..b10f6782c9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWifiConfigurationPolicyAndroidDeviceAdministrator.psm1 @@ -150,7 +150,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -653,7 +653,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.psm1 index bcc3d55c54..30b980cbe8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.psm1 @@ -186,7 +186,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -733,7 +733,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.psm1 index c475d7aa94..ce4931ea9a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.psm1 @@ -150,7 +150,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -651,7 +651,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 index b6e9680e93..a2a05d3e74 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 @@ -150,7 +150,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -649,7 +649,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 index 382fdff02c..ab34662ea9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 @@ -160,7 +160,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -675,7 +675,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 index 366f2f92f9..6d85132cd2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 @@ -714,7 +714,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 index 3a6666e6a1..c1a3aa20b9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 @@ -187,7 +187,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -717,7 +717,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 index de8d37c4fb..d5d320d613 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 @@ -225,7 +225,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -788,7 +788,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.psm1 index aafcd047f8..a402bfda7a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.psm1 @@ -716,7 +716,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined.psm1 index 5a57179d6a..92a3def24c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined/MSFT_IntuneWindowsAutopilotDeploymentProfileAzureADJoined.psm1 @@ -219,7 +219,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -712,7 +712,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.psm1 index 16d51d8e1f..103fcf01fa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled/MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.psm1 @@ -426,7 +426,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -997,7 +997,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.psm1 index 478c6c25d6..35a990cbe3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10/MSFT_IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.psm1 @@ -430,7 +430,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens #endregion } @@ -1145,7 +1145,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_O365AdminAuditLogConfig/MSFT_O365AdminAuditLogConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_O365AdminAuditLogConfig/MSFT_O365AdminAuditLogConfig.psm1 index 0dddd44021..ea78c48639 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_O365AdminAuditLogConfig/MSFT_O365AdminAuditLogConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_O365AdminAuditLogConfig/MSFT_O365AdminAuditLogConfig.psm1 @@ -100,7 +100,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent UnifiedAuditLogIngestionEnabled = $UnifiedAuditLogIngestionEnabledReturnValue AccessTokens = $AccessTokens } @@ -382,7 +382,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_O365Group/MSFT_O365Group.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_O365Group/MSFT_O365Group.psm1 index c1a558ef2b..47f5f6b6d2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_O365Group/MSFT_O365Group.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_O365Group/MSFT_O365Group.psm1 @@ -153,7 +153,7 @@ function Get-TargetResource ApplicationSecret = $ApplicationSecret TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' AccessTokens = $AccessTokens } @@ -613,7 +613,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret DisplayName = $group.DisplayName ManagedBy = 'DummyUser' diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 index 6a7b973c07..c635582e09 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_O365OrgSettings/MSFT_O365OrgSettings.psm1 @@ -198,7 +198,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } try @@ -1055,7 +1055,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_ODSettings/MSFT_ODSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_ODSettings/MSFT_ODSettings.psm1 index 8bc0ee8f00..bc18c20516 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_ODSettings/MSFT_ODSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_ODSettings/MSFT_ODSettings.psm1 @@ -202,7 +202,7 @@ function Get-TargetResource CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint Credential = $Credential - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -662,7 +662,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRoleGroup/MSFT_SCRoleGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRoleGroup/MSFT_SCRoleGroup.psm1 index 96ad5585b9..c903b1d14a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRoleGroup/MSFT_SCRoleGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRoleGroup/MSFT_SCRoleGroup.psm1 @@ -108,7 +108,7 @@ function Get-TargetResource CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent TenantId = $TenantId AccessTokens = $AccessTokens } @@ -425,7 +425,7 @@ function Export-TargetResource TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint CertificatePassword = $CertificatePassword - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOAccessControlSettings/MSFT_SPOAccessControlSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOAccessControlSettings/MSFT_SPOAccessControlSettings.psm1 index 3aff8908b0..cee9168443 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOAccessControlSettings/MSFT_SPOAccessControlSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOAccessControlSettings/MSFT_SPOAccessControlSettings.psm1 @@ -139,7 +139,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' ConditionalAccessPolicy = $SPOAccessControlSettings.ConditionalAccessPolicy AccessTokens = $AccessTokens @@ -531,7 +531,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential ApplicationSecret = $ApplicationSecret AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOApp/MSFT_SPOApp.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOApp/MSFT_SPOApp.psm1 index 185a8ff29c..29bbc3eb1e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOApp/MSFT_SPOApp.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOApp/MSFT_SPOApp.psm1 @@ -111,7 +111,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } @@ -441,7 +441,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOBrowserIdleSignout/MSFT_SPOBrowserIdleSignout.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOBrowserIdleSignout/MSFT_SPOBrowserIdleSignout.psm1 index b3870435d3..14ea7cef9e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOBrowserIdleSignout/MSFT_SPOBrowserIdleSignout.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOBrowserIdleSignout/MSFT_SPOBrowserIdleSignout.psm1 @@ -97,7 +97,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -378,7 +378,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential ApplicationSecret = $ApplicationSecret AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHomeSite/MSFT_SPOHomeSite.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHomeSite/MSFT_SPOHomeSite.psm1 index 757c079caf..596598bc8b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHomeSite/MSFT_SPOHomeSite.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHomeSite/MSFT_SPOHomeSite.psm1 @@ -96,7 +96,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } return $result @@ -378,7 +378,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential ApplicationSecret = $ApplicationSecret AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHubSite/MSFT_SPOHubSite.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHubSite/MSFT_SPOHubSite.psm1 index 9611f94040..1ad0f721ed 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHubSite/MSFT_SPOHubSite.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOHubSite/MSFT_SPOHubSite.psm1 @@ -170,7 +170,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } return $result @@ -677,7 +677,7 @@ function Export-TargetResource ApplicationId = $ApplicationId TenantId = $TenantId CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOOrgAssetsLibrary/MSFT_SPOOrgAssetsLibrary.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOOrgAssetsLibrary/MSFT_SPOOrgAssetsLibrary.psm1 index 1270250a91..5e1bf83787 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOOrgAssetsLibrary/MSFT_SPOOrgAssetsLibrary.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOOrgAssetsLibrary/MSFT_SPOOrgAssetsLibrary.psm1 @@ -150,7 +150,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -492,7 +492,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent ApplicationSecret = $ApplicationSecret AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOPropertyBag/MSFT_SPOPropertyBag.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOPropertyBag/MSFT_SPOPropertyBag.psm1 index 1aab1b8eaa..50b1e29b7d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOPropertyBag/MSFT_SPOPropertyBag.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOPropertyBag/MSFT_SPOPropertyBag.psm1 @@ -135,7 +135,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } @@ -454,7 +454,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchManagedProperty/MSFT_SPOSearchManagedProperty.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchManagedProperty/MSFT_SPOSearchManagedProperty.psm1 index c867fcd3c0..e9d1bd10e6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchManagedProperty/MSFT_SPOSearchManagedProperty.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchManagedProperty/MSFT_SPOSearchManagedProperty.psm1 @@ -227,7 +227,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' AccessTokens = $AccessTokens } @@ -957,7 +957,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchResultSource/MSFT_SPOSearchResultSource.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchResultSource/MSFT_SPOSearchResultSource.psm1 index 09afd6bbb5..65138e2a51 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchResultSource/MSFT_SPOSearchResultSource.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSearchResultSource/MSFT_SPOSearchResultSource.psm1 @@ -178,7 +178,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' AccessTokens = $AccessTokens } @@ -646,7 +646,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword AccessTokens = $AccessTokens diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 index 9831be4742..f773308729 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 @@ -231,7 +231,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' AccessTokens = $AccessTokens } @@ -855,7 +855,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1 index be4d3cb594..fe214293a2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1 @@ -269,7 +269,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteAuditSettings/MSFT_SPOSiteAuditSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteAuditSettings/MSFT_SPOSiteAuditSettings.psm1 index 16c97ad780..56799272d8 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteAuditSettings/MSFT_SPOSiteAuditSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteAuditSettings/MSFT_SPOSiteAuditSettings.psm1 @@ -89,7 +89,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -369,7 +369,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesign/MSFT_SPOSiteDesign.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesign/MSFT_SPOSiteDesign.psm1 index 86cb26511c..5732521a25 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesign/MSFT_SPOSiteDesign.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesign/MSFT_SPOSiteDesign.psm1 @@ -160,7 +160,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesignRights/MSFT_SPOSiteDesignRights.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesignRights/MSFT_SPOSiteDesignRights.psm1 index 496f31705c..9f0a98f2fe 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesignRights/MSFT_SPOSiteDesignRights.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteDesignRights/MSFT_SPOSiteDesignRights.psm1 @@ -125,7 +125,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -454,7 +454,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteGroup/MSFT_SPOSiteGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteGroup/MSFT_SPOSiteGroup.psm1 index e691de28e2..f851df5fc5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteGroup/MSFT_SPOSiteGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteGroup/MSFT_SPOSiteGroup.psm1 @@ -156,7 +156,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -564,7 +564,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteScript/MSFT_SPOSiteScript.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteScript/MSFT_SPOSiteScript.psm1 index aa063438e3..3f8fca41f1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteScript/MSFT_SPOSiteScript.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSiteScript/MSFT_SPOSiteScript.psm1 @@ -129,7 +129,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -524,7 +524,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOStorageEntity/MSFT_SPOStorageEntity.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOStorageEntity/MSFT_SPOStorageEntity.psm1 index 5905026aa4..ffacfe074b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOStorageEntity/MSFT_SPOStorageEntity.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOStorageEntity/MSFT_SPOStorageEntity.psm1 @@ -129,7 +129,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -490,7 +490,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } Write-M365DSCHost -Message " |---[$i/$($storageEntities.Length)] $($storageEntity.Key)" -DeferWrite diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnEnabled/MSFT_SPOTenantCdnEnabled.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnEnabled/MSFT_SPOTenantCdnEnabled.psm1 index fc7bbab870..68c5c4abce 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnEnabled/MSFT_SPOTenantCdnEnabled.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnEnabled/MSFT_SPOTenantCdnEnabled.psm1 @@ -91,7 +91,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } return $result @@ -371,7 +371,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnPolicy/MSFT_SPOTenantCdnPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnPolicy/MSFT_SPOTenantCdnPolicy.psm1 index bf33e16252..4e50de0445 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnPolicy/MSFT_SPOTenantCdnPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantCdnPolicy/MSFT_SPOTenantCdnPolicy.psm1 @@ -108,7 +108,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent AccessTokens = $AccessTokens } } @@ -377,7 +377,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } @@ -414,7 +414,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential } Write-M365DSCHost -Message ' |---[2/2] Private' -DeferWrite diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantSettings/MSFT_SPOTenantSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantSettings/MSFT_SPOTenantSettings.psm1 index 32ba074ed6..ca43fe12db 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantSettings/MSFT_SPOTenantSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTenantSettings/MSFT_SPOTenantSettings.psm1 @@ -264,7 +264,7 @@ function Get-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' AccessTokens = $AccessTokens } @@ -889,7 +889,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTheme/MSFT_SPOTheme.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTheme/MSFT_SPOTheme.psm1 index 202a4a3cbd..2af3e14bda 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTheme/MSFT_SPOTheme.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOTheme/MSFT_SPOTheme.psm1 @@ -433,7 +433,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOUserProfileProperty/MSFT_SPOUserProfileProperty.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOUserProfileProperty/MSFT_SPOUserProfileProperty.psm1 index 7402edf559..0b67f4c765 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOUserProfileProperty/MSFT_SPOUserProfileProperty.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOUserProfileProperty/MSFT_SPOUserProfileProperty.psm1 @@ -92,7 +92,7 @@ function Get-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Ensure = 'Present' AccessTokens = $AccessTokens } @@ -333,7 +333,7 @@ function Export-TargetResource TenantId = $TenantId ApplicationSecret = $ApplicationSecret CertificateThumbprint = $CertificateThumbprint - Managedidentity = $ManagedIdentity.IsPresent + ManagedIdentity = $ManagedIdentity.IsPresent Credential = $Credential AccessTokens = $AccessTokens } diff --git a/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/1-Create.ps1 index 6fc2c28b2a..97ec7b2f24 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/1-Create.ps1 @@ -29,7 +29,7 @@ Configuration Example CatalogType = 'UserManaged' Description = 'Built-in catalog.' IsExternallyVisible = $True - Managedidentity = $False + ManagedIdentity = $False Ensure = 'Present' ApplicationId = $ApplicationId TenantId = $TenantId diff --git a/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/2-Update.ps1 index c1a0688bbc..b9b9732037 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/AADEntitlementManagementAccessPackageCatalog/2-Update.ps1 @@ -29,7 +29,7 @@ Configuration Example CatalogType = 'UserManaged' Description = 'Built-in catalog.' IsExternallyVisible = $False # Updated Property - Managedidentity = $False + ManagedIdentity = $False Ensure = 'Present' ApplicationId = $ApplicationId TenantId = $TenantId diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/1-Create.ps1 index d8f011747e..acdd6d94f5 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/1-Create.ps1 @@ -52,7 +52,6 @@ Configuration Example DisplayName = 'custom 2' } ); - SupportsScopeTags = $True; ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/2-Update.ps1 index 945f22f9be..eb17888ba0 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationCustomPolicyWindows10/2-Update.ps1 @@ -52,7 +52,6 @@ Configuration Example DisplayName = 'custom 3' } ); - SupportsScopeTags = $True; ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/1-Create.ps1 index fd1fc21f94..3401837d21 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/1-Create.ps1 @@ -58,7 +58,6 @@ Configuration Example MinimumRamAllowedToPeerInGigabytes = 3; ModifyCacheLocation = "%systemdrive%"; RestrictPeerSelectionBy = "subnetMask"; - SupportsScopeTags = $True; VpnPeerCaching = "enabled"; ApplicationId = $ApplicationId; TenantId = $TenantId; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/2-Update.ps1 index 3d9c8a6d9c..5b582aef45 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/2-Update.ps1 @@ -58,7 +58,6 @@ Configuration Example MinimumRamAllowedToPeerInGigabytes = 3; ModifyCacheLocation = "%systemdrive%"; RestrictPeerSelectionBy = "subnetMask"; - SupportsScopeTags = $True; VpnPeerCaching = "enabled"; ApplicationId = $ApplicationId; TenantId = $TenantId; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/1-Create.ps1 index 30695840ec..eba630cc12 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/1-Create.ps1 @@ -36,7 +36,6 @@ Configuration Example DisplayName = "Domain Join"; Ensure = "Present"; OrganizationalUnit = "OU=workstation,CN=domain,CN=com"; - SupportsScopeTags = $True; ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/2-Update.ps1 index 13cee6a023..1fb2bd0d22 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationDomainJoinPolicyWindows10/2-Update.ps1 @@ -32,11 +32,10 @@ Configuration Example } ); ComputerNameStaticPrefix = "WK-"; - ComputerNameSuffixRandomCharCount = 12; + ComputerNameSuffixRandomCharCount = 13; # Updated Property DisplayName = "Domain Join"; Ensure = "Present"; OrganizationalUnit = "OU=workstation,CN=domain,CN=com"; - SupportsScopeTags = $False; # Updated Property ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/1-Create.ps1 index 917e26ab44..3e9058e5ef 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/1-Create.ps1 @@ -232,7 +232,6 @@ Configuration Example LocalSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $False; SmartScreenBlockOverrideForFiles = $True; SmartScreenEnableInShell = $True; - SupportsScopeTags = $True; UserRightsAccessCredentialManagerAsTrustedCaller = MSFT_MicrosoftGraphdeviceManagementUserRightsSetting{ State = 'allowed' LocalUsersOrGroups = @( diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/2-Update.ps1 index 27f4d9db02..e84261ee71 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationEndpointProtectionPolicyWindows10/2-Update.ps1 @@ -232,7 +232,6 @@ Configuration Example LocalSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $False; SmartScreenBlockOverrideForFiles = $True; SmartScreenEnableInShell = $True; - SupportsScopeTags = $True; UserRightsAccessCredentialManagerAsTrustedCaller = MSFT_MicrosoftGraphdeviceManagementUserRightsSetting{ State = 'allowed' LocalUsersOrGroups = @( diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/1-Create.ps1 index d771035f63..f2a50e419b 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/1-Create.ps1 @@ -46,7 +46,6 @@ Configuration Example RearCamera = "enabled"; SdCard = "notConfigured"; SimultaneousMultiThreading = "enabled"; - SupportsScopeTags = $True; UsbTypeAPort = "notConfigured"; VirtualizationOfCpuAndIO = "enabled"; WakeOnLAN = "notConfigured"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/2-Update.ps1 index d74cbce780..a8c21b1844 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10/2-Update.ps1 @@ -46,7 +46,6 @@ Configuration Example RearCamera = "enabled"; SdCard = "notConfigured"; SimultaneousMultiThreading = "enabled"; - SupportsScopeTags = $True; UsbTypeAPort = "notConfigured"; VirtualizationOfCpuAndIO = "enabled"; WakeOnLAN = "notConfigured"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/1-Create.ps1 index 8b7685ebab..1e6ec52379 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/1-Create.ps1 @@ -34,7 +34,6 @@ Configuration Example ConfigDeviceHealthMonitoringScope = @("bootPerformance","windowsUpdates"); DisplayName = "Health Monitoring Configuration"; Ensure = "Present"; - SupportsScopeTags = $True; ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/2-Update.ps1 index 56db5bb57e..1e6ec52379 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10/2-Update.ps1 @@ -34,7 +34,6 @@ Configuration Example ConfigDeviceHealthMonitoringScope = @("bootPerformance","windowsUpdates"); DisplayName = "Health Monitoring Configuration"; Ensure = "Present"; - SupportsScopeTags = $False; # Updated Property ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/1-Create.ps1 index 53710e648b..80f613bda0 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/1-Create.ps1 @@ -42,7 +42,6 @@ Configuration Example PinSpecialCharactersUsage = "allowed"; PinUppercaseCharactersUsage = "allowed"; SecurityDeviceRequired = $True; - SupportsScopeTags = $True; UnlockWithBiometricsEnabled = $True; UseCertificatesForOnPremisesAuthEnabled = $True; UseSecurityKeyForSignin = $True; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/2-Update.ps1 index ce8fe9037f..e383c893cc 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationIdentityProtectionPolicyWindows10/2-Update.ps1 @@ -42,7 +42,6 @@ Configuration Example PinSpecialCharactersUsage = "allowed"; PinUppercaseCharactersUsage = "allowed"; SecurityDeviceRequired = $True; - SupportsScopeTags = $True; UnlockWithBiometricsEnabled = $True; UseCertificatesForOnPremisesAuthEnabled = $True; UseSecurityKeyForSignin = $True; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/1-Create.ps1 index f788c8187f..5a8d4e501a 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/1-Create.ps1 @@ -32,7 +32,6 @@ Configuration Example ); DisplayName = "network boundary"; Ensure = "Present"; - SupportsScopeTags = $True; WindowsNetworkIsolationPolicy = MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy{ EnterpriseProxyServers = @() EnterpriseInternalProxyServers = @() diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/2-Update.ps1 index 11c361adeb..c05c6cbac5 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10/2-Update.ps1 @@ -32,13 +32,12 @@ Configuration Example ); DisplayName = "network boundary"; Ensure = "Present"; - SupportsScopeTags = $False; # Updated Property WindowsNetworkIsolationPolicy = MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy{ EnterpriseProxyServers = @() EnterpriseInternalProxyServers = @() EnterpriseIPRangesAreAuthoritative = $True EnterpriseProxyServersAreAuthoritative = $True - EnterpriseNetworkDomainNames = @('domain.com') + EnterpriseNetworkDomainNames = @('domain.com', 'domain2.com') # Updated Property EnterpriseIPRanges = @( MSFT_MicrosoftGraphIpRange1{ UpperAddress = '1.1.1.255' diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/1-Create.ps1 index c8e9be6cc7..fcfcb3ce7c 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/1-Create.ps1 @@ -250,7 +250,6 @@ Configuration Example StorageRequireMobileDeviceEncryption = $False; StorageRestrictAppDataToSystemVolume = $False; StorageRestrictAppInstallToSystemVolume = $False; - SupportsScopeTags = $True; TaskManagerBlockEndTask = $False; TenantLockdownRequireNetworkDuringOutOfBoxExperience = $False; UninstallBuiltInApps = $False; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/2-Update.ps1 index e31803d2db..12d4b79465 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationPolicyWindows10/2-Update.ps1 @@ -250,7 +250,6 @@ Configuration Example StorageRequireMobileDeviceEncryption = $False; StorageRestrictAppDataToSystemVolume = $False; StorageRestrictAppInstallToSystemVolume = $False; - SupportsScopeTags = $True; TaskManagerBlockEndTask = $False; TenantLockdownRequireNetworkDuringOutOfBoxExperience = $False; UninstallBuiltInApps = $False; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/1-Create.ps1 index daa9eae1b6..4e94b97054 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/1-Create.ps1 @@ -43,7 +43,6 @@ Configuration Example SettingsBlockMyMeetingsAndFiles = $True; SettingsBlockSessionResume = $True; SettingsBlockSigninSuggestions = $True; - SupportsScopeTags = $True; WelcomeScreenBlockAutomaticWakeUp = $True; WelcomeScreenMeetingInformation = "showOrganizerAndTimeOnly"; ApplicationId = $ApplicationId; diff --git a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/2-Update.ps1 index d362300d56..e81c6b93bf 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/IntuneDeviceConfigurationWindowsTeamPolicyWindows10/2-Update.ps1 @@ -43,7 +43,6 @@ Configuration Example SettingsBlockMyMeetingsAndFiles = $True; SettingsBlockSessionResume = $True; SettingsBlockSigninSuggestions = $True; - SupportsScopeTags = $True; WelcomeScreenBlockAutomaticWakeUp = $True; WelcomeScreenMeetingInformation = "showOrganizerAndTimeOnly"; ApplicationId = $ApplicationId; diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 index 1883a19178..7a28a01039 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 @@ -72,7 +72,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { displayName = "FakeStringValue" } -ClientOnly) ) - supportsScopeTags = $True Ensure = "Present" Credential = $Credential; } @@ -111,7 +110,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { displayName = "FakeStringValue" } -ClientOnly) ) - supportsScopeTags = $True Ensure = "Absent" Credential = $Credential; } @@ -136,8 +134,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = "FakeStringValue" displayName = "FakeStringValue" id = "FakeStringValue" - supportsScopeTags = $True - } } } @@ -173,7 +169,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { displayName = "FakeStringValue" } -ClientOnly) ) - supportsScopeTags = $True Ensure = "Present" Credential = $Credential; } @@ -198,8 +193,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = "FakeStringValue" displayName = "FakeStringValue" id = "FakeStringValue" - supportsScopeTags = $True - } } } @@ -228,7 +221,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { displayName = "FakeStringValue" } -ClientOnly) ) - supportsScopeTags = $True Ensure = "Present" Credential = $Credential; } @@ -298,8 +290,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = "FakeStringValue" displayName = "FakeStringValue" id = "FakeStringValue" - supportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 index 5ecdb7d8d2..90d9b9390f 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 @@ -101,7 +101,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { minimumRamAllowedToPeerInGigabytes = 25 modifyCacheLocation = 'FakeStringValue' restrictPeerSelectionBy = 'notConfigured' - supportsScopeTags = $True vpnPeerCaching = 'notConfigured' Ensure = 'Present' Credential = $Credential @@ -166,7 +165,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { minimumRamAllowedToPeerInGigabytes = 25 modifyCacheLocation = 'FakeStringValue' restrictPeerSelectionBy = 'notConfigured' - supportsScopeTags = $True vpnPeerCaching = 'notConfigured' Ensure = 'Absent' Credential = $Credential @@ -218,8 +216,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } @@ -280,7 +276,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { minimumRamAllowedToPeerInGigabytes = 25 modifyCacheLocation = 'FakeStringValue' restrictPeerSelectionBy = 'notConfigured' - supportsScopeTags = $True vpnPeerCaching = 'notConfigured' Ensure = 'Present' Credential = $Credential @@ -332,8 +327,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } @@ -387,7 +380,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { minimumRamAllowedToPeerInGigabytes = 25 modifyCacheLocation = 'FakeStringValue' restrictPeerSelectionBy = 'notConfigured' - supportsScopeTags = $True vpnPeerCaching = 'notConfigured' Ensure = 'Present' Credential = $Credential @@ -511,8 +503,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 index e1e24c6a7b..91bbba79ca 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 @@ -68,7 +68,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "FakeStringValue" Id = "FakeStringValue" OrganizationalUnit = "FakeStringValue" - SupportsScopeTags = $True Ensure = "Present" Credential = $Credential; } @@ -99,7 +98,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "FakeStringValue" Id = "FakeStringValue" OrganizationalUnit = "FakeStringValue" - SupportsScopeTags = $True Ensure = 'Absent' Credential = $Credential; } @@ -116,8 +114,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } @@ -145,7 +141,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "FakeStringValue" Id = "FakeStringValue" OrganizationalUnit = "FakeStringValue" - SupportsScopeTags = $True Ensure = 'Present' Credential = $Credential; } @@ -162,8 +157,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } @@ -184,7 +177,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "FakeStringValue" Id = "FakeStringValue" OrganizationalUnit = "FakeStringValue" - SupportsScopeTags = $True Ensure = 'Present' Credential = $Credential; } @@ -239,8 +231,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 index 13aad01594..582a904925 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 @@ -388,7 +388,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True smartScreenBlockOverrideForFiles = $True smartScreenEnableInShell = $True - supportsScopeTags = $True userRightsAccessCredentialManagerAsTrustedCaller = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementUserRightsSetting -Property @{ State = "notConfigured" LocalUsersOrGroups = [CimInstance[]]@( @@ -1035,7 +1034,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True smartScreenBlockOverrideForFiles = $True smartScreenEnableInShell = $True - supportsScopeTags = $True userRightsAccessCredentialManagerAsTrustedCaller = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementUserRightsSetting -Property @{ State = "notConfigured" LocalUsersOrGroups = [CimInstance[]]@( @@ -1964,8 +1962,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = "FakeStringValue" displayName = "FakeStringValue" id = "FakeStringValue" - supportsScopeTags = $True - } } } @@ -2313,7 +2309,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True smartScreenBlockOverrideForFiles = $True smartScreenEnableInShell = $True - supportsScopeTags = $True userRightsAccessCredentialManagerAsTrustedCaller = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementUserRightsSetting -Property @{ State = "notConfigured" LocalUsersOrGroups = [CimInstance[]]@( @@ -3242,13 +3237,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = "FakeStringValue" displayName = "FakeStringValue" id = "FakeStringValue" - supportsScopeTags = $True - } } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -3584,7 +3576,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True smartScreenBlockOverrideForFiles = $True smartScreenEnableInShell = $True - supportsScopeTags = $True userRightsAccessCredentialManagerAsTrustedCaller = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementUserRightsSetting -Property @{ State = "notConfigured" LocalUsersOrGroups = [CimInstance[]]@( @@ -4985,8 +4976,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = "FakeStringValue" displayName = "FakeStringValue" id = "FakeStringValue" - supportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 index 31a04b51d0..df8f165b0a 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 @@ -78,7 +78,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RearCamera = "notConfigured" SdCard = "notConfigured" SimultaneousMultiThreading = "notConfigured" - SupportsScopeTags = $True UsbTypeAPort = "notConfigured" VirtualizationOfCpuAndIO = "notConfigured" WakeOnLAN = "notConfigured" @@ -126,7 +125,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RearCamera = "notConfigured" SdCard = "notConfigured" SimultaneousMultiThreading = "notConfigured" - SupportsScopeTags = $True UsbTypeAPort = "notConfigured" VirtualizationOfCpuAndIO = "notConfigured" WakeOnLAN = "notConfigured" @@ -167,8 +165,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } @@ -206,7 +202,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RearCamera = "notConfigured" SdCard = "notConfigured" SimultaneousMultiThreading = "notConfigured" - SupportsScopeTags = $True UsbTypeAPort = "notConfigured" VirtualizationOfCpuAndIO = "notConfigured" WakeOnLAN = "notConfigured" @@ -247,8 +242,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } @@ -279,7 +272,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RearCamera = "notConfigured" SdCard = "notConfigured" SimultaneousMultiThreading = "notConfigured" - SupportsScopeTags = $True UsbTypeAPort = "notConfigured" VirtualizationOfCpuAndIO = "notConfigured" WakeOnLAN = "notConfigured" @@ -375,8 +367,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 index 2163d962ed..cc68d98ae7 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 @@ -70,7 +70,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True Ensure = 'Present' Credential = $Credential } @@ -100,7 +99,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True Ensure = 'Absent' Credential = $Credential } @@ -116,7 +114,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True } } } @@ -143,7 +140,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True Ensure = 'Present' Credential = $Credential } @@ -159,7 +155,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True } } } @@ -179,7 +174,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True Ensure = 'Present' Credential = $Credential } @@ -232,7 +226,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 index 98e86cbe4e..1072241098 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 @@ -77,7 +77,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PinSpecialCharactersUsage = 'blocked' PinUppercaseCharactersUsage = 'blocked' SecurityDeviceRequired = $True - SupportsScopeTags = $True UnlockWithBiometricsEnabled = $True UseCertificatesForOnPremisesAuthEnabled = $True UseSecurityKeyForSignin = $True @@ -118,7 +117,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PinSpecialCharactersUsage = 'blocked' PinUppercaseCharactersUsage = 'blocked' SecurityDeviceRequired = $True - SupportsScopeTags = $True UnlockWithBiometricsEnabled = $True UseCertificatesForOnPremisesAuthEnabled = $True UseSecurityKeyForSignin = $True @@ -149,8 +147,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True - } } } @@ -184,7 +180,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PinSpecialCharactersUsage = 'blocked' PinUppercaseCharactersUsage = 'blocked' SecurityDeviceRequired = $True - SupportsScopeTags = $True UnlockWithBiometricsEnabled = $True UseCertificatesForOnPremisesAuthEnabled = $True UseSecurityKeyForSignin = $True @@ -215,8 +210,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True - } } } @@ -243,7 +236,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PinSpecialCharactersUsage = 'blocked' PinUppercaseCharactersUsage = 'blocked' SecurityDeviceRequired = $True - SupportsScopeTags = $True UnlockWithBiometricsEnabled = $True UseCertificatesForOnPremisesAuthEnabled = $True UseSecurityKeyForSignin = $True @@ -315,8 +307,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - SupportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 index 512b02d69a..3460a1cc23 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 @@ -64,7 +64,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True windowsNetworkIsolationPolicy = (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy -Property @{ EnterpriseProxyServers = @('FakeStringValue') EnterpriseInternalProxyServers = @('FakeStringValue') @@ -113,7 +112,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True windowsNetworkIsolationPolicy = (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy -Property @{ EnterpriseProxyServers = @('FakeStringValue') EnterpriseInternalProxyServers = @('FakeStringValue') @@ -170,8 +168,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } @@ -195,7 +191,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True windowsNetworkIsolationPolicy = (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy -Property @{ EnterpriseProxyServers = @('FakeStringValue') EnterpriseInternalProxyServers = @('FakeStringValue') @@ -252,8 +247,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } @@ -270,7 +263,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True windowsNetworkIsolationPolicy = (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy -Property @{ EnterpriseProxyServers = @('FakeStringValue') EnterpriseInternalProxyServers = @('FakeStringValue') @@ -381,8 +373,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyWindows10.Tests.ps1 index ce29e5e6f7..5f6b8fec7b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyWindows10.Tests.ps1 @@ -334,7 +334,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { storageRequireMobileDeviceEncryption = $True storageRestrictAppDataToSystemVolume = $True storageRestrictAppInstallToSystemVolume = $True - supportsScopeTags = $True systemTelemetryProxyServer = 'FakeStringValue' taskManagerBlockEndTask = $True tenantLockdownRequireNetworkDuringOutOfBoxExperience = $True @@ -663,7 +662,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { storageRequireMobileDeviceEncryption = $True storageRestrictAppDataToSystemVolume = $True storageRestrictAppInstallToSystemVolume = $True - supportsScopeTags = $True systemTelemetryProxyServer = 'FakeStringValue' taskManagerBlockEndTask = $True tenantLockdownRequireNetworkDuringOutOfBoxExperience = $True @@ -1008,8 +1006,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } @@ -1305,7 +1301,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { storageRequireMobileDeviceEncryption = $True storageRestrictAppDataToSystemVolume = $True storageRestrictAppInstallToSystemVolume = $True - supportsScopeTags = $True systemTelemetryProxyServer = 'FakeStringValue' taskManagerBlockEndTask = $True tenantLockdownRequireNetworkDuringOutOfBoxExperience = $True @@ -1650,8 +1645,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } @@ -1940,7 +1933,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { storageRequireMobileDeviceEncryption = $True storageRestrictAppDataToSystemVolume = $True storageRestrictAppInstallToSystemVolume = $True - supportsScopeTags = $True systemTelemetryProxyServer = 'FakeStringValue' taskManagerBlockEndTask = $True tenantLockdownRequireNetworkDuringOutOfBoxExperience = $True @@ -2439,8 +2431,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { description = 'FakeStringValue' displayName = 'FakeStringValue' id = 'FakeStringValue' - supportsScopeTags = $True - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 index afe344d49e..ae4ba61a76 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 @@ -81,7 +81,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SettingsScreenTimeoutInMinutes = 25 SettingsSessionTimeoutInMinutes = 25 SettingsSleepTimeoutInMinutes = 25 - SupportsScopeTags = $True WelcomeScreenBackgroundImageUrl = "FakeStringValue" WelcomeScreenBlockAutomaticWakeUp = $True WelcomeScreenMeetingInformation = "userDefined" @@ -128,7 +127,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SettingsScreenTimeoutInMinutes = 25 SettingsSessionTimeoutInMinutes = 25 SettingsSleepTimeoutInMinutes = 25 - SupportsScopeTags = $True WelcomeScreenBackgroundImageUrl = "FakeStringValue" WelcomeScreenBlockAutomaticWakeUp = $True WelcomeScreenMeetingInformation = "userDefined" @@ -164,8 +162,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } @@ -206,7 +202,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SettingsScreenTimeoutInMinutes = 25 SettingsSessionTimeoutInMinutes = 25 SettingsSleepTimeoutInMinutes = 25 - SupportsScopeTags = $True WelcomeScreenBackgroundImageUrl = "FakeStringValue" WelcomeScreenBlockAutomaticWakeUp = $True WelcomeScreenMeetingInformation = "userDefined" @@ -242,8 +237,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } @@ -277,7 +270,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SettingsScreenTimeoutInMinutes = 25 SettingsSessionTimeoutInMinutes = 25 SettingsSleepTimeoutInMinutes = 25 - SupportsScopeTags = $True WelcomeScreenBackgroundImageUrl = "FakeStringValue" WelcomeScreenBlockAutomaticWakeUp = $True WelcomeScreenMeetingInformation = "userDefined" @@ -358,8 +350,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" - SupportsScopeTags = $True - } } } From 568f997b6e362ed9f53045f1d9d756d79776e96a Mon Sep 17 00:00:00 2001 From: Fabien Tschanz Date: Sun, 15 Jun 2025 22:59:42 +0200 Subject: [PATCH 2/3] Move and combine test mocks in startup of test --- ...icrosoft365DSC.IntuneAppCategory.Tests.ps1 | 34 +- ...tuneAppConfigurationDevicePolicy.Tests.ps1 | 188 +- ...DSC.IntuneAppConfigurationPolicy.Tests.ps1 | 98 +- ...leMDMPushNotificationCertificate.Tests.ps1 | 84 +- ...ft365DSC.IntuneDerivedCredential.Tests.ps1 | 51 +- ...AndAppManagementAssignmentFilter.Tests.ps1 | 47 +- ...osoft365DSC.IntuneDeviceCategory.Tests.ps1 | 42 +- ...ft365DSC.IntuneDeviceCleanupRule.Tests.ps1 | 15 +- ...mpliancePolicyAndroidDeviceOwner.Tests.ps1 | 516 +-- ...mpliancePolicyAndroidWorkProfile.Tests.ps1 | 369 +- ...ntuneDeviceCompliancePolicyMacOS.Tests.ps1 | 148 +- ...eDeviceCompliancePolicyWindows10.Tests.ps1 | 222 +- ....IntuneDeviceCompliancePolicyiOs.Tests.ps1 | 133 +- ...istrativeTemplatePolicyWindows10.Tests.ps1 | 264 +- ...nfigurationCustomPolicyWindows10.Tests.ps1 | 117 +- ...viceConfigurationCustomPolicyiOS.Tests.ps1 | 72 +- ...ndpointOnboardingPolicyWindows10.Tests.ps1 | 94 +- ...iveryOptimizationPolicyWindows10.Tests.ps1 | 248 +- ...urationDomainJoinPolicyWindows10.Tests.ps1 | 79 +- ...ationEmailProfilePolicyWindows10.Tests.ps1 | 119 +- ...ndpointProtectionPolicyWindows10.Tests.ps1 | 2976 ++++------------- ...FirmwareInterfacePolicyWindows10.Tests.ps1 | 163 +- ...ringConfigurationPolicyWindows10.Tests.ps1 | 73 +- ...dentityProtectionPolicyWindows10.Tests.ps1 | 120 +- ...tedPfxCertificatePolicyWindows10.Tests.ps1 | 96 +- ...onfigurationKioskPolicyWindows10.Tests.ps1 | 522 +-- ...onNetworkBoundaryPolicyWindows10.Tests.ps1 | 166 +- ...onPkcsCertificatePolicyWindows10.Tests.ps1 | 182 +- ...ConfigurationPlatformScriptMacOS.Tests.ps1 | 83 +- ...nfigurationPlatformScriptWindows.Tests.ps1 | 85 +- ...onPolicyAndroidOpenSourceProject.Tests.ps1 | 128 +- ...gurationPolicyAndroidWorkProfile.Tests.ps1 | 228 +- ...neDeviceConfigurationPolicyMacOS.Tests.ps1 | 342 +- ...tuneDeviceConfigurationPolicyiOS.Tests.ps1 | 1152 ++----- ...onSCEPCertificatePolicyWindows10.Tests.ps1 | 187 +- ...nSecureAssessmentPolicyWindows10.Tests.ps1 | 98 +- ...SharedMultiDevicePolicyWindows10.Tests.ps1 | 172 +- ...rustedCertificatePolicyWindows10.Tests.ps1 | 72 +- ...eConfigurationVpnPolicyWindows10.Tests.ps1 | 570 +--- ...rationWindowsTeamPolicyWindows10.Tests.ps1 | 149 +- ...ationWiredNetworkPolicyWindows10.Tests.ps1 | 266 +- ...DeviceEnrollmentLimitRestriction.Tests.ps1 | 62 +- ...iceEnrollmentPlatformRestriction.Tests.ps1 | 92 +- ...iceEnrollmentStatusPageWindows10.Tests.ps1 | 154 +- ...ceFeaturesConfigurationPolicyIOS.Tests.ps1 | 401 +-- ...roidDeviceOwnerEnrollmentProfile.Tests.ps1 | 91 +- ...viceManagementComplianceSettings.Tests.ps1 | 30 +- ...5DSC.IntuneMobileAppsMacOSLobApp.Tests.ps1 | 137 +- ...eMobileAppsWindowsOfficeSuiteApp.Tests.ps1 | 199 +- ...Microsoft365DSC.IntunePolicySets.Tests.ps1 | 216 +- ...osoft365DSC.IntuneRoleAssignment.Tests.ps1 | 107 +- ...osoft365DSC.IntuneRoleDefinition.Tests.ps1 | 81 +- ...crosoft365DSC.IntuneRoleScopeTag.Tests.ps1 | 58 +- ...tingCatalogCustomPolicyWindows10.Tests.ps1 | 480 +-- ...RootCertificateAndroidEnterprise.Tests.ps1 | 58 +- ...rustedRootCertificateAndroidWork.Tests.ps1 | 56 +- ...igurationPolicyAndroidEnterprise.Tests.ps1 | 202 +- ...PNConfigurationPolicyAndroidWork.Tests.ps1 | 202 +- ....IntuneVPNConfigurationPolicyIOS.Tests.ps1 | 265 +- ...licyAndroidEnterpriseDeviceOwner.Tests.ps1 | 130 +- ...licyAndroidEnterpriseWorkProfile.Tests.ps1 | 97 +- ...onfigurationPolicyAndroidForWork.Tests.ps1 | 96 +- ...onPolicyAndroidOpenSourceProject.Tests.ps1 | 102 +- ...IntuneWifiConfigurationPolicyIOS.Tests.ps1 | 112 +- ...tuneWifiConfigurationPolicyMacOS.Tests.ps1 | 107 +- ...WifiConfigurationPolicyWindows10.Tests.ps1 | 126 +- ...oymentProfileAzureADHybridJoined.Tests.ps1 | 168 +- ...otDeploymentProfileAzureADJoined.Tests.ps1 | 164 +- ...ectionPolicyWindows10MdmEnrolled.Tests.ps1 | 581 +--- ...nessDriverUpdateProfileWindows10.Tests.ps1 | 51 +- ...essQualityUpdateProfileWindows10.Tests.ps1 | 67 +- ...sinessRingUpdateProfileWindows10.Tests.ps1 | 253 +- 72 files changed, 3412 insertions(+), 12303 deletions(-) diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppCategory.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppCategory.Tests.ps1 index 500353b280..ed963c10e6 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppCategory.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppCategory.Tests.ps1 @@ -40,6 +40,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppCategory -MockWith { + return @{ + Id = '046e0b16-76ce-4b49-bf1b-1cc5bd94fb47' + DisplayName = 'Data Management' + } } Mock -CommandName New-MgBetaDeviceAppManagementMobileAppCategory -MockWith { } @@ -88,13 +92,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppCategory -MockWith { - return @{ - Id = '046e0b16-76ce-4b49-bf1b-1cc5bd94fb47' - DisplayName = 'Data Management' - } - } } It '2.1 Should return values from the Get method' { @@ -117,13 +114,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppCategory -MockWith { - return @{ - Id = '046e0b16-76ce-4b49-bf1b-1cc5bd94fb47' - DisplayName = 'Data Management' - } - } } It '3.0 Should return true from the Test method' { @@ -135,17 +125,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { BeforeAll { $testParams = @{ Id = "046e0b16-76ce-4b49-bf1b-1cc5bd94fb47" - DisplayName = "Data Management" + DisplayName = "Data Management 1" # Updated property Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppCategory -MockWith { - return @{ - Id = "046e0b16-76ce-4b49-bf1b-1cc5bd94fb47" - DisplayName = "Data Management 1" #drift - } - } } It '4.1 Should return Values from the Get method' { @@ -169,13 +152,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppCategory -MockWith { - return @{ - Id = "046e0b16-76ce-4b49-bf1b-1cc5bd94fb47" - DisplayName = "Data Management" - } - } } It '5.1 Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationDevicePolicy.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationDevicePolicy.Tests.ps1 index 837da1316e..9008a9e0ff 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationDevicePolicy.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationDevicePolicy.Tests.ps1 @@ -49,6 +49,43 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { + return @{ + Id = "FakeStringValue" + AdditionalProperties = @{ + packageId = "FakeStringValue" + '@odata.type' = "#microsoft.graph.androidManagedStoreApp" + } + } + } + + Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + appSupportsOemConfig = $True + '@odata.type' = "#microsoft.graph.androidManagedStoreAppConfiguration" + payloadJson = "eyJ0ZXN0IjoidmFsdWUifQ==" + profileApplicability = "default" + permissionActions = @( + @{ + permission = "FakeStringValue" + action = "prompt" + } + ) + packageId = "FakeStringValue" + connectedAppsEnabled = $True + } + createdDateTime = "2023-01-01T00:00:00.0000000+01:00" + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + lastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" + roleScopeTagIds = @("FakeStringValue") + targetedMobileApps = @("FakeStringValue") + version = 25 + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -57,10 +94,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfigurationAssignment -MockWith { } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - } - } # Test contexts Context -Name "The IntuneAppConfigurationDevicePolicy should exist but it DOES NOT" -Fixture { @@ -85,16 +118,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Credential = $Credential; } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "FakeStringValue" - AdditionalProperties = @{ - packageId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.androidManagedStoreApp" - } - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfiguration -MockWith { return $null } @@ -132,43 +155,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "FakeStringValue" - AdditionalProperties = @{ - packageId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.androidManagedStoreApp" - } - } - } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - appSupportsOemConfig = $True - '@odata.type' = "#microsoft.graph.androidManagedStoreAppConfiguration" - payloadJson = "eyJ0ZXN0IjoidmFsdWUifQ==" - profileApplicability = "default" - permissionActions = @( - @{ - permission = "FakeStringValue" - action = "prompt" - } - ) - packageId = "FakeStringValue" - connectedAppsEnabled = $True - } - createdDateTime = "2023-01-01T00:00:00.0000000+01:00" - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - lastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - roleScopeTagIds = @("FakeStringValue") - targetedMobileApps = @("FakeStringValue") - version = 25 - } - } } It 'Should return Values from the Get method' { @@ -205,43 +191,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "FakeStringValue" - AdditionalProperties = @{ - packageId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.androidManagedStoreApp" - } - } - } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - appSupportsOemConfig = $True - '@odata.type' = "#microsoft.graph.androidManagedStoreAppConfiguration" - payloadJson = "eyJ0ZXN0IjoidmFsdWUifQ==" - profileApplicability = "default" - permissionActions = @( - @{ - permission = "FakeStringValue" - action = "prompt" - } - ) - packageId = "FakeStringValue" - connectedAppsEnabled = $True - } - createdDateTime = "2023-01-01T00:00:00.0000000+01:00" - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - lastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - roleScopeTagIds = @("FakeStringValue") - targetedMobileApps = @("FakeStringValue") - version = 25 - } - } } It 'Should return true from the Test method' { @@ -261,7 +210,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PayloadJson = "{`"test`":`"value`"}" permissionActions = [CimInstance[]]@( (New-CimInstance -ClassName MSFT_MicrosoftGraphandroidPermissionAction -Property @{ - permission = "FakeStringValue" + permission = "OtherPermission" # Updated property action = "prompt" } -ClientOnly) ) @@ -271,40 +220,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "FakeStringValue" - AdditionalProperties = @{ - packageId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.androidManagedStoreApp" - } - } - } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - profileApplicability = "default" - packageId = "FakeStringValue" - permissionActions = @( - @{ - permission = "FakeStringValue" - action = "prompt" - } - ) - payloadJson = "eyJ0ZXN0IjoidmFsdWUifQ==" - } - createdDateTime = "2023-01-01T00:00:00.0000000+01:00" - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - lastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - roleScopeTagIds = @("FakeStringValue") - targetedMobileApps = @("FakeStringValue") - version = 7 - } - } } It 'Should return Values from the Get method' { @@ -328,33 +243,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - appSupportsOemConfig = $True - '@odata.type' = "#microsoft.graph.androidManagedStoreAppConfiguration" - payloadJson = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("{`"test`":`"value`"}")) - profileApplicability = "default" - permissionActions = @( - @{ - permission = "FakeStringValue" - action = "prompt" - } - ) - packageId = "FakeStringValue" - connectedAppsEnabled = $True - } - createdDateTime = "2023-01-01T00:00:00.0000000+01:00" - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - lastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - roleScopeTagIds = @("FakeStringValue") - targetedMobileApps = @("FakeStringValue") - version = 25 - } - } } It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationPolicy.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationPolicy.Tests.ps1 index a20bdd145e..a094406ac7 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationPolicy.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppConfigurationPolicy.Tests.ps1 @@ -41,6 +41,23 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceAppManagementTargetedManagedAppConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfiguration -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy Desire State' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + RoleScopeTagIds = @("0") + TargetedAppManagementLevels = "unspecified" + AppGroupType = "selectedPublicApps" + CustomSettings = @( + @{ + name = 'FakeStringValue' + value = '1' + } + ) + } + } + Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfigurationAssignment -MockWith { return @() } @@ -95,32 +112,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RoleScopeTagIds = @("0") TargetedAppManagementLevels = "unspecified" AppGroupType = "selectedPublicApps" - CustomSettings = [CimInstance[]]@( + CustomSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_IntuneAppConfigurationPolicyCustomSetting ` -Property @{ - name = 'FakeStringValue' - value = '1' + name = 'FakeStringValue' + value = '2' # Updated property } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfiguration -MockWith { - return @{ - DisplayName = 'Test App Configuration Policy' - Description = 'Different Value' - Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' - RoleScopeTagIds = @("0") - TargetedAppManagementLevels = "unspecified" - AppGroupType = "selectedPublicApps" - CustomSettings = @( - @{ - name = 'FakeStringValue' - value = '1' - } - ) - } - } } It 'Should return Present from the Get method' { @@ -147,7 +147,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RoleScopeTagIds = @("0") TargetedAppManagementLevels = "unspecified" AppGroupType = "selectedPublicApps" - CustomSettings = [CimInstance[]]@( + CustomSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_IntuneAppConfigurationPolicyCustomSetting ` -Property @{ @@ -156,27 +156,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfiguration -MockWith { - return @{ - DisplayName = 'Test App Configuration Policy Desire State' - Description = 'Test Definition' - Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' - RoleScopeTagIds = @("0") - TargetedAppManagementLevels = "unspecified" - AppGroupType = "selectedPublicApps" - CustomSettings = @( - @{ - name = 'FakeStringValue' - value = '1' - } - ) - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfigurationAssignment -MockWith { - return @() - } - } It 'Should return true from the Test method' { @@ -203,24 +182,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfiguration -MockWith { - return @{ - DisplayName = 'Test App Configuration Policy' - Description = 'Test Definition' - Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' - RoleScopeTagIds = @("0") - TargetedAppManagementLevels = "unspecified" - AppGroupType = "selectedPublicApps" - Apps = @() - CustomSettings = @( - @{ - name = 'FakeStringValue' - value = '1' - } - ) - } - } } It 'Should return Present from the Get method' { @@ -244,23 +205,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementTargetedManagedAppConfiguration -MockWith { - return @{ - DisplayName = 'Test App Configuration Policy' - Description = 'Test Definition' - Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' - RoleScopeTagIds = @("0") - TargetedAppManagementLevels = "unspecified" - AppGroupType = "selectedPublicApps" - CustomSettings = @( - @{ - name = 'FakeStringValue' - value = '1' - } - ) - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 index 80edf77742..4592beba3f 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 @@ -43,12 +43,21 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Get-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { + return @{ + AppleIdentifier = "Patched cert"; + Certificate = "Test cert"; + Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; + } } - Mock -CommandName Update-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDataSharingConsent -MockWith { + return @{ + DataSharingConsentId = "appleMDMPushCertificate" + Granted = $True; + } } - Mock -CommandName Get-MgBetaDeviceManagementDataSharingConsent -MockWith { + Mock -CommandName Update-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { } $Script:exportedInstances =$null @@ -97,25 +106,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Certificate = "Test cert"; Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; DataSharingConsetGranted = $True; - Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { - return @{ - AppleIdentifier = "Patched cert"; - Certificate = "Test cert"; - Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDataSharingConsent -MockWith { - return @{ - DataSharingConsentId = "appleMDMPushCertificate" - Granted = $True; - } - } } It '2.1 Should return values from the Get method' { @@ -137,25 +130,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Certificate = "Test cert"; Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; DataSharingConsetGranted = $True; - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { - return @{ - AppleIdentifier = "Apple ID"; - Certificate = "Test cert"; - Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDataSharingConsent -MockWith { - return @{ - DataSharingConsentId = "appleMDMPushCertificate" - Granted = $True; - } - } } It '3.0 Should return true from the Test method' { @@ -166,29 +143,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name '4. The instance exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - AppleIdentifier = "Apple ID"; - Certificate = "Test cert"; - Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; - DataSharingConsetGranted = $True; - + AppleIdentifier = "Apple ID"; + Certificate = "Patched cert"; # Updated property + Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; + DataSharingConsetGranted = $True; Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { - return @{ - AppleIdentifier = "Apple ID"; #drift - Certificate = "Patched cert base64 string"; #drift - Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDataSharingConsent -MockWith { - return @{ - DataSharingConsentId = "appleMDMPushCertificate" - Granted = $True; - } - } } It '4.1 Should return Values from the Get method' { @@ -212,21 +173,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { - return @{ - AppleIdentifier = "Apple ID"; - Certificate = "Test cert"; - Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDataSharingConsent -MockWith { - return @{ - DataSharingConsentId = "appleMDMPushCertificate" - Granted = $True; - } - } } It '5.0 Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDerivedCredential.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDerivedCredential.Tests.ps1 index 8ec3f19f07..69ce32f354 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDerivedCredential.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDerivedCredential.Tests.ps1 @@ -40,6 +40,14 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Get-MgBetaDeviceManagementDerivedCredential -MockWith { + return @{ + Ensure = 'Present' + DisplayName = "K5"; + HelpUrl = "http://www.ff.com/"; + Id = "a409d85f-2a49-440d-884a-80fb52a557ab"; + Issuer = "purebred"; + NotificationType = "email"; + } } Mock -CommandName New-MgBetaDeviceManagementDerivedCredential -MockWith { } @@ -91,16 +99,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NotificationType = "email"; Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDerivedCredential -MockWith { - return @{ - DisplayName = "K5"; - HelpUrl = "http://www.ff.com/"; - Id = "a409d85f-2a49-440d-884a-80fb52a557ab"; - Issuer = "purebred"; - NotificationType = "email"; - } - } } It ' 2.1 Should return Values from the Get method' { (Get-TargetResource @testParams).Ensure | Should -Be 'Present' @@ -126,17 +124,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NotificationType = "email"; Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDerivedCredential -MockWith { - return @{ - Ensure = 'Present' - DisplayName = "K5"; - HelpUrl = "http://www.ff.com/"; - Id = "a409d85f-2a49-440d-884a-80fb52a557ab"; - Issuer = "purebred"; - NotificationType = "email"; - } - } } It ' 3.0 Should return true from the Test method' { @@ -149,22 +136,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Ensure = 'Present' DisplayName = "K5"; - HelpUrl = "http://www.ff.com/"; + HelpUrl = "http://www.ff2.com/"; # Updated property Id = "a409d85f-2a49-440d-884a-80fb52a557ab"; Issuer = "purebred"; NotificationType = "email"; Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDerivedCredential -MockWith { - return @{ - DisplayName = "K5 drift"; #drift - HelpUrl = "http://www.ff.com/"; - Id = "a409d85f-2a49-440d-884a-80fb52a557ab"; - Issuer = "purebred"; - NotificationType = "email"; - } - } } It ' 4.1 Should return Values from the Get method' { @@ -185,16 +162,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDerivedCredential -MockWith { - return @{ - DisplayName = "K5"; - HelpUrl = "http://www.ff.com/"; - Id = "a409d85f-2a49-440d-884a-80fb52a557ab"; - Issuer = "purebred"; - NotificationType = "email"; - } - } } It ' 5.0 Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceAndAppManagementAssignmentFilter.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceAndAppManagementAssignmentFilter.Tests.ps1 index 1da33fa6ff..d41cdf9a26 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceAndAppManagementAssignmentFilter.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceAndAppManagementAssignmentFilter.Tests.ps1 @@ -41,6 +41,15 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementAssignmentFilter -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementAssignmentFilter -MockWith { + return @{ + Description = 'Test' + DisplayName = 'Test Device Filter' + Platform = 'windows10AndLater' + Rule = "(device.manufacturer -ne `"bibi`")" + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -86,18 +95,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test Device Filter' Ensure = 'Present' Platform = 'windows10AndLater' - Rule = "(device.manufacturer -ne `"bibi`")" + Rule = "(device.manufacturer -ne `"test`")" # Updated property Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementAssignmentFilter -MockWith { - return @{ - Description = 'Test' - DisplayName = 'Test Device Filter' - Platform = 'windows10AndLater' - Rule = "(device.manufacturer -ne `"test`")"; #drift - } - } } It 'Should return Present from the Get method' { @@ -124,15 +124,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Rule = "(device.manufacturer -ne `"bibi`")" Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementAssignmentFilter -MockWith { - return @{ - Description = 'Test' - DisplayName = 'Test Device Filter' - Platform = 'windows10AndLater' - Rule = "(device.manufacturer -ne `"bibi`")" - } - } } It 'Should return true from the Test method' { @@ -150,15 +141,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Rule = "(device.manufacturer -ne `"bibi`")" Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementAssignmentFilter -MockWith { - return @{ - Description = 'Test' - DisplayName = 'Test Device Filter' - Platform = 'windows10AndLater' - Rule = "(device.manufacturer -ne `"bibi`")" - } - } } It 'Should return Present from the Get method' { @@ -182,15 +164,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementAssignmentFilter -MockWith { - return @{ - Description = 'Test' - DisplayName = 'Test Device Filter' - Platform = 'windows10AndLater' - Rule = "(device.manufacturer -ne `"bibi`")" - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCategory.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCategory.Tests.ps1 index 9469f98e1a..77d54def2b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCategory.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCategory.Tests.ps1 @@ -32,6 +32,14 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCategory -MockWith { + return @{ + DisplayName = 'Test Category' + Description = 'Test Definition' + Id = '12345-12345-12345-12345-12345' + } + } + Mock -CommandName Update-MgBetaDeviceManagementDeviceCategory -MockWith { } @@ -85,14 +93,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCategory -MockWith { - return @{ - DisplayName = 'Test Category' - Description = 'Test Definition' - Id = '12345-12345-12345-12345-12345' - } - } } It 'Should return Present from the Get method' { @@ -117,14 +117,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCategory -MockWith { - return @{ - DisplayName = 'Test Category' - Description = 'Test Definition' - Id = '12345-12345-12345-12345-12345' - } - } } It 'Should return true from the Test method' { @@ -136,18 +128,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { BeforeAll { $testParams = @{ DisplayName = 'Test Category' - Description = 'Test Definition' + Description = 'Different Value' # Updated property Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCategory -MockWith { - return @{ - DisplayName = 'Test Category' - Description = 'Different Value' - Id = '12345-12345-12345-12345-12345' - } - } } It 'Should return Present from the Get method' { @@ -171,14 +155,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCategory -MockWith { - return @{ - DisplayName = 'Test Category' - Description = 'Test Definition' - Id = '12345-12345-12345-12345-12345' - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCleanupRule.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCleanupRule.Tests.ps1 index 028b34a7f8..fdbddbaf86 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCleanupRule.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCleanupRule.Tests.ps1 @@ -36,6 +36,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Invoke-MgGraphRequest -MockWith { + return @{ + DeviceInactivityBeforeRetirementInDays = 30 + } } # Mock Write-M365DSCHost to hide output during the tests @@ -86,12 +89,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { IsSingleInstance = 'Yes' Credential = $Credential } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - DeviceInactivityBeforeRetirementInDays = 30 - } - } } It 'Should return true from the Test method' { @@ -106,12 +103,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - DeviceInactivityBeforeRetirementInDays = 30 - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidDeviceOwner.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidDeviceOwner.Tests.ps1 index 9fcf41ae75..5df6c5d712 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidDeviceOwner.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidDeviceOwner.Tests.ps1 @@ -41,8 +41,74 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { + return @{ + DisplayName = 'Test Android Device Owner Device Compliance Policy' + Description = 'Test Android Device Owner Device Compliance Policy Description' + Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' + ScheduledActionsForRule =@( + @{ + ruleName = '' + scheduledActionConfigurations = @( + @{ + actionType = 'block' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @() + }, + @{ + actionType = 'pushNotification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @() + }, + @{ + actionType = 'remoteLock' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @() + }, + @{ + actionType = 'Notification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') + } + ) + } + ) + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidDeviceOwnerCompliancePolicy' + PasswordMinimumLetterCharacters = 1 + PasswordMinimumLowerCaseCharacters = 1 + PasswordMinimumNonLetterCharacters = 1 + PasswordMinimumNumericCharacters = 1 + PasswordMinimumSymbolCharacters = 1 + PasswordMinimumUpperCaseCharacters = 1 + RequireNoPendingSystemUpdates = $true + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' + AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' + SecurityRequireSafetyNetAttestationBasicIntegrity = $True + SecurityRequireSafetyNetAttestationCertifiedDevice = $True + OsMinimumVersion = 7 + OsMaximumVersion = 11 + PasswordRequired = $True + PasswordMinimumLength = 6 + PasswordRequiredType = 'DeviceDefault' + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordExpirationDays = 365 + PasswordPreviousPasswordCountToBlock = 10 + StorageRequireEncryption = $True + SecurityRequireIntuneAppIntegrity = $True + RoleScopeTagIds = '0' + minAndroidSecurityPatchLevel = '2024-01-24' + securityRequiredAndroidSafetyNetEvaluationType = 'hardwareBacked' + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -87,36 +153,36 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential ScheduledActionsForRule = [CimInstance[]]@( - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } -ClientOnly) - ) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'block' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'pushNotification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'remoteLock' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'Notification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') + } -ClientOnly) + ) } Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { @@ -170,103 +236,36 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential ScheduledActionsForRule = [CimInstance[]]@( - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } -ClientOnly) - ) - } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Device Owner Device Compliance Policy' - Description = 'Different Value' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidDeviceOwnerCompliancePolicy' - PasswordMinimumLetterCharacters = 1 - PasswordMinimumLowerCaseCharacters = 1 - PasswordMinimumNonLetterCharacters = 1 - PasswordMinimumNumericCharacters = 1 - PasswordMinimumSymbolCharacters = 1 - PasswordMinimumUpperCaseCharacters = 1 - RequireNoPendingSystemUpdates = $true - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordCountToBlock = 10 - StorageRequireEncryption = $True - SecurityRequireIntuneAppIntegrity = $True - RoleScopeTagIds = '0' - minAndroidSecurityPatchLevel = '2024-01-24' - securityRequiredAndroidSafetyNetEvaluationType = 'hardwareBacked' - } - } + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'block' + gracePeriodHours = 1 # Updated property + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'pushNotification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'remoteLock' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'Notification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') + } -ClientOnly) + ) } } @@ -316,103 +315,36 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { securityRequiredAndroidSafetyNetEvaluationType = 'hardwareBacked' Credential = $Credential ScheduledActionsForRule = [CimInstance[]]@( - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - } -ClientOnly) - (New-CimInstance ` - -ClassName MSFT_scheduledActionConfigurations ` - -Property @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } -ClientOnly) - ) - } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Device Owner Device Compliance Policy' - Description = 'Test Android Device Owner Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidDeviceOwnerCompliancePolicy' - PasswordMinimumLetterCharacters = 1 - PasswordMinimumLowerCaseCharacters = 1 - PasswordMinimumNonLetterCharacters = 1 - PasswordMinimumNumericCharacters = 1 - PasswordMinimumSymbolCharacters = 1 - PasswordMinimumUpperCaseCharacters = 1 - RequireNoPendingSystemUpdates = $true - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordCountToBlock = 10 - StorageRequireEncryption = $True - SecurityRequireIntuneAppIntegrity = $True - RoleScopeTagIds = '0' - minAndroidSecurityPatchLevel = '2024-01-24' - securityRequiredAndroidSafetyNetEvaluationType = 'hardwareBacked' - } - } + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'block' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'pushNotification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'remoteLock' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + } -ClientOnly) + (New-CimInstance ` + -ClassName MSFT_scheduledActionConfigurations ` + -Property @{ + actionType = 'Notification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') + } -ClientOnly) + ) } } @@ -428,73 +360,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Device Owner Device Compliance Policy' - Description = 'Test Android Device Owner Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidDeviceOwnerCompliancePolicy' - PasswordMinimumLetterCharacters = 1 - PasswordMinimumLowerCaseCharacters = 1 - PasswordMinimumNonLetterCharacters = 1 - PasswordMinimumNumericCharacters = 1 - PasswordMinimumSymbolCharacters = 1 - PasswordMinimumUpperCaseCharacters = 1 - RequireNoPendingSystemUpdates = $true - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordCountToBlock = 10 - StorageRequireEncryption = $True - SecurityRequireIntuneAppIntegrity = $True - RoleScopeTagIds = '0' - minAndroidSecurityPatchLevel = '2024-01-24' - securityRequiredAndroidSafetyNetEvaluationType = 'hardwareBacked' - } - } - } } It 'Should return Present from the Get method' { @@ -518,73 +383,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Device Owner Device Compliance Policy' - Description = 'Test Android Device Owner Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidDeviceOwnerCompliancePolicy' - PasswordMinimumLetterCharacters = 1 - PasswordMinimumLowerCaseCharacters = 1 - PasswordMinimumNonLetterCharacters = 1 - PasswordMinimumNumericCharacters = 1 - PasswordMinimumSymbolCharacters = 1 - PasswordMinimumUpperCaseCharacters = 1 - RequireNoPendingSystemUpdates = $true - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordCountToBlock = 10 - StorageRequireEncryption = $True - SecurityRequireIntuneAppIntegrity = $True - RoleScopeTagIds = '0' - minAndroidSecurityPatchLevel = '2024-01-24' - securityRequiredAndroidSafetyNetEvaluationType = 'hardwareBacked' - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidWorkProfile.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidWorkProfile.Tests.ps1 index bb3ae2d788..2d761a2519 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidWorkProfile.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyAndroidWorkProfile.Tests.ps1 @@ -41,8 +41,84 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { + return @{ + DisplayName = 'Test Android Work Profile Device Compliance Policy' + Description = 'Test Android Work Profile Device Compliance Policy Description' + Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' + ScheduledActionsForRule =@( + @{ + ruleName = '' + scheduledActionConfigurations = @( + @{ + actionType = 'block' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @() + }, + @{ + actionType = 'pushNotification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @() + }, + @{ + actionType = 'remoteLock' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @() + }, + @{ + actionType = 'Notification' + gracePeriodHours = 0 + notificationTemplateId = '00000000-0000-0000-0000-000000000000' + notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') + } + ) + } + ) + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidWorkProfileCompliancePolicy' + PasswordRequired = $True + PasswordMinimumLength = 6 + PasswordRequiredType = 'DeviceDefault' + RequiredPasswordComplexity = 'low' + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordExpirationDays = 365 + PasswordPreviousPasswordBlockCount = 10 + PasswordSignInFailureCountBeforeFactoryReset = 11 + SecurityPreventInstallAppsFromUnknownSources = $True + SecurityDisableUsbDebugging = $True + SecurityRequireVerifyApps = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' + AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' + SecurityBlockJailbrokenDevices = $True + OsMinimumVersion = 7 + OsMaximumVersion = 11 + StorageRequireEncryption = $True + SecurityRequireSafetyNetAttestationBasicIntegrity = $True + SecurityRequireSafetyNetAttestationCertifiedDevice = $True + SecurityRequireGooglePlayServices = $True + SecurityRequireUpToDateSecurityProviders = $True + SecurityRequireCompanyPortalAppIntegrity = $True + RoleScopeTagIds = '0' + MinAndroidSecurityPatchLevel = "2024-01-01"; + SecurityRequiredAndroidSafetyNetEvaluationType = "hardwareBacked" + WorkProfileInactiveBeforeScreenLockInMinutes = 480 + WorkProfilePasswordExpirationInDays = 30 + WorkProfilePasswordMinimumLength = 12 + WorkProfilePasswordRequiredType = "atLeastNumeric" + WorkProfilePreviousPasswordBlockCount = 5 + WorkProfileRequiredPasswordComplexity = "high" + WorkProfileRequirePassword = $True + SecurityBlockDeviceAdministratorManagedDevices = $true + RestrictedApps = @('App1', 'App2', 'App3') + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -175,7 +251,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SecurityRequireCompanyPortalAppIntegrity = $True MinAndroidSecurityPatchLevel = "2024-01-01"; SecurityRequiredAndroidSafetyNetEvaluationType = "hardwareBacked" - WorkProfileInactiveBeforeScreenLockInMinutes = 480 + WorkProfileInactiveBeforeScreenLockInMinutes = 360 # Updated property WorkProfilePasswordExpirationInDays = 30 WorkProfilePasswordMinimumLength = 12 WorkProfilePasswordRequiredType = "atLeastNumeric" @@ -220,83 +296,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Work Profile Device Compliance Policy' - Description = 'Test Android Work Profile Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d47' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileCompliancePolicy' - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - RequiredPasswordComplexity = 'low' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordBlockCount = 10 - PasswordSignInFailureCountBeforeFactoryReset = 11 - SecurityPreventInstallAppsFromUnknownSources = $True - SecurityDisableUsbDebugging = $True - SecurityRequireVerifyApps = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityBlockJailbrokenDevices = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - StorageRequireEncryption = $True - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - SecurityRequireGooglePlayServices = $True - SecurityRequireUpToDateSecurityProviders = $True - SecurityRequireCompanyPortalAppIntegrity = $True - RoleScopeTagIds = '0' - MinAndroidSecurityPatchLevel = "2024-01-01"; - SecurityRequiredAndroidSafetyNetEvaluationType = "hardwareBacked" - WorkProfileInactiveBeforeScreenLockInMinutes = 480 - WorkProfilePasswordExpirationInDays = 30 - WorkProfilePasswordMinimumLength = 12 - WorkProfilePasswordRequiredType = "atLeastNumeric" - WorkProfilePreviousPasswordBlockCount = 5 - WorkProfileRequiredPasswordComplexity = "high" - WorkProfileRequirePassword = $True - SecurityBlockDeviceAdministratorManagedDevices = $true - RestrictedApps = @('App1', 'App2', 'App3') - } - } - } } It 'Should return Present from the Get method' { @@ -386,83 +385,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Work Profile Device Compliance Policy' - Description = 'Test Android Work Profile Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileCompliancePolicy' - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - RequiredPasswordComplexity = 'low' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordBlockCount = 10 - PasswordSignInFailureCountBeforeFactoryReset = 11 - SecurityPreventInstallAppsFromUnknownSources = $True - SecurityDisableUsbDebugging = $True - SecurityRequireVerifyApps = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityBlockJailbrokenDevices = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - StorageRequireEncryption = $True - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - SecurityRequireGooglePlayServices = $True - SecurityRequireUpToDateSecurityProviders = $True - SecurityRequireCompanyPortalAppIntegrity = $True - RoleScopeTagIds = '0' - MinAndroidSecurityPatchLevel = "2024-01-01"; - SecurityRequiredAndroidSafetyNetEvaluationType = "hardwareBacked" - WorkProfileInactiveBeforeScreenLockInMinutes = 480 - WorkProfilePasswordExpirationInDays = 30 - WorkProfilePasswordMinimumLength = 12 - WorkProfilePasswordRequiredType = "atLeastNumeric" - WorkProfilePreviousPasswordBlockCount = 5 - WorkProfileRequiredPasswordComplexity = "high" - WorkProfileRequirePassword = $True - SecurityBlockDeviceAdministratorManagedDevices = $true - RestrictedApps = @('App1', 'App2', 'App3') - } - } - } } It 'Should return true from the Test method' { @@ -534,74 +456,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Work Profile Device Compliance Policy' - Description = 'Test Android Work Profile Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileCompliancePolicy' - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - RequiredPasswordComplexity = 'low' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordBlockCount = 10 - PasswordSignInFailureCountBeforeFactoryReset = 11 - SecurityPreventInstallAppsFromUnknownSources = $True - SecurityDisableUsbDebugging = $True - SecurityRequireVerifyApps = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityBlockJailbrokenDevices = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - StorageRequireEncryption = $True - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - SecurityRequireGooglePlayServices = $True - SecurityRequireUpToDateSecurityProviders = $True - SecurityRequireCompanyPortalAppIntegrity = $True - RoleScopeTagIds = '0' - SecurityBlockDeviceAdministratorManagedDevices = $true - RestrictedApps = @('App1', 'App2', 'App3') - } - } - } } It 'Should return Present from the Get method' { @@ -625,73 +479,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test Android Device Compliance Policy' - Description = 'Test Android Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d46' - ScheduledActionsForRule =@( - @{ - ruleName = '' - scheduledActionConfigurations = @( - @{ - actionType = 'block' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'pushNotification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'remoteLock' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @() - }, - @{ - actionType = 'Notification' - gracePeriodHours = 0 - notificationTemplateId = '00000000-0000-0000-0000-000000000000' - notificationMessageCCList = @('00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000') - } - ) - } - ) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileCompliancePolicy' - PasswordRequired = $True - PasswordMinimumLength = 6 - PasswordRequiredType = 'DeviceDefault' - RequiredPasswordComplexity = 'low' - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordExpirationDays = 365 - PasswordPreviousPasswordBlockCount = 10 - PasswordSignInFailureCountBeforeFactoryReset = 11 - SecurityPreventInstallAppsFromUnknownSources = $True - SecurityDisableUsbDebugging = $True - SecurityRequireVerifyApps = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - AdvancedThreatProtectionRequiredSecurityLevel = 'Unavailable' - SecurityBlockJailbrokenDevices = $True - OsMinimumVersion = 7 - OsMaximumVersion = 11 - StorageRequireEncryption = $True - SecurityRequireSafetyNetAttestationBasicIntegrity = $True - SecurityRequireSafetyNetAttestationCertifiedDevice = $True - SecurityRequireGooglePlayServices = $True - SecurityRequireUpToDateSecurityProviders = $True - SecurityRequireCompanyPortalAppIntegrity = $True - SecurityBlockDeviceAdministratorManagedDevices = $true - RestrictedApps = @('App1', 'App2', 'App3') - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 index 7fe0748ddc..716fa56d6d 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 @@ -41,6 +41,34 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { + return @{ + DisplayName = 'MacOS DSC Policy' + Description = 'Test policy' + Id = 'd95e706d-c92c-410d-a132-09e0b1032dbd' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' + PasswordRequired = $False + PasswordBlockSimple = $False + PasswordExpirationDays = 365 + PasswordMinimumLength = 6 + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordPreviousPasswordBlockCount = 13 + PasswordMinimumCharacterSetCount = 1 + PasswordRequiredType = 'DeviceDefault' + OsMinimumVersion = 10 + OsMaximumVersion = 13 + SystemIntegrityProtectionEnabled = $False + DeviceThreatProtectionEnabled = $False + DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' + StorageRequireEncryption = $False + FirewallEnabled = $False + FirewallBlockAllIncoming = $False + FirewallEnableStealthMode = $False + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() @@ -113,7 +141,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PasswordPreviousPasswordBlockCount = 13 PasswordMinimumCharacterSetCount = 1 PasswordRequiredType = 'DeviceDefault' - OsMinimumVersion = 10 + OsMinimumVersion = 11 # Updated property OsMaximumVersion = 13 SystemIntegrityProtectionEnabled = $False DeviceThreatProtectionEnabled = $False @@ -125,35 +153,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'MacOS DSC Policy' - Description = 'Test policy with different value' - Id = 'd95e706d-c92c-410d-a132-09e0b1032dbd' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'DeviceDefault' - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = '0' - } - } - } } It 'Should return Present from the Get method' { @@ -196,37 +195,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'MacOS DSC Policy' - Description = 'Test policy' - Id = 'd95e706d-c92c-410d-a132-09e0b1032dbd' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'DeviceDefault' - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - } - } - } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { - return @() - } } It 'Should return true from the Test method' { @@ -259,35 +227,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'MacOS DSC Policy' - Description = 'Test policy' - Id = 'd95e706d-c92c-410d-a132-09e0b1032dbd' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'DeviceDefault' - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = '0' - } - } - } } It 'Should return Present from the Get method' { @@ -311,35 +250,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'MacOS DSC Policy' - Description = 'Test policy' - Id = 'd95e706d-c92c-410d-a132-09e0b1032dbd' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'DeviceDefault' - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = 'Unavailable' - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = '0' - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 index 6ef354a92c..20e0445eca 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 @@ -51,6 +51,50 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return @() } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { + return @{ + DisplayName = 'Windows 10 DSC Policy' + Description = 'Test policy' + Id = 'f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' + PasswordRequired = $False + PasswordBlockSimple = $False + PasswordRequiredToUnlockFromIdle = $True + PasswordMinutesOfInactivityBeforeLock = 15 + PasswordExpirationDays = 365 + PasswordMinimumLength = 6 + PasswordPreviousPasswordBlockCount = 13 + PasswordMinimumCharacterSetCount = 1 + PasswordRequiredType = 'Devicedefault' + RequireHealthyDeviceReport = $True + OsMinimumVersion = 10 + OsMaximumVersion = 10.19 + MobileOsMinimumVersion = 10 + MobileOsMaximumVersion = 10.19 + EarlyLaunchAntiMalwareDriverEnabled = $False + BitLockerEnabled = $False + SecureBootEnabled = $True + CodeIntegrityEnabled = $True + StorageRequireEncryption = $True + ActiveFirewallRequired = $True + DefenderEnabled = $True + DefenderVersion = '' + SignatureOutOfDate = $True + RtpEnabled = $True + AntivirusRequired = $True + AntiSpywareRequired = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'Medium' + ConfigurationManagerComplianceRequired = $False + TPMRequired = $False + DeviceCompliancePolicyScript = $null + ValidOperatingSystemBuildRanges = @() + RoleScopeTagIds = '0' + } + } + } + Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } @@ -134,7 +178,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Windows 10 DSC Policy' Description = 'Test policy' PasswordRequired = $False - PasswordBlockSimple = $False + PasswordBlockSimple = $True # Drift PasswordRequiredToUnlockFromIdle = $True PasswordMinutesOfInactivityBeforeLock = 15 PasswordExpirationDays = 365 @@ -168,50 +212,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Windows 10 DSC Policy' - Description = 'Test policy' - Id = 'f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $True; #Drift - PasswordRequiredToUnlockFromIdle = $True - PasswordMinutesOfInactivityBeforeLock = 15 - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'Devicedefault' - RequireHealthyDeviceReport = $True - OsMinimumVersion = 10 - OsMaximumVersion = 10.19 - MobileOsMinimumVersion = 10 - MobileOsMaximumVersion = 10.19 - EarlyLaunchAntiMalwareDriverEnabled = $False - BitLockerEnabled = $False - SecureBootEnabled = $True - CodeIntegrityEnabled = $True - StorageRequireEncryption = $True - ActiveFirewallRequired = $True - DefenderEnabled = $True - DefenderVersion = '' - SignatureOutOfDate = $True - RtpEnabled = $True - AntivirusRequired = $True - AntiSpywareRequired = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Medium' - ConfigurationManagerComplianceRequired = $False - TPMRequired = $False - DeviceCompliancePolicyScript = $null - ValidOperatingSystemBuildRanges = @() - RoleScopeTagIds = '0' - } - } - } } It 'Should return Present from the Get method' { @@ -268,50 +268,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Windows 10 DSC Policy' - Description = 'Test policy' - Id = 'f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordRequiredToUnlockFromIdle = $True - PasswordMinutesOfInactivityBeforeLock = 15 - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'Devicedefault' - RequireHealthyDeviceReport = $True - OsMinimumVersion = 10 - OsMaximumVersion = 10.19 - MobileOsMinimumVersion = 10 - MobileOsMaximumVersion = 10.19 - EarlyLaunchAntiMalwareDriverEnabled = $False - BitLockerEnabled = $False - SecureBootEnabled = $True - CodeIntegrityEnabled = $True - StorageRequireEncryption = $True - ActiveFirewallRequired = $True - DefenderEnabled = $True - DefenderVersion = '' - SignatureOutOfDate = $True - RtpEnabled = $True - AntivirusRequired = $True - AntiSpywareRequired = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Medium' - ConfigurationManagerComplianceRequired = $False - TPMRequired = $False - DeviceCompliancePolicyScript = $null - ValidOperatingSystemBuildRanges = @() - RoleScopeTagIds = '0' - } - } - } } It 'Should return true from the Test method' { @@ -359,50 +315,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Windows 10 DSC Policy' - Description = 'Test policy' - Id = 'f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordRequiredToUnlockFromIdle = $True - PasswordMinutesOfInactivityBeforeLock = 15 - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'Devicedefault' - RequireHealthyDeviceReport = $True - OsMinimumVersion = 10 - OsMaximumVersion = 10.19 - MobileOsMinimumVersion = 10 - MobileOsMaximumVersion = 10.19 - EarlyLaunchAntiMalwareDriverEnabled = $False - BitLockerEnabled = $False - SecureBootEnabled = $True - CodeIntegrityEnabled = $True - StorageRequireEncryption = $True - ActiveFirewallRequired = $True - DefenderEnabled = $True - DefenderVersion = '' - SignatureOutOfDate = $True - RtpEnabled = $True - AntivirusRequired = $True - AntiSpywareRequired = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Medium' - ConfigurationManagerComplianceRequired = $False - TPMRequired = $False - DeviceCompliancePolicyScript = $null - ValidOperatingSystemBuildRanges = @() - RoleScopeTagIds = '0' - } - } - } } It 'Should return Present from the Get method' { @@ -426,50 +338,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Windows 10 DSC Policy' - Description = 'Test policy' - Id = 'f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordRequiredToUnlockFromIdle = $True - PasswordMinutesOfInactivityBeforeLock = 15 - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = 'Devicedefault' - RequireHealthyDeviceReport = $True - OsMinimumVersion = 10 - OsMaximumVersion = 10.19 - MobileOsMinimumVersion = 10 - MobileOsMaximumVersion = 10.19 - EarlyLaunchAntiMalwareDriverEnabled = $False - BitLockerEnabled = $False - SecureBootEnabled = $True - CodeIntegrityEnabled = $True - StorageRequireEncryption = $True - ActiveFirewallRequired = $True - DefenderEnabled = $True - DefenderVersion = '' - SignatureOutOfDate = $True - RtpEnabled = $True - AntivirusRequired = $True - AntiSpywareRequired = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'Medium' - ConfigurationManagerComplianceRequired = $False - TPMRequired = $False - DeviceCompliancePolicyScript = $null - ValidOperatingSystemBuildRanges = @() - RoleScopeTagIds = '0' - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 index 663821e551..9f0f55cf20 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 @@ -39,8 +39,33 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { + return @{ + DisplayName = 'Test iOS Device Compliance Policy' + Description = 'Test iOS Device Compliance Policy Description' + Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' + AdditionalProperties = @{ + PasscodeBlockSimple = $True + PasscodeExpirationDays = 365 + PasscodeMinimumLength = 6 + PasscodeMinutesOfInactivityBeforeLock = 5 + PasscodePreviousPasscodeBlockCount = 3 + PasscodeMinimumCharacterSetCount = 2 + PasscodeRequiredType = 'numeric' + PasscodeRequired = $True + OsMinimumVersion = 10 + OsMaximumVersion = 12 + SecurityBlockJailbrokenDevices = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'medium' + ManagedEmailProfileRequired = $True + RoleScopeTagIds = '0' + '@odata.type' = '#microsoft.graph.iosCompliancePolicy' + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -108,7 +133,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PasscodeMinimumCharacterSetCount = 2 PasscodeRequiredType = 'numeric' PasscodeRequired = $True - OsMinimumVersion = 10 + OsMinimumVersion = 11 # Updated property OsMaximumVersion = 12 SecurityBlockJailbrokenDevices = $True DeviceThreatProtectionEnabled = $True @@ -117,32 +142,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test iOS Device Compliance Policy' - Description = 'Different Value' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - AdditionalProperties = @{ - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = '0' - '@odata.type' = '#microsoft.graph.iosCompliancePolicy' - } - } - } } It 'Should return Present from the Get method' { @@ -181,32 +180,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test iOS Device Compliance Policy' - Description = 'Test iOS Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - AdditionalProperties = @{ - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = '0' - '@odata.type' = '#microsoft.graph.iosCompliancePolicy' - } - } - } } It 'Should return true from the Test method' { @@ -236,32 +209,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test iOS Device Compliance Policy' - Description = 'Test iOS Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - AdditionalProperties = @{ - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = '0' - '@odata.type' = '#microsoft.graph.iosCompliancePolicy' - } - } - } } It 'Should return Present from the Get method' { @@ -285,32 +232,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicy -MockWith { - return @{ - DisplayName = 'Test iOS Device Compliance Policy' - Description = 'Test iOS Device Compliance Policy Description' - Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - AdditionalProperties = @{ - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = '0' - '@odata.type' = '#microsoft.graph.iosCompliancePolicy' - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 index 2e08ff437b..31ac311717 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 @@ -49,6 +49,59 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.GroupPolicyConfiguration' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + PolicyConfigurationIngestionType = 'unknown' + } + } + + Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValue -MockWith { + return @( + @{ + ConfigurationType = 'fakeConfigurationType' + Enabled = $true + Id = 'fakeDefinitionValueId' + PolicyConfigurationIngestionType = 'unknown' + } + ) + } + + Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValueDefinition -MockWith { + return @{ + Id = '37ab8b81-47d7-46d8-8b99-81d9cecdcce9' + DisplayName = 'Configure allowed app/extension types' + CategoryPath = '\Google\Google Chrome\Extensions' + PolicyType = 'admxIngested' + SupportedOn = 'Microsoft Windows 7 or later' + ClassType = 'machine' + } + } + + Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValuePresentationValue -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.groupPolicyPresentationValueList' + values = @( + @{ + name = "`"hosted_app`"" + } + ) + } + Id = 'fakePresentationId' + Presentation = @{ + Id = 'fakePresentationDefinitionId' + Label = 'fakePresentationLabel' + } + PolicyConfigurationIngestionType = 'unknown' + } + } + Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationAssignment -MockWith { return @(@{ target = @{ @@ -180,59 +233,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.GroupPolicyConfiguration' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - PolicyConfigurationIngestionType = 'unknown' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValue -MockWith { - return @( - @{ - ConfigurationType = 'fakeConfigurationType' - Enabled = $true - Id = 'fakeDefinitionValueId' - PolicyConfigurationIngestionType = 'unknown' - } - ) - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValueDefinition -MockWith { - return @{ - Id = '37ab8b81-47d7-46d8-8b99-81d9cecdcce9' - DisplayName = 'Configure allowed app/extension types' - CategoryPath = '\Google\Google Chrome\Extensions' - PolicyType = 'admxIngested' - SupportedOn = 'Microsoft Windows 7 or later' - ClassType = 'machine' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValuePresentationValue -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.groupPolicyPresentationValueList' - values = @( - @{ - name = "`"hosted_app`"" - } - ) - } - Id = 'fakePresentationId' - Presentation = @{ - Id = 'fakePresentationDefinitionId' - Label = 'fakePresentationLabel' - } - PolicyConfigurationIngestionType = 'unknown' - } - } } It 'Should return Values from the Get method' { @@ -248,6 +248,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Should -Invoke -CommandName Remove-MgBetaDeviceManagementGroupPolicyConfiguration -Exactly 1 } } + Context -Name 'The IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10 Exists and Values are already in the desired state' -Fixture { BeforeAll { $testParams = @{ @@ -292,57 +293,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.GroupPolicyConfiguration' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - PolicyConfigurationIngestionType = 'unknown' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValue -MockWith { - return @( - @{ - Enabled = $true - Id = 'fakeDefinitionValueId' - ConfigurationType = 'policy' - } - ) - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValueDefinition -MockWith { - return @{ - Id = '37ab8b81-47d7-46d8-8b99-81d9cecdcce9' - DisplayName = 'Configure allowed app/extension types' - CategoryPath = '\Google\Google Chrome\Extensions' - PolicyType = 'admxIngested' - SupportedOn = 'Microsoft Windows 7 or later' - ClassType = 'machine' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValuePresentationValue -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.groupPolicyPresentationValueList' - values = @( - @{ - name = "`"hosted_app`"" - } - ) - } - Id = 'fakePresentationId' - Presentation = @{ - Id = 'fakePresentationDefinitionId' - Label = 'fakePresentationDefinitionLabel' - } - } - } } It 'Should return true from the Test method' { @@ -374,7 +324,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { presentationDefinitionLabel = 'fakePresentationDefinitionLabel' KeyValuePairValues = [CimInstance[]]@( (New-CimInstance -ClassName MSFT_IntuneGroupPolicyDefinitionValuePresentationValueKeyValuePair -Property @{ - Name = 'hosted_app' + Name = 'hosted_app_new' # Updated property } -ClientOnly) ) Id = 'fakePresentationId' @@ -394,57 +344,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.GroupPolicyConfiguration' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - PolicyConfigurationIngestionType = 'unknown' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValue -MockWith { - return @( - @{ - Enabled = $true - Id = 'fakeDefinitionValueId' - ConfigurationType = 'policy' - } - ) - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValueDefinition -MockWith { - return @{ - Id = '37ab8b81-47d7-46d8-8b99-81d9cecdcce9' - DisplayName = 'Configure allowed app/extension types' - CategoryPath = '\Google\Google Chrome\Extensions' - PolicyType = 'admxIngested' - SupportedOn = 'Microsoft Windows 7 or later' - ClassType = 'machine' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValuePresentationValue -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.groupPolicyPresentationValueList' - values = @( - @{ - name = "`"user_script`"" - } - ) - } - Id = 'fakePresentationId' - Presentation = @{ - Id = 'fakePresentationDefinitionId' - Label = 'fakePresentationDefinitionLabel' - } - } - } } It 'Should return Values from the Get method' { @@ -470,59 +369,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfiguration -MockWith { - return @(@{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.GroupPolicyConfiguration' - } - Description = 'FakeStringValue' - DisplayName = 'AdministrativeTemplatePolicyWindows10' - Id = 'FakeStringValue' - PolicyConfigurationIngestionType = 'unknown' - }) - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValue -MockWith { - return @( - @{ - ConfigurationType = 'fakeConfigurationType' - Enabled = $true - Id = 'fakeDefinitionValueId' - PolicyConfigurationIngestionType = 'unknown' - } - ) - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValueDefinition -MockWith { - return @{ - Id = '37ab8b81-47d7-46d8-8b99-81d9cecdcce9' - DisplayName = 'Configure allowed app/extension types' - CategoryPath = '\Google\Google Chrome\Extensions' - PolicyType = 'admxIngested' - SupportedOn = 'Microsoft Windows 7 or later' - ClassType = 'machine' - } - } - - Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValuePresentationValue -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.groupPolicyPresentationValueList' - values = @( - @{ - name = "`"hosted_app`"" - } - ) - } - Id = 'fakePresentationId' - Presentation = @{ - Id = 'fakePresentationDefinitionId' - Label = 'fakePresentationLabel' - } - PolicyConfigurationIngestionType = 'unknown' - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 index 7a28a01039..2ee0f5969c 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyWindows10.Tests.ps1 @@ -42,6 +42,29 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = "#microsoft.graph.windows10CustomConfiguration" + omaSettings = @( + @{ + fileName = "FakeStringValue" + description = "FakeStringValue" + omaUri = "FakeStringValue" + '@odata.type' = "#microsoft.graph.omaSettingBase64" + secretReferenceValueId = "FakeStringValue" + value = "FakeStringValue" + isEncrypted = $True + displayName = "FakeStringValue" + } + ) + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + } + } + Mock -CommandName New-M365DSCConnection -MockWith { return "Credentials" } @@ -113,29 +136,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = "Absent" Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windows10CustomConfiguration" - omaSettings = @( - @{ - fileName = "FakeStringValue" - description = "FakeStringValue" - omaUri = "FakeStringValue" - '@odata.type' = "#microsoft.graph.omaSettingBase64" - secretReferenceValueId = "FakeStringValue" - value = "FakeStringValue" - isEncrypted = $True - displayName = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It "Should return Values from the Get method" { @@ -172,29 +172,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = "Present" Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windows10CustomConfiguration" - omaSettings = @( - @{ - fileName = "FakeStringValue" - description = "FakeStringValue" - omaUri = "FakeStringValue" - '@odata.type' = "#microsoft.graph.omaSettingBase64" - secretReferenceValueId = "FakeStringValue" - value = "FakeStringValue" - isEncrypted = $True - displayName = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } @@ -216,7 +193,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { omaUri = "FakeStringValue" odataType = "#microsoft.graph.omaSettingBase64" secretReferenceValueId = "FakeStringValue" - value = "FakeStringValue" + value = "FakeStringValue2" # Updated property isEncrypted = $True displayName = "FakeStringValue" } -ClientOnly) @@ -224,28 +201,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = "Present" Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windows10CustomConfiguration" - omaSettings = @( - @{ - '@odata.type' = "#microsoft.graph.omaSettingBase64" - description = "FakeStringValue" - fileName = "FakeStringValue" - omaUri = "FakeStringValue" - secretReferenceValueId = "FakeStringValue" - value = "FakeStringValue" - displayName = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It "Should return Values from the Get method" { @@ -269,30 +224,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windows10CustomConfiguration" - omaSettings = @( - @{ - fileName = "FakeStringValue" - description = "FakeStringValue" - omaUri = "FakeStringValue" - '@odata.type' = "#microsoft.graph.omaSettingBase64" - secretReferenceValueId = "FakeStringValue" - value = "FakeStringValue" - isEncrypted = $True - displayName = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } + It "Should Reverse Engineer resource from the Export method" { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 index 2a204e8702..b59f50f0ba 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 @@ -39,6 +39,20 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' + Description = 'Different Value' + Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' + AdditionalProperties = @{ + Payload = 'PHJvb3Q+PC9yb290Pg==' + PayloadFileName = 'simple.xml' + PayloadName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' + '@odata.type' = '#microsoft.graph.iosCustomConfiguration' + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() @@ -88,27 +102,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { BeforeAll { $testParams = @{ DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - Description = 'Test IntuneDeviceConfigurationCustomPolicyiOS Description' + Description = 'Updated description' # Updated property Payload = 'PHJvb3Q+PC9yb290Pg==' PayloadFileName = 'simple.xml' PayloadName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - Description = 'Different Value' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - Payload = 'PHJvb3Q+PC9yb290Pg==' - PayloadFileName = 'simple.xml' - PayloadName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - '@odata.type' = '#microsoft.graph.iosCustomConfiguration' - } - } - } } It 'Should return Present from the Get method' { @@ -137,20 +137,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - Description = 'Test IntuneDeviceConfigurationCustomPolicyiOS Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - Payload = 'PHJvb3Q+PC9yb290Pg==' - PayloadFileName = 'simple.xml' - PayloadName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - '@odata.type' = '#microsoft.graph.iosCustomConfiguration' - } - } - } } It 'Should return true from the Test method' { @@ -169,20 +155,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - Description = 'Test IntuneDeviceConfigurationCustomPolicyiOS Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - Payload = 'PHJvb3Q+PC9yb290Pg==' - PayloadFileName = 'simple.xml' - PayloadName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - '@odata.type' = '#microsoft.graph.iosCustomConfiguration' - } - } - } } It 'Should return Present from the Get method' { @@ -206,20 +178,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - Description = 'Test IntuneDeviceConfigurationCustomPolicyiOS Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - Payload = 'PHJvb3Q+PC9yb290Pg==' - PayloadFileName = 'simple.xml' - PayloadName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - '@odata.type' = '#microsoft.graph.iosCustomConfiguration' - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.Tests.ps1 index c5515a2234..4cb2fa3a7e 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDefenderForEndpointOnboardingPolicyWindows10.Tests.ps1 @@ -36,6 +36,25 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration" + advancedThreatProtectionOffboardingBlob = "FakeStringValue" + allowSampleSharing = $True + advancedThreatProtectionOffboardingFilename = "FakeStringValue" + enableExpeditedTelemetryReporting = $True + advancedThreatProtectionAutoPopulateOnboardingBlob = $True + advancedThreatProtectionOnboardingBlob = "FakeStringValue" + advancedThreatProtectionOnboardingFilename = "FakeStringValue" + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + + } + } + Mock -CommandName New-M365DSCConnection -MockWith { return "Credentials" } @@ -101,25 +120,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration" - advancedThreatProtectionOffboardingBlob = "FakeStringValue" - allowSampleSharing = $True - advancedThreatProtectionOffboardingFilename = "FakeStringValue" - enableExpeditedTelemetryReporting = $True - advancedThreatProtectionAutoPopulateOnboardingBlob = $True - advancedThreatProtectionOnboardingBlob = "FakeStringValue" - advancedThreatProtectionOnboardingFilename = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -151,25 +151,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration" - advancedThreatProtectionOffboardingBlob = "FakeStringValue" - allowSampleSharing = $True - advancedThreatProtectionOffboardingFilename = "FakeStringValue" - enableExpeditedTelemetryReporting = $True - advancedThreatProtectionAutoPopulateOnboardingBlob = $True - advancedThreatProtectionOnboardingBlob = "FakeStringValue" - advancedThreatProtectionOnboardingFilename = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } @@ -186,7 +167,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { AdvancedThreatProtectionOffboardingFilename = "FakeStringValue" AdvancedThreatProtectionOnboardingBlob = "FakeStringValue" AdvancedThreatProtectionOnboardingFilename = "FakeStringValue" - AllowSampleSharing = $True + AllowSampleSharing = $False # Updated property Description = "FakeStringValue" DisplayName = "FakeStringValue" EnableExpeditedTelemetryReporting = $True @@ -194,21 +175,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - advancedThreatProtectionOffboardingBlob = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration" - advancedThreatProtectionOffboardingFilename = "FakeStringValue" - advancedThreatProtectionOnboardingBlob = "FakeStringValue" - advancedThreatProtectionOnboardingFilename = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -232,26 +198,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration" - advancedThreatProtectionOffboardingBlob = "FakeStringValue" - allowSampleSharing = $True - advancedThreatProtectionOffboardingFilename = "FakeStringValue" - enableExpeditedTelemetryReporting = $True - advancedThreatProtectionAutoPopulateOnboardingBlob = $True - advancedThreatProtectionOnboardingBlob = "FakeStringValue" - advancedThreatProtectionOnboardingFilename = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 index 90d9b9390f..6fb3e1768a 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.Tests.ps1 @@ -42,6 +42,55 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + cacheServerForegroundDownloadFallbackToHttpDelayInSeconds = 25 + maximumCacheAgeInDays = 25 + cacheServerHostNames = @('FakeStringValue') + groupIdSource = @{ + groupIdCustom = 'FakeStringValue' + groupIdSourceOption = 'notConfigured' + '@odata.type' = '#microsoft.graph.deliveryOptimizationGroupIdCustom' + } + vpnPeerCaching = 'notConfigured' + minimumFileSizeToCacheInMegabytes = 25 + maximumCacheSize = @{ + '@odata.type' = '#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute' + maximumCacheSizePercentage = 25 + } + '@odata.type' = '#microsoft.graph.windowsDeliveryOptimizationConfiguration' + minimumBatteryPercentageAllowedToUpload = 25 + minimumRamAllowedToPeerInGigabytes = 25 + cacheServerBackgroundDownloadFallbackToHttpDelayInSeconds = 25 + deliveryOptimizationMode = 'userDefined' + modifyCacheLocation = 'FakeStringValue' + bandwidthMode = @{ + maximumBackgroundBandwidthPercentage = 25 + bandwidthForegroundPercentageHours = @{ + bandwidthBeginBusinessHours = 25 + bandwidthPercentageOutsideBusinessHours = 25 + bandwidthPercentageDuringBusinessHours = 25 + bandwidthEndBusinessHours = 25 + } + bandwidthBackgroundPercentageHours = @{ + bandwidthBeginBusinessHours = 25 + bandwidthPercentageOutsideBusinessHours = 25 + bandwidthPercentageDuringBusinessHours = 25 + bandwidthEndBusinessHours = 25 + } + maximumForegroundBandwidthPercentage = 25 + '@odata.type' = '#microsoft.graph.deliveryOptimizationBandwidthAbsolute' + } + minimumDiskSizeAllowedToPeerInGigabytes = 25 + restrictPeerSelectionBy = 'notConfigured' + } + description = 'FakeStringValue' + displayName = 'FakeStringValue' + id = 'FakeStringValue' + } + } + Mock -CommandName New-M365DSCConnection -MockWith { return 'Credentials' } @@ -169,55 +218,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - cacheServerForegroundDownloadFallbackToHttpDelayInSeconds = 25 - maximumCacheAgeInDays = 25 - cacheServerHostNames = @('FakeStringValue') - groupIdSource = @{ - groupIdCustom = 'FakeStringValue' - groupIdSourceOption = 'notConfigured' - '@odata.type' = '#microsoft.graph.deliveryOptimizationGroupIdCustom' - } - vpnPeerCaching = 'notConfigured' - minimumFileSizeToCacheInMegabytes = 25 - maximumCacheSize = @{ - '@odata.type' = '#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute' - maximumCacheSizePercentage = 25 - } - '@odata.type' = '#microsoft.graph.windowsDeliveryOptimizationConfiguration' - minimumBatteryPercentageAllowedToUpload = 25 - minimumRamAllowedToPeerInGigabytes = 25 - cacheServerBackgroundDownloadFallbackToHttpDelayInSeconds = 25 - deliveryOptimizationMode = 'userDefined' - modifyCacheLocation = 'FakeStringValue' - bandwidthMode = @{ - maximumBackgroundBandwidthPercentage = 25 - bandwidthForegroundPercentageHours = @{ - bandwidthBeginBusinessHours = 25 - bandwidthPercentageOutsideBusinessHours = 25 - bandwidthPercentageDuringBusinessHours = 25 - bandwidthEndBusinessHours = 25 - } - bandwidthBackgroundPercentageHours = @{ - bandwidthBeginBusinessHours = 25 - bandwidthPercentageOutsideBusinessHours = 25 - bandwidthPercentageDuringBusinessHours = 25 - bandwidthEndBusinessHours = 25 - } - maximumForegroundBandwidthPercentage = 25 - '@odata.type' = '#microsoft.graph.deliveryOptimizationBandwidthAbsolute' - } - minimumDiskSizeAllowedToPeerInGigabytes = 25 - restrictPeerSelectionBy = 'notConfigured' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -280,55 +280,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - cacheServerForegroundDownloadFallbackToHttpDelayInSeconds = 25 - maximumCacheAgeInDays = 25 - cacheServerHostNames = @('FakeStringValue') - groupIdSource = @{ - groupIdCustom = 'FakeStringValue' - groupIdSourceOption = 'notConfigured' - '@odata.type' = '#microsoft.graph.deliveryOptimizationGroupIdCustom' - } - vpnPeerCaching = 'notConfigured' - minimumFileSizeToCacheInMegabytes = 25 - maximumCacheSize = @{ - '@odata.type' = '#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute' - maximumCacheSizePercentage = 25 - } - '@odata.type' = '#microsoft.graph.windowsDeliveryOptimizationConfiguration' - minimumBatteryPercentageAllowedToUpload = 25 - minimumRamAllowedToPeerInGigabytes = 25 - cacheServerBackgroundDownloadFallbackToHttpDelayInSeconds = 25 - deliveryOptimizationMode = 'userDefined' - modifyCacheLocation = 'FakeStringValue' - bandwidthMode = @{ - maximumBackgroundBandwidthPercentage = 25 - bandwidthForegroundPercentageHours = @{ - bandwidthBeginBusinessHours = 25 - bandwidthPercentageOutsideBusinessHours = 25 - bandwidthPercentageDuringBusinessHours = 25 - bandwidthEndBusinessHours = 25 - } - bandwidthBackgroundPercentageHours = @{ - bandwidthBeginBusinessHours = 25 - bandwidthPercentageOutsideBusinessHours = 25 - bandwidthPercentageDuringBusinessHours = 25 - bandwidthEndBusinessHours = 25 - } - maximumForegroundBandwidthPercentage = 25 - '@odata.type' = '#microsoft.graph.deliveryOptimizationBandwidthAbsolute' - } - minimumDiskSizeAllowedToPeerInGigabytes = 25 - restrictPeerSelectionBy = 'notConfigured' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } @@ -374,7 +325,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { odataType = '#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute' maximumCacheSizePercentage = 25 } -ClientOnly) - minimumBatteryPercentageAllowedToUpload = 25 + minimumBatteryPercentageAllowedToUpload = 7 # Updated property minimumDiskSizeAllowedToPeerInGigabytes = 25 minimumFileSizeToCacheInMegabytes = 25 minimumRamAllowedToPeerInGigabytes = 25 @@ -384,55 +335,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - cacheServerForegroundDownloadFallbackToHttpDelayInSeconds = 7 - maximumCacheAgeInDays = 7 - cacheServerHostNames = @('FakeStringValue') - groupIdSource = @{ - groupIdCustom = 'FakeStringValue' - groupIdSourceOption = 'notConfigured' - '@odata.type' = '#microsoft.graph.deliveryOptimizationGroupIdCustom' - } - vpnPeerCaching = 'notConfigured' - minimumFileSizeToCacheInMegabytes = 7 - maximumCacheSize = @{ - '@odata.type' = '#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute' - maximumCacheSizePercentage = 7 - } - '@odata.type' = '#microsoft.graph.windowsDeliveryOptimizationConfiguration' - minimumBatteryPercentageAllowedToUpload = 7 - minimumRamAllowedToPeerInGigabytes = 7 - cacheServerBackgroundDownloadFallbackToHttpDelayInSeconds = 7 - deliveryOptimizationMode = 'userDefined' - modifyCacheLocation = 'FakeStringValue' - bandwidthMode = @{ - maximumBackgroundBandwidthPercentage = 7 - bandwidthForegroundPercentageHours = @{ - bandwidthBeginBusinessHours = 7 - bandwidthPercentageOutsideBusinessHours = 7 - bandwidthPercentageDuringBusinessHours = 7 - bandwidthEndBusinessHours = 7 - } - bandwidthBackgroundPercentageHours = @{ - bandwidthBeginBusinessHours = 7 - bandwidthPercentageOutsideBusinessHours = 7 - bandwidthPercentageDuringBusinessHours = 7 - bandwidthEndBusinessHours = 7 - } - maximumForegroundBandwidthPercentage = 7 - '@odata.type' = '#microsoft.graph.deliveryOptimizationBandwidthAbsolute' - } - minimumDiskSizeAllowedToPeerInGigabytes = 7 - restrictPeerSelectionBy = 'notConfigured' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -456,56 +358,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - cacheServerForegroundDownloadFallbackToHttpDelayInSeconds = 25 - maximumCacheAgeInDays = 25 - cacheServerHostNames = @('FakeStringValue') - groupIdSource = @{ - groupIdCustom = 'FakeStringValue' - groupIdSourceOption = 'notConfigured' - '@odata.type' = '#microsoft.graph.deliveryOptimizationGroupIdCustom' - } - vpnPeerCaching = 'notConfigured' - minimumFileSizeToCacheInMegabytes = 25 - maximumCacheSize = @{ - '@odata.type' = '#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute' - maximumCacheSizePercentage = 25 - } - '@odata.type' = '#microsoft.graph.windowsDeliveryOptimizationConfiguration' - minimumBatteryPercentageAllowedToUpload = 25 - minimumRamAllowedToPeerInGigabytes = 25 - cacheServerBackgroundDownloadFallbackToHttpDelayInSeconds = 25 - deliveryOptimizationMode = 'userDefined' - modifyCacheLocation = 'FakeStringValue' - bandwidthMode = @{ - maximumBackgroundBandwidthPercentage = 25 - bandwidthForegroundPercentageHours = @{ - bandwidthBeginBusinessHours = 25 - bandwidthPercentageOutsideBusinessHours = 25 - bandwidthPercentageDuringBusinessHours = 25 - bandwidthEndBusinessHours = 25 - } - bandwidthBackgroundPercentageHours = @{ - bandwidthBeginBusinessHours = 25 - bandwidthPercentageOutsideBusinessHours = 25 - bandwidthPercentageDuringBusinessHours = 25 - bandwidthEndBusinessHours = 25 - } - maximumForegroundBandwidthPercentage = 25 - '@odata.type' = '#microsoft.graph.deliveryOptimizationBandwidthAbsolute' - } - minimumDiskSizeAllowedToPeerInGigabytes = 25 - restrictPeerSelectionBy = 'notConfigured' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 index 91bbba79ca..b42b6dbef9 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationDomainJoinPolicyWindows10.Tests.ps1 @@ -42,6 +42,21 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + computerNameStaticPrefix = "FakeStringValue" + computerNameSuffixRandomCharCount = 25 + activeDirectoryDomainName = "FakeStringValue" + '@odata.type' = "#microsoft.graph.windowsDomainJoinConfiguration" + organizationalUnit = "FakeStringValue" + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + } + } + Mock -CommandName New-M365DSCConnection -MockWith { return "Credentials" } @@ -101,21 +116,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - computerNameStaticPrefix = "FakeStringValue" - computerNameSuffixRandomCharCount = 25 - activeDirectoryDomainName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsDomainJoinConfiguration" - organizationalUnit = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -144,24 +144,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - computerNameStaticPrefix = "FakeStringValue" - computerNameSuffixRandomCharCount = 25 - activeDirectoryDomainName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsDomainJoinConfiguration" - organizationalUnit = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -172,7 +156,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ ActiveDirectoryDomainName = "FakeStringValue" ComputerNameStaticPrefix = "FakeStringValue" - ComputerNameSuffixRandomCharCount = 25 + ComputerNameSuffixRandomCharCount = 7 # Updated property Description = "FakeStringValue" DisplayName = "FakeStringValue" Id = "FakeStringValue" @@ -180,21 +164,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - computerNameStaticPrefix = "FakeStringValue" - computerNameSuffixRandomCharCount = 7 - activeDirectoryDomainName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsDomainJoinConfiguration" - organizationalUnit = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -218,22 +187,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - computerNameStaticPrefix = "FakeStringValue" - computerNameSuffixRandomCharCount = 25 - activeDirectoryDomainName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsDomainJoinConfiguration" - organizationalUnit = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEmailProfilePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEmailProfilePolicyWindows10.Tests.ps1 index 5d699ec0fe..2f2247118b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEmailProfilePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEmailProfilePolicyWindows10.Tests.ps1 @@ -41,6 +41,30 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + requireSsl = $True + '@odata.type' = "#microsoft.graph.windows10EasEmailProfileConfiguration" + accountName = "FakeStringValue" + hostName = "FakeStringValue" + syncContacts = $True + syncTasks = $True + emailSyncSchedule = "userDefined" + emailAddressSource = "userPrincipalName" + durationOfEmailToSync = "userDefined" + syncCalendar = $True + customDomainName = "FakeStringValue" + userDomainNameSource = "fullDomainName" + usernameAADSource = "userPrincipalName" + usernameSource = "userPrincipalName" + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -113,30 +137,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - requireSsl = $True - '@odata.type' = "#microsoft.graph.windows10EasEmailProfileConfiguration" - accountName = "FakeStringValue" - hostName = "FakeStringValue" - syncContacts = $True - syncTasks = $True - emailSyncSchedule = "userDefined" - emailAddressSource = "userPrincipalName" - durationOfEmailToSync = "userDefined" - syncCalendar = $True - customDomainName = "FakeStringValue" - userDomainNameSource = "fullDomainName" - usernameAADSource = "userPrincipalName" - usernameSource = "userPrincipalName" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -174,30 +174,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - requireSsl = $True - '@odata.type' = "#microsoft.graph.windows10EasEmailProfileConfiguration" - accountName = "FakeStringValue" - hostName = "FakeStringValue" - syncContacts = $True - syncTasks = $True - emailSyncSchedule = "userDefined" - emailAddressSource = "userPrincipalName" - durationOfEmailToSync = "userDefined" - syncCalendar = $True - customDomainName = "FakeStringValue" - userDomainNameSource = "fullDomainName" - usernameAADSource = "userPrincipalName" - usernameSource = "userPrincipalName" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } @@ -218,7 +194,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { EmailSyncSchedule = "userDefined" HostName = "FakeStringValue" Id = "FakeStringValue" - RequireSsl = $True + RequireSsl = $False # Updated property SyncCalendar = $True SyncContacts = $True SyncTasks = $True @@ -228,26 +204,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.windows10EasEmailProfileConfiguration" - accountName = "FakeStringValue" - hostName = "FakeStringValue" - emailSyncSchedule = "userDefined" - emailAddressSource = "userPrincipalName" - durationOfEmailToSync = "userDefined" - customDomainName = "FakeStringValue" - userDomainNameSource = "fullDomainName" - usernameAADSource = "userPrincipalName" - usernameSource = "userPrincipalName" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -271,31 +227,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - requireSsl = $True - '@odata.type' = "#microsoft.graph.windows10EasEmailProfileConfiguration" - accountName = "FakeStringValue" - hostName = "FakeStringValue" - syncContacts = $True - syncTasks = $True - emailSyncSchedule = "userDefined" - emailAddressSource = "userPrincipalName" - durationOfEmailToSync = "userDefined" - syncCalendar = $True - customDomainName = "FakeStringValue" - userDomainNameSource = "fullDomainName" - usernameAADSource = "userPrincipalName" - usernameSource = "userPrincipalName" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 index 582a904925..775defafdd 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationEndpointProtectionPolicyWindows10.Tests.ps1 @@ -46,6 +46,637 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + localSecurityOptionsClearVirtualMemoryPageFile = $True + defenderSecurityCenterDisableHardwareUI = $True + applicationGuardAllowPrintToNetworkPrinters = $True + defenderFilesAndFoldersToExclude = @("FakeStringValue") + defenderAllowScanArchiveFiles = $True + firewallIPSecExemptionsNone = $True + bitLockerAllowStandardUserEncryption = $True + localSecurityOptionsAllowRemoteCallsToSecurityAccountsManager = "FakeStringValue" + defenderScheduledScanDay = "userDefined" + firewallPacketQueueingMethod = "deviceDefault" + defenderUntrustedUSBProcessType = "userDefined" + defenderNetworkProtectionType = "userDefined" + defenderProcessCreation = "userDefined" + applicationGuardEnabledOptions = "notConfigured" + defenderOfficeAppsLaunchChildProcess = "userDefined" + defenderAllowRealTimeMonitoring = $True + firewallIPSecExemptionsAllowNeighborDiscovery = $True + defenderUntrustedExecutable = "userDefined" + defenderGuardMyFoldersType = "userDefined" + localSecurityOptionsInformationDisplayedOnLockScreen = "notConfigured" + defenderScheduledQuickScanTime = "00:00:00" + localSecurityOptionsUseAdminApprovalMode = $True + applicationGuardAllowCameraMicrophoneRedirection = $True + applicationGuardAllowPrintToXPS = $True + deviceGuardLaunchSystemGuard = "notConfigured" + defenderScanDirection = "monitorAllFiles" + userRightsIncreaseSchedulingPriority = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + deviceGuardEnableVirtualizationBasedSecurity = $True + defenderBlockEndUserAccess = $True + firewallIPSecExemptionsAllowRouterDiscovery = $True + xboxServicesLiveGameSaveServiceStartupMode = "manual" + bitLockerFixedDrivePolicy = @{ + RecoveryOptions = @{ + RecoveryInformationToStore = "passwordAndKey" + HideRecoveryOptions = $True + BlockDataRecoveryAgent = $True + RecoveryKeyUsage = "blocked" + EnableBitLockerAfterRecoveryInformationToStore = $True + EnableRecoveryInformationSaveToStore = $True + RecoveryPasswordUsage = "blocked" + } + RequireEncryptionForWriteAccess = $True + encryptionMethod = "aesCbc128" + } + userRightsCreateSymbolicLinks = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + applicationGuardBlockFileTransfer = "notConfigured" + defenderCheckForSignaturesBeforeRunningScan = $True + userRightsRemoteShutdown = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + firewallRules = @( + @{ + localAddressRanges = @("FakeStringValue") + action = "notConfigured" + description = "FakeStringValue" + interfaceTypes = "notConfigured" + remotePortRanges = @("FakeStringValue") + displayName = "FakeStringValue" + filePath = "FakeStringValue" + localUserAuthorizations = "FakeStringValue" + protocol = 25 + trafficDirection = "notConfigured" + remoteAddressRanges = @("FakeStringValue") + packageFamilyName = "FakeStringValue" + serviceName = "FakeStringValue" + localPortRanges = @("FakeStringValue") + profileTypes = "notConfigured" + edgeTraversal = "notConfigured" + } + ) + defenderSignatureUpdateIntervalInHours = 25 + defenderEnableLowCpuPriority = $True + localSecurityOptionsAllowAnonymousEnumerationOfSAMAccountsAndShares = $True + defenderFileExtensionsToExclude = @("FakeStringValue") + localSecurityOptionsHideLastSignedInUser = $True + userRightsBlockAccessFromNetwork = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedServers = "none" + xboxServicesLiveAuthManagerServiceStartupMode = "manual" + localSecurityOptionsMachineInactivityLimitInMinutes = 25 + localSecurityOptionsClientDigitallySignCommunicationsAlways = $True + defenderSecurityCenterDisableNetworkUI = $True + userRightsModifyObjectLabels = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + deviceGuardLocalSystemAuthorityCredentialGuardSettings = "notConfigured" + firewallIdleTimeoutForSecurityAssociationInSeconds = 25 + defenderSecurityCenterHelpURL = "FakeStringValue" + localSecurityOptionsDisableServerDigitallySignCommunicationsAlways = $True + localSecurityOptionsAllowRemoteCallsToSecurityAccountsManagerHelperBool = $True + userRightsChangeSystemTime = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsAllowUndockWithoutHavingToLogon = $True + defenderEnableScanMappedNetworkDrivesDuringFullScan = $True + defenderUntrustedUSBProcess = "userDefined" + localSecurityOptionsHideUsernameAtSignIn = $True + defenderAllowScanDownloads = $True + localSecurityOptionsDisableAdministratorAccount = $True + defenderSecurityCenterDisableHealthUI = $True + userRightsCreateGlobalObjects = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsRestrictAnonymousAccessToNamedPipesAndShares = $True + localSecurityOptionsMachineInactivityLimit = 25 + firewallCertificateRevocationListCheckMethod = "deviceDefault" + defenderSecurityCenterDisableFamilyUI = $True + defenderAllowCloudProtection = $True + bitLockerEnableStorageCardEncryptionOnMobile = $True + applicationGuardEnabled = $True + defenderOfficeAppsOtherProcessInjection = "userDefined" + userRightsImpersonateClient = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + '@odata.type' = "#microsoft.graph.windows10EndpointProtectionConfiguration" + localSecurityOptionsUseAdminApprovalModeForAdministrators = $True + lanManagerWorkstationDisableInsecureGuestLogons = $True + defenderAdvancedRansomewareProtectionType = "userDefined" + defenderUntrustedExecutableType = "userDefined" + defenderDisableScanArchiveFiles = $True + lanManagerAuthenticationLevel = "lmAndNltm" + userRightsActAsPartOfTheOperatingSystem = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderPreventCredentialStealingType = "userDefined" + localSecurityOptionsAllowUIAccessApplicationsForSecureLocations = $True + deviceGuardEnableSecureBootWithDMA = $True + localSecurityOptionsDisableClientDigitallySignCommunicationsIfServerAgrees = $True + defenderScriptObfuscatedMacroCode = "userDefined" + defenderDaysBeforeDeletingQuarantinedMalware = 25 + defenderAllowScanRemovableDrivesDuringFullScan = $True + localSecurityOptionsDisableServerDigitallySignCommunicationsIfClientAgrees = $True + firewallProfilePrivate = @{ + policyRulesFromGroupPolicyNotMerged = $True + inboundConnectionsRequired = $True + securedPacketExemptionAllowed = $True + securedPacketExemptionBlocked = $True + globalPortRulesFromGroupPolicyMerged = $True + stealthModeBlocked = $True + outboundConnectionsBlocked = $True + inboundConnectionsBlocked = $True + authorizedApplicationRulesFromGroupPolicyMerged = $True + inboundNotificationsRequired = $True + firewallEnabled = "notConfigured" + stealthModeRequired = $True + incomingTrafficBlocked = $True + incomingTrafficRequired = $True + unicastResponsesToMulticastBroadcastsBlocked = $True + policyRulesFromGroupPolicyMerged = $True + unicastResponsesToMulticastBroadcastsRequired = $True + connectionSecurityRulesFromGroupPolicyNotMerged = $True + globalPortRulesFromGroupPolicyNotMerged = $True + outboundConnectionsRequired = $True + inboundNotificationsBlocked = $True + connectionSecurityRulesFromGroupPolicyMerged = $True + authorizedApplicationRulesFromGroupPolicyNotMerged = $True + } + defenderSecurityCenterDisableAppBrowserUI = $True + localSecurityOptionsInformationShownOnLockScreen = "notConfigured" + defenderOfficeAppsLaunchChildProcessType = "userDefined" + deviceGuardSecureBootWithDMA = "notConfigured" + applicationGuardAllowPrintToPDF = $True + userRightsCreateToken = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderExploitProtectionXml = $True + userRightsRemoteDesktopServicesLogOn = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsBlockRemoteLogonWithBlankPassword = $True + userRightsBackupData = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + userRightsDenyLocalLogOn = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsOnlyElevateSignedExecutables = $True + applicationGuardAllowVirtualGPU = $True + defenderScanType = "userDefined" + bitLockerSystemDrivePolicy = @{ + prebootRecoveryEnableMessageAndUrl = $True + StartupAuthenticationTpmPinUsage = "blocked" + encryptionMethod = "aesCbc128" + minimumPinLength = 25 + prebootRecoveryMessage = "FakeStringValue" + StartupAuthenticationTpmPinAndKeyUsage = "blocked" + StartupAuthenticationRequired = $True + RecoveryOptions = @{ + RecoveryInformationToStore = "passwordAndKey" + HideRecoveryOptions = $True + BlockDataRecoveryAgent = $True + RecoveryKeyUsage = "blocked" + EnableBitLockerAfterRecoveryInformationToStore = $True + EnableRecoveryInformationSaveToStore = $True + RecoveryPasswordUsage = "blocked" + } + prebootRecoveryUrl = "FakeStringValue" + StartupAuthenticationTpmUsage = "blocked" + StartupAuthenticationTpmKeyUsage = "blocked" + StartupAuthenticationBlockWithoutTpmChip = $True + } + defenderAllowBehaviorMonitoring = $True + defenderAllowIntrusionPreventionSystem = $True + localSecurityOptionsDoNotStoreLANManagerHashValueOnNextPasswordChange = $True + defenderSecurityCenterHelpEmail = "FakeStringValue" + defenderDisableBehaviorMonitoring = $True + localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True + applicationGuardBlockClipboardSharing = "notConfigured" + defenderEmailContentExecution = "userDefined" + localSecurityOptionsBlockRemoteOpticalDriveAccess = $True + firewallProfilePublic = @{ + policyRulesFromGroupPolicyNotMerged = $True + inboundConnectionsRequired = $True + securedPacketExemptionAllowed = $True + securedPacketExemptionBlocked = $True + globalPortRulesFromGroupPolicyMerged = $True + stealthModeBlocked = $True + outboundConnectionsBlocked = $True + inboundConnectionsBlocked = $True + authorizedApplicationRulesFromGroupPolicyMerged = $True + inboundNotificationsRequired = $True + firewallEnabled = "notConfigured" + stealthModeRequired = $True + incomingTrafficBlocked = $True + incomingTrafficRequired = $True + unicastResponsesToMulticastBroadcastsBlocked = $True + policyRulesFromGroupPolicyMerged = $True + unicastResponsesToMulticastBroadcastsRequired = $True + connectionSecurityRulesFromGroupPolicyNotMerged = $True + globalPortRulesFromGroupPolicyNotMerged = $True + outboundConnectionsRequired = $True + inboundNotificationsBlocked = $True + connectionSecurityRulesFromGroupPolicyMerged = $True + authorizedApplicationRulesFromGroupPolicyNotMerged = $True + } + defenderScriptDownloadedPayloadExecutionType = "userDefined" + xboxServicesAccessoryManagementServiceStartupMode = "manual" + xboxServicesEnableXboxGameSaveTask = $True + bitLockerEncryptDevice = $True + localSecurityOptionsBlockMicrosoftAccounts = $True + bitLockerRemovableDrivePolicy = @{ + requireEncryptionForWriteAccess = $True + blockCrossOrganizationWriteAccess = $True + encryptionMethod = "aesCbc128" + } + defenderSecurityCenterBlockExploitProtectionOverride = $True + localSecurityOptionsLogOnMessageText = "FakeStringValue" + applicationGuardCertificateThumbprints = @("FakeStringValue") + defenderCloudBlockLevel = "notConfigured" + defenderProcessCreationType = "userDefined" + defenderDisableScanDownloads = $True + defenderOfficeCommunicationAppsLaunchChildProcess = "userDefined" + localSecurityOptionsClientSendUnencryptedPasswordToThirdPartySMBServers = $True + userRightsAllowAccessFromNetwork = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + applicationGuardForceAuditing = $True + defenderDisableRealTimeMonitoring = $True + defenderSecurityCenterNotificationsFromApp = "notConfigured" + localSecurityOptionsAdministratorAccountName = "FakeStringValue" + windowsDefenderTamperProtection = "notConfigured" + defenderSecurityCenterDisableAccountUI = $True + localSecurityOptionsSwitchToSecureDesktopWhenPromptingForElevation = $True + defenderEmailContentExecutionType = "userDefined" + defenderAllowScanNetworkFiles = $True + defenderSecurityCenterDisableNotificationAreaUI = $True + userRightsProfileSingleProcess = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsSmartCardRemovalBehavior = "noAction" + defenderDisableCloudProtection = $True + userRightsManageVolumes = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + smartScreenEnableInShell = $True + applicationGuardBlockNonEnterpriseContent = $True + defenderAdditionalGuardedFolders = @("FakeStringValue") + localSecurityOptionsDoNotAllowAnonymousEnumerationOfSAMAccounts = $True + userRightsRestoreData = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedClients = "none" + defenderDisableOnAccessProtection = $True + bitLockerRecoveryPasswordRotation = "notConfigured" + firewallPreSharedKeyEncodingMethod = "deviceDefault" + userRightsDelegation = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + userRightsDebugPrograms = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderSecurityCenterDisableVulnerableTpmFirmwareUpdateUI = $True + defenderSecurityCenterOrganizationDisplayName = "FakeStringValue" + localSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUser = "notConfigured" + userRightsLockMemory = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + appLockerApplicationControl = "notConfigured" + defenderBlockPersistenceThroughWmiType = "userDefined" + defenderDisableScanNetworkFiles = $True + defenderDisableCatchupQuickScan = $True + localSecurityOptionsLogOnMessageTitle = "FakeStringValue" + localSecurityOptionsStandardUserElevationPromptBehavior = "notConfigured" + userRightsGenerateSecurityAudits = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderSecurityCenterDisableClearTpmUI = $True + defenderEnableScanIncomingMail = $True + defenderSecurityCenterHelpPhone = "FakeStringValue" + localSecurityOptionsDoNotRequireCtrlAltDel = $True + userRightsTakeOwnership = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + userRightsLocalLogOn = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + applicationGuardAllowPersistence = $True + defenderCloudExtendedTimeoutInSeconds = 25 + firewallIPSecExemptionsAllowICMP = $True + defenderAllowEndUserAccess = $True + defenderScriptDownloadedPayloadExecution = "userDefined" + defenderExploitProtectionXmlFileName = "FakeStringValue" + defenderScriptObfuscatedMacroCodeType = "userDefined" + defenderDisableScanRemovableDrivesDuringFullScan = $True + localSecurityOptionsAllowSystemToBeShutDownWithoutHavingToLogOn = $True + defenderOfficeMacroCodeAllowWin32ImportsType = "userDefined" + firewallIPSecExemptionsAllowDHCP = $True + firewallProfileDomain = @{ + policyRulesFromGroupPolicyNotMerged = $True + inboundConnectionsRequired = $True + securedPacketExemptionAllowed = $True + securedPacketExemptionBlocked = $True + globalPortRulesFromGroupPolicyMerged = $True + stealthModeBlocked = $True + outboundConnectionsBlocked = $True + inboundConnectionsBlocked = $True + authorizedApplicationRulesFromGroupPolicyMerged = $True + inboundNotificationsRequired = $True + firewallEnabled = "notConfigured" + stealthModeRequired = $True + incomingTrafficBlocked = $True + incomingTrafficRequired = $True + unicastResponsesToMulticastBroadcastsBlocked = $True + policyRulesFromGroupPolicyMerged = $True + unicastResponsesToMulticastBroadcastsRequired = $True + connectionSecurityRulesFromGroupPolicyNotMerged = $True + globalPortRulesFromGroupPolicyNotMerged = $True + outboundConnectionsRequired = $True + inboundNotificationsBlocked = $True + connectionSecurityRulesFromGroupPolicyMerged = $True + authorizedApplicationRulesFromGroupPolicyNotMerged = $True + } + localSecurityOptionsAllowPKU2UAuthenticationRequests = $True + defenderSecurityCenterDisableTroubleshootingUI = $True + defenderPotentiallyUnwantedAppAction = "userDefined" + userRightsModifyFirmwareEnvironment = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderOfficeAppsExecutableContentCreationOrLaunch = "userDefined" + defenderOfficeAppsExecutableContentCreationOrLaunchType = "userDefined" + defenderSubmitSamplesConsentType = "sendSafeSamplesAutomatically" + defenderAdobeReaderLaunchChildProcess = "userDefined" + localSecurityOptionsDetectApplicationInstallationsAndPromptForElevation = $True + defenderDisableIntrusionPreventionSystem = $True + defenderDisableCatchupFullScan = $True + bitLockerDisableWarningForOtherDiskEncryption = $True + xboxServicesLiveNetworkingServiceStartupMode = "manual" + firewallBlockStatefulFTP = $True + firewallMergeKeyingModuleSettings = $True + userRightsManageAuditingAndSecurityLogs = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + userRightsCreatePermanentSharedObjects = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsBlockUsersInstallingPrinterDrivers = $True + smartScreenBlockOverrideForFiles = $True + userRightsCreatePageFile = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderAllowOnAccessProtection = $True + dmaGuardDeviceEnumerationPolicy = "deviceDefault" + defenderOfficeAppsOtherProcessInjectionType = "userDefined" + localSecurityOptionsGuestAccountName = "FakeStringValue" + defenderDetectedMalwareActions = @{ + lowSeverity = "deviceDefault" + severeSeverity = "deviceDefault" + moderateSeverity = "deviceDefault" + highSeverity = "deviceDefault" + } + defenderProcessesToExclude = @("FakeStringValue") + defenderScheduledScanTime = "00:00:00" + defenderSecurityCenterDisableSecureBootUI = $True + applicationGuardAllowFileSaveOnHost = $True + localSecurityOptionsDisableGuestAccount = $True + defenderSecurityCenterDisableRansomwareUI = $True + defenderGuardedFoldersAllowedAppPaths = @("FakeStringValue") + defenderOfficeMacroCodeAllowWin32Imports = "userDefined" + applicationGuardAllowPrintToLocalPrinters = $True + defenderSecurityCenterITContactDisplay = "notConfigured" + defenderAttackSurfaceReductionExcludedPaths = @("FakeStringValue") + defenderAllowScanScriptsLoadedInInternetExplorer = $True + defenderSecurityCenterDisableVirusUI = $True + userRightsAccessCredentialManagerAsTrustedCaller = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + localSecurityOptionsAllowUIAccessApplicationElevation = $True + defenderDisableScanScriptsLoadedInInternetExplorer = $True + localSecurityOptionsAdministratorElevationPromptBehavior = "notConfigured" + userRightsLoadUnloadDrivers = @{ + State = "notConfigured" + LocalUsersOrGroups = @( + @{ + Description = "FakeStringValue" + Name = "FakeStringValue" + SecurityIdentifier = "FakeStringValue" + } + ) + } + defenderScanMaxCpuPercentage = 25 + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -1333,637 +1964,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = "Absent" Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - localSecurityOptionsClearVirtualMemoryPageFile = $True - defenderSecurityCenterDisableHardwareUI = $True - applicationGuardAllowPrintToNetworkPrinters = $True - defenderFilesAndFoldersToExclude = @("FakeStringValue") - defenderAllowScanArchiveFiles = $True - firewallIPSecExemptionsNone = $True - bitLockerAllowStandardUserEncryption = $True - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManager = "FakeStringValue" - defenderScheduledScanDay = "userDefined" - firewallPacketQueueingMethod = "deviceDefault" - defenderUntrustedUSBProcessType = "userDefined" - defenderNetworkProtectionType = "userDefined" - defenderProcessCreation = "userDefined" - applicationGuardEnabledOptions = "notConfigured" - defenderOfficeAppsLaunchChildProcess = "userDefined" - defenderAllowRealTimeMonitoring = $True - firewallIPSecExemptionsAllowNeighborDiscovery = $True - defenderUntrustedExecutable = "userDefined" - defenderGuardMyFoldersType = "userDefined" - localSecurityOptionsInformationDisplayedOnLockScreen = "notConfigured" - defenderScheduledQuickScanTime = "00:00:00" - localSecurityOptionsUseAdminApprovalMode = $True - applicationGuardAllowCameraMicrophoneRedirection = $True - applicationGuardAllowPrintToXPS = $True - deviceGuardLaunchSystemGuard = "notConfigured" - defenderScanDirection = "monitorAllFiles" - userRightsIncreaseSchedulingPriority = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - deviceGuardEnableVirtualizationBasedSecurity = $True - defenderBlockEndUserAccess = $True - firewallIPSecExemptionsAllowRouterDiscovery = $True - xboxServicesLiveGameSaveServiceStartupMode = "manual" - bitLockerFixedDrivePolicy = @{ - RecoveryOptions = @{ - RecoveryInformationToStore = "passwordAndKey" - HideRecoveryOptions = $True - BlockDataRecoveryAgent = $True - RecoveryKeyUsage = "blocked" - EnableBitLockerAfterRecoveryInformationToStore = $True - EnableRecoveryInformationSaveToStore = $True - RecoveryPasswordUsage = "blocked" - } - RequireEncryptionForWriteAccess = $True - encryptionMethod = "aesCbc128" - } - userRightsCreateSymbolicLinks = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardBlockFileTransfer = "notConfigured" - defenderCheckForSignaturesBeforeRunningScan = $True - userRightsRemoteShutdown = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - firewallRules = @( - @{ - localAddressRanges = @("FakeStringValue") - action = "notConfigured" - description = "FakeStringValue" - interfaceTypes = "notConfigured" - remotePortRanges = @("FakeStringValue") - displayName = "FakeStringValue" - filePath = "FakeStringValue" - localUserAuthorizations = "FakeStringValue" - protocol = 25 - trafficDirection = "notConfigured" - remoteAddressRanges = @("FakeStringValue") - packageFamilyName = "FakeStringValue" - serviceName = "FakeStringValue" - localPortRanges = @("FakeStringValue") - profileTypes = "notConfigured" - edgeTraversal = "notConfigured" - } - ) - defenderSignatureUpdateIntervalInHours = 25 - defenderEnableLowCpuPriority = $True - localSecurityOptionsAllowAnonymousEnumerationOfSAMAccountsAndShares = $True - defenderFileExtensionsToExclude = @("FakeStringValue") - localSecurityOptionsHideLastSignedInUser = $True - userRightsBlockAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedServers = "none" - xboxServicesLiveAuthManagerServiceStartupMode = "manual" - localSecurityOptionsMachineInactivityLimitInMinutes = 25 - localSecurityOptionsClientDigitallySignCommunicationsAlways = $True - defenderSecurityCenterDisableNetworkUI = $True - userRightsModifyObjectLabels = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - deviceGuardLocalSystemAuthorityCredentialGuardSettings = "notConfigured" - firewallIdleTimeoutForSecurityAssociationInSeconds = 25 - defenderSecurityCenterHelpURL = "FakeStringValue" - localSecurityOptionsDisableServerDigitallySignCommunicationsAlways = $True - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManagerHelperBool = $True - userRightsChangeSystemTime = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAllowUndockWithoutHavingToLogon = $True - defenderEnableScanMappedNetworkDrivesDuringFullScan = $True - defenderUntrustedUSBProcess = "userDefined" - localSecurityOptionsHideUsernameAtSignIn = $True - defenderAllowScanDownloads = $True - localSecurityOptionsDisableAdministratorAccount = $True - defenderSecurityCenterDisableHealthUI = $True - userRightsCreateGlobalObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsRestrictAnonymousAccessToNamedPipesAndShares = $True - localSecurityOptionsMachineInactivityLimit = 25 - firewallCertificateRevocationListCheckMethod = "deviceDefault" - defenderSecurityCenterDisableFamilyUI = $True - defenderAllowCloudProtection = $True - bitLockerEnableStorageCardEncryptionOnMobile = $True - applicationGuardEnabled = $True - defenderOfficeAppsOtherProcessInjection = "userDefined" - userRightsImpersonateClient = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - '@odata.type' = "#microsoft.graph.windows10EndpointProtectionConfiguration" - localSecurityOptionsUseAdminApprovalModeForAdministrators = $True - lanManagerWorkstationDisableInsecureGuestLogons = $True - defenderAdvancedRansomewareProtectionType = "userDefined" - defenderUntrustedExecutableType = "userDefined" - defenderDisableScanArchiveFiles = $True - lanManagerAuthenticationLevel = "lmAndNltm" - userRightsActAsPartOfTheOperatingSystem = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderPreventCredentialStealingType = "userDefined" - localSecurityOptionsAllowUIAccessApplicationsForSecureLocations = $True - deviceGuardEnableSecureBootWithDMA = $True - localSecurityOptionsDisableClientDigitallySignCommunicationsIfServerAgrees = $True - defenderScriptObfuscatedMacroCode = "userDefined" - defenderDaysBeforeDeletingQuarantinedMalware = 25 - defenderAllowScanRemovableDrivesDuringFullScan = $True - localSecurityOptionsDisableServerDigitallySignCommunicationsIfClientAgrees = $True - firewallProfilePrivate = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - defenderSecurityCenterDisableAppBrowserUI = $True - localSecurityOptionsInformationShownOnLockScreen = "notConfigured" - defenderOfficeAppsLaunchChildProcessType = "userDefined" - deviceGuardSecureBootWithDMA = "notConfigured" - applicationGuardAllowPrintToPDF = $True - userRightsCreateToken = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderExploitProtectionXml = $True - userRightsRemoteDesktopServicesLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsBlockRemoteLogonWithBlankPassword = $True - userRightsBackupData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsDenyLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsOnlyElevateSignedExecutables = $True - applicationGuardAllowVirtualGPU = $True - defenderScanType = "userDefined" - bitLockerSystemDrivePolicy = @{ - prebootRecoveryEnableMessageAndUrl = $True - StartupAuthenticationTpmPinUsage = "blocked" - encryptionMethod = "aesCbc128" - minimumPinLength = 25 - prebootRecoveryMessage = "FakeStringValue" - StartupAuthenticationTpmPinAndKeyUsage = "blocked" - StartupAuthenticationRequired = $True - RecoveryOptions = @{ - RecoveryInformationToStore = "passwordAndKey" - HideRecoveryOptions = $True - BlockDataRecoveryAgent = $True - RecoveryKeyUsage = "blocked" - EnableBitLockerAfterRecoveryInformationToStore = $True - EnableRecoveryInformationSaveToStore = $True - RecoveryPasswordUsage = "blocked" - } - prebootRecoveryUrl = "FakeStringValue" - StartupAuthenticationTpmUsage = "blocked" - StartupAuthenticationTpmKeyUsage = "blocked" - StartupAuthenticationBlockWithoutTpmChip = $True - } - defenderAllowBehaviorMonitoring = $True - defenderAllowIntrusionPreventionSystem = $True - localSecurityOptionsDoNotStoreLANManagerHashValueOnNextPasswordChange = $True - defenderSecurityCenterHelpEmail = "FakeStringValue" - defenderDisableBehaviorMonitoring = $True - localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True - applicationGuardBlockClipboardSharing = "notConfigured" - defenderEmailContentExecution = "userDefined" - localSecurityOptionsBlockRemoteOpticalDriveAccess = $True - firewallProfilePublic = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - defenderScriptDownloadedPayloadExecutionType = "userDefined" - xboxServicesAccessoryManagementServiceStartupMode = "manual" - xboxServicesEnableXboxGameSaveTask = $True - bitLockerEncryptDevice = $True - localSecurityOptionsBlockMicrosoftAccounts = $True - bitLockerRemovableDrivePolicy = @{ - requireEncryptionForWriteAccess = $True - blockCrossOrganizationWriteAccess = $True - encryptionMethod = "aesCbc128" - } - defenderSecurityCenterBlockExploitProtectionOverride = $True - localSecurityOptionsLogOnMessageText = "FakeStringValue" - applicationGuardCertificateThumbprints = @("FakeStringValue") - defenderCloudBlockLevel = "notConfigured" - defenderProcessCreationType = "userDefined" - defenderDisableScanDownloads = $True - defenderOfficeCommunicationAppsLaunchChildProcess = "userDefined" - localSecurityOptionsClientSendUnencryptedPasswordToThirdPartySMBServers = $True - userRightsAllowAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardForceAuditing = $True - defenderDisableRealTimeMonitoring = $True - defenderSecurityCenterNotificationsFromApp = "notConfigured" - localSecurityOptionsAdministratorAccountName = "FakeStringValue" - windowsDefenderTamperProtection = "notConfigured" - defenderSecurityCenterDisableAccountUI = $True - localSecurityOptionsSwitchToSecureDesktopWhenPromptingForElevation = $True - defenderEmailContentExecutionType = "userDefined" - defenderAllowScanNetworkFiles = $True - defenderSecurityCenterDisableNotificationAreaUI = $True - userRightsProfileSingleProcess = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsSmartCardRemovalBehavior = "noAction" - defenderDisableCloudProtection = $True - userRightsManageVolumes = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - smartScreenEnableInShell = $True - applicationGuardBlockNonEnterpriseContent = $True - defenderAdditionalGuardedFolders = @("FakeStringValue") - localSecurityOptionsDoNotAllowAnonymousEnumerationOfSAMAccounts = $True - userRightsRestoreData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedClients = "none" - defenderDisableOnAccessProtection = $True - bitLockerRecoveryPasswordRotation = "notConfigured" - firewallPreSharedKeyEncodingMethod = "deviceDefault" - userRightsDelegation = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsDebugPrograms = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterDisableVulnerableTpmFirmwareUpdateUI = $True - defenderSecurityCenterOrganizationDisplayName = "FakeStringValue" - localSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUser = "notConfigured" - userRightsLockMemory = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - appLockerApplicationControl = "notConfigured" - defenderBlockPersistenceThroughWmiType = "userDefined" - defenderDisableScanNetworkFiles = $True - defenderDisableCatchupQuickScan = $True - localSecurityOptionsLogOnMessageTitle = "FakeStringValue" - localSecurityOptionsStandardUserElevationPromptBehavior = "notConfigured" - userRightsGenerateSecurityAudits = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterDisableClearTpmUI = $True - defenderEnableScanIncomingMail = $True - defenderSecurityCenterHelpPhone = "FakeStringValue" - localSecurityOptionsDoNotRequireCtrlAltDel = $True - userRightsTakeOwnership = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardAllowPersistence = $True - defenderCloudExtendedTimeoutInSeconds = 25 - firewallIPSecExemptionsAllowICMP = $True - defenderAllowEndUserAccess = $True - defenderScriptDownloadedPayloadExecution = "userDefined" - defenderExploitProtectionXmlFileName = "FakeStringValue" - defenderScriptObfuscatedMacroCodeType = "userDefined" - defenderDisableScanRemovableDrivesDuringFullScan = $True - localSecurityOptionsAllowSystemToBeShutDownWithoutHavingToLogOn = $True - defenderOfficeMacroCodeAllowWin32ImportsType = "userDefined" - firewallIPSecExemptionsAllowDHCP = $True - firewallProfileDomain = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - localSecurityOptionsAllowPKU2UAuthenticationRequests = $True - defenderSecurityCenterDisableTroubleshootingUI = $True - defenderPotentiallyUnwantedAppAction = "userDefined" - userRightsModifyFirmwareEnvironment = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderOfficeAppsExecutableContentCreationOrLaunch = "userDefined" - defenderOfficeAppsExecutableContentCreationOrLaunchType = "userDefined" - defenderSubmitSamplesConsentType = "sendSafeSamplesAutomatically" - defenderAdobeReaderLaunchChildProcess = "userDefined" - localSecurityOptionsDetectApplicationInstallationsAndPromptForElevation = $True - defenderDisableIntrusionPreventionSystem = $True - defenderDisableCatchupFullScan = $True - bitLockerDisableWarningForOtherDiskEncryption = $True - xboxServicesLiveNetworkingServiceStartupMode = "manual" - firewallBlockStatefulFTP = $True - firewallMergeKeyingModuleSettings = $True - userRightsManageAuditingAndSecurityLogs = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsCreatePermanentSharedObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsBlockUsersInstallingPrinterDrivers = $True - smartScreenBlockOverrideForFiles = $True - userRightsCreatePageFile = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderAllowOnAccessProtection = $True - dmaGuardDeviceEnumerationPolicy = "deviceDefault" - defenderOfficeAppsOtherProcessInjectionType = "userDefined" - localSecurityOptionsGuestAccountName = "FakeStringValue" - defenderDetectedMalwareActions = @{ - lowSeverity = "deviceDefault" - severeSeverity = "deviceDefault" - moderateSeverity = "deviceDefault" - highSeverity = "deviceDefault" - } - defenderProcessesToExclude = @("FakeStringValue") - defenderScheduledScanTime = "00:00:00" - defenderSecurityCenterDisableSecureBootUI = $True - applicationGuardAllowFileSaveOnHost = $True - localSecurityOptionsDisableGuestAccount = $True - defenderSecurityCenterDisableRansomwareUI = $True - defenderGuardedFoldersAllowedAppPaths = @("FakeStringValue") - defenderOfficeMacroCodeAllowWin32Imports = "userDefined" - applicationGuardAllowPrintToLocalPrinters = $True - defenderSecurityCenterITContactDisplay = "notConfigured" - defenderAttackSurfaceReductionExcludedPaths = @("FakeStringValue") - defenderAllowScanScriptsLoadedInInternetExplorer = $True - defenderSecurityCenterDisableVirusUI = $True - userRightsAccessCredentialManagerAsTrustedCaller = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAllowUIAccessApplicationElevation = $True - defenderDisableScanScriptsLoadedInInternetExplorer = $True - localSecurityOptionsAdministratorElevationPromptBehavior = "notConfigured" - userRightsLoadUnloadDrivers = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderScanMaxCpuPercentage = 25 - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It "Should return Values from the Get method" { @@ -2608,637 +2608,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = "Present" Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - localSecurityOptionsClearVirtualMemoryPageFile = $True - defenderSecurityCenterDisableHardwareUI = $True - applicationGuardAllowPrintToNetworkPrinters = $True - defenderFilesAndFoldersToExclude = @("FakeStringValue") - defenderAllowScanArchiveFiles = $True - firewallIPSecExemptionsNone = $True - bitLockerAllowStandardUserEncryption = $True - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManager = "FakeStringValue" - defenderScheduledScanDay = "userDefined" - firewallPacketQueueingMethod = "deviceDefault" - defenderUntrustedUSBProcessType = "userDefined" - defenderNetworkProtectionType = "userDefined" - defenderProcessCreation = "userDefined" - applicationGuardEnabledOptions = "notConfigured" - defenderOfficeAppsLaunchChildProcess = "userDefined" - defenderAllowRealTimeMonitoring = $True - firewallIPSecExemptionsAllowNeighborDiscovery = $True - defenderUntrustedExecutable = "userDefined" - defenderGuardMyFoldersType = "userDefined" - localSecurityOptionsInformationDisplayedOnLockScreen = "notConfigured" - defenderScheduledQuickScanTime = "00:00:00" - localSecurityOptionsUseAdminApprovalMode = $True - applicationGuardAllowCameraMicrophoneRedirection = $True - applicationGuardAllowPrintToXPS = $True - deviceGuardLaunchSystemGuard = "notConfigured" - defenderScanDirection = "monitorAllFiles" - userRightsIncreaseSchedulingPriority = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - deviceGuardEnableVirtualizationBasedSecurity = $True - defenderBlockEndUserAccess = $True - firewallIPSecExemptionsAllowRouterDiscovery = $True - xboxServicesLiveGameSaveServiceStartupMode = "manual" - bitLockerFixedDrivePolicy = @{ - RecoveryOptions = @{ - RecoveryInformationToStore = "passwordAndKey" - HideRecoveryOptions = $True - BlockDataRecoveryAgent = $True - RecoveryKeyUsage = "blocked" - EnableBitLockerAfterRecoveryInformationToStore = $True - EnableRecoveryInformationSaveToStore = $True - RecoveryPasswordUsage = "blocked" - } - RequireEncryptionForWriteAccess = $True - encryptionMethod = "aesCbc128" - } - userRightsCreateSymbolicLinks = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardBlockFileTransfer = "notConfigured" - defenderCheckForSignaturesBeforeRunningScan = $True - userRightsRemoteShutdown = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - firewallRules = @( - @{ - localAddressRanges = @("FakeStringValue") - action = "notConfigured" - description = "FakeStringValue" - interfaceTypes = "notConfigured" - remotePortRanges = @("FakeStringValue") - displayName = "FakeStringValue" - filePath = "FakeStringValue" - localUserAuthorizations = "FakeStringValue" - protocol = 25 - trafficDirection = "notConfigured" - remoteAddressRanges = @("FakeStringValue") - packageFamilyName = "FakeStringValue" - serviceName = "FakeStringValue" - localPortRanges = @("FakeStringValue") - profileTypes = "notConfigured" - edgeTraversal = "notConfigured" - } - ) - defenderSignatureUpdateIntervalInHours = 25 - defenderEnableLowCpuPriority = $True - localSecurityOptionsAllowAnonymousEnumerationOfSAMAccountsAndShares = $True - defenderFileExtensionsToExclude = @("FakeStringValue") - localSecurityOptionsHideLastSignedInUser = $True - userRightsBlockAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedServers = "none" - xboxServicesLiveAuthManagerServiceStartupMode = "manual" - localSecurityOptionsMachineInactivityLimitInMinutes = 25 - localSecurityOptionsClientDigitallySignCommunicationsAlways = $True - defenderSecurityCenterDisableNetworkUI = $True - userRightsModifyObjectLabels = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - deviceGuardLocalSystemAuthorityCredentialGuardSettings = "notConfigured" - firewallIdleTimeoutForSecurityAssociationInSeconds = 25 - defenderSecurityCenterHelpURL = "FakeStringValue" - localSecurityOptionsDisableServerDigitallySignCommunicationsAlways = $True - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManagerHelperBool = $True - userRightsChangeSystemTime = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAllowUndockWithoutHavingToLogon = $True - defenderEnableScanMappedNetworkDrivesDuringFullScan = $True - defenderUntrustedUSBProcess = "userDefined" - localSecurityOptionsHideUsernameAtSignIn = $True - defenderAllowScanDownloads = $True - localSecurityOptionsDisableAdministratorAccount = $True - defenderSecurityCenterDisableHealthUI = $True - userRightsCreateGlobalObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsRestrictAnonymousAccessToNamedPipesAndShares = $True - localSecurityOptionsMachineInactivityLimit = 25 - firewallCertificateRevocationListCheckMethod = "deviceDefault" - defenderSecurityCenterDisableFamilyUI = $True - defenderAllowCloudProtection = $True - bitLockerEnableStorageCardEncryptionOnMobile = $True - applicationGuardEnabled = $True - defenderOfficeAppsOtherProcessInjection = "userDefined" - userRightsImpersonateClient = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - '@odata.type' = "#microsoft.graph.windows10EndpointProtectionConfiguration" - localSecurityOptionsUseAdminApprovalModeForAdministrators = $True - lanManagerWorkstationDisableInsecureGuestLogons = $True - defenderAdvancedRansomewareProtectionType = "userDefined" - defenderUntrustedExecutableType = "userDefined" - defenderDisableScanArchiveFiles = $True - lanManagerAuthenticationLevel = "lmAndNltm" - userRightsActAsPartOfTheOperatingSystem = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderPreventCredentialStealingType = "userDefined" - localSecurityOptionsAllowUIAccessApplicationsForSecureLocations = $True - deviceGuardEnableSecureBootWithDMA = $True - localSecurityOptionsDisableClientDigitallySignCommunicationsIfServerAgrees = $True - defenderScriptObfuscatedMacroCode = "userDefined" - defenderDaysBeforeDeletingQuarantinedMalware = 25 - defenderAllowScanRemovableDrivesDuringFullScan = $True - localSecurityOptionsDisableServerDigitallySignCommunicationsIfClientAgrees = $True - firewallProfilePrivate = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - defenderSecurityCenterDisableAppBrowserUI = $True - localSecurityOptionsInformationShownOnLockScreen = "notConfigured" - defenderOfficeAppsLaunchChildProcessType = "userDefined" - deviceGuardSecureBootWithDMA = "notConfigured" - applicationGuardAllowPrintToPDF = $True - userRightsCreateToken = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderExploitProtectionXml = $True - userRightsRemoteDesktopServicesLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsBlockRemoteLogonWithBlankPassword = $True - userRightsBackupData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsDenyLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsOnlyElevateSignedExecutables = $True - applicationGuardAllowVirtualGPU = $True - defenderScanType = "userDefined" - bitLockerSystemDrivePolicy = @{ - prebootRecoveryEnableMessageAndUrl = $True - StartupAuthenticationTpmPinUsage = "blocked" - encryptionMethod = "aesCbc128" - minimumPinLength = 25 - prebootRecoveryMessage = "FakeStringValue" - StartupAuthenticationTpmPinAndKeyUsage = "blocked" - StartupAuthenticationRequired = $True - RecoveryOptions = @{ - RecoveryInformationToStore = "passwordAndKey" - HideRecoveryOptions = $True - BlockDataRecoveryAgent = $True - RecoveryKeyUsage = "blocked" - EnableBitLockerAfterRecoveryInformationToStore = $True - EnableRecoveryInformationSaveToStore = $True - RecoveryPasswordUsage = "blocked" - } - prebootRecoveryUrl = "FakeStringValue" - StartupAuthenticationTpmUsage = "blocked" - StartupAuthenticationTpmKeyUsage = "blocked" - StartupAuthenticationBlockWithoutTpmChip = $True - } - defenderAllowBehaviorMonitoring = $True - defenderAllowIntrusionPreventionSystem = $True - localSecurityOptionsDoNotStoreLANManagerHashValueOnNextPasswordChange = $True - defenderSecurityCenterHelpEmail = "FakeStringValue" - defenderDisableBehaviorMonitoring = $True - localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True - applicationGuardBlockClipboardSharing = "notConfigured" - defenderEmailContentExecution = "userDefined" - localSecurityOptionsBlockRemoteOpticalDriveAccess = $True - firewallProfilePublic = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - defenderScriptDownloadedPayloadExecutionType = "userDefined" - xboxServicesAccessoryManagementServiceStartupMode = "manual" - xboxServicesEnableXboxGameSaveTask = $True - bitLockerEncryptDevice = $True - localSecurityOptionsBlockMicrosoftAccounts = $True - bitLockerRemovableDrivePolicy = @{ - requireEncryptionForWriteAccess = $True - blockCrossOrganizationWriteAccess = $True - encryptionMethod = "aesCbc128" - } - defenderSecurityCenterBlockExploitProtectionOverride = $True - localSecurityOptionsLogOnMessageText = "FakeStringValue" - applicationGuardCertificateThumbprints = @("FakeStringValue") - defenderCloudBlockLevel = "notConfigured" - defenderProcessCreationType = "userDefined" - defenderDisableScanDownloads = $True - defenderOfficeCommunicationAppsLaunchChildProcess = "userDefined" - localSecurityOptionsClientSendUnencryptedPasswordToThirdPartySMBServers = $True - userRightsAllowAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardForceAuditing = $True - defenderDisableRealTimeMonitoring = $True - defenderSecurityCenterNotificationsFromApp = "notConfigured" - localSecurityOptionsAdministratorAccountName = "FakeStringValue" - windowsDefenderTamperProtection = "notConfigured" - defenderSecurityCenterDisableAccountUI = $True - localSecurityOptionsSwitchToSecureDesktopWhenPromptingForElevation = $True - defenderEmailContentExecutionType = "userDefined" - defenderAllowScanNetworkFiles = $True - defenderSecurityCenterDisableNotificationAreaUI = $True - userRightsProfileSingleProcess = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsSmartCardRemovalBehavior = "noAction" - defenderDisableCloudProtection = $True - userRightsManageVolumes = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - smartScreenEnableInShell = $True - applicationGuardBlockNonEnterpriseContent = $True - defenderAdditionalGuardedFolders = @("FakeStringValue") - localSecurityOptionsDoNotAllowAnonymousEnumerationOfSAMAccounts = $True - userRightsRestoreData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedClients = "none" - defenderDisableOnAccessProtection = $True - bitLockerRecoveryPasswordRotation = "notConfigured" - firewallPreSharedKeyEncodingMethod = "deviceDefault" - userRightsDelegation = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsDebugPrograms = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterDisableVulnerableTpmFirmwareUpdateUI = $True - defenderSecurityCenterOrganizationDisplayName = "FakeStringValue" - localSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUser = "notConfigured" - userRightsLockMemory = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - appLockerApplicationControl = "notConfigured" - defenderBlockPersistenceThroughWmiType = "userDefined" - defenderDisableScanNetworkFiles = $True - defenderDisableCatchupQuickScan = $True - localSecurityOptionsLogOnMessageTitle = "FakeStringValue" - localSecurityOptionsStandardUserElevationPromptBehavior = "notConfigured" - userRightsGenerateSecurityAudits = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterDisableClearTpmUI = $True - defenderEnableScanIncomingMail = $True - defenderSecurityCenterHelpPhone = "FakeStringValue" - localSecurityOptionsDoNotRequireCtrlAltDel = $True - userRightsTakeOwnership = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardAllowPersistence = $True - defenderCloudExtendedTimeoutInSeconds = 25 - firewallIPSecExemptionsAllowICMP = $True - defenderAllowEndUserAccess = $True - defenderScriptDownloadedPayloadExecution = "userDefined" - defenderExploitProtectionXmlFileName = "FakeStringValue" - defenderScriptObfuscatedMacroCodeType = "userDefined" - defenderDisableScanRemovableDrivesDuringFullScan = $True - localSecurityOptionsAllowSystemToBeShutDownWithoutHavingToLogOn = $True - defenderOfficeMacroCodeAllowWin32ImportsType = "userDefined" - firewallIPSecExemptionsAllowDHCP = $True - firewallProfileDomain = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - localSecurityOptionsAllowPKU2UAuthenticationRequests = $True - defenderSecurityCenterDisableTroubleshootingUI = $True - defenderPotentiallyUnwantedAppAction = "userDefined" - userRightsModifyFirmwareEnvironment = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderOfficeAppsExecutableContentCreationOrLaunch = "userDefined" - defenderOfficeAppsExecutableContentCreationOrLaunchType = "userDefined" - defenderSubmitSamplesConsentType = "sendSafeSamplesAutomatically" - defenderAdobeReaderLaunchChildProcess = "userDefined" - localSecurityOptionsDetectApplicationInstallationsAndPromptForElevation = $True - defenderDisableIntrusionPreventionSystem = $True - defenderDisableCatchupFullScan = $True - bitLockerDisableWarningForOtherDiskEncryption = $True - xboxServicesLiveNetworkingServiceStartupMode = "manual" - firewallBlockStatefulFTP = $True - firewallMergeKeyingModuleSettings = $True - userRightsManageAuditingAndSecurityLogs = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsCreatePermanentSharedObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsBlockUsersInstallingPrinterDrivers = $True - smartScreenBlockOverrideForFiles = $True - userRightsCreatePageFile = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderAllowOnAccessProtection = $True - dmaGuardDeviceEnumerationPolicy = "deviceDefault" - defenderOfficeAppsOtherProcessInjectionType = "userDefined" - localSecurityOptionsGuestAccountName = "FakeStringValue" - defenderDetectedMalwareActions = @{ - lowSeverity = "deviceDefault" - severeSeverity = "deviceDefault" - moderateSeverity = "deviceDefault" - highSeverity = "deviceDefault" - } - defenderProcessesToExclude = @("FakeStringValue") - defenderScheduledScanTime = "00:00:00" - defenderSecurityCenterDisableSecureBootUI = $True - applicationGuardAllowFileSaveOnHost = $True - localSecurityOptionsDisableGuestAccount = $True - defenderSecurityCenterDisableRansomwareUI = $True - defenderGuardedFoldersAllowedAppPaths = @("FakeStringValue") - defenderOfficeMacroCodeAllowWin32Imports = "userDefined" - applicationGuardAllowPrintToLocalPrinters = $True - defenderSecurityCenterITContactDisplay = "notConfigured" - defenderAttackSurfaceReductionExcludedPaths = @("FakeStringValue") - defenderAllowScanScriptsLoadedInInternetExplorer = $True - defenderSecurityCenterDisableVirusUI = $True - userRightsAccessCredentialManagerAsTrustedCaller = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAllowUIAccessApplicationElevation = $True - defenderDisableScanScriptsLoadedInInternetExplorer = $True - localSecurityOptionsAdministratorElevationPromptBehavior = "notConfigured" - userRightsLoadUnloadDrivers = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderScanMaxCpuPercentage = 25 - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It 'Should return true from the Test method' { @@ -3249,7 +2618,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name "The IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 exists and values are NOT in the desired state" -Fixture { BeforeAll { $testParams = @{ - ApplicationGuardAllowCameraMicrophoneRedirection = $True + ApplicationGuardAllowCameraMicrophoneRedirection = $False # Updated property ApplicationGuardAllowFileSaveOnHost = $True ApplicationGuardAllowPersistence = $True ApplicationGuardAllowPrintToLocalPrinters = $True @@ -3875,455 +3244,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = "Present" Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - userRightsManageAuditingAndSecurityLogs = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - bitLockerSystemDrivePolicy = @{ - StartupAuthenticationTpmPinUsage = "blocked" - encryptionMethod = "aesCbc128" - minimumPinLength = 7 - prebootRecoveryMessage = "FakeStringValue" - StartupAuthenticationTpmPinAndKeyUsage = "blocked" - RecoveryOptions = @{ - RecoveryPasswordUsage = "blocked" - RecoveryInformationToStore = "passwordAndKey" - RecoveryKeyUsage = "blocked" - } - prebootRecoveryUrl = "FakeStringValue" - StartupAuthenticationTpmUsage = "blocked" - StartupAuthenticationTpmKeyUsage = "blocked" - } - localSecurityOptionsGuestAccountName = "FakeStringValue" - defenderSecurityCenterOrganizationDisplayName = "FakeStringValue" - userRightsAccessCredentialManagerAsTrustedCaller = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedClients = "none" - userRightsTakeOwnership = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - firewallPacketQueueingMethod = "deviceDefault" - defenderProcessCreation = "userDefined" - windowsDefenderTamperProtection = "notConfigured" - firewallIdleTimeoutForSecurityAssociationInSeconds = 7 - defenderUntrustedUSBProcessType = "userDefined" - deviceGuardLaunchSystemGuard = "notConfigured" - userRightsCreatePermanentSharedObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - firewallPreSharedKeyEncodingMethod = "deviceDefault" - applicationGuardBlockClipboardSharing = "notConfigured" - userRightsLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderAdvancedRansomewareProtectionType = "userDefined" - firewallProfilePublic = @{ - firewallEnabled = "notConfigured" - } - defenderOfficeAppsLaunchChildProcess = "userDefined" - defenderDetectedMalwareActions = @{ - lowSeverity = "deviceDefault" - severeSeverity = "deviceDefault" - moderateSeverity = "deviceDefault" - highSeverity = "deviceDefault" - } - localSecurityOptionsSmartCardRemovalBehavior = "noAction" - lanManagerAuthenticationLevel = "lmAndNltm" - userRightsCreateGlobalObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - xboxServicesAccessoryManagementServiceStartupMode = "manual" - applicationGuardCertificateThumbprints = @("FakeStringValue") - xboxServicesLiveNetworkingServiceStartupMode = "manual" - '@odata.type' = "#microsoft.graph.windows10EndpointProtectionConfiguration" - userRightsManageVolumes = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterHelpEmail = "FakeStringValue" - localSecurityOptionsLogOnMessageTitle = "FakeStringValue" - userRightsDenyLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderAdditionalGuardedFolders = @("FakeStringValue") - defenderUntrustedExecutable = "userDefined" - localSecurityOptionsStandardUserElevationPromptBehavior = "notConfigured" - firewallRules = @( - @{ - localAddressRanges = @("FakeStringValue") - action = "notConfigured" - description = "FakeStringValue" - interfaceTypes = "notConfigured" - remotePortRanges = @("FakeStringValue") - displayName = "FakeStringValue" - filePath = "FakeStringValue" - localUserAuthorizations = "FakeStringValue" - protocol = 7 - trafficDirection = "notConfigured" - remoteAddressRanges = @("FakeStringValue") - packageFamilyName = "FakeStringValue" - serviceName = "FakeStringValue" - localPortRanges = @("FakeStringValue") - profileTypes = "notConfigured" - edgeTraversal = "notConfigured" - } - ) - bitLockerRemovableDrivePolicy = @{ - encryptionMethod = "aesCbc128" - } - defenderGuardedFoldersAllowedAppPaths = @("FakeStringValue") - defenderEmailContentExecutionType = "userDefined" - defenderScriptDownloadedPayloadExecutionType = "userDefined" - dmaGuardDeviceEnumerationPolicy = "deviceDefault" - defenderEmailContentExecution = "userDefined" - userRightsLockMemory = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSubmitSamplesConsentType = "sendSafeSamplesAutomatically" - defenderSecurityCenterHelpURL = "FakeStringValue" - defenderScheduledScanDay = "userDefined" - userRightsLoadUnloadDrivers = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsGenerateSecurityAudits = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderDaysBeforeDeletingQuarantinedMalware = 7 - defenderBlockPersistenceThroughWmiType = "userDefined" - defenderFilesAndFoldersToExclude = @("FakeStringValue") - defenderSecurityCenterNotificationsFromApp = "notConfigured" - userRightsBlockAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - bitLockerRecoveryPasswordRotation = "notConfigured" - defenderFileExtensionsToExclude = @("FakeStringValue") - defenderProcessCreationType = "userDefined" - defenderScanMaxCpuPercentage = 7 - userRightsChangeSystemTime = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderScanDirection = "monitorAllFiles" - defenderOfficeAppsExecutableContentCreationOrLaunch = "userDefined" - localSecurityOptionsMachineInactivityLimit = 7 - userRightsModifyFirmwareEnvironment = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsInformationDisplayedOnLockScreen = "notConfigured" - defenderOfficeAppsExecutableContentCreationOrLaunchType = "userDefined" - userRightsRemoteShutdown = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsInformationShownOnLockScreen = "notConfigured" - defenderOfficeCommunicationAppsLaunchChildProcess = "userDefined" - bitLockerFixedDrivePolicy = @{ - RecoveryOptions = @{ - RecoveryPasswordUsage = "blocked" - RecoveryInformationToStore = "passwordAndKey" - RecoveryKeyUsage = "blocked" - } - encryptionMethod = "aesCbc128" - } - userRightsDelegation = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderExploitProtectionXmlFileName = "FakeStringValue" - userRightsImpersonateClient = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMachineInactivityLimitInMinutes = 7 - firewallProfileDomain = @{ - firewallEnabled = "notConfigured" - } - defenderCloudBlockLevel = "notConfigured" - firewallProfilePrivate = @{ - firewallEnabled = "notConfigured" - } - defenderCloudExtendedTimeoutInSeconds = 7 - userRightsIncreaseSchedulingPriority = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAdministratorAccountName = "FakeStringValue" - defenderAttackSurfaceReductionExcludedPaths = @("FakeStringValue") - userRightsCreatePageFile = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderAdobeReaderLaunchChildProcess = "userDefined" - userRightsBackupData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderOfficeAppsLaunchChildProcessType = "userDefined" - defenderOfficeMacroCodeAllowWin32Imports = "userDefined" - applicationGuardEnabledOptions = "notConfigured" - deviceGuardSecureBootWithDMA = "notConfigured" - defenderScheduledQuickScanTime = "00:00:00" - defenderScriptObfuscatedMacroCode = "userDefined" - defenderScriptObfuscatedMacroCodeType = "userDefined" - defenderPreventCredentialStealingType = "userDefined" - defenderOfficeMacroCodeAllowWin32ImportsType = "userDefined" - userRightsAllowAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderProcessesToExclude = @("FakeStringValue") - defenderNetworkProtectionType = "userDefined" - firewallCertificateRevocationListCheckMethod = "deviceDefault" - userRightsCreateToken = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderOfficeAppsOtherProcessInjection = "userDefined" - localSecurityOptionsLogOnMessageText = "FakeStringValue" - defenderUntrustedExecutableType = "userDefined" - defenderScanType = "userDefined" - deviceGuardLocalSystemAuthorityCredentialGuardSettings = "notConfigured" - userRightsModifyObjectLabels = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterHelpPhone = "FakeStringValue" - appLockerApplicationControl = "notConfigured" - userRightsRemoteDesktopServicesLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderUntrustedUSBProcess = "userDefined" - userRightsDebugPrograms = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardBlockFileTransfer = "notConfigured" - localSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUser = "notConfigured" - userRightsProfileSingleProcess = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderOfficeAppsOtherProcessInjectionType = "userDefined" - defenderGuardMyFoldersType = "userDefined" - xboxServicesLiveGameSaveServiceStartupMode = "manual" - userRightsRestoreData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAdministratorElevationPromptBehavior = "notConfigured" - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManager = "FakeStringValue" - defenderPotentiallyUnwantedAppAction = "userDefined" - defenderScriptDownloadedPayloadExecution = "userDefined" - defenderSecurityCenterITContactDisplay = "notConfigured" - userRightsCreateSymbolicLinks = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderScheduledScanTime = "00:00:00" - xboxServicesLiveAuthManagerServiceStartupMode = "manual" - userRightsActAsPartOfTheOperatingSystem = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedServers = "none" - defenderSignatureUpdateIntervalInHours = 7 - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It "Should return Values from the Get method" { @@ -4347,638 +3267,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - localSecurityOptionsClearVirtualMemoryPageFile = $True - defenderSecurityCenterDisableHardwareUI = $True - applicationGuardAllowPrintToNetworkPrinters = $True - defenderFilesAndFoldersToExclude = @("FakeStringValue") - defenderAllowScanArchiveFiles = $True - firewallIPSecExemptionsNone = $True - bitLockerAllowStandardUserEncryption = $True - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManager = "FakeStringValue" - defenderScheduledScanDay = "userDefined" - firewallPacketQueueingMethod = "deviceDefault" - defenderUntrustedUSBProcessType = "userDefined" - defenderNetworkProtectionType = "userDefined" - defenderProcessCreation = "userDefined" - applicationGuardEnabledOptions = "notConfigured" - defenderOfficeAppsLaunchChildProcess = "userDefined" - defenderAllowRealTimeMonitoring = $True - firewallIPSecExemptionsAllowNeighborDiscovery = $True - defenderUntrustedExecutable = "userDefined" - defenderGuardMyFoldersType = "userDefined" - localSecurityOptionsInformationDisplayedOnLockScreen = "notConfigured" - defenderScheduledQuickScanTime = "00:00:00" - localSecurityOptionsUseAdminApprovalMode = $True - applicationGuardAllowCameraMicrophoneRedirection = $True - applicationGuardAllowPrintToXPS = $True - deviceGuardLaunchSystemGuard = "notConfigured" - defenderScanDirection = "monitorAllFiles" - userRightsIncreaseSchedulingPriority = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - deviceGuardEnableVirtualizationBasedSecurity = $True - defenderBlockEndUserAccess = $True - firewallIPSecExemptionsAllowRouterDiscovery = $True - xboxServicesLiveGameSaveServiceStartupMode = "manual" - bitLockerFixedDrivePolicy = @{ - RecoveryOptions = @{ - RecoveryInformationToStore = "passwordAndKey" - HideRecoveryOptions = $True - BlockDataRecoveryAgent = $True - RecoveryKeyUsage = "blocked" - EnableBitLockerAfterRecoveryInformationToStore = $True - EnableRecoveryInformationSaveToStore = $True - RecoveryPasswordUsage = "blocked" - } - RequireEncryptionForWriteAccess = $True - encryptionMethod = "aesCbc128" - } - userRightsCreateSymbolicLinks = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardBlockFileTransfer = "notConfigured" - defenderCheckForSignaturesBeforeRunningScan = $True - userRightsRemoteShutdown = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - firewallRules = @( - @{ - localAddressRanges = @("FakeStringValue") - action = "notConfigured" - description = "FakeStringValue" - interfaceTypes = "notConfigured" - remotePortRanges = @("FakeStringValue") - displayName = "FakeStringValue" - filePath = "FakeStringValue" - localUserAuthorizations = "FakeStringValue" - protocol = 25 - trafficDirection = "notConfigured" - remoteAddressRanges = @("FakeStringValue") - packageFamilyName = "FakeStringValue" - serviceName = "FakeStringValue" - localPortRanges = @("FakeStringValue") - profileTypes = "notConfigured" - edgeTraversal = "notConfigured" - } - ) - defenderSignatureUpdateIntervalInHours = 25 - defenderEnableLowCpuPriority = $True - localSecurityOptionsAllowAnonymousEnumerationOfSAMAccountsAndShares = $True - defenderFileExtensionsToExclude = @("FakeStringValue") - localSecurityOptionsHideLastSignedInUser = $True - userRightsBlockAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedServers = "none" - xboxServicesLiveAuthManagerServiceStartupMode = "manual" - localSecurityOptionsMachineInactivityLimitInMinutes = 25 - localSecurityOptionsClientDigitallySignCommunicationsAlways = $True - defenderSecurityCenterDisableNetworkUI = $True - userRightsModifyObjectLabels = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - deviceGuardLocalSystemAuthorityCredentialGuardSettings = "notConfigured" - firewallIdleTimeoutForSecurityAssociationInSeconds = 25 - defenderSecurityCenterHelpURL = "FakeStringValue" - localSecurityOptionsDisableServerDigitallySignCommunicationsAlways = $True - localSecurityOptionsAllowRemoteCallsToSecurityAccountsManagerHelperBool = $True - userRightsChangeSystemTime = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAllowUndockWithoutHavingToLogon = $True - defenderEnableScanMappedNetworkDrivesDuringFullScan = $True - defenderUntrustedUSBProcess = "userDefined" - localSecurityOptionsHideUsernameAtSignIn = $True - defenderAllowScanDownloads = $True - localSecurityOptionsDisableAdministratorAccount = $True - defenderSecurityCenterDisableHealthUI = $True - userRightsCreateGlobalObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsRestrictAnonymousAccessToNamedPipesAndShares = $True - localSecurityOptionsMachineInactivityLimit = 25 - firewallCertificateRevocationListCheckMethod = "deviceDefault" - defenderSecurityCenterDisableFamilyUI = $True - defenderAllowCloudProtection = $True - bitLockerEnableStorageCardEncryptionOnMobile = $True - applicationGuardEnabled = $True - defenderOfficeAppsOtherProcessInjection = "userDefined" - userRightsImpersonateClient = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - '@odata.type' = "#microsoft.graph.windows10EndpointProtectionConfiguration" - localSecurityOptionsUseAdminApprovalModeForAdministrators = $True - lanManagerWorkstationDisableInsecureGuestLogons = $True - defenderAdvancedRansomewareProtectionType = "userDefined" - defenderUntrustedExecutableType = "userDefined" - defenderDisableScanArchiveFiles = $True - lanManagerAuthenticationLevel = "lmAndNltm" - userRightsActAsPartOfTheOperatingSystem = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderPreventCredentialStealingType = "userDefined" - localSecurityOptionsAllowUIAccessApplicationsForSecureLocations = $True - deviceGuardEnableSecureBootWithDMA = $True - localSecurityOptionsDisableClientDigitallySignCommunicationsIfServerAgrees = $True - defenderScriptObfuscatedMacroCode = "userDefined" - defenderDaysBeforeDeletingQuarantinedMalware = 25 - defenderAllowScanRemovableDrivesDuringFullScan = $True - localSecurityOptionsDisableServerDigitallySignCommunicationsIfClientAgrees = $True - firewallProfilePrivate = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - defenderSecurityCenterDisableAppBrowserUI = $True - localSecurityOptionsInformationShownOnLockScreen = "notConfigured" - defenderOfficeAppsLaunchChildProcessType = "userDefined" - deviceGuardSecureBootWithDMA = "notConfigured" - applicationGuardAllowPrintToPDF = $True - userRightsCreateToken = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderExploitProtectionXml = $True - userRightsRemoteDesktopServicesLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsBlockRemoteLogonWithBlankPassword = $True - userRightsBackupData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsDenyLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsOnlyElevateSignedExecutables = $True - applicationGuardAllowVirtualGPU = $True - defenderScanType = "userDefined" - bitLockerSystemDrivePolicy = @{ - prebootRecoveryEnableMessageAndUrl = $True - StartupAuthenticationTpmPinUsage = "blocked" - encryptionMethod = "aesCbc128" - minimumPinLength = 25 - prebootRecoveryMessage = "FakeStringValue" - StartupAuthenticationTpmPinAndKeyUsage = "blocked" - StartupAuthenticationRequired = $True - RecoveryOptions = @{ - RecoveryInformationToStore = "passwordAndKey" - HideRecoveryOptions = $True - BlockDataRecoveryAgent = $True - RecoveryKeyUsage = "blocked" - EnableBitLockerAfterRecoveryInformationToStore = $True - EnableRecoveryInformationSaveToStore = $True - RecoveryPasswordUsage = "blocked" - } - prebootRecoveryUrl = "FakeStringValue" - StartupAuthenticationTpmUsage = "blocked" - StartupAuthenticationTpmKeyUsage = "blocked" - StartupAuthenticationBlockWithoutTpmChip = $True - } - defenderAllowBehaviorMonitoring = $True - defenderAllowIntrusionPreventionSystem = $True - localSecurityOptionsDoNotStoreLANManagerHashValueOnNextPasswordChange = $True - defenderSecurityCenterHelpEmail = "FakeStringValue" - defenderDisableBehaviorMonitoring = $True - localSecurityOptionsVirtualizeFileAndRegistryWriteFailuresToPerUserLocations = $True - applicationGuardBlockClipboardSharing = "notConfigured" - defenderEmailContentExecution = "userDefined" - localSecurityOptionsBlockRemoteOpticalDriveAccess = $True - firewallProfilePublic = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - defenderScriptDownloadedPayloadExecutionType = "userDefined" - xboxServicesAccessoryManagementServiceStartupMode = "manual" - xboxServicesEnableXboxGameSaveTask = $True - bitLockerEncryptDevice = $True - localSecurityOptionsBlockMicrosoftAccounts = $True - bitLockerRemovableDrivePolicy = @{ - requireEncryptionForWriteAccess = $True - blockCrossOrganizationWriteAccess = $True - encryptionMethod = "aesCbc128" - } - defenderSecurityCenterBlockExploitProtectionOverride = $True - localSecurityOptionsLogOnMessageText = "FakeStringValue" - applicationGuardCertificateThumbprints = @("FakeStringValue") - defenderCloudBlockLevel = "notConfigured" - defenderProcessCreationType = "userDefined" - defenderDisableScanDownloads = $True - defenderOfficeCommunicationAppsLaunchChildProcess = "userDefined" - localSecurityOptionsClientSendUnencryptedPasswordToThirdPartySMBServers = $True - userRightsAllowAccessFromNetwork = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardForceAuditing = $True - defenderDisableRealTimeMonitoring = $True - defenderSecurityCenterNotificationsFromApp = "notConfigured" - localSecurityOptionsAdministratorAccountName = "FakeStringValue" - windowsDefenderTamperProtection = "notConfigured" - defenderSecurityCenterDisableAccountUI = $True - localSecurityOptionsSwitchToSecureDesktopWhenPromptingForElevation = $True - defenderEmailContentExecutionType = "userDefined" - defenderAllowScanNetworkFiles = $True - defenderSecurityCenterDisableNotificationAreaUI = $True - userRightsProfileSingleProcess = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsSmartCardRemovalBehavior = "noAction" - defenderDisableCloudProtection = $True - userRightsManageVolumes = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - smartScreenEnableInShell = $True - applicationGuardBlockNonEnterpriseContent = $True - defenderAdditionalGuardedFolders = @("FakeStringValue") - localSecurityOptionsDoNotAllowAnonymousEnumerationOfSAMAccounts = $True - userRightsRestoreData = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsMinimumSessionSecurityForNtlmSspBasedClients = "none" - defenderDisableOnAccessProtection = $True - bitLockerRecoveryPasswordRotation = "notConfigured" - firewallPreSharedKeyEncodingMethod = "deviceDefault" - userRightsDelegation = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsDebugPrograms = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterDisableVulnerableTpmFirmwareUpdateUI = $True - defenderSecurityCenterOrganizationDisplayName = "FakeStringValue" - localSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUser = "notConfigured" - userRightsLockMemory = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - appLockerApplicationControl = "notConfigured" - defenderBlockPersistenceThroughWmiType = "userDefined" - defenderDisableScanNetworkFiles = $True - defenderDisableCatchupQuickScan = $True - localSecurityOptionsLogOnMessageTitle = "FakeStringValue" - localSecurityOptionsStandardUserElevationPromptBehavior = "notConfigured" - userRightsGenerateSecurityAudits = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderSecurityCenterDisableClearTpmUI = $True - defenderEnableScanIncomingMail = $True - defenderSecurityCenterHelpPhone = "FakeStringValue" - localSecurityOptionsDoNotRequireCtrlAltDel = $True - userRightsTakeOwnership = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsLocalLogOn = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - applicationGuardAllowPersistence = $True - defenderCloudExtendedTimeoutInSeconds = 25 - firewallIPSecExemptionsAllowICMP = $True - defenderAllowEndUserAccess = $True - defenderScriptDownloadedPayloadExecution = "userDefined" - defenderExploitProtectionXmlFileName = "FakeStringValue" - defenderScriptObfuscatedMacroCodeType = "userDefined" - defenderDisableScanRemovableDrivesDuringFullScan = $True - localSecurityOptionsAllowSystemToBeShutDownWithoutHavingToLogOn = $True - defenderOfficeMacroCodeAllowWin32ImportsType = "userDefined" - firewallIPSecExemptionsAllowDHCP = $True - firewallProfileDomain = @{ - policyRulesFromGroupPolicyNotMerged = $True - inboundConnectionsRequired = $True - securedPacketExemptionAllowed = $True - securedPacketExemptionBlocked = $True - globalPortRulesFromGroupPolicyMerged = $True - stealthModeBlocked = $True - outboundConnectionsBlocked = $True - inboundConnectionsBlocked = $True - authorizedApplicationRulesFromGroupPolicyMerged = $True - inboundNotificationsRequired = $True - firewallEnabled = "notConfigured" - stealthModeRequired = $True - incomingTrafficBlocked = $True - incomingTrafficRequired = $True - unicastResponsesToMulticastBroadcastsBlocked = $True - policyRulesFromGroupPolicyMerged = $True - unicastResponsesToMulticastBroadcastsRequired = $True - connectionSecurityRulesFromGroupPolicyNotMerged = $True - globalPortRulesFromGroupPolicyNotMerged = $True - outboundConnectionsRequired = $True - inboundNotificationsBlocked = $True - connectionSecurityRulesFromGroupPolicyMerged = $True - authorizedApplicationRulesFromGroupPolicyNotMerged = $True - } - localSecurityOptionsAllowPKU2UAuthenticationRequests = $True - defenderSecurityCenterDisableTroubleshootingUI = $True - defenderPotentiallyUnwantedAppAction = "userDefined" - userRightsModifyFirmwareEnvironment = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderOfficeAppsExecutableContentCreationOrLaunch = "userDefined" - defenderOfficeAppsExecutableContentCreationOrLaunchType = "userDefined" - defenderSubmitSamplesConsentType = "sendSafeSamplesAutomatically" - defenderAdobeReaderLaunchChildProcess = "userDefined" - localSecurityOptionsDetectApplicationInstallationsAndPromptForElevation = $True - defenderDisableIntrusionPreventionSystem = $True - defenderDisableCatchupFullScan = $True - bitLockerDisableWarningForOtherDiskEncryption = $True - xboxServicesLiveNetworkingServiceStartupMode = "manual" - firewallBlockStatefulFTP = $True - firewallMergeKeyingModuleSettings = $True - userRightsManageAuditingAndSecurityLogs = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - userRightsCreatePermanentSharedObjects = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsBlockUsersInstallingPrinterDrivers = $True - smartScreenBlockOverrideForFiles = $True - userRightsCreatePageFile = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderAllowOnAccessProtection = $True - dmaGuardDeviceEnumerationPolicy = "deviceDefault" - defenderOfficeAppsOtherProcessInjectionType = "userDefined" - localSecurityOptionsGuestAccountName = "FakeStringValue" - defenderDetectedMalwareActions = @{ - lowSeverity = "deviceDefault" - severeSeverity = "deviceDefault" - moderateSeverity = "deviceDefault" - highSeverity = "deviceDefault" - } - defenderProcessesToExclude = @("FakeStringValue") - defenderScheduledScanTime = "00:00:00" - defenderSecurityCenterDisableSecureBootUI = $True - applicationGuardAllowFileSaveOnHost = $True - localSecurityOptionsDisableGuestAccount = $True - defenderSecurityCenterDisableRansomwareUI = $True - defenderGuardedFoldersAllowedAppPaths = @("FakeStringValue") - defenderOfficeMacroCodeAllowWin32Imports = "userDefined" - applicationGuardAllowPrintToLocalPrinters = $True - defenderSecurityCenterITContactDisplay = "notConfigured" - defenderAttackSurfaceReductionExcludedPaths = @("FakeStringValue") - defenderAllowScanScriptsLoadedInInternetExplorer = $True - defenderSecurityCenterDisableVirusUI = $True - userRightsAccessCredentialManagerAsTrustedCaller = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - localSecurityOptionsAllowUIAccessApplicationElevation = $True - defenderDisableScanScriptsLoadedInInternetExplorer = $True - localSecurityOptionsAdministratorElevationPromptBehavior = "notConfigured" - userRightsLoadUnloadDrivers = @{ - State = "notConfigured" - LocalUsersOrGroups = @( - @{ - Description = "FakeStringValue" - Name = "FakeStringValue" - SecurityIdentifier = "FakeStringValue" - } - ) - } - defenderScanMaxCpuPercentage = 25 - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } + It "Should Reverse Engineer resource from the Export method" { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 index df8f165b0a..15b8adfc60 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationFirmwareInterfacePolicyWindows10.Tests.ps1 @@ -46,6 +46,38 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + wakeOnPower = "notConfigured" + microphone = "notConfigured" + bootFromBuiltInNetworkAdapters = "notConfigured" + radios = "notConfigured" + simultaneousMultiThreading = "notConfigured" + usbTypeAPort = "notConfigured" + microphonesAndSpeakers = "notConfigured" + rearCamera = "notConfigured" + infraredCamera = "notConfigured" + changeUefiSettingsPermission = "notConfiguredOnly" + sdCard = "notConfigured" + bootFromExternalMedia = "notConfigured" + frontCamera = "notConfigured" + windowsPlatformBinaryTable = "notConfigured" + '@odata.type' = "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface" + wakeOnLAN = "notConfigured" + virtualizationOfCpuAndIO = "notConfigured" + wirelessWideAreaNetwork = "notConfigured" + nearFieldCommunication = "notConfigured" + wiFi = "notConfigured" + bluetooth = "notConfigured" + cameras = "notConfigured" + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -135,38 +167,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - wakeOnPower = "notConfigured" - microphone = "notConfigured" - bootFromBuiltInNetworkAdapters = "notConfigured" - radios = "notConfigured" - simultaneousMultiThreading = "notConfigured" - usbTypeAPort = "notConfigured" - microphonesAndSpeakers = "notConfigured" - rearCamera = "notConfigured" - infraredCamera = "notConfigured" - changeUefiSettingsPermission = "notConfiguredOnly" - sdCard = "notConfigured" - bootFromExternalMedia = "notConfigured" - frontCamera = "notConfigured" - windowsPlatformBinaryTable = "notConfigured" - '@odata.type' = "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface" - wakeOnLAN = "notConfigured" - virtualizationOfCpuAndIO = "notConfigured" - wirelessWideAreaNetwork = "notConfigured" - nearFieldCommunication = "notConfigured" - wiFi = "notConfigured" - bluetooth = "notConfigured" - cameras = "notConfigured" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -212,38 +212,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - wakeOnPower = "notConfigured" - microphone = "notConfigured" - bootFromBuiltInNetworkAdapters = "notConfigured" - radios = "notConfigured" - simultaneousMultiThreading = "notConfigured" - usbTypeAPort = "notConfigured" - microphonesAndSpeakers = "notConfigured" - rearCamera = "notConfigured" - infraredCamera = "notConfigured" - changeUefiSettingsPermission = "notConfiguredOnly" - sdCard = "notConfigured" - bootFromExternalMedia = "notConfigured" - frontCamera = "notConfigured" - windowsPlatformBinaryTable = "notConfigured" - '@odata.type' = "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface" - wakeOnLAN = "notConfigured" - virtualizationOfCpuAndIO = "notConfigured" - wirelessWideAreaNetwork = "notConfigured" - nearFieldCommunication = "notConfigured" - wiFi = "notConfigured" - bluetooth = "notConfigured" - cameras = "notConfigured" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } @@ -271,7 +239,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Radios = "notConfigured" RearCamera = "notConfigured" SdCard = "notConfigured" - SimultaneousMultiThreading = "notConfigured" + SimultaneousMultiThreading = "enabled" # Updated property UsbTypeAPort = "notConfigured" VirtualizationOfCpuAndIO = "notConfigured" WakeOnLAN = "notConfigured" @@ -282,38 +250,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - wakeOnPower = "notConfigured" - microphone = "notConfigured" - bootFromBuiltInNetworkAdapters = "notConfigured" - radios = "notConfigured" - simultaneousMultiThreading = "notConfigured" - usbTypeAPort = "notConfigured" - microphonesAndSpeakers = "notConfigured" - rearCamera = "notConfigured" - infraredCamera = "notConfigured" - changeUefiSettingsPermission = "notConfiguredOnly" - sdCard = "notConfigured" - bootFromExternalMedia = "notConfigured" - frontCamera = "notConfigured" - windowsPlatformBinaryTable = "notConfigured" - '@odata.type' = "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface" - wakeOnLAN = "notConfigured" - virtualizationOfCpuAndIO = "notConfigured" - wirelessWideAreaNetwork = "notConfigured" - nearFieldCommunication = "notConfigured" - wiFi = "notConfigured" - bluetooth = "notConfigured" - cameras = "notConfigured" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -337,39 +273,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - wakeOnPower = "notConfigured" - microphone = "notConfigured" - bootFromBuiltInNetworkAdapters = "notConfigured" - radios = "notConfigured" - simultaneousMultiThreading = "notConfigured" - usbTypeAPort = "notConfigured" - microphonesAndSpeakers = "notConfigured" - rearCamera = "notConfigured" - infraredCamera = "notConfigured" - changeUefiSettingsPermission = "notConfiguredOnly" - sdCard = "notConfigured" - bootFromExternalMedia = "notConfigured" - frontCamera = "notConfigured" - windowsPlatformBinaryTable = "notConfigured" - '@odata.type' = "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface" - wakeOnLAN = "notConfigured" - virtualizationOfCpuAndIO = "notConfigured" - wirelessWideAreaNetwork = "notConfigured" - nearFieldCommunication = "notConfigured" - wiFi = "notConfigured" - bluetooth = "notConfigured" - cameras = "notConfigured" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 index cc68d98ae7..3278f33bb0 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10.Tests.ps1 @@ -49,6 +49,20 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.windowsHealthMonitoringConfiguration' + configDeviceHealthMonitoringCustomScope = 'FakeStringValue' + allowDeviceHealthMonitoring = 'notConfigured' + configDeviceHealthMonitoringScope = 'undefined' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + Mock -CommandName Write-M365DSCHost -MockWith{ } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -102,20 +116,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windowsHealthMonitoringConfiguration' - configDeviceHealthMonitoringCustomScope = 'FakeStringValue' - allowDeviceHealthMonitoring = 'notConfigured' - configDeviceHealthMonitoringScope = 'undefined' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -143,20 +143,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windowsHealthMonitoringConfiguration' - configDeviceHealthMonitoringCustomScope = 'FakeStringValue' - allowDeviceHealthMonitoring = 'notConfigured' - configDeviceHealthMonitoringScope = 'undefined' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } @@ -168,7 +154,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10 exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - AllowDeviceHealthMonitoring = 'notConfigured' + AllowDeviceHealthMonitoring = 'enabled' # Updated property ConfigDeviceHealthMonitoringCustomScope = 'FakeStringValue' ConfigDeviceHealthMonitoringScope = 'undefined' Description = 'FakeStringValue' @@ -177,20 +163,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windowsHealthMonitoringConfiguration' - configDeviceHealthMonitoringCustomScope = 'FakeStringValue' - allowDeviceHealthMonitoring = 'notConfigured' - configDeviceHealthMonitoringScope = 'undefined' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -214,21 +186,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windowsHealthMonitoringConfiguration' - configDeviceHealthMonitoringCustomScope = 'FakeStringValue' - allowDeviceHealthMonitoring = 'notConfigured' - configDeviceHealthMonitoringScope = 'undefined' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 index 1072241098..87bd1c20b9 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationIdentityProtectionPolicyWindows10.Tests.ps1 @@ -46,6 +46,31 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + pinRecoveryEnabled = $True + pinExpirationInDays = 25 + pinMinimumLength = 25 + securityDeviceRequired = $True + useCertificatesForOnPremisesAuthEnabled = $True + unlockWithBiometricsEnabled = $True + '@odata.type' = '#microsoft.graph.windowsIdentityProtectionConfiguration' + pinLowercaseCharactersUsage = 'blocked' + pinPreviousBlockCount = 25 + windowsHelloForBusinessBlocked = $True + useSecurityKeyForSignin = $True + pinSpecialCharactersUsage = 'blocked' + pinMaximumLength = 25 + enhancedAntiSpoofingForFacialFeaturesEnabled = $True + pinUppercaseCharactersUsage = 'blocked' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -124,31 +149,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - pinRecoveryEnabled = $True - pinExpirationInDays = 25 - pinMinimumLength = 25 - securityDeviceRequired = $True - useCertificatesForOnPremisesAuthEnabled = $True - unlockWithBiometricsEnabled = $True - '@odata.type' = '#microsoft.graph.windowsIdentityProtectionConfiguration' - pinLowercaseCharactersUsage = 'blocked' - pinPreviousBlockCount = 25 - windowsHelloForBusinessBlocked = $True - useSecurityKeyForSignin = $True - pinSpecialCharactersUsage = 'blocked' - pinMaximumLength = 25 - enhancedAntiSpoofingForFacialFeaturesEnabled = $True - pinUppercaseCharactersUsage = 'blocked' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -187,31 +187,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - pinRecoveryEnabled = $True - pinExpirationInDays = 25 - pinMinimumLength = 25 - securityDeviceRequired = $True - useCertificatesForOnPremisesAuthEnabled = $True - unlockWithBiometricsEnabled = $True - '@odata.type' = '#microsoft.graph.windowsIdentityProtectionConfiguration' - pinLowercaseCharactersUsage = 'blocked' - pinPreviousBlockCount = 25 - windowsHelloForBusinessBlocked = $True - useSecurityKeyForSignin = $True - pinSpecialCharactersUsage = 'blocked' - pinMaximumLength = 25 - enhancedAntiSpoofingForFacialFeaturesEnabled = $True - pinUppercaseCharactersUsage = 'blocked' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } @@ -227,7 +202,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'FakeStringValue' EnhancedAntiSpoofingForFacialFeaturesEnabled = $True Id = 'FakeStringValue' - PinExpirationInDays = 25 + PinExpirationInDays = 7 # Updated property PinLowercaseCharactersUsage = 'blocked' PinMaximumLength = 25 PinMinimumLength = 25 @@ -243,24 +218,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windowsIdentityProtectionConfiguration' - pinUppercaseCharactersUsage = 'blocked' - pinPreviousBlockCount = 7 - pinMinimumLength = 7 - pinSpecialCharactersUsage = 'blocked' - pinExpirationInDays = 7 - pinLowercaseCharactersUsage = 'blocked' - pinMaximumLength = 7 - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -284,31 +241,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - pinRecoveryEnabled = $True - pinExpirationInDays = 25 - pinMinimumLength = 25 - securityDeviceRequired = $True - useCertificatesForOnPremisesAuthEnabled = $True - unlockWithBiometricsEnabled = $True - '@odata.type' = '#microsoft.graph.windowsIdentityProtectionConfiguration' - pinLowercaseCharactersUsage = 'blocked' - pinPreviousBlockCount = 25 - windowsHelloForBusinessBlocked = $True - useSecurityKeyForSignin = $True - pinSpecialCharactersUsage = 'blocked' - pinMaximumLength = 25 - enhancedAntiSpoofingForFacialFeaturesEnabled = $True - pinUppercaseCharactersUsage = 'blocked' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.Tests.ps1 index 0a31c4e230..678426dcc1 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationImportedPfxCertificatePolicyWindows10.Tests.ps1 @@ -46,6 +46,25 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + intendedPurpose = "unassigned" + subjectAlternativeNameType = "none" + certificateValidityPeriodScale = "days" + '@odata.type' = "#microsoft.graph.windows10ImportedPFXCertificateProfile" + keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" + subjectNameFormat = "commonName" + certificateValidityPeriodValue = 25 + renewalThresholdPercentage = 25 + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -107,25 +126,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - intendedPurpose = "unassigned" - subjectAlternativeNameType = "none" - certificateValidityPeriodScale = "days" - '@odata.type' = "#microsoft.graph.windows10ImportedPFXCertificateProfile" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - subjectNameFormat = "commonName" - certificateValidityPeriodValue = 25 - renewalThresholdPercentage = 25 - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -157,25 +157,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - intendedPurpose = "unassigned" - subjectAlternativeNameType = "none" - certificateValidityPeriodScale = "days" - '@odata.type' = "#microsoft.graph.windows10ImportedPFXCertificateProfile" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - subjectNameFormat = "commonName" - certificateValidityPeriodValue = 25 - renewalThresholdPercentage = 25 - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } @@ -194,30 +175,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Id = "FakeStringValue" IntendedPurpose = "unassigned" KeyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - RenewalThresholdPercentage = 25 + RenewalThresholdPercentage = 7 # Updated property SubjectAlternativeNameType = "none" SubjectNameFormat = "commonName" Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - intendedPurpose = "unassigned" - subjectAlternativeNameType = "none" - certificateValidityPeriodScale = "days" - '@odata.type' = "#microsoft.graph.windows10ImportedPFXCertificateProfile" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - subjectNameFormat = "commonName" - certificateValidityPeriodValue = 7 - renewalThresholdPercentage = 7 - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -241,25 +204,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - intendedPurpose = "unassigned" - subjectAlternativeNameType = "none" - certificateValidityPeriodScale = "days" - '@odata.type' = "#microsoft.graph.windows10ImportedPFXCertificateProfile" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - subjectNameFormat = "commonName" - certificateValidityPeriodValue = 25 - renewalThresholdPercentage = 25 - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationKioskPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationKioskPolicyWindows10.Tests.ps1 index a6439421dc..36d4b83e98 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationKioskPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationKioskPolicyWindows10.Tests.ps1 @@ -40,6 +40,113 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + kioskBrowserBlockedURLs = @("FakeStringValue") + kioskBrowserDefaultUrl = "FakeStringValue" + '@odata.type' = "#microsoft.graph.windowsKioskConfiguration" + kioskBrowserEnableNavigationButtons = $True + edgeKioskEnablePublicBrowsing = $True + kioskBrowserRestartOnIdleTimeInMinutes = 25 + kioskBrowserBlockedUrlExceptions = @("FakeStringValue") + kioskBrowserEnableHomeButton = $True + windowsKioskForceUpdateSchedule = @{ + runImmediatelyIfAfterStartDateTime = $True + startDateTime = "2023-01-01T00:00:00.0000000+00:00" + dayofMonth = 25 + recurrence = "none" + dayofWeek = "sunday" + } + kioskProfiles = @( + @{ + profileId = "FakeStringValue" + userAccountsConfiguration = @( + @{ + groupId = "FakeStringValue" + '@odata.type' = "#microsoft.graph.windowsKioskActiveDirectoryGroup" + userName = "FakeStringValue" + userPrincipalName = "FakeStringValue" + groupName = "FakeStringValue" + userId = "FakeStringValue" + displayName = "FakeStringValue" + } + ) + profileName = "FakeStringValue" + appConfiguration = @{ + uwpApp = @{ + edgeNoFirstRun = $True + name = "FakeStringValue" + edgeKiosk = "FakeStringValue" + classicAppPath = "FakeStringValue" + appId = "FakeStringValue" + appUserModelId = "FakeStringValue" + edgeKioskIdleTimeoutMinutes = 25 + autoLaunch = $True + startLayoutTileSize = "hidden" + appType = "unknown" + '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" + edgeKioskType = "publicBrowsing" + containedAppId = "FakeStringValue" + desktopApplicationId = "FakeStringValue" + desktopApplicationLinkPath = "FakeStringValue" + path = "FakeStringValue" + } + win32App = @{ + edgeNoFirstRun = $True + name = "FakeStringValue" + edgeKiosk = "FakeStringValue" + classicAppPath = "FakeStringValue" + edgeKioskIdleTimeoutMinutes = 25 + appUserModelId = "FakeStringValue" + appId = "FakeStringValue" + autoLaunch = $True + startLayoutTileSize = "hidden" + appType = "unknown" + '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" + edgeKioskType = "publicBrowsing" + containedAppId = "FakeStringValue" + desktopApplicationId = "FakeStringValue" + desktopApplicationLinkPath = "FakeStringValue" + path = "FakeStringValue" + } + '@odata.type' = "#microsoft.graph.windowsKioskMultipleApps" + apps = @( + @{ + edgeNoFirstRun = $True + name = "FakeStringValue" + edgeKiosk = "FakeStringValue" + classicAppPath = "FakeStringValue" + appId = "FakeStringValue" + appUserModelId = "FakeStringValue" + edgeKioskIdleTimeoutMinutes = 25 + autoLaunch = $True + startLayoutTileSize = "hidden" + appType = "unknown" + '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" + edgeKioskType = "publicBrowsing" + containedAppId = "FakeStringValue" + desktopApplicationId = "FakeStringValue" + desktopApplicationLinkPath = "FakeStringValue" + path = "FakeStringValue" + } + ) + allowAccessToDownloadsFolder = $True + showTaskBar = $True + disallowDesktopApps = $True + startMenuLayoutXml = $True + } + } + ) + kioskBrowserEnableEndSessionButton = $True + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -277,113 +384,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskBrowserBlockedURLs = @("FakeStringValue") - kioskBrowserDefaultUrl = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskConfiguration" - kioskBrowserEnableNavigationButtons = $True - edgeKioskEnablePublicBrowsing = $True - kioskBrowserRestartOnIdleTimeInMinutes = 25 - kioskBrowserBlockedUrlExceptions = @("FakeStringValue") - kioskBrowserEnableHomeButton = $True - windowsKioskForceUpdateSchedule = @{ - runImmediatelyIfAfterStartDateTime = $True - startDateTime = "2023-01-01T00:00:00.0000000+00:00" - dayofMonth = 25 - recurrence = "none" - dayofWeek = "sunday" - } - kioskProfiles = @( - @{ - profileId = "FakeStringValue" - userAccountsConfiguration = @( - @{ - groupId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskActiveDirectoryGroup" - userName = "FakeStringValue" - userPrincipalName = "FakeStringValue" - groupName = "FakeStringValue" - userId = "FakeStringValue" - displayName = "FakeStringValue" - } - ) - profileName = "FakeStringValue" - appConfiguration = @{ - uwpApp = @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - win32App = @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - appUserModelId = "FakeStringValue" - appId = "FakeStringValue" - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - '@odata.type' = "#microsoft.graph.windowsKioskMultipleApps" - apps = @( - @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - ) - allowAccessToDownloadsFolder = $True - showTaskBar = $True - disallowDesktopApps = $True - startMenuLayoutXml = $True - } - } - ) - kioskBrowserEnableEndSessionButton = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -503,116 +503,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskBrowserBlockedURLs = @("FakeStringValue") - kioskBrowserDefaultUrl = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskConfiguration" - kioskBrowserEnableNavigationButtons = $True - edgeKioskEnablePublicBrowsing = $True - kioskBrowserRestartOnIdleTimeInMinutes = 25 - kioskBrowserBlockedUrlExceptions = @("FakeStringValue") - kioskBrowserEnableHomeButton = $True - windowsKioskForceUpdateSchedule = @{ - runImmediatelyIfAfterStartDateTime = $True - startDateTime = "2023-01-01T00:00:00.0000000+00:00" - dayofMonth = 25 - recurrence = "none" - dayofWeek = "sunday" - } - kioskProfiles = @( - @{ - profileId = "FakeStringValue" - userAccountsConfiguration = @( - @{ - groupId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskActiveDirectoryGroup" - userName = "FakeStringValue" - userPrincipalName = "FakeStringValue" - groupName = "FakeStringValue" - userId = "FakeStringValue" - displayName = "FakeStringValue" - } - ) - profileName = "FakeStringValue" - appConfiguration = @{ - uwpApp = @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - win32App = @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - appUserModelId = "FakeStringValue" - appId = "FakeStringValue" - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - '@odata.type' = "#microsoft.graph.windowsKioskMultipleApps" - apps = @( - @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - ) - allowAccessToDownloadsFolder = $True - showTaskBar = $True - disallowDesktopApps = $True - startMenuLayoutXml = $True - } - } - ) - kioskBrowserEnableEndSessionButton = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -631,7 +523,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { KioskBrowserEnableEndSessionButton = $True KioskBrowserEnableHomeButton = $True KioskBrowserEnableNavigationButtons = $True - KioskBrowserRestartOnIdleTimeInMinutes = 25 + KioskBrowserRestartOnIdleTimeInMinutes = 7 # Updated property kioskProfiles = [CimInstance[]]@( (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsKioskProfile -Property @{ profileId = "FakeStringValue" @@ -722,97 +614,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskBrowserBlockedURLs = @("FakeStringValue") - kioskBrowserDefaultUrl = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskConfiguration" - kioskBrowserBlockedUrlExceptions = @("FakeStringValue") - kioskBrowserRestartOnIdleTimeInMinutes = 7 - windowsKioskForceUpdateSchedule = @{ - startDateTime = "2023-01-01T00:00:00.0000000+00:00" - dayofMonth = 7 - recurrence = "none" - dayofWeek = "sunday" - } - kioskProfiles = @( - @{ - profileId = "FakeStringValue" - userAccountsConfiguration = @( - @{ - groupId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskActiveDirectoryGroup" - userName = "FakeStringValue" - userPrincipalName = "FakeStringValue" - groupName = "FakeStringValue" - userId = "FakeStringValue" - displayName = "FakeStringValue" - } - ) - profileName = "FakeStringValue" - appConfiguration = @{ - apps = @( - @{ - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 7 - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - ) - uwpApp = @{ - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 7 - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - '@odata.type' = "#microsoft.graph.windowsKioskMultipleApps" - win32App = @{ - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 7 - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - } - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -836,113 +637,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskBrowserBlockedURLs = @("FakeStringValue") - kioskBrowserDefaultUrl = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskConfiguration" - kioskBrowserEnableNavigationButtons = $True - edgeKioskEnablePublicBrowsing = $True - kioskBrowserRestartOnIdleTimeInMinutes = 25 - kioskBrowserBlockedUrlExceptions = @("FakeStringValue") - kioskBrowserEnableHomeButton = $True - windowsKioskForceUpdateSchedule = @{ - runImmediatelyIfAfterStartDateTime = $True - startDateTime = "2023-01-01T00:00:00.0000000+00:00" - dayofMonth = 25 - recurrence = "none" - dayofWeek = "sunday" - } - kioskProfiles = @( - @{ - profileId = "FakeStringValue" - userAccountsConfiguration = @( - @{ - groupId = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windowsKioskActiveDirectoryGroup" - userName = "FakeStringValue" - userPrincipalName = "FakeStringValue" - groupName = "FakeStringValue" - userId = "FakeStringValue" - displayName = "FakeStringValue" - } - ) - profileName = "FakeStringValue" - appConfiguration = @{ - uwpApp = @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - win32App = @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - appUserModelId = "FakeStringValue" - appId = "FakeStringValue" - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - '@odata.type' = "#microsoft.graph.windowsKioskMultipleApps" - apps = @( - @{ - edgeNoFirstRun = $True - name = "FakeStringValue" - edgeKiosk = "FakeStringValue" - classicAppPath = "FakeStringValue" - appId = "FakeStringValue" - appUserModelId = "FakeStringValue" - edgeKioskIdleTimeoutMinutes = 25 - autoLaunch = $True - startLayoutTileSize = "hidden" - appType = "unknown" - '@odata.type' = "#microsoft.graph.windowsKioskDesktopApp" - edgeKioskType = "publicBrowsing" - containedAppId = "FakeStringValue" - desktopApplicationId = "FakeStringValue" - desktopApplicationLinkPath = "FakeStringValue" - path = "FakeStringValue" - } - ) - allowAccessToDownloadsFolder = $True - showTaskBar = $True - disallowDesktopApps = $True - startMenuLayoutXml = $True - } - } - ) - kioskBrowserEnableEndSessionButton = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 index 3460a1cc23..13c35037fb 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10.Tests.ps1 @@ -46,6 +46,39 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + windowsNetworkIsolationPolicy = @{ + EnterpriseProxyServers = @('FakeStringValue') + EnterpriseInternalProxyServers = @('FakeStringValue') + EnterpriseIPRangesAreAuthoritative = $True + EnterpriseCloudResources = @( + @{ + Proxy = 'FakeStringValue' + IpAddressOrFQDN = 'FakeStringValue' + } + ) + EnterpriseProxyServersAreAuthoritative = $True + EnterpriseNetworkDomainNames = @('FakeStringValue') + EnterpriseIPRanges = @( + @{ + CidrAddress = 'FakeStringValue' + UpperAddress = 'FakeStringValue' + LowerAddress = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.iPv4CidrRange' + } + ) + NeutralDomainResources = @('FakeStringValue') + } + '@odata.type' = '#microsoft.graph.windows10NetworkBoundaryConfiguration' + } + description = 'FakeStringValue' + displayName = 'FakeStringValue' + id = 'FakeStringValue' + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -137,39 +170,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - windowsNetworkIsolationPolicy = @{ - EnterpriseProxyServers = @('FakeStringValue') - EnterpriseInternalProxyServers = @('FakeStringValue') - EnterpriseIPRangesAreAuthoritative = $True - EnterpriseCloudResources = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - EnterpriseProxyServersAreAuthoritative = $True - EnterpriseNetworkDomainNames = @('FakeStringValue') - EnterpriseIPRanges = @( - @{ - CidrAddress = 'FakeStringValue' - UpperAddress = 'FakeStringValue' - LowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - ) - NeutralDomainResources = @('FakeStringValue') - } - '@odata.type' = '#microsoft.graph.windows10NetworkBoundaryConfiguration' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -216,39 +216,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - windowsNetworkIsolationPolicy = @{ - EnterpriseProxyServers = @('FakeStringValue') - EnterpriseInternalProxyServers = @('FakeStringValue') - EnterpriseIPRangesAreAuthoritative = $True - EnterpriseCloudResources = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - EnterpriseProxyServersAreAuthoritative = $True - EnterpriseNetworkDomainNames = @('FakeStringValue') - EnterpriseIPRanges = @( - @{ - CidrAddress = 'FakeStringValue' - UpperAddress = 'FakeStringValue' - LowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - ) - NeutralDomainResources = @('FakeStringValue') - } - '@odata.type' = '#microsoft.graph.windows10NetworkBoundaryConfiguration' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } @@ -266,7 +233,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { windowsNetworkIsolationPolicy = (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsNetworkIsolationPolicy -Property @{ EnterpriseProxyServers = @('FakeStringValue') EnterpriseInternalProxyServers = @('FakeStringValue') - EnterpriseIPRangesAreAuthoritative = $True + EnterpriseIPRangesAreAuthoritative = $False # Updated property EnterpriseCloudResources = [CimInstance[]]@( (New-CimInstance -ClassName MSFT_MicrosoftGraphproxiedDomain1 -Property @{ Proxy = 'FakeStringValue' @@ -288,37 +255,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - windowsNetworkIsolationPolicy = @{ - EnterpriseProxyServers = @('FakeStringValue') - EnterpriseInternalProxyServers = @('FakeStringValue') - EnterpriseCloudResources = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - EnterpriseNetworkDomainNames = @('FakeStringValue') - EnterpriseIPRanges = @( - @{ - CidrAddress = 'FakeStringValue' - UpperAddress = 'FakeStringValue' - LowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - ) - NeutralDomainResources = @('FakeStringValue') - } - '@odata.type' = '#microsoft.graph.windows10NetworkBoundaryConfiguration' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -342,40 +278,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - windowsNetworkIsolationPolicy = @{ - EnterpriseProxyServers = @('FakeStringValue') - EnterpriseInternalProxyServers = @('FakeStringValue') - EnterpriseIPRangesAreAuthoritative = $True - EnterpriseCloudResources = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - EnterpriseProxyServersAreAuthoritative = $True - EnterpriseNetworkDomainNames = @('FakeStringValue') - EnterpriseIPRanges = @( - @{ - CidrAddress = 'FakeStringValue' - UpperAddress = 'FakeStringValue' - LowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - ) - NeutralDomainResources = @('FakeStringValue') - } - '@odata.type' = '#microsoft.graph.windows10NetworkBoundaryConfiguration' - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.Tests.ps1 index 0f1013b55d..9679bfd52d 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPkcsCertificatePolicyWindows10.Tests.ps1 @@ -40,6 +40,42 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + subjectAlternativeNameType = "none" + certificationAuthorityName = "FakeStringValue" + renewalThresholdPercentage = 25 + subjectAlternativeNameFormatString = "FakeStringValue" + certificateValidityPeriodScale = "days" + keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" + certificationAuthority = "FakeStringValue" + certificateValidityPeriodValue = 25 + certificateTemplateName = "FakeStringValue" + '@odata.type' = "#microsoft.graph.windows10PkcsCertificateProfile" + subjectNameFormatString = "FakeStringValue" + subjectNameFormat = "commonName" + certificateStore = "user" + extendedKeyUsages = @( + @{ + objectIdentifier = "FakeStringValue" + name = "FakeStringValue" + } + ) + customSubjectAlternativeNames = @( + @{ + sanType = "none" + name = "FakeStringValue" + } + ) + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -135,42 +171,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - certificationAuthorityName = "FakeStringValue" - renewalThresholdPercentage = 25 - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - certificationAuthority = "FakeStringValue" - certificateValidityPeriodValue = 25 - certificateTemplateName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows10PkcsCertificateProfile" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -219,42 +219,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - certificationAuthorityName = "FakeStringValue" - renewalThresholdPercentage = 25 - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - certificationAuthority = "FakeStringValue" - certificateValidityPeriodValue = 25 - certificateTemplateName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows10PkcsCertificateProfile" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } @@ -269,7 +233,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { CertificateStore = "user" CertificateTemplateName = "FakeStringValue" certificateValidityPeriodScale = "days" - certificateValidityPeriodValue = 25 + certificateValidityPeriodValue = 7 # Updated property CertificationAuthority = "FakeStringValue" CertificationAuthorityName = "FakeStringValue" customSubjectAlternativeNames = [CimInstance[]]@( @@ -296,41 +260,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - certificationAuthorityName = "FakeStringValue" - renewalThresholdPercentage = 7 - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - certificationAuthority = "FakeStringValue" - certificateValidityPeriodValue = 7 - certificateTemplateName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows10PkcsCertificateProfile" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -354,43 +283,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - certificationAuthorityName = "FakeStringValue" - renewalThresholdPercentage = 25 - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - certificationAuthority = "FakeStringValue" - certificateValidityPeriodValue = 25 - certificateTemplateName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows10PkcsCertificateProfile" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptMacOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptMacOS.Tests.ps1 index 70a949d4f6..2d28e25af1 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptMacOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptMacOS.Tests.ps1 @@ -49,6 +49,22 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceShellScript -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = "#microsoft.graph.DeviceShellScript" + } + BlockExecutionNotifications = $True + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + FileName = "FakeStringValue" + Id = "FakeStringValue" + RoleScopeTagIds = @("FakeStringValue") + RunAsAccount = "system" + ScriptContent = [byte[]]::new(5) + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -105,22 +121,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceShellScript -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.DeviceShellScript" - } - BlockExecutionNotifications = $True - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - FileName = "FakeStringValue" - Id = "FakeStringValue" - RoleScopeTagIds = @("FakeStringValue") - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } It 'Should return Values from the Get method' { @@ -150,23 +150,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceShellScript -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.DeviceShellScript" - } - BlockExecutionNotifications = $True - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - FileName = "FakeStringValue" - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - RoleScopeTagIds = @("FakeStringValue") - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } @@ -184,26 +167,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { FileName = "FakeStringValue" Id = "FakeStringValue" RoleScopeTagIds = @("FakeStringValue") - RunAsAccount = "system" + RunAsAccount = "user" # Updated property ScriptContent = "AAAAAAA=" Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceShellScript -MockWith { - return @{ - CreatedDateTime = "2023-01-01T00:00:00.0000000+01:00" - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - FileName = "FakeStringValue" - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - RetryCount = 7 - RoleScopeTagIds = @("FakeStringValue") - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } It 'Should return Values from the Get method' { @@ -227,23 +195,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceShellScript -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.DeviceShellScript" - } - BlockExecutionNotifications = $True - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - FileName = "FakeStringValue" - Id = "FakeStringValue" - RoleScopeTagIds = @("FakeStringValue") - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptWindows.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptWindows.Tests.ps1 index 817b028911..1a715d1a97 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptWindows.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPlatformScriptWindows.Tests.ps1 @@ -49,6 +49,23 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementScript -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = "#microsoft.graph.DeviceManagementScript" + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + EnforceSignatureCheck = $True + FileName = "FakeStringValue" + Id = "FakeStringValue" + RoleScopeTagIds = @("FakeStringValue") + RunAs32Bit = $True + RunAsAccount = "system" + ScriptContent = [byte[]]::new(5) + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -107,23 +124,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementScript -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.DeviceManagementScript" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - EnforceSignatureCheck = $True - FileName = "FakeStringValue" - Id = "FakeStringValue" - RoleScopeTagIds = @("FakeStringValue") - RunAs32Bit = $True - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } It 'Should return Values from the Get method' { @@ -154,23 +154,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementScript -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.DeviceManagementScript" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - EnforceSignatureCheck = $True - FileName = "FakeStringValue" - Id = "FakeStringValue" - RoleScopeTagIds = @("FakeStringValue") - RunAs32Bit = $True - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } @@ -189,23 +172,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Id = "FakeStringValue" RoleScopeTagIds = @("FakeStringValue") RunAs32Bit = $True - RunAsAccount = "system" + RunAsAccount = "user" # Updated property ScriptContent = "AAAAAAA=" Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementScript -MockWith { - return @{ - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - FileName = "FakeStringValue" - Id = "FakeStringValue" - RoleScopeTagIds = @("FakeStringValue") - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } It 'Should return Values from the Get method' { @@ -229,26 +200,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementScript -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.DeviceManagementScript" - } - CreatedDateTime = "2023-01-01T00:00:00.0000000+01:00" - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - EnforceSignatureCheck = $True - FileName = "FakeStringValue" - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+01:00" - RoleScopeTagIds = @("FakeStringValue") - RunAs32Bit = $True - RunAsAccount = "system" - ScriptContent = [byte[]]::new(5) - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 index 656deff570..6d178fd618 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 @@ -43,6 +43,31 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + ScreenCaptureBlocked = $True + PasswordMinimumLength = 25 + BluetoothBlocked = $True + '@odata.type' = '#microsoft.graph.' + AppsBlockInstallFromUnknownSources = $True + FactoryResetBlocked = $True + CameraBlocked = $True + PasswordRequiredType = 'deviceDefault' + PasswordMinutesOfInactivityBeforeScreenTimeout = 25 + StorageBlockUsbFileTransfer = $True + WifiBlockEditConfigurations = $True + PasswordSignInFailureCountBeforeFactoryReset = 25 + SecurityAllowDebuggingFeatures = $True + StorageBlockExternalMedia = $True + BluetoothBlockConfiguration = $True + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + Mock -CommandName New-M365DSCConnection -MockWith { return 'Credentials' } @@ -76,7 +101,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { StorageBlockExternalMedia = $True StorageBlockUsbFileTransfer = $True WifiBlockEditConfigurations = $True - Ensure = 'Present' Credential = $Credential } @@ -117,37 +141,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { StorageBlockExternalMedia = $True StorageBlockUsbFileTransfer = $True WifiBlockEditConfigurations = $True - Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ScreenCaptureBlocked = $True - PasswordMinimumLength = 25 - BluetoothBlocked = $True - '@odata.type' = '#microsoft.graph.' - AppsBlockInstallFromUnknownSources = $True - FactoryResetBlocked = $True - CameraBlocked = $True - PasswordRequiredType = 'deviceDefault' - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - StorageBlockUsbFileTransfer = $True - WifiBlockEditConfigurations = $True - PasswordSignInFailureCountBeforeFactoryReset = 25 - SecurityAllowDebuggingFeatures = $True - StorageBlockExternalMedia = $True - BluetoothBlockConfiguration = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -183,36 +179,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { StorageBlockExternalMedia = $True StorageBlockUsbFileTransfer = $True WifiBlockEditConfigurations = $True - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ScreenCaptureBlocked = $True - PasswordMinimumLength = 25 - BluetoothBlocked = $True - '@odata.type' = '#microsoft.graph.' - AppsBlockInstallFromUnknownSources = $True - FactoryResetBlocked = $True - CameraBlocked = $True - PasswordRequiredType = 'deviceDefault' - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - StorageBlockUsbFileTransfer = $True - WifiBlockEditConfigurations = $True - PasswordSignInFailureCountBeforeFactoryReset = 25 - SecurityAllowDebuggingFeatures = $True - StorageBlockExternalMedia = $True - BluetoothBlockConfiguration = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return true from the Test method' { @@ -231,7 +200,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'FakeStringValue' FactoryResetBlocked = $True Id = 'FakeStringValue' - PasswordMinimumLength = 25 + PasswordMinimumLength = 7 # Updated property PasswordMinutesOfInactivityBeforeScreenTimeout = 25 PasswordRequiredType = 'deviceDefault' PasswordSignInFailureCountBeforeFactoryReset = 25 @@ -240,27 +209,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { StorageBlockExternalMedia = $True StorageBlockUsbFileTransfer = $True WifiBlockEditConfigurations = $True - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - PasswordMinimumLength = 7 - PasswordRequiredType = 'deviceDefault' - PasswordSignInFailureCountBeforeFactoryReset = 7 - PasswordMinutesOfInactivityBeforeScreenTimeout = 7 - '@odata.type' = '#microsoft.graph.' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -284,33 +235,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ScreenCaptureBlocked = $True - PasswordMinimumLength = 25 - BluetoothBlocked = $True - '@odata.type' = '#microsoft.graph.aospDeviceOwnerDeviceConfiguration' - AppsBlockInstallFromUnknownSources = $True - FactoryResetBlocked = $True - CameraBlocked = $True - PasswordRequiredType = 'deviceDefault' - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - StorageBlockUsbFileTransfer = $True - WifiBlockEditConfigurations = $True - PasswordSignInFailureCountBeforeFactoryReset = 25 - SecurityAllowDebuggingFeatures = $True - StorageBlockExternalMedia = $True - BluetoothBlockConfiguration = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 index aaf7ff48ff..b066a7a224 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 @@ -41,6 +41,51 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + id = '12345-12345-12345-12345-12345' + displayName = 'Android Work Profile - Device Restrictions - Standard' + description = 'Android device configuration policy' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration' + passwordBlockFingerprintUnlock = $False + passwordBlockTrustAgents = $False + passwordExpirationDays = 10 + passwordMinimumLength = 8 + passwordMinutesOfInactivityBeforeScreenTimeout = 3 + passwordPreviousPasswordBlockCount = 3 + passwordSignInFailureCountBeforeFactoryReset = 10 + passwordRequiredType = 'deviceDefault' + workProfileDataSharingType = 'deviceDefault' + workProfileBlockNotificationsWhileDeviceLocked = $False + workProfileBlockAddingAccounts = $False + workProfileBluetoothEnableContactSharing = $False + workProfileBlockScreenCapture = $False + workProfileBlockCrossProfileCallerId = $False + workProfileBlockCamera = $False + workProfileBlockCrossProfileContactsSearch = $False + workProfileBlockCrossProfileCopyPaste = $False + workProfileDefaultAppPermissionPolicy = 'deviceDefault' + workProfilePasswordBlockFingerprintUnlock = $False + workProfilePasswordBlockTrustAgents = $False + workProfilePasswordExpirationDays = 90 + workProfilePasswordMinimumLength = 4 + workProfilePasswordMinNumericCharacters = 3 + workProfilePasswordMinNonLetterCharacters = 3 + workProfilePasswordMinLetterCharacters = 3 + workProfilePasswordMinLowerCaseCharacters = 3 + workProfilePasswordMinUpperCaseCharacters = 3 + workProfilePasswordMinSymbolCharacters = 3 + workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = 3 + workProfilePasswordPreviousPasswordBlockCount = 3 + workProfilePasswordSignInFailureCountBeforeFactoryReset = 3 + workProfilePasswordRequiredType = 'deviceDefault' + workProfileRequirePassword = $False + securityRequireVerifyApps = $False + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { return @() } @@ -126,7 +171,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { passwordExpirationDays = 10 passwordMinimumLength = 8 passwordMinutesOfInactivityBeforeScreenTimeout = 3 - passwordPreviousPasswordBlockCount = 3 + passwordPreviousPasswordBlockCount = 2 # Updated property passwordSignInFailureCountBeforeFactoryReset = 10 passwordRequiredType = 'deviceDefault' workProfileDataSharingType = 'deviceDefault' @@ -158,51 +203,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - id = '12345-12345-12345-12345-12345' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration' - } - description = 'Android device configuration policy' - displayName = 'Android Work Profile - Device Restrictions - Standard' - passwordBlockFingerprintUnlock = $False - passwordBlockTrustAgents = $True; #drift - passwordExpirationDays = 10 - passwordMinimumLength = 8 - passwordMinutesOfInactivityBeforeScreenTimeout = 3 - passwordPreviousPasswordBlockCount = 3 - passwordSignInFailureCountBeforeFactoryReset = 10 - passwordRequiredType = 'deviceDefault' - workProfileDataSharingType = 'deviceDefault' - workProfileBlockNotificationsWhileDeviceLocked = $False - workProfileBlockAddingAccounts = $False - workProfileBluetoothEnableContactSharing = $False - workProfileBlockScreenCapture = $False - workProfileBlockCrossProfileCallerId = $False - workProfileBlockCamera = $False - workProfileBlockCrossProfileContactsSearch = $False - workProfileBlockCrossProfileCopyPaste = $False - workProfileDefaultAppPermissionPolicy = 'deviceDefault' - workProfilePasswordBlockFingerprintUnlock = $False - workProfilePasswordBlockTrustAgents = $False - workProfilePasswordExpirationDays = 90 - workProfilePasswordMinimumLength = 4 - workProfilePasswordMinNumericCharacters = 3 - workProfilePasswordMinNonLetterCharacters = 3 - workProfilePasswordMinLetterCharacters = 3 - workProfilePasswordMinLowerCaseCharacters = 3 - workProfilePasswordMinUpperCaseCharacters = 3 - workProfilePasswordMinSymbolCharacters = 3 - workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = 3 - workProfilePasswordPreviousPasswordBlockCount = 3 - workProfilePasswordSignInFailureCountBeforeFactoryReset = 3 - workProfilePasswordRequiredType = 'deviceDefault' - workProfileRequirePassword = $False - securityRequireVerifyApps = $False - } - } } It 'Should return Present from the Get method' { @@ -221,7 +221,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'When the policy already exists and IS in the Desired State' -Fixture { BeforeAll { - $TestParams = @{ description = 'Android device configuration policy' displayName = 'Android Work Profile - Device Restrictions - Standard' @@ -262,51 +261,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - id = '12345-12345-12345-12345-12345' - displayName = 'Android Work Profile - Device Restrictions - Standard' - description = 'Android device configuration policy' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration' - passwordBlockFingerprintUnlock = $False - passwordBlockTrustAgents = $False - passwordExpirationDays = 10 - passwordMinimumLength = 8 - passwordMinutesOfInactivityBeforeScreenTimeout = 3 - passwordPreviousPasswordBlockCount = 3 - passwordSignInFailureCountBeforeFactoryReset = 10 - passwordRequiredType = 'deviceDefault' - workProfileDataSharingType = 'deviceDefault' - workProfileBlockNotificationsWhileDeviceLocked = $False - workProfileBlockAddingAccounts = $False - workProfileBluetoothEnableContactSharing = $False - workProfileBlockScreenCapture = $False - workProfileBlockCrossProfileCallerId = $False - workProfileBlockCamera = $False - workProfileBlockCrossProfileContactsSearch = $False - workProfileBlockCrossProfileCopyPaste = $False - workProfileDefaultAppPermissionPolicy = 'deviceDefault' - workProfilePasswordBlockFingerprintUnlock = $False - workProfilePasswordBlockTrustAgents = $False - workProfilePasswordExpirationDays = 90 - workProfilePasswordMinimumLength = 4 - workProfilePasswordMinNumericCharacters = 3 - workProfilePasswordMinNonLetterCharacters = 3 - workProfilePasswordMinLetterCharacters = 3 - workProfilePasswordMinLowerCaseCharacters = 3 - workProfilePasswordMinUpperCaseCharacters = 3 - workProfilePasswordMinSymbolCharacters = 3 - workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = 3 - workProfilePasswordPreviousPasswordBlockCount = 3 - workProfilePasswordSignInFailureCountBeforeFactoryReset = 3 - workProfilePasswordRequiredType = 'deviceDefault' - workProfileRequirePassword = $False - securityRequireVerifyApps = $False - } - } - } } It 'Should return true from the Test method' { @@ -321,51 +275,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - id = '12345-12345-12345-12345-12345' - displayName = 'Android Work Profile - Device Restrictions - Standard' - description = 'Android device configuration policy' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration' - passwordBlockFingerprintUnlock = $False - passwordBlockTrustAgents = $False - passwordExpirationDays = 10 - passwordMinimumLength = 8 - passwordMinutesOfInactivityBeforeScreenTimeout = 3 - passwordPreviousPasswordBlockCount = 3 - passwordSignInFailureCountBeforeFactoryReset = 10 - passwordRequiredType = 'deviceDefault' - workProfileDataSharingType = 'deviceDefault' - workProfileBlockNotificationsWhileDeviceLocked = $False - workProfileBlockAddingAccounts = $False - workProfileBluetoothEnableContactSharing = $False - workProfileBlockScreenCapture = $False - workProfileBlockCrossProfileCallerId = $False - workProfileBlockCamera = $False - workProfileBlockCrossProfileContactsSearch = $False - workProfileBlockCrossProfileCopyPaste = $False - workProfileDefaultAppPermissionPolicy = 'deviceDefault' - workProfilePasswordBlockFingerprintUnlock = $False - workProfilePasswordBlockTrustAgents = $False - workProfilePasswordExpirationDays = 90 - workProfilePasswordMinimumLength = 4 - workProfilePasswordMinNumericCharacters = 3 - workProfilePasswordMinNonLetterCharacters = 3 - workProfilePasswordMinLetterCharacters = 3 - workProfilePasswordMinLowerCaseCharacters = 3 - workProfilePasswordMinUpperCaseCharacters = 3 - workProfilePasswordMinSymbolCharacters = 3 - workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = 3 - workProfilePasswordPreviousPasswordBlockCount = 3 - workProfilePasswordSignInFailureCountBeforeFactoryReset = 3 - workProfilePasswordRequiredType = 'deviceDefault' - workProfileRequirePassword = $False - securityRequireVerifyApps = $False - } - } - } } It 'Should return Present from the Get method' { @@ -389,51 +298,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - id = '12345-12345-12345-12345-12345' - displayName = 'Android Work Profile - Device Restrictions - Standard' - description = 'Android device configuration policy' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration' - passwordBlockFingerprintUnlock = $False - passwordBlockTrustAgents = $False - passwordExpirationDays = 10 - passwordMinimumLength = 8 - passwordMinutesOfInactivityBeforeScreenTimeout = 3 - passwordPreviousPasswordBlockCount = 3 - passwordSignInFailureCountBeforeFactoryReset = 10 - passwordRequiredType = 'deviceDefault' - workProfileDataSharingType = 'deviceDefault' - workProfileBlockNotificationsWhileDeviceLocked = $False - workProfileBlockAddingAccounts = $False - workProfileBluetoothEnableContactSharing = $False - workProfileBlockScreenCapture = $False - workProfileBlockCrossProfileCallerId = $False - workProfileBlockCamera = $False - workProfileBlockCrossProfileContactsSearch = $False - workProfileBlockCrossProfileCopyPaste = $False - workProfileDefaultAppPermissionPolicy = 'deviceDefault' - workProfilePasswordBlockFingerprintUnlock = $False - workProfilePasswordBlockTrustAgents = $False - workProfilePasswordExpirationDays = 90 - workProfilePasswordMinimumLength = 4 - workProfilePasswordMinNumericCharacters = 3 - workProfilePasswordMinNonLetterCharacters = 3 - workProfilePasswordMinLetterCharacters = 3 - workProfilePasswordMinLowerCaseCharacters = 3 - workProfilePasswordMinUpperCaseCharacters = 3 - workProfilePasswordMinSymbolCharacters = 3 - workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = 3 - workProfilePasswordPreviousPasswordBlockCount = 3 - workProfilePasswordSignInFailureCountBeforeFactoryReset = 3 - workProfilePasswordRequiredType = 'deviceDefault' - workProfileRequirePassword = $False - securityRequireVerifyApps = $False - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 index 9112538c24..6c82dd3309 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 @@ -46,6 +46,72 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName New-M365DSCConnection -MockWith { return 'Credentials' } + + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{'@odata.type' = '#microsoft.graph.macosGeneralDeviceConfiguration' } + TouchIdTimeoutInHours = 25 + Description = 'FakeStringValue' + AirDropBlocked = $True + ClassroomAppForceUnpromptedScreenObservation = $True + KeychainBlockCloudSync = $True + DisplayName = 'FakeStringValue' + AppleWatchBlockAutoUnlock = $True + ScreenCaptureBlocked = $True + MultiplayerGamingBlocked = $True + WallpaperModificationBlocked = $True + CameraBlocked = $True + ICloudBlockActivityContinuation = $True + SpotlightBlockInternetResults = $True + SafariBlockAutofill = $True + PasswordBlockAutoFill = $True + PasswordRequiredType = 'deviceDefault' + PasswordMaximumAttemptCount = 25 + ClassroomForceAutomaticallyJoinClasses = $True + ICloudPrivateRelayBlocked = $True + PasswordBlockModification = $True + ICloudBlockCalendar = $True + ICloudBlockAddressBook = $True + SoftwareUpdatesEnforcedDelayInDays = 25 + ICloudBlockReminders = $True + PasswordBlockSimple = $True + PasswordBlockAirDropSharing = $True + ICloudBlockBookmarks = $True + PasswordRequired = $True + KeyboardBlockDictation = $True + SoftwareUpdateMajorOSDeferredInstallDelayInDays = 25 + ContentCachingBlocked = $True + ICloudDesktopAndDocumentsBlocked = $True + UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' + PasswordPreviousPasswordBlockCount = 25 + AddingGameCenterFriendsBlocked = $True + Id = 'FakeStringValue' + PasswordMinimumLength = 25 + EraseContentAndSettingsBlocked = $True + ICloudBlockNotes = $True + ICloudBlockPhotoLibrary = $True + ICloudBlockMail = $True + PasswordMinutesOfInactivityBeforeScreenTimeout = 25 + PasswordExpirationDays = 25 + PasswordBlockFingerprintUnlock = $True + PasswordBlockProximityRequests = $True + SoftwareUpdateNonOSDeferredInstallDelayInDays = 25 + ITunesBlockMusicService = $True + DefinitionLookupBlocked = $True + ClassroomForceRequestPermissionToLeaveClasses = $True + ClassroomAppBlockRemoteScreenObservation = $True + SoftwareUpdateMinorOSDeferredInstallDelayInDays = 25 + ITunesBlockFileSharing = $True + GameCenterBlocked = $True + ICloudBlockDocumentSync = $True + PasswordMinimumCharacterSetCount = 25 + PasswordMinutesOfInactivityBeforeLock = 25 + ClassroomForceUnpromptedAppAndDeviceLock = $True + PasswordMinutesUntilFailedLoginReset = 25 + + } + } + Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } # Mock Write-M365DSCHost to hide output during the tests @@ -117,7 +183,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PasswordMinutesOfInactivityBeforeLock = 25 ClassroomForceUnpromptedAppAndDeviceLock = $True PasswordMinutesUntilFailedLoginReset = 25 - Ensure = 'Present' Credential = $Credential } @@ -204,71 +269,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{'@odata.type' = '#microsoft.graph.macosGeneralDeviceConfiguration' } - TouchIdTimeoutInHours = 25 - Description = 'FakeStringValue' - AirDropBlocked = $True - ClassroomAppForceUnpromptedScreenObservation = $True - KeychainBlockCloudSync = $True - DisplayName = 'FakeStringValue' - AppleWatchBlockAutoUnlock = $True - ScreenCaptureBlocked = $True - MultiplayerGamingBlocked = $True - WallpaperModificationBlocked = $True - CameraBlocked = $True - ICloudBlockActivityContinuation = $True - SpotlightBlockInternetResults = $True - SafariBlockAutofill = $True - PasswordBlockAutoFill = $True - PasswordRequiredType = 'deviceDefault' - PasswordMaximumAttemptCount = 25 - ClassroomForceAutomaticallyJoinClasses = $True - ICloudPrivateRelayBlocked = $True - PasswordBlockModification = $True - ICloudBlockCalendar = $True - ICloudBlockAddressBook = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - ICloudBlockReminders = $True - PasswordBlockSimple = $True - PasswordBlockAirDropSharing = $True - ICloudBlockBookmarks = $True - PasswordRequired = $True - KeyboardBlockDictation = $True - SoftwareUpdateMajorOSDeferredInstallDelayInDays = 25 - ContentCachingBlocked = $True - ICloudDesktopAndDocumentsBlocked = $True - UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' - PasswordPreviousPasswordBlockCount = 25 - AddingGameCenterFriendsBlocked = $True - Id = 'FakeStringValue' - PasswordMinimumLength = 25 - EraseContentAndSettingsBlocked = $True - ICloudBlockNotes = $True - ICloudBlockPhotoLibrary = $True - ICloudBlockMail = $True - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - PasswordExpirationDays = 25 - PasswordBlockFingerprintUnlock = $True - PasswordBlockProximityRequests = $True - SoftwareUpdateNonOSDeferredInstallDelayInDays = 25 - ITunesBlockMusicService = $True - DefinitionLookupBlocked = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - ClassroomAppBlockRemoteScreenObservation = $True - SoftwareUpdateMinorOSDeferredInstallDelayInDays = 25 - ITunesBlockFileSharing = $True - GameCenterBlocked = $True - ICloudBlockDocumentSync = $True - PasswordMinimumCharacterSetCount = 25 - PasswordMinutesOfInactivityBeforeLock = 25 - ClassroomForceUnpromptedAppAndDeviceLock = $True - PasswordMinutesUntilFailedLoginReset = 25 - - } - } } It 'Should return Values from the Get method' { @@ -350,79 +350,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Credential = $Credential - Ensure = 'Present' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' - TouchIdTimeoutInHours = 25 - AirDropBlocked = $True - ClassroomAppForceUnpromptedScreenObservation = $True - KeychainBlockCloudSync = $True - AppleWatchBlockAutoUnlock = $True - ScreenCaptureBlocked = $True - MultiplayerGamingBlocked = $True - WallpaperModificationBlocked = $True - CameraBlocked = $True - ICloudBlockActivityContinuation = $True - SpotlightBlockInternetResults = $True - SafariBlockAutofill = $True - PasswordBlockAutoFill = $True - PasswordRequiredType = 'deviceDefault' - PasswordMaximumAttemptCount = 25 - ClassroomForceAutomaticallyJoinClasses = $True - ICloudPrivateRelayBlocked = $True - PasswordBlockModification = $True - ICloudBlockCalendar = $True - ICloudBlockAddressBook = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - ICloudBlockReminders = $True - PasswordBlockSimple = $True - PasswordBlockAirDropSharing = $True - ICloudBlockBookmarks = $True - PasswordRequired = $True - KeyboardBlockDictation = $True - SoftwareUpdateMajorOSDeferredInstallDelayInDays = 25 - ContentCachingBlocked = $True - ICloudDesktopAndDocumentsBlocked = $True - UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' - PasswordPreviousPasswordBlockCount = 25 - AddingGameCenterFriendsBlocked = $True - PasswordMinimumLength = 25 - EraseContentAndSettingsBlocked = $True - ICloudBlockNotes = $True - ICloudBlockPhotoLibrary = $True - ICloudBlockMail = $True - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - PasswordExpirationDays = 25 - PasswordBlockFingerprintUnlock = $True - PasswordBlockProximityRequests = $True - SoftwareUpdateNonOSDeferredInstallDelayInDays = 25 - ITunesBlockMusicService = $True - DefinitionLookupBlocked = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - ClassroomAppBlockRemoteScreenObservation = $True - SoftwareUpdateMinorOSDeferredInstallDelayInDays = 25 - ITunesBlockFileSharing = $True - GameCenterBlocked = $True - ICloudBlockDocumentSync = $True - PasswordMinimumCharacterSetCount = 25 - PasswordMinutesOfInactivityBeforeLock = 25 - ClassroomForceUnpromptedAppAndDeviceLock = $True - PasswordMinutesUntilFailedLoginReset = 25 - } - } - } } - #It "Should return Values from the Get method" { - #Get-TargetResource @testParams - #} + It 'Should return Values from the Get method' { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true @@ -432,7 +364,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneDeviceConfigurationPolicyMacOS exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - TouchIdTimeoutInHours = 25 + TouchIdTimeoutInHours = 7 # Updated property Description = 'FakeStringValue' AirDropBlocked = $True ClassroomAppForceUnpromptedScreenObservation = $True @@ -490,77 +422,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PasswordMinutesOfInactivityBeforeLock = 25 ClassroomForceUnpromptedAppAndDeviceLock = $True PasswordMinutesUntilFailedLoginReset = 25 - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' - } - TouchIdTimeoutInHours = 7 - AirDropBlocked = $False - ClassroomAppForceUnpromptedScreenObservation = $False - KeychainBlockCloudSync = $False - AppleWatchBlockAutoUnlock = $False - ScreenCaptureBlocked = $False - MultiplayerGamingBlocked = $False - WallpaperModificationBlocked = $False - CameraBlocked = $False - ICloudBlockActivityContinuation = $False - SpotlightBlockInternetResults = $False - SafariBlockAutofill = $False - PasswordBlockAutoFill = $False - PasswordRequiredType = 'deviceDefault' - PasswordMaximumAttemptCount = 7 - ClassroomForceAutomaticallyJoinClasses = $False - ICloudPrivateRelayBlocked = $False - PasswordBlockModification = $False - ICloudBlockCalendar = $False - ICloudBlockAddressBook = $False - SoftwareUpdatesEnforcedDelayInDays = 7 - ICloudBlockReminders = $False - PasswordBlockSimple = $False - PasswordBlockAirDropSharing = $False - ICloudBlockBookmarks = $False - PasswordRequired = $False - KeyboardBlockDictation = $False - SoftwareUpdateMajorOSDeferredInstallDelayInDays = 7 - ContentCachingBlocked = $False - ICloudDesktopAndDocumentsBlocked = $False - UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' - PasswordPreviousPasswordBlockCount = 7 - AddingGameCenterFriendsBlocked = $False - PasswordMinimumLength = 7 - EraseContentAndSettingsBlocked = $False - ICloudBlockNotes = $False - ICloudBlockPhotoLibrary = $False - ICloudBlockMail = $False - PasswordMinutesOfInactivityBeforeScreenTimeout = 7 - PasswordExpirationDays = 7 - PasswordBlockFingerprintUnlock = $False - PasswordBlockProximityRequests = $False - SoftwareUpdateNonOSDeferredInstallDelayInDays = 7 - ITunesBlockMusicService = $False - DefinitionLookupBlocked = $False - ClassroomForceRequestPermissionToLeaveClasses = $False - ClassroomAppBlockRemoteScreenObservation = $False - SoftwareUpdateMinorOSDeferredInstallDelayInDays = 7 - ITunesBlockFileSharing = $False - GameCenterBlocked = $False - ICloudBlockDocumentSync = $False - PasswordMinimumCharacterSetCount = 7 - PasswordMinutesOfInactivityBeforeLock = 7 - ClassroomForceUnpromptedAppAndDeviceLock = $False - PasswordMinutesUntilFailedLoginReset = 7 - - } - } } It 'Should return Values from the Get method' { @@ -584,72 +448,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{'@odata.type' = '#microsoft.graph.macosGeneralDeviceConfiguration' } - TouchIdTimeoutInHours = 25 - Description = 'FakeStringValue' - AirDropBlocked = $True - ClassroomAppForceUnpromptedScreenObservation = $True - KeychainBlockCloudSync = $True - DisplayName = 'FakeStringValue' - AppleWatchBlockAutoUnlock = $True - ScreenCaptureBlocked = $True - MultiplayerGamingBlocked = $True - WallpaperModificationBlocked = $True - CameraBlocked = $True - ICloudBlockActivityContinuation = $True - SpotlightBlockInternetResults = $True - SafariBlockAutofill = $True - PasswordBlockAutoFill = $True - PasswordRequiredType = 'deviceDefault' - PasswordMaximumAttemptCount = 25 - ClassroomForceAutomaticallyJoinClasses = $True - ICloudPrivateRelayBlocked = $True - PasswordBlockModification = $True - ICloudBlockCalendar = $True - ICloudBlockAddressBook = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - ICloudBlockReminders = $True - PasswordBlockSimple = $True - PasswordBlockAirDropSharing = $True - ICloudBlockBookmarks = $True - PasswordRequired = $True - KeyboardBlockDictation = $True - SoftwareUpdateMajorOSDeferredInstallDelayInDays = 25 - ContentCachingBlocked = $True - ICloudDesktopAndDocumentsBlocked = $True - UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' - PasswordPreviousPasswordBlockCount = 25 - AddingGameCenterFriendsBlocked = $True - Id = 'FakeStringValue' - PasswordMinimumLength = 25 - EraseContentAndSettingsBlocked = $True - ICloudBlockNotes = $True - ICloudBlockPhotoLibrary = $True - ICloudBlockMail = $True - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - PasswordExpirationDays = 25 - PasswordBlockFingerprintUnlock = $True - PasswordBlockProximityRequests = $True - SoftwareUpdateNonOSDeferredInstallDelayInDays = 25 - ITunesBlockMusicService = $True - DefinitionLookupBlocked = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - ClassroomAppBlockRemoteScreenObservation = $True - SoftwareUpdateMinorOSDeferredInstallDelayInDays = 25 - ITunesBlockFileSharing = $True - GameCenterBlocked = $True - ICloudBlockDocumentSync = $True - PasswordMinimumCharacterSetCount = 25 - PasswordMinutesOfInactivityBeforeLock = 25 - ClassroomForceUnpromptedAppAndDeviceLock = $True - PasswordMinutesUntilFailedLoginReset = 25 - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyiOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyiOS.Tests.ps1 index fd77b47ae0..f570a5c86a 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyiOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyiOS.Tests.ps1 @@ -48,6 +48,261 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + FaceTimeBlocked = $True + KioskModeAllowSleepButton = $True + MediaContentRatingCanada = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + UnpairedExternalBootToRecoveryAllowed = $True + ICloudBlockPhotoStreamSync = $True + KeyboardBlockPredictive = $True + SafariBlockPopups = $True + GameCenterBlocked = $True + PasscodeBlockSimple = $True + ITunesBlocked = $True + PasscodeMinimumCharacterSetCount = 25 + AppleWatchForceWristDetection = $True + PasscodeExpirationDays = 25 + EnterpriseAppBlockTrustModification = $True + AirPlayForcePairingPasswordForOutgoingRequests = $True + KeyboardBlockAutoCorrect = $True + ITunesBlockExplicitContent = $True + IBooksStoreBlockErotica = $True + KioskModeAllowRingerSwitch = $True + DocumentsBlockUnmanagedDocumentsInManagedApps = $True + MessagesBlocked = $True + DeviceBlockEnableRestrictions = $True + AppStoreBlocked = $True + SpotlightBlockInternetResults = $True + KioskModeAppType = 'notConfigured' + KioskModeAllowVolumeButtons = $True + VoiceDialingBlocked = $True + PasscodeMinimumLength = 25 + ICloudBlockSharedPhotoStream = $True + ActivationLockAllowWhenSupervised = $True + CellularBlockVoiceRoaming = $True + MediaContentRatingIreland = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + PkiBlockOTAUpdates = $True + KeyboardBlockDictation = $True + PasscodeBlockModification = $True + AutoUnlockBlocked = $True + PasswordBlockProximityRequests = $True + MediaContentRatingAustralia = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + ITunesBlockMusicService = $True + DiagnosticDataBlockSubmissionModification = $True + EnterpriseAppBlockTrust = $True + ManagedPasteboardRequired = $True + ProximityBlockSetupToNewDevice = $True + PasscodeMinutesOfInactivityBeforeScreenTimeout = 25 + ITunesBlockRadio = $True + CellularBlockGlobalBackgroundFetchWhileRoaming = $True + SiriBlocked = $True + MediaContentRatingJapan = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + FindMyFriendsInFindMyAppBlocked = $True + CellularBlockPerAppDataModification = $True + ClassroomForceAutomaticallyJoinClasses = $True + SiriBlockUserGeneratedContent = $True + MediaContentRatingApps = 'allAllowed' + SafariCookieSettings = 'browserDefault' + DeviceBlockNameModification = $True + WifiPowerOnForced = $True + ContactsAllowManagedToUnmanagedWrite = $True + AirPrintBlockCredentialsStorage = $True + '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' + KioskModeAllowAssistiveTouchSettings = $True + PasscodeRequiredType = 'deviceDefault' + PasscodePreviousPasscodeBlockCount = 25 + AutoFillForceAuthentication = $True + CompliantAppListType = 'none' + ICloudBlockBackup = $True + KioskModeAllowAutoLock = $True + LockScreenBlockControlCenter = $True + EsimBlockModification = $True + AppleNewsBlocked = $True + CellularBlockPersonalHotspot = $True + KioskModeBuiltInAppId = 'FakeStringValue' + AirPrintForceTrustedTLS = $True + CameraBlocked = $True + SiriRequireProfanityFilter = $True + PasscodeBlockFingerprintUnlock = $True + DateAndTimeForceSetAutomatically = $True + KioskModeAllowAssistiveSpeak = $True + AccountBlockModification = $True + BlockSystemAppRemoval = $True + DocumentsBlockManagedDocumentsInUnmanagedApps = $True + FindMyFriendsBlocked = $True + ICloudBlockManagedAppsSync = $True + LockScreenBlockTodayView = $True + BluetoothBlockModification = $True + KioskModeManagedAppId = 'FakeStringValue' + SoftwareUpdatesForceDelayed = $True + ConfigurationProfileBlockChanges = $True + WiFiConnectOnlyToConfiguredNetworks = $True + MediaContentRatingNewZealand = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + KioskModeRequireMonoAudio = $True + AppStoreRequirePassword = $True + ICloudBlockDocumentSync = $True + CellularBlockDataRoaming = $True + ICloudRequireEncryptedBackup = $True + ApplePersonalizedAdsBlocked = $True + KioskModeBlockAutoLock = $True + ClassroomAppBlockRemoteScreenObservation = $True + PasscodeBlockFingerprintModification = $True + FindMyDeviceInFindMyAppBlocked = $True + IBooksStoreBlocked = $True + KioskModeRequireVoiceOver = $True + KioskModeAllowVoiceOverSettings = $True + AirDropForceUnmanagedDropTarget = $True + SafariBlockAutofill = $True + PasscodeSignInFailureCountBeforeWipe = 25 + ContinuousPathKeyboardBlocked = $True + KeychainBlockCloudSync = $True + VpnBlockCreation = $True + KioskModeAllowVoiceControlModification = $True + MediaContentRatingUnitedStates = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + KioskModeBlockVolumeButtons = $True + HostPairingBlocked = $True + AppClipsBlocked = $True + PasscodeRequired = $True + AppStoreBlockInAppPurchases = $True + LockScreenBlockNotificationView = $True + KioskModeBlockSleepButton = $True + OnDeviceOnlyDictationForced = $True + NetworkUsageRules = @( + @{ + cellularDataBlocked = $True + cellularDataBlockWhenRoaming = $True + } + ) + ICloudBlockActivityContinuation = $True + SoftwareUpdatesEnforcedDelayInDays = 25 + AppsSingleAppModeList = @( + @{ + name = 'FakeStringValue' + appId = 'FakeStringValue' + appStoreUrl = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.appleAppListItem' + publisher = 'FakeStringValue' + } + ) + ICloudBlockPhotoLibrary = $True + PrivacyForceLimitAdTracking = $True + MediaContentRatingGermany = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + KeyboardBlockShortcuts = $True + OnDeviceOnlyTranslationForced = $True + FilesUsbDriveAccessBlocked = $True + AppStoreBlockAutomaticDownloads = $True + KioskModeRequireColorInversion = $True + SharedDeviceBlockTemporarySessions = $True + GamingBlockGameCenterFriends = $True + EnterpriseBookBlockBackup = $True + EnterpriseBookBlockMetadataSync = $True + AirDropBlocked = $True + KioskModeBlockRingerSwitch = $True + KioskModeEnableVoiceControl = $True + MediaContentRatingUnitedKingdom = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + CellularBlockPlanModification = $True + AirPrintBlocked = $True + KioskModeAllowZoomSettings = $True + AppRemovalBlocked = $True + ICloudPrivateRelayBlocked = $True + PodcastsBlocked = $True + WallpaperBlockModification = $True + ClassroomForceRequestPermissionToLeaveClasses = $True + AppsVisibilityList = @( + @{ + name = 'FakeStringValue' + appId = 'FakeStringValue' + appStoreUrl = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.appleAppListItem' + publisher = 'FakeStringValue' + } + ) + SiriBlockedWhenLocked = $True + MediaContentRatingFrance = @{ + movieRating = 'allAllowed' + tvRating = 'allAllowed' + } + DefinitionLookupBlocked = $True + SafariBlockJavaScript = $True + AppsVisibilityListType = 'none' + AppleWatchBlockPairing = $True + KioskModeAppStoreUrl = 'FakeStringValue' + NfcBlocked = $True + LockScreenBlockPassbook = $True + PasswordBlockAutoFill = $True + CompliantAppsList = @( + @{ + name = 'FakeStringValue' + appId = 'FakeStringValue' + appStoreUrl = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.appleAppListItem' + publisher = 'FakeStringValue' + } + ) + AirPrintBlockiBeaconDiscovery = $True + ScreenCaptureBlocked = $True + KioskModeAllowTouchscreen = $True + ContactsAllowUnmanagedToManagedRead = $True + KioskModeBlockTouchscreen = $True + UsbRestrictedModeBlocked = $True + DeviceBlockEraseContentAndSettings = $True + PasswordBlockAirDropSharing = $True + CellularBlockPersonalHotspotModification = $True + NotificationsBlockSettingsModification = $True + SafariBlocked = $True + CertificatesBlockUntrustedTlsCertificates = $True + FilesNetworkDriveAccessBlocked = $True + KeyboardBlockSpellCheck = $True + ClassroomAppForceUnpromptedScreenObservation = $True + ClassroomForceUnpromptedAppAndDeviceLock = $True + KioskModeAllowScreenRotation = $True + KioskModeAllowColorInversionSettings = $True + PasscodeMinutesOfInactivityBeforeLock = 25 + DiagnosticDataBlockSubmission = $True + GamingBlockMultiplayer = $True + SafariRequireFraudWarning = $True + KioskModeRequireAssistiveTouch = $True + AppStoreBlockUIAppInstallation = $True + KioskModeBlockScreenRotation = $True + WiFiConnectToAllowedNetworksOnlyForced = $True + KioskModeRequireZoom = $True + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { + return @() + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -314,10 +569,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { return $null } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { - return @() - } } It 'Should return Values from the Get method' { (Get-TargetResource @testParams).Ensure | Should -Be 'Absent' @@ -585,267 +836,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - FaceTimeBlocked = $True - KioskModeAllowSleepButton = $True - MediaContentRatingCanada = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - UnpairedExternalBootToRecoveryAllowed = $True - ICloudBlockPhotoStreamSync = $True - KeyboardBlockPredictive = $True - SafariBlockPopups = $True - GameCenterBlocked = $True - PasscodeBlockSimple = $True - ITunesBlocked = $True - PasscodeMinimumCharacterSetCount = 25 - AppleWatchForceWristDetection = $True - PasscodeExpirationDays = 25 - EnterpriseAppBlockTrustModification = $True - AirPlayForcePairingPasswordForOutgoingRequests = $True - KeyboardBlockAutoCorrect = $True - ITunesBlockExplicitContent = $True - IBooksStoreBlockErotica = $True - KioskModeAllowRingerSwitch = $True - DocumentsBlockUnmanagedDocumentsInManagedApps = $True - MessagesBlocked = $True - DeviceBlockEnableRestrictions = $True - AppStoreBlocked = $True - SpotlightBlockInternetResults = $True - KioskModeAppType = 'notConfigured' - KioskModeAllowVolumeButtons = $True - VoiceDialingBlocked = $True - PasscodeMinimumLength = 25 - ICloudBlockSharedPhotoStream = $True - ActivationLockAllowWhenSupervised = $True - CellularBlockVoiceRoaming = $True - MediaContentRatingIreland = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PkiBlockOTAUpdates = $True - KeyboardBlockDictation = $True - PasscodeBlockModification = $True - AutoUnlockBlocked = $True - PasswordBlockProximityRequests = $True - MediaContentRatingAustralia = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - ITunesBlockMusicService = $True - DiagnosticDataBlockSubmissionModification = $True - EnterpriseAppBlockTrust = $True - ManagedPasteboardRequired = $True - ProximityBlockSetupToNewDevice = $True - PasscodeMinutesOfInactivityBeforeScreenTimeout = 25 - ITunesBlockRadio = $True - CellularBlockGlobalBackgroundFetchWhileRoaming = $True - SiriBlocked = $True - MediaContentRatingJapan = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - FindMyFriendsInFindMyAppBlocked = $True - CellularBlockPerAppDataModification = $True - ClassroomForceAutomaticallyJoinClasses = $True - SiriBlockUserGeneratedContent = $True - MediaContentRatingApps = 'allAllowed' - SafariCookieSettings = 'browserDefault' - DeviceBlockNameModification = $True - WifiPowerOnForced = $True - ContactsAllowManagedToUnmanagedWrite = $True - AirPrintBlockCredentialsStorage = $True - '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' - KioskModeAllowAssistiveTouchSettings = $True - PasscodeRequiredType = 'deviceDefault' - PasscodePreviousPasscodeBlockCount = 25 - AutoFillForceAuthentication = $True - CompliantAppListType = 'none' - ICloudBlockBackup = $True - KioskModeAllowAutoLock = $True - LockScreenBlockControlCenter = $True - EsimBlockModification = $True - AppleNewsBlocked = $True - CellularBlockPersonalHotspot = $True - KioskModeBuiltInAppId = 'FakeStringValue' - AirPrintForceTrustedTLS = $True - CameraBlocked = $True - SiriRequireProfanityFilter = $True - PasscodeBlockFingerprintUnlock = $True - DateAndTimeForceSetAutomatically = $True - KioskModeAllowAssistiveSpeak = $True - AccountBlockModification = $True - BlockSystemAppRemoval = $True - DocumentsBlockManagedDocumentsInUnmanagedApps = $True - FindMyFriendsBlocked = $True - ICloudBlockManagedAppsSync = $True - LockScreenBlockTodayView = $True - BluetoothBlockModification = $True - KioskModeManagedAppId = 'FakeStringValue' - SoftwareUpdatesForceDelayed = $True - ConfigurationProfileBlockChanges = $True - WiFiConnectOnlyToConfiguredNetworks = $True - MediaContentRatingNewZealand = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeRequireMonoAudio = $True - AppStoreRequirePassword = $True - ICloudBlockDocumentSync = $True - CellularBlockDataRoaming = $True - ICloudRequireEncryptedBackup = $True - ApplePersonalizedAdsBlocked = $True - KioskModeBlockAutoLock = $True - ClassroomAppBlockRemoteScreenObservation = $True - PasscodeBlockFingerprintModification = $True - FindMyDeviceInFindMyAppBlocked = $True - IBooksStoreBlocked = $True - KioskModeRequireVoiceOver = $True - KioskModeAllowVoiceOverSettings = $True - AirDropForceUnmanagedDropTarget = $True - SafariBlockAutofill = $True - PasscodeSignInFailureCountBeforeWipe = 25 - ContinuousPathKeyboardBlocked = $True - KeychainBlockCloudSync = $True - VpnBlockCreation = $True - KioskModeAllowVoiceControlModification = $True - MediaContentRatingUnitedStates = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeBlockVolumeButtons = $True - HostPairingBlocked = $True - AppClipsBlocked = $True - PasscodeRequired = $True - AppStoreBlockInAppPurchases = $True - LockScreenBlockNotificationView = $True - KioskModeBlockSleepButton = $True - OnDeviceOnlyDictationForced = $True - NetworkUsageRules = @( - @{ - cellularDataBlocked = $True - cellularDataBlockWhenRoaming = $True - - } - ) - ICloudBlockActivityContinuation = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - AppsSingleAppModeList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - ICloudBlockPhotoLibrary = $True - PrivacyForceLimitAdTracking = $True - MediaContentRatingGermany = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KeyboardBlockShortcuts = $True - OnDeviceOnlyTranslationForced = $True - FilesUsbDriveAccessBlocked = $True - AppStoreBlockAutomaticDownloads = $True - KioskModeRequireColorInversion = $True - SharedDeviceBlockTemporarySessions = $True - GamingBlockGameCenterFriends = $True - EnterpriseBookBlockBackup = $True - EnterpriseBookBlockMetadataSync = $True - AirDropBlocked = $True - KioskModeBlockRingerSwitch = $True - KioskModeEnableVoiceControl = $True - MediaContentRatingUnitedKingdom = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - CellularBlockPlanModification = $True - AirPrintBlocked = $True - KioskModeAllowZoomSettings = $True - AppRemovalBlocked = $True - ICloudPrivateRelayBlocked = $True - PodcastsBlocked = $True - WallpaperBlockModification = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - AppsVisibilityList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - SiriBlockedWhenLocked = $True - MediaContentRatingFrance = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - DefinitionLookupBlocked = $True - SafariBlockJavaScript = $True - AppsVisibilityListType = 'none' - AppleWatchBlockPairing = $True - KioskModeAppStoreUrl = 'FakeStringValue' - NfcBlocked = $True - LockScreenBlockPassbook = $True - PasswordBlockAutoFill = $True - CompliantAppsList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - AirPrintBlockiBeaconDiscovery = $True - ScreenCaptureBlocked = $True - KioskModeAllowTouchscreen = $True - ContactsAllowUnmanagedToManagedRead = $True - KioskModeBlockTouchscreen = $True - UsbRestrictedModeBlocked = $True - DeviceBlockEraseContentAndSettings = $True - PasswordBlockAirDropSharing = $True - CellularBlockPersonalHotspotModification = $True - NotificationsBlockSettingsModification = $True - SafariBlocked = $True - CertificatesBlockUntrustedTlsCertificates = $True - FilesNetworkDriveAccessBlocked = $True - KeyboardBlockSpellCheck = $True - ClassroomAppForceUnpromptedScreenObservation = $True - ClassroomForceUnpromptedAppAndDeviceLock = $True - KioskModeAllowScreenRotation = $True - KioskModeAllowColorInversionSettings = $True - PasscodeMinutesOfInactivityBeforeLock = 25 - DiagnosticDataBlockSubmission = $True - GamingBlockMultiplayer = $True - SafariRequireFraudWarning = $True - KioskModeRequireAssistiveTouch = $True - AppStoreBlockUIAppInstallation = $True - KioskModeBlockScreenRotation = $True - WiFiConnectToAllowedNetworksOnlyForced = $True - KioskModeRequireZoom = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { - return @() - } } It 'Should return Values from the Get method' { @@ -1115,267 +1105,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - FaceTimeBlocked = $True - KioskModeAllowSleepButton = $True - MediaContentRatingCanada = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - UnpairedExternalBootToRecoveryAllowed = $True - ICloudBlockPhotoStreamSync = $True - KeyboardBlockPredictive = $True - SafariBlockPopups = $True - GameCenterBlocked = $True - PasscodeBlockSimple = $True - ITunesBlocked = $True - PasscodeMinimumCharacterSetCount = 25 - AppleWatchForceWristDetection = $True - PasscodeExpirationDays = 25 - EnterpriseAppBlockTrustModification = $True - AirPlayForcePairingPasswordForOutgoingRequests = $True - KeyboardBlockAutoCorrect = $True - ITunesBlockExplicitContent = $True - IBooksStoreBlockErotica = $True - KioskModeAllowRingerSwitch = $True - DocumentsBlockUnmanagedDocumentsInManagedApps = $True - MessagesBlocked = $True - DeviceBlockEnableRestrictions = $True - AppStoreBlocked = $True - SpotlightBlockInternetResults = $True - KioskModeAppType = 'notConfigured' - KioskModeAllowVolumeButtons = $True - VoiceDialingBlocked = $True - PasscodeMinimumLength = 25 - ICloudBlockSharedPhotoStream = $True - ActivationLockAllowWhenSupervised = $True - CellularBlockVoiceRoaming = $True - MediaContentRatingIreland = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PkiBlockOTAUpdates = $True - KeyboardBlockDictation = $True - PasscodeBlockModification = $True - AutoUnlockBlocked = $True - PasswordBlockProximityRequests = $True - MediaContentRatingAustralia = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - ITunesBlockMusicService = $True - DiagnosticDataBlockSubmissionModification = $True - EnterpriseAppBlockTrust = $True - ManagedPasteboardRequired = $True - ProximityBlockSetupToNewDevice = $True - PasscodeMinutesOfInactivityBeforeScreenTimeout = 25 - ITunesBlockRadio = $True - CellularBlockGlobalBackgroundFetchWhileRoaming = $True - SiriBlocked = $True - MediaContentRatingJapan = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - FindMyFriendsInFindMyAppBlocked = $True - CellularBlockPerAppDataModification = $True - ClassroomForceAutomaticallyJoinClasses = $True - SiriBlockUserGeneratedContent = $True - MediaContentRatingApps = 'allAllowed' - SafariCookieSettings = 'browserDefault' - DeviceBlockNameModification = $True - WifiPowerOnForced = $True - ContactsAllowManagedToUnmanagedWrite = $True - AirPrintBlockCredentialsStorage = $True - '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' - KioskModeAllowAssistiveTouchSettings = $True - PasscodeRequiredType = 'deviceDefault' - PasscodePreviousPasscodeBlockCount = 25 - AutoFillForceAuthentication = $True - CompliantAppListType = 'none' - ICloudBlockBackup = $True - KioskModeAllowAutoLock = $True - LockScreenBlockControlCenter = $True - EsimBlockModification = $True - AppleNewsBlocked = $True - CellularBlockPersonalHotspot = $True - KioskModeBuiltInAppId = 'FakeStringValue' - AirPrintForceTrustedTLS = $True - CameraBlocked = $True - SiriRequireProfanityFilter = $True - PasscodeBlockFingerprintUnlock = $True - DateAndTimeForceSetAutomatically = $True - KioskModeAllowAssistiveSpeak = $True - AccountBlockModification = $True - BlockSystemAppRemoval = $True - DocumentsBlockManagedDocumentsInUnmanagedApps = $True - FindMyFriendsBlocked = $True - ICloudBlockManagedAppsSync = $True - LockScreenBlockTodayView = $True - BluetoothBlockModification = $True - KioskModeManagedAppId = 'FakeStringValue' - SoftwareUpdatesForceDelayed = $True - ConfigurationProfileBlockChanges = $True - WiFiConnectOnlyToConfiguredNetworks = $True - MediaContentRatingNewZealand = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeRequireMonoAudio = $True - AppStoreRequirePassword = $True - ICloudBlockDocumentSync = $True - CellularBlockDataRoaming = $True - ICloudRequireEncryptedBackup = $True - ApplePersonalizedAdsBlocked = $True - KioskModeBlockAutoLock = $True - ClassroomAppBlockRemoteScreenObservation = $True - PasscodeBlockFingerprintModification = $True - FindMyDeviceInFindMyAppBlocked = $True - IBooksStoreBlocked = $True - KioskModeRequireVoiceOver = $True - KioskModeAllowVoiceOverSettings = $True - AirDropForceUnmanagedDropTarget = $True - SafariBlockAutofill = $True - PasscodeSignInFailureCountBeforeWipe = 25 - ContinuousPathKeyboardBlocked = $True - KeychainBlockCloudSync = $True - VpnBlockCreation = $True - KioskModeAllowVoiceControlModification = $True - MediaContentRatingUnitedStates = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeBlockVolumeButtons = $True - HostPairingBlocked = $True - AppClipsBlocked = $True - PasscodeRequired = $True - AppStoreBlockInAppPurchases = $True - LockScreenBlockNotificationView = $True - KioskModeBlockSleepButton = $True - OnDeviceOnlyDictationForced = $True - NetworkUsageRules = @( - @{ - cellularDataBlocked = $True - cellularDataBlockWhenRoaming = $True - - } - ) - ICloudBlockActivityContinuation = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - AppsSingleAppModeList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - ICloudBlockPhotoLibrary = $True - PrivacyForceLimitAdTracking = $True - MediaContentRatingGermany = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KeyboardBlockShortcuts = $True - OnDeviceOnlyTranslationForced = $True - FilesUsbDriveAccessBlocked = $True - AppStoreBlockAutomaticDownloads = $True - KioskModeRequireColorInversion = $True - SharedDeviceBlockTemporarySessions = $True - GamingBlockGameCenterFriends = $True - EnterpriseBookBlockBackup = $True - EnterpriseBookBlockMetadataSync = $True - AirDropBlocked = $True - KioskModeBlockRingerSwitch = $True - KioskModeEnableVoiceControl = $True - MediaContentRatingUnitedKingdom = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - CellularBlockPlanModification = $True - AirPrintBlocked = $True - KioskModeAllowZoomSettings = $True - AppRemovalBlocked = $True - ICloudPrivateRelayBlocked = $True - PodcastsBlocked = $True - WallpaperBlockModification = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - AppsVisibilityList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - SiriBlockedWhenLocked = $True - MediaContentRatingFrance = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - DefinitionLookupBlocked = $True - SafariBlockJavaScript = $True - AppsVisibilityListType = 'none' - AppleWatchBlockPairing = $True - KioskModeAppStoreUrl = 'FakeStringValue' - NfcBlocked = $True - LockScreenBlockPassbook = $True - PasswordBlockAutoFill = $True - CompliantAppsList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - AirPrintBlockiBeaconDiscovery = $True - ScreenCaptureBlocked = $True - KioskModeAllowTouchscreen = $True - ContactsAllowUnmanagedToManagedRead = $True - KioskModeBlockTouchscreen = $True - UsbRestrictedModeBlocked = $True - DeviceBlockEraseContentAndSettings = $True - PasswordBlockAirDropSharing = $True - CellularBlockPersonalHotspotModification = $True - NotificationsBlockSettingsModification = $True - SafariBlocked = $True - CertificatesBlockUntrustedTlsCertificates = $True - FilesNetworkDriveAccessBlocked = $True - KeyboardBlockSpellCheck = $True - ClassroomAppForceUnpromptedScreenObservation = $True - ClassroomForceUnpromptedAppAndDeviceLock = $True - KioskModeAllowScreenRotation = $True - KioskModeAllowColorInversionSettings = $True - PasscodeMinutesOfInactivityBeforeLock = 25 - DiagnosticDataBlockSubmission = $True - GamingBlockMultiplayer = $True - SafariRequireFraudWarning = $True - KioskModeRequireAssistiveTouch = $True - AppStoreBlockUIAppInstallation = $True - KioskModeBlockScreenRotation = $True - WiFiConnectToAllowedNetworksOnlyForced = $True - KioskModeRequireZoom = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { - return @() - } } @@ -1387,7 +1116,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneDeviceConfigurationPolicyIOS exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - AccountBlockModification = $True + AccountBlockModification = $False # Updated property ActivationLockAllowWhenSupervised = $True AirDropBlocked = $True AirDropForceUnmanagedDropTarget = $True @@ -1638,113 +1367,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - MediaContentRatingCanada = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PasscodeMinutesOfInactivityBeforeLock = 7 - PasscodeMinimumLength = 7 - MediaContentRatingIreland = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PasscodeMinutesOfInactivityBeforeScreenTimeout = 7 - NetworkUsageRules = @( - @{ - cellularDataBlocked = $True - cellularDataBlockWhenRoaming = $True - - } - ) - PasscodePreviousPasscodeBlockCount = 7 - MediaContentRatingNewZealand = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeManagedAppId = 'FakeStringValue' - MediaContentRatingApps = 'allAllowed' - PasscodeMinimumCharacterSetCount = 7 - MediaContentRatingUnitedStates = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - SafariCookieSettings = 'browserDefault' - CompliantAppListType = 'none' - AppsSingleAppModeList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - MediaContentRatingFrance = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - MediaContentRatingAustralia = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - MediaContentRatingGermany = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PasscodeSignInFailureCountBeforeWipe = 7 - KioskModeAppStoreUrl = 'FakeStringValue' - AppsVisibilityListType = 'none' - KioskModeAppType = 'notConfigured' - AppsVisibilityList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - MediaContentRatingJapan = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - SoftwareUpdatesEnforcedDelayInDays = 7 - PasscodeExpirationDays = 7 - CompliantAppsList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' - KioskModeBuiltInAppId = 'FakeStringValue' - MediaContentRatingUnitedKingdom = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PasscodeRequiredType = 'deviceDefault' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { - return @() - } } It 'Should return Values from the Get method' { @@ -1768,268 +1390,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - FaceTimeBlocked = $True - KioskModeAllowSleepButton = $True - MediaContentRatingCanada = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - UnpairedExternalBootToRecoveryAllowed = $True - ICloudBlockPhotoStreamSync = $True - KeyboardBlockPredictive = $True - SafariBlockPopups = $True - GameCenterBlocked = $True - PasscodeBlockSimple = $True - ITunesBlocked = $True - PasscodeMinimumCharacterSetCount = 25 - AppleWatchForceWristDetection = $True - PasscodeExpirationDays = 25 - EnterpriseAppBlockTrustModification = $True - AirPlayForcePairingPasswordForOutgoingRequests = $True - KeyboardBlockAutoCorrect = $True - ITunesBlockExplicitContent = $True - IBooksStoreBlockErotica = $True - KioskModeAllowRingerSwitch = $True - DocumentsBlockUnmanagedDocumentsInManagedApps = $True - MessagesBlocked = $True - DeviceBlockEnableRestrictions = $True - AppStoreBlocked = $True - SpotlightBlockInternetResults = $True - KioskModeAppType = 'notConfigured' - KioskModeAllowVolumeButtons = $True - VoiceDialingBlocked = $True - PasscodeMinimumLength = 25 - ICloudBlockSharedPhotoStream = $True - ActivationLockAllowWhenSupervised = $True - CellularBlockVoiceRoaming = $True - MediaContentRatingIreland = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - PkiBlockOTAUpdates = $True - KeyboardBlockDictation = $True - PasscodeBlockModification = $True - AutoUnlockBlocked = $True - PasswordBlockProximityRequests = $True - MediaContentRatingAustralia = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - ITunesBlockMusicService = $True - DiagnosticDataBlockSubmissionModification = $True - EnterpriseAppBlockTrust = $True - ManagedPasteboardRequired = $True - ProximityBlockSetupToNewDevice = $True - PasscodeMinutesOfInactivityBeforeScreenTimeout = 25 - ITunesBlockRadio = $True - CellularBlockGlobalBackgroundFetchWhileRoaming = $True - SiriBlocked = $True - MediaContentRatingJapan = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - FindMyFriendsInFindMyAppBlocked = $True - CellularBlockPerAppDataModification = $True - ClassroomForceAutomaticallyJoinClasses = $True - SiriBlockUserGeneratedContent = $True - MediaContentRatingApps = 'allAllowed' - SafariCookieSettings = 'browserDefault' - DeviceBlockNameModification = $True - WifiPowerOnForced = $True - ContactsAllowManagedToUnmanagedWrite = $True - AirPrintBlockCredentialsStorage = $True - '@odata.type' = '#microsoft.graph.iosGeneralDeviceConfiguration' - KioskModeAllowAssistiveTouchSettings = $True - PasscodeRequiredType = 'deviceDefault' - PasscodePreviousPasscodeBlockCount = 25 - AutoFillForceAuthentication = $True - CompliantAppListType = 'none' - ICloudBlockBackup = $True - KioskModeAllowAutoLock = $True - LockScreenBlockControlCenter = $True - EsimBlockModification = $True - AppleNewsBlocked = $True - CellularBlockPersonalHotspot = $True - KioskModeBuiltInAppId = 'FakeStringValue' - AirPrintForceTrustedTLS = $True - CameraBlocked = $True - SiriRequireProfanityFilter = $True - PasscodeBlockFingerprintUnlock = $True - DateAndTimeForceSetAutomatically = $True - KioskModeAllowAssistiveSpeak = $True - AccountBlockModification = $True - BlockSystemAppRemoval = $True - DocumentsBlockManagedDocumentsInUnmanagedApps = $True - FindMyFriendsBlocked = $True - ICloudBlockManagedAppsSync = $True - LockScreenBlockTodayView = $True - BluetoothBlockModification = $True - KioskModeManagedAppId = 'FakeStringValue' - SoftwareUpdatesForceDelayed = $True - ConfigurationProfileBlockChanges = $True - WiFiConnectOnlyToConfiguredNetworks = $True - MediaContentRatingNewZealand = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeRequireMonoAudio = $True - AppStoreRequirePassword = $True - ICloudBlockDocumentSync = $True - CellularBlockDataRoaming = $True - ICloudRequireEncryptedBackup = $True - ApplePersonalizedAdsBlocked = $True - KioskModeBlockAutoLock = $True - ClassroomAppBlockRemoteScreenObservation = $True - PasscodeBlockFingerprintModification = $True - FindMyDeviceInFindMyAppBlocked = $True - IBooksStoreBlocked = $True - KioskModeRequireVoiceOver = $True - KioskModeAllowVoiceOverSettings = $True - AirDropForceUnmanagedDropTarget = $True - SafariBlockAutofill = $True - PasscodeSignInFailureCountBeforeWipe = 25 - ContinuousPathKeyboardBlocked = $True - KeychainBlockCloudSync = $True - VpnBlockCreation = $True - KioskModeAllowVoiceControlModification = $True - MediaContentRatingUnitedStates = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KioskModeBlockVolumeButtons = $True - HostPairingBlocked = $True - AppClipsBlocked = $True - PasscodeRequired = $True - AppStoreBlockInAppPurchases = $True - LockScreenBlockNotificationView = $True - KioskModeBlockSleepButton = $True - OnDeviceOnlyDictationForced = $True - NetworkUsageRules = @( - @{ - cellularDataBlocked = $True - cellularDataBlockWhenRoaming = $True - - } - ) - ICloudBlockActivityContinuation = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - AppsSingleAppModeList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - ICloudBlockPhotoLibrary = $True - PrivacyForceLimitAdTracking = $True - MediaContentRatingGermany = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - KeyboardBlockShortcuts = $True - OnDeviceOnlyTranslationForced = $True - FilesUsbDriveAccessBlocked = $True - AppStoreBlockAutomaticDownloads = $True - KioskModeRequireColorInversion = $True - SharedDeviceBlockTemporarySessions = $True - GamingBlockGameCenterFriends = $True - EnterpriseBookBlockBackup = $True - EnterpriseBookBlockMetadataSync = $True - AirDropBlocked = $True - KioskModeBlockRingerSwitch = $True - KioskModeEnableVoiceControl = $True - MediaContentRatingUnitedKingdom = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - CellularBlockPlanModification = $True - AirPrintBlocked = $True - KioskModeAllowZoomSettings = $True - AppRemovalBlocked = $True - ICloudPrivateRelayBlocked = $True - PodcastsBlocked = $True - WallpaperBlockModification = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - AppsVisibilityList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - SiriBlockedWhenLocked = $True - MediaContentRatingFrance = @{ - movieRating = 'allAllowed' - tvRating = 'allAllowed' - } - DefinitionLookupBlocked = $True - SafariBlockJavaScript = $True - AppsVisibilityListType = 'none' - AppleWatchBlockPairing = $True - KioskModeAppStoreUrl = 'FakeStringValue' - NfcBlocked = $True - LockScreenBlockPassbook = $True - PasswordBlockAutoFill = $True - CompliantAppsList = @( - @{ - name = 'FakeStringValue' - appId = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.appleAppListItem' - publisher = 'FakeStringValue' - - } - ) - AirPrintBlockiBeaconDiscovery = $True - ScreenCaptureBlocked = $True - KioskModeAllowTouchscreen = $True - ContactsAllowUnmanagedToManagedRead = $True - KioskModeBlockTouchscreen = $True - UsbRestrictedModeBlocked = $True - DeviceBlockEraseContentAndSettings = $True - PasswordBlockAirDropSharing = $True - CellularBlockPersonalHotspotModification = $True - NotificationsBlockSettingsModification = $True - SafariBlocked = $True - CertificatesBlockUntrustedTlsCertificates = $True - FilesNetworkDriveAccessBlocked = $True - KeyboardBlockSpellCheck = $True - ClassroomAppForceUnpromptedScreenObservation = $True - ClassroomForceUnpromptedAppAndDeviceLock = $True - KioskModeAllowScreenRotation = $True - KioskModeAllowColorInversionSettings = $True - PasscodeMinutesOfInactivityBeforeLock = 25 - DiagnosticDataBlockSubmission = $True - GamingBlockMultiplayer = $True - SafariRequireFraudWarning = $True - KioskModeRequireAssistiveTouch = $True - AppStoreBlockUIAppInstallation = $True - KioskModeBlockScreenRotation = $True - WiFiConnectToAllowedNetworksOnlyForced = $True - KioskModeRequireZoom = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { - return @() - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.Tests.ps1 index 39ade7f5d7..a3d31723d0 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSCEPCertificatePolicyWindows10.Tests.ps1 @@ -66,6 +66,43 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + subjectAlternativeNameType = "none" + keyUsage = "keyEncipherment" + subjectAlternativeNameFormatString = "FakeStringValue" + certificateValidityPeriodScale = "days" + keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" + '@odata.type' = "#microsoft.graph.windows81SCEPCertificateProfile" + scepServerUrls = @("FakeStringValue") + renewalThresholdPercentage = 25 + certificateValidityPeriodValue = 25 + hashAlgorithm = "sha1" + keySize = "size1024" + subjectNameFormatString = "FakeStringValue" + subjectNameFormat = "commonName" + certificateStore = "user" + extendedKeyUsages = @( + @{ + objectIdentifier = "FakeStringValue" + name = "FakeStringValue" + } + ) + customSubjectAlternativeNames = @( + @{ + sanType = "none" + name = "FakeStringValue" + } + ) + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + + } + } + Mock -CommandName Update-DeviceConfigurationPolicyRootCertificateId -MockWith { } } @@ -173,43 +210,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - keyUsage = "keyEncipherment" - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - '@odata.type' = "#microsoft.graph.windows81SCEPCertificateProfile" - scepServerUrls = @("FakeStringValue") - renewalThresholdPercentage = 25 - certificateValidityPeriodValue = 25 - hashAlgorithm = "sha1" - keySize = "size1024" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -261,43 +261,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - keyUsage = "keyEncipherment" - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - '@odata.type' = "#microsoft.graph.windows81SCEPCertificateProfile" - scepServerUrls = @("FakeStringValue") - renewalThresholdPercentage = 25 - certificateValidityPeriodValue = 25 - hashAlgorithm = "sha1" - keySize = "size1024" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } @@ -333,7 +296,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { KeySize = "size1024" keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" KeyUsage = @("keyEncipherment") - renewalThresholdPercentage = 25 + renewalThresholdPercentage = 7 # Updated property ScepServerUrls = @("FakeStringValue") SubjectAlternativeNameFormatString = "FakeStringValue" subjectAlternativeNameType = "none" @@ -345,42 +308,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Credential = $Credential; } - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - keyUsage = "keyEncipherment" - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - '@odata.type' = "#microsoft.graph.windows81SCEPCertificateProfile" - scepServerUrls = @("FakeStringValue") - renewalThresholdPercentage = 7 - certificateValidityPeriodValue = 7 - hashAlgorithm = "sha1" - keySize = "size1024" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -ParameterFilter { $DeviceConfigurationId -eq $RootCertificateId } -MockWith { $AdditionalProperties = @{} $AdditionalProperties.'@odata.type' = "#microsoft.graph.windows81TrustedRootCertificate" @@ -414,44 +341,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - subjectAlternativeNameType = "none" - keyUsage = "keyEncipherment" - subjectAlternativeNameFormatString = "FakeStringValue" - certificateValidityPeriodScale = "days" - keyStorageProvider = "useTpmKspOtherwiseUseSoftwareKsp" - '@odata.type' = "#microsoft.graph.windows81SCEPCertificateProfile" - scepServerUrls = @("FakeStringValue") - renewalThresholdPercentage = 25 - certificateValidityPeriodValue = 25 - hashAlgorithm = "sha1" - keySize = "size1024" - subjectNameFormatString = "FakeStringValue" - subjectNameFormat = "commonName" - certificateStore = "user" - extendedKeyUsages = @( - @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - ) - customSubjectAlternativeNames = @( - @{ - sanType = "none" - name = "FakeStringValue" - } - ) - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.Tests.ps1 index 60e3277721..e867a708d3 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSecureAssessmentPolicyWindows10.Tests.ps1 @@ -41,6 +41,25 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + configurationAccountType = "azureADAccount" + '@odata.type' = "#microsoft.graph.windows10SecureAssessmentConfiguration" + allowTextSuggestion = $True + launchUri = "FakeStringValue" + assessmentAppUserModelId = "FakeStringValue" + allowScreenCapture = $True + localGuestAccountName = "FakeStringValue" + configurationAccount = "FakeStringValue" + allowPrinting = $True + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + + } + } # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -103,26 +122,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - configurationAccountType = "azureADAccount" - '@odata.type' = "#microsoft.graph.windows10SecureAssessmentConfiguration" - allowTextSuggestion = $True - launchUri = "FakeStringValue" - assessmentAppUserModelId = "FakeStringValue" - allowScreenCapture = $True - localGuestAccountName = "FakeStringValue" - configurationAccount = "FakeStringValue" - allowPrinting = $True - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -155,26 +154,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - configurationAccountType = "azureADAccount" - '@odata.type' = "#microsoft.graph.windows10SecureAssessmentConfiguration" - allowTextSuggestion = $True - launchUri = "FakeStringValue" - assessmentAppUserModelId = "FakeStringValue" - allowScreenCapture = $True - localGuestAccountName = "FakeStringValue" - configurationAccount = "FakeStringValue" - allowPrinting = $True - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } @@ -196,26 +175,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "FakeStringValue" Id = "FakeStringValue" LaunchUri = "FakeStringValue" - LocalGuestAccountName = "FakeStringValue" + LocalGuestAccountName = "AnotherAccount" # Updated property Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - configurationAccountType = "azureADAccount" - '@odata.type' = "#microsoft.graph.windows10SecureAssessmentConfiguration" - launchUri = "FakeStringValue" - localGuestAccountName = "FakeStringValue" - configurationAccount = "FakeStringValue" - assessmentAppUserModelId = "FakeStringValue" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -239,27 +202,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - configurationAccountType = "azureADAccount" - '@odata.type' = "#microsoft.graph.windows10SecureAssessmentConfiguration" - allowTextSuggestion = $True - launchUri = "FakeStringValue" - assessmentAppUserModelId = "FakeStringValue" - allowScreenCapture = $True - localGuestAccountName = "FakeStringValue" - configurationAccount = "FakeStringValue" - allowPrinting = $True - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.Tests.ps1 index c7a56e0183..573749f314 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10.Tests.ps1 @@ -39,6 +39,40 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName New-M365DSCConnection -MockWith { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + kioskAppDisplayName = "FakeStringValue" + fastFirstSignIn = "notConfigured" + disableEduPolicies = $True + disableAccountManager = $True + accountManagerPolicy = @{ + inactiveThresholdDays = 25 + cacheAccountsAboveDiskFreePercentage = 25 + accountDeletionPolicy = "immediate" + removeAccountsBelowDiskFreePercentage = 25 + } + signInOnResume = "notConfigured" + setAccountManager = "notConfigured" + disableSignInOnResume = $True + localStorage = "notConfigured" + setEduPolicies = "notConfigured" + maintenanceStartTime = "00:00:00" + allowedAccounts = "notConfigured" + setPowerPolicies = "notConfigured" + '@odata.type' = "#microsoft.graph.sharedPCConfiguration" + allowLocalStorage = $True + kioskAppUserModelId = "FakeStringValue" + idleTimeBeforeSleepInSeconds = 25 + disablePowerPolicies = $True + enabled = $True + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + + } + } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } # Mock Write-M365DSCHost to hide output during the tests @@ -49,7 +83,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } - } # Test contexts Context -Name "The IntuneDeviceConfigurationSharedMultiDevicePolicyWindows10 should exist but it DOES NOT" -Fixture { @@ -133,41 +166,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskAppDisplayName = "FakeStringValue" - fastFirstSignIn = "notConfigured" - disableEduPolicies = $True - disableAccountManager = $True - accountManagerPolicy = @{ - inactiveThresholdDays = 25 - cacheAccountsAboveDiskFreePercentage = 25 - accountDeletionPolicy = "immediate" - removeAccountsBelowDiskFreePercentage = 25 - } - signInOnResume = "notConfigured" - setAccountManager = "notConfigured" - disableSignInOnResume = $True - localStorage = "notConfigured" - setEduPolicies = "notConfigured" - maintenanceStartTime = "00:00:00" - allowedAccounts = "notConfigured" - setPowerPolicies = "notConfigured" - '@odata.type' = "#microsoft.graph.sharedPCConfiguration" - allowLocalStorage = $True - kioskAppUserModelId = "FakeStringValue" - idleTimeBeforeSleepInSeconds = 25 - disablePowerPolicies = $True - enabled = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -215,44 +213,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskAppDisplayName = "FakeStringValue" - fastFirstSignIn = "notConfigured" - disableEduPolicies = $True - disableAccountManager = $True - accountManagerPolicy = @{ - inactiveThresholdDays = 25 - cacheAccountsAboveDiskFreePercentage = 25 - accountDeletionPolicy = "immediate" - removeAccountsBelowDiskFreePercentage = 25 - } - signInOnResume = "notConfigured" - setAccountManager = "notConfigured" - disableSignInOnResume = $True - localStorage = "notConfigured" - setEduPolicies = "notConfigured" - maintenanceStartTime = "00:00:00" - allowedAccounts = "notConfigured" - setPowerPolicies = "notConfigured" - '@odata.type' = "#microsoft.graph.sharedPCConfiguration" - allowLocalStorage = $True - kioskAppUserModelId = "FakeStringValue" - idleTimeBeforeSleepInSeconds = 25 - disablePowerPolicies = $True - enabled = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -262,7 +224,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { BeforeAll { $testParams = @{ accountManagerPolicy = (New-CimInstance -ClassName MSFT_MicrosoftGraphsharedPCAccountManagerPolicy -Property @{ - inactiveThresholdDays = 25 + inactiveThresholdDays = 7 # Updated property cacheAccountsAboveDiskFreePercentage = 25 accountDeletionPolicy = "immediate" removeAccountsBelowDiskFreePercentage = 25 @@ -290,34 +252,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - maintenanceStartTime = "00:00:00" - idleTimeBeforeSleepInSeconds = 7 - signInOnResume = "notConfigured" - '@odata.type' = "#microsoft.graph.sharedPCConfiguration" - setPowerPolicies = "notConfigured" - allowedAccounts = "notConfigured" - kioskAppUserModelId = "FakeStringValue" - setEduPolicies = "notConfigured" - accountManagerPolicy = @{ - inactiveThresholdDays = 7 - cacheAccountsAboveDiskFreePercentage = 7 - accountDeletionPolicy = "immediate" - removeAccountsBelowDiskFreePercentage = 7 - } - kioskAppDisplayName = "FakeStringValue" - fastFirstSignIn = "notConfigured" - localStorage = "notConfigured" - setAccountManager = "notConfigured" - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -341,42 +275,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - kioskAppDisplayName = "FakeStringValue" - fastFirstSignIn = "notConfigured" - disableEduPolicies = $True - disableAccountManager = $True - accountManagerPolicy = @{ - inactiveThresholdDays = 25 - cacheAccountsAboveDiskFreePercentage = 25 - accountDeletionPolicy = "immediate" - removeAccountsBelowDiskFreePercentage = 25 - } - signInOnResume = "notConfigured" - setAccountManager = "notConfigured" - disableSignInOnResume = $True - localStorage = "notConfigured" - setEduPolicies = "notConfigured" - maintenanceStartTime = "00:00:00" - allowedAccounts = "notConfigured" - setPowerPolicies = "notConfigured" - '@odata.type' = "#microsoft.graph.sharedPCConfiguration" - allowLocalStorage = $True - kioskAppUserModelId = "FakeStringValue" - idleTimeBeforeSleepInSeconds = 25 - disablePowerPolicies = $True - enabled = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 index 9a0cecc348..ca681f27d4 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 @@ -41,6 +41,19 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + destinationStore = "computerCertStoreRoot" + certFileName = "FakeStringValue" + '@odata.type' = "#microsoft.graph.windows81TrustedRootCertificate" + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + + } + } # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -91,20 +104,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - destinationStore = "computerCertStoreRoot" - certFileName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows81TrustedRootCertificate" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -131,23 +130,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - destinationStore = "computerCertStoreRoot" - certFileName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows81TrustedRootCertificate" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -158,25 +142,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ CertFileName = "FakeStringValue" Description = "FakeStringValue" - DestinationStore = "computerCertStoreRoot" + DestinationStore = "userCertStoreRoot" # Updated property DisplayName = "FakeStringValue" Id = "FakeStringValue" Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - destinationStore = "computerCertStoreRoot" - certFileName = "CertFileName Drift" - '@odata.type' = "#microsoft.graph.windows81TrustedRootCertificate" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -200,21 +171,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - destinationStore = "computerCertStoreRoot" - certFileName = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows81TrustedRootCertificate" - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationVpnPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationVpnPolicyWindows10.Tests.ps1 index 1139869677..ac41d1d72b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationVpnPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationVpnPolicyWindows10.Tests.ps1 @@ -39,6 +39,121 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName New-M365DSCConnection -MockWith { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + dnsRules = @( + @{ + servers = @("FakeStringValue") + proxyServerUri = "FakeStringValue" + name = "FakeStringValue" + persistent = $True + autoTrigger = $True + } + ) + authenticationMethod = "certificate" + proxyServer = @{ + bypassProxyServerForLocalAddress = $True + '@odata.type' = "#microsoft.graph.windows10VpnProxyServer" + address = "FakeStringValue" + automaticConfigurationScriptUrl = "FakeStringValue" + automaticallyDetectProxySettings = $True + port = 25 + } + rememberUserCredentials = $True + enableDnsRegistration = $True + associatedApps = @( + @{ + identifier = "FakeStringValue" + appType = "desktop" + } + ) + routes = @( + @{ + prefixSize = 25 + destinationPrefix = "FakeStringValue" + } + ) + trustedNetworkDomains = @("FakeStringValue") + enableDeviceTunnel = $True + singleSignOnIssuerHash = "FakeStringValue" + singleSignOnEku = @{ + objectIdentifier = "FakeStringValue" + name = "FakeStringValue" + } + microsoftTunnelSiteId = "FakeStringValue" + enableSingleSignOnWithAlternateCertificate = $True + onlyAssociatedAppsCanUseConnection = $True + dnsSuffixes = @("FakeStringValue") + profileTarget = "user" + enableAlwaysOn = $True + servers = @( + @{ + isDefaultServer = $True + description = "FakeStringValue" + address = "FakeStringValue" + } + ) + connectionType = "pulseSecure" + connectionName = "FakeStringValue" + cryptographySuite = @{ + cipherTransformConstants = "aes256" + encryptionMethod = "aes256" + pfsGroup = "pfs1" + dhGroup = "group1" + integrityCheckMethod = "sha2_256" + authenticationTransformConstants = "md5_96" + } + trafficRules = @( + @{ + remotePortRanges = @( + @{ + lowerNumber = 25 + upperNumber = 25 + } + ) + name = "FakeStringValue" + appId = "FakeStringValue" + localPortRanges = @( + @{ + lowerNumber = 25 + upperNumber = 25 + } + ) + appType = "none" + localAddressRanges = @( + @{ + cidrAddress = "FakeStringValue" + upperAddress = "FakeStringValue" + lowerAddress = "FakeStringValue" + '@odata.type' = "#microsoft.graph.iPv4CidrRange" + } + ) + remoteAddressRanges = @( + @{ + cidrAddress = "FakeStringValue" + upperAddress = "FakeStringValue" + lowerAddress = "FakeStringValue" + '@odata.type' = "#microsoft.graph.iPv4CidrRange" + } + ) + claims = "FakeStringValue" + protocols = 25 + routingPolicyType = "none" + vpnTrafficDirection = "outbound" + } + ) + windowsInformationProtectionDomain = "FakeStringValue" + enableConditionalAccess = $True + '@odata.type' = "#microsoft.graph.windows10VpnConfiguration" + enableSplitTunneling = $True + } + description = "FakeStringValue" + displayName = "FakeStringValue" + id = "FakeStringValue" + + } + } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } # Mock Write-M365DSCHost to hide output during the tests @@ -295,122 +410,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - dnsRules = @( - @{ - servers = @("FakeStringValue") - proxyServerUri = "FakeStringValue" - name = "FakeStringValue" - persistent = $True - autoTrigger = $True - } - ) - authenticationMethod = "certificate" - proxyServer = @{ - bypassProxyServerForLocalAddress = $True - '@odata.type' = "#microsoft.graph.windows10VpnProxyServer" - address = "FakeStringValue" - automaticConfigurationScriptUrl = "FakeStringValue" - automaticallyDetectProxySettings = $True - port = 25 - } - rememberUserCredentials = $True - enableDnsRegistration = $True - associatedApps = @( - @{ - identifier = "FakeStringValue" - appType = "desktop" - } - ) - routes = @( - @{ - prefixSize = 25 - destinationPrefix = "FakeStringValue" - } - ) - trustedNetworkDomains = @("FakeStringValue") - enableDeviceTunnel = $True - singleSignOnIssuerHash = "FakeStringValue" - singleSignOnEku = @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - microsoftTunnelSiteId = "FakeStringValue" - enableSingleSignOnWithAlternateCertificate = $True - onlyAssociatedAppsCanUseConnection = $True - dnsSuffixes = @("FakeStringValue") - profileTarget = "user" - enableAlwaysOn = $True - servers = @( - @{ - isDefaultServer = $True - description = "FakeStringValue" - address = "FakeStringValue" - } - ) - connectionType = "pulseSecure" - connectionName = "FakeStringValue" - cryptographySuite = @{ - cipherTransformConstants = "aes256" - encryptionMethod = "aes256" - pfsGroup = "pfs1" - dhGroup = "group1" - integrityCheckMethod = "sha2_256" - authenticationTransformConstants = "md5_96" - } - trafficRules = @( - @{ - remotePortRanges = @( - @{ - lowerNumber = 25 - upperNumber = 25 - } - ) - name = "FakeStringValue" - appId = "FakeStringValue" - localPortRanges = @( - @{ - lowerNumber = 25 - upperNumber = 25 - } - ) - appType = "none" - localAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - remoteAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - claims = "FakeStringValue" - protocols = 25 - routingPolicyType = "none" - vpnTrafficDirection = "outbound" - } - ) - windowsInformationProtectionDomain = "FakeStringValue" - enableConditionalAccess = $True - '@odata.type' = "#microsoft.graph.windows10VpnConfiguration" - enableSplitTunneling = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } It 'Should return Values from the Get method' { @@ -539,122 +538,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - dnsRules = @( - @{ - servers = @("FakeStringValue") - proxyServerUri = "FakeStringValue" - name = "FakeStringValue" - persistent = $True - autoTrigger = $True - } - ) - authenticationMethod = "certificate" - proxyServer = @{ - bypassProxyServerForLocalAddress = $True - '@odata.type' = "#microsoft.graph.windows10VpnProxyServer" - address = "FakeStringValue" - automaticConfigurationScriptUrl = "FakeStringValue" - automaticallyDetectProxySettings = $True - port = 25 - } - rememberUserCredentials = $True - enableDnsRegistration = $True - associatedApps = @( - @{ - identifier = "FakeStringValue" - appType = "desktop" - } - ) - routes = @( - @{ - prefixSize = 25 - destinationPrefix = "FakeStringValue" - } - ) - trustedNetworkDomains = @("FakeStringValue") - enableDeviceTunnel = $True - singleSignOnIssuerHash = "FakeStringValue" - singleSignOnEku = @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - microsoftTunnelSiteId = "FakeStringValue" - enableSingleSignOnWithAlternateCertificate = $True - onlyAssociatedAppsCanUseConnection = $True - dnsSuffixes = @("FakeStringValue") - profileTarget = "user" - enableAlwaysOn = $True - servers = @( - @{ - isDefaultServer = $True - description = "FakeStringValue" - address = "FakeStringValue" - } - ) - connectionType = "pulseSecure" - connectionName = "FakeStringValue" - cryptographySuite = @{ - cipherTransformConstants = "aes256" - encryptionMethod = "aes256" - pfsGroup = "pfs1" - dhGroup = "group1" - integrityCheckMethod = "sha2_256" - authenticationTransformConstants = "md5_96" - } - trafficRules = @( - @{ - remotePortRanges = @( - @{ - lowerNumber = 25 - upperNumber = 25 - } - ) - name = "FakeStringValue" - appId = "FakeStringValue" - localPortRanges = @( - @{ - lowerNumber = 25 - upperNumber = 25 - } - ) - appType = "none" - localAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - remoteAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - claims = "FakeStringValue" - protocols = 25 - routingPolicyType = "none" - vpnTrafficDirection = "outbound" - } - ) - windowsInformationProtectionDomain = "FakeStringValue" - enableConditionalAccess = $True - '@odata.type' = "#microsoft.graph.windows10VpnConfiguration" - enableSplitTunneling = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } @@ -676,8 +559,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { connectionName = "FakeStringValue" connectionType = "pulseSecure" cryptographySuite = (New-CimInstance -ClassName MSFT_MicrosoftGraphcryptographySuite -Property @{ - cipherTransformConstants = "aes256" - encryptionMethod = "aes256" + cipherTransformConstants = "aes512" # Updated property + encryptionMethod = "aes512" # Updated property pfsGroup = "pfs1" dhGroup = "group1" integrityCheckMethod = "sha2_256" @@ -776,108 +659,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - dnsRules = @( - @{ - servers = @("FakeStringValue") - name = "FakeStringValue" - proxyServerUri = "FakeStringValue" - } - ) - singleSignOnEku = @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - singleSignOnIssuerHash = "FakeStringValue" - associatedApps = @( - @{ - identifier = "FakeStringValue" - appType = "desktop" - } - ) - trustedNetworkDomains = @("FakeStringValue") - routes = @( - @{ - prefixSize = 7 - destinationPrefix = "FakeStringValue" - } - ) - microsoftTunnelSiteId = "FakeStringValue" - connectionName = "FakeStringValue" - dnsSuffixes = @("FakeStringValue") - profileTarget = "user" - authenticationMethod = "certificate" - servers = @( - @{ - description = "FakeStringValue" - address = "FakeStringValue" - } - ) - connectionType = "pulseSecure" - trafficRules = @( - @{ - remotePortRanges = @( - @{ - lowerNumber = 7 - upperNumber = 7 - } - ) - name = "FakeStringValue" - appId = "FakeStringValue" - localPortRanges = @( - @{ - lowerNumber = 7 - upperNumber = 7 - } - ) - appType = "none" - localAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - remoteAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - claims = "FakeStringValue" - protocols = 7 - routingPolicyType = "none" - vpnTrafficDirection = "outbound" - } - ) - windowsInformationProtectionDomain = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows10VpnConfiguration" - proxyServer = @{ - port = 7 - automaticConfigurationScriptUrl = "FakeStringValue" - address = "FakeStringValue" - '@odata.type' = "#microsoft.graph.windows10VpnProxyServer" - } - cryptographySuite = @{ - cipherTransformConstants = "aes256" - encryptionMethod = "aes256" - pfsGroup = "pfs1" - dhGroup = "group1" - integrityCheckMethod = "sha2_256" - authenticationTransformConstants = "md5_96" - } - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -901,123 +682,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - dnsRules = @( - @{ - servers = @("FakeStringValue") - proxyServerUri = "FakeStringValue" - name = "FakeStringValue" - persistent = $True - autoTrigger = $True - } - ) - authenticationMethod = "certificate" - proxyServer = @{ - bypassProxyServerForLocalAddress = $True - '@odata.type' = "#microsoft.graph.windows10VpnProxyServer" - address = "FakeStringValue" - automaticConfigurationScriptUrl = "FakeStringValue" - automaticallyDetectProxySettings = $True - port = 25 - } - rememberUserCredentials = $True - enableDnsRegistration = $True - associatedApps = @( - @{ - identifier = "FakeStringValue" - appType = "desktop" - } - ) - routes = @( - @{ - prefixSize = 25 - destinationPrefix = "FakeStringValue" - } - ) - trustedNetworkDomains = @("FakeStringValue") - enableDeviceTunnel = $True - singleSignOnIssuerHash = "FakeStringValue" - singleSignOnEku = @{ - objectIdentifier = "FakeStringValue" - name = "FakeStringValue" - } - microsoftTunnelSiteId = "FakeStringValue" - enableSingleSignOnWithAlternateCertificate = $True - onlyAssociatedAppsCanUseConnection = $True - dnsSuffixes = @("FakeStringValue") - profileTarget = "user" - enableAlwaysOn = $True - servers = @( - @{ - isDefaultServer = $True - description = "FakeStringValue" - address = "FakeStringValue" - } - ) - connectionType = "pulseSecure" - connectionName = "FakeStringValue" - cryptographySuite = @{ - cipherTransformConstants = "aes256" - encryptionMethod = "aes256" - pfsGroup = "pfs1" - dhGroup = "group1" - integrityCheckMethod = "sha2_256" - authenticationTransformConstants = "md5_96" - } - trafficRules = @( - @{ - remotePortRanges = @( - @{ - lowerNumber = 25 - upperNumber = 25 - } - ) - name = "FakeStringValue" - appId = "FakeStringValue" - localPortRanges = @( - @{ - lowerNumber = 25 - upperNumber = 25 - } - ) - appType = "none" - localAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - remoteAddressRanges = @( - @{ - cidrAddress = "FakeStringValue" - upperAddress = "FakeStringValue" - lowerAddress = "FakeStringValue" - '@odata.type' = "#microsoft.graph.iPv4CidrRange" - } - ) - claims = "FakeStringValue" - protocols = 25 - routingPolicyType = "none" - vpnTrafficDirection = "outbound" - } - ) - windowsInformationProtectionDomain = "FakeStringValue" - enableConditionalAccess = $True - '@odata.type' = "#microsoft.graph.windows10VpnConfiguration" - enableSplitTunneling = $True - } - description = "FakeStringValue" - displayName = "FakeStringValue" - id = "FakeStringValue" - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 index ae4ba61a76..0269630343 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWindowsTeamPolicyWindows10.Tests.ps1 @@ -45,6 +45,36 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName New-M365DSCConnection -MockWith { return "Credentials" } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + settingsDefaultVolume = 25 + welcomeScreenMeetingInformation = "userDefined" + settingsScreenTimeoutInMinutes = 25 + settingsBlockMyMeetingsAndFiles = $True + '@odata.type' = "#microsoft.graph.windows10TeamGeneralConfiguration" + maintenanceWindowDurationInHours = 25 + azureOperationalInsightsBlockTelemetry = $True + miracastChannel = "userDefined" + welcomeScreenBackgroundImageUrl = "FakeStringValue" + settingsBlockSessionResume = $True + settingsSessionTimeoutInMinutes = 25 + azureOperationalInsightsWorkspaceKey = "FakeStringValue" + welcomeScreenBlockAutomaticWakeUp = $True + miracastRequirePin = $True + maintenanceWindowStartTime = "00:00:00" + settingsBlockSigninSuggestions = $True + maintenanceWindowBlocked = $True + miracastBlocked = $True + settingsSleepTimeoutInMinutes = 25 + azureOperationalInsightsWorkspaceId = "FakeStringValue" + connectAppBlockAutoLaunch = $True + } + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + Id = "FakeStringValue" + } + } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } # Mock Write-M365DSCHost to hide output during the tests @@ -133,37 +163,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - settingsDefaultVolume = 25 - welcomeScreenMeetingInformation = "userDefined" - settingsScreenTimeoutInMinutes = 25 - settingsBlockMyMeetingsAndFiles = $True - '@odata.type' = "#microsoft.graph.windows10TeamGeneralConfiguration" - maintenanceWindowDurationInHours = 25 - azureOperationalInsightsBlockTelemetry = $True - miracastChannel = "userDefined" - welcomeScreenBackgroundImageUrl = "FakeStringValue" - settingsBlockSessionResume = $True - settingsSessionTimeoutInMinutes = 25 - azureOperationalInsightsWorkspaceKey = "FakeStringValue" - welcomeScreenBlockAutomaticWakeUp = $True - miracastRequirePin = $True - maintenanceWindowStartTime = "00:00:00" - settingsBlockSigninSuggestions = $True - maintenanceWindowBlocked = $True - miracastBlocked = $True - settingsSleepTimeoutInMinutes = 25 - azureOperationalInsightsWorkspaceId = "FakeStringValue" - connectAppBlockAutoLaunch = $True - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -208,40 +207,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - settingsDefaultVolume = 25 - welcomeScreenMeetingInformation = "userDefined" - settingsScreenTimeoutInMinutes = 25 - settingsBlockMyMeetingsAndFiles = $True - '@odata.type' = "#microsoft.graph.windows10TeamGeneralConfiguration" - maintenanceWindowDurationInHours = 25 - azureOperationalInsightsBlockTelemetry = $True - miracastChannel = "userDefined" - welcomeScreenBackgroundImageUrl = "FakeStringValue" - settingsBlockSessionResume = $True - settingsSessionTimeoutInMinutes = 25 - azureOperationalInsightsWorkspaceKey = "FakeStringValue" - welcomeScreenBlockAutomaticWakeUp = $True - miracastRequirePin = $True - maintenanceWindowStartTime = "00:00:00" - settingsBlockSigninSuggestions = $True - maintenanceWindowBlocked = $True - miracastBlocked = $True - settingsSleepTimeoutInMinutes = 25 - azureOperationalInsightsWorkspaceId = "FakeStringValue" - connectAppBlockAutoLaunch = $True - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -266,7 +233,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SettingsBlockMyMeetingsAndFiles = $True SettingsBlockSessionResume = $True SettingsBlockSigninSuggestions = $True - SettingsDefaultVolume = 25 + SettingsDefaultVolume = 7 # Updated property SettingsScreenTimeoutInMinutes = 25 SettingsSessionTimeoutInMinutes = 25 SettingsSleepTimeoutInMinutes = 25 @@ -276,28 +243,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - maintenanceWindowDurationInHours = 7 - settingsScreenTimeoutInMinutes = 7 - welcomeScreenMeetingInformation = "userDefined" - settingsDefaultVolume = 7 - azureOperationalInsightsWorkspaceId = "FakeStringValue" - miracastChannel = "userDefined" - azureOperationalInsightsWorkspaceKey = "FakeStringValue" - settingsSessionTimeoutInMinutes = 7 - maintenanceWindowStartTime = "00:00:00" - '@odata.type' = "#microsoft.graph.windows10TeamGeneralConfiguration" - welcomeScreenBackgroundImageUrl = "FakeStringValue" - settingsSleepTimeoutInMinutes = 7 - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } It 'Should return Values from the Get method' { @@ -321,38 +266,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - settingsDefaultVolume = 25 - welcomeScreenMeetingInformation = "userDefined" - settingsScreenTimeoutInMinutes = 25 - settingsBlockMyMeetingsAndFiles = $True - '@odata.type' = "#microsoft.graph.windows10TeamGeneralConfiguration" - maintenanceWindowDurationInHours = 25 - azureOperationalInsightsBlockTelemetry = $True - miracastChannel = "userDefined" - welcomeScreenBackgroundImageUrl = "FakeStringValue" - settingsBlockSessionResume = $True - settingsSessionTimeoutInMinutes = 25 - azureOperationalInsightsWorkspaceKey = "FakeStringValue" - welcomeScreenBlockAutomaticWakeUp = $True - miracastRequirePin = $True - maintenanceWindowStartTime = "00:00:00" - settingsBlockSigninSuggestions = $True - maintenanceWindowBlocked = $True - miracastBlocked = $True - settingsSleepTimeoutInMinutes = 25 - azureOperationalInsightsWorkspaceId = "FakeStringValue" - connectAppBlockAutoLaunch = $True - } - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - Id = "FakeStringValue" - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 index 2f57621990..15bac33c97 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 @@ -53,18 +53,63 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + outerIdentityPrivacyTemporaryValue = 'FakeStringValue' + eapType = 'eapTls' + forceFIPSCompliance = $True + '@odata.type' = '#microsoft.graph.windowsWiredNetworkConfiguration' + secondaryAuthenticationMethod = 'certificate' + cacheCredentials = $True + innerAuthenticationProtocolForEAPTTLS = 'unencryptedPassword' + requireCryptographicBinding = $True + authenticationType = 'none' + trustedServerCertificateNames = @('FakeStringValue') + enforce8021X = $True + authenticationRetryDelayPeriodInSeconds = 25 + performServerValidation = $True + authenticationBlockPeriodInMinutes = 25 + maximumEAPOLStartMessages = 25 + disableUserPromptForServerValidation = $True + authenticationPeriodInSeconds = 25 + eapolStartPeriodInSeconds = 25 + authenticationMethod = 'certificate' + maximumAuthenticationFailures = 25 + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } } - Mock -CommandName Update-DeviceConfigurationPolicyCertificateId -MockWith { - } + Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { + return @(@{ + Id = 'a485d322-13cd-43ef-beda-733f656f48ea' + DisplayName = 'RootCertificate' + }) + } -ParameterFilter { $CertificateName -eq 'rootCertificatesForServerValidation' } - Mock -CommandName Remove-DeviceConfigurationPolicyCertificateId -MockWith { - } + Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { + return @{ + Id = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' + DisplayName = 'ClientCertificate' + } + } -ParameterFilter { $CertificateName -eq 'secondaryIdentityCertificateForClientAuthentication' } Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { + return 'a485d322-13cd-43ef-beda-733f656f48ea' + } -ParameterFilter { $DisplayName -eq 'RootCertificate' } + + Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { + return '0b9aef2f-1671-4260-8eb9-3ab3138e176a' + } -ParameterFilter { $DisplayName -eq 'ClientCertificate' } + + Mock -CommandName Update-DeviceConfigurationPolicyCertificateId -MockWith { } + Mock -CommandName Remove-DeviceConfigurationPolicyCertificateId -MockWith { + } } # Test contexts Context -Name 'The IntuneDeviceConfigurationWiredNetworkPolicyWindows10 should exist but it DOES NOT' -Fixture { @@ -103,27 +148,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { return $null } - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @(@{ - Id = 'a485d322-13cd-43ef-beda-733f656f48ea' - DisplayName = 'RootCertificate' - }) - } -ParameterFilter { $CertificateName -eq 'rootCertificatesForServerValidation' } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @{ - Id = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - DisplayName = 'ClientCertificate' - } - } -ParameterFilter { $CertificateName -eq 'secondaryIdentityCertificateForClientAuthentication' } - - Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { - return 'a485d322-13cd-43ef-beda-733f656f48ea' - } -ParameterFilter { $DisplayName -eq 'RootCertificate' } - - Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { - return '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - } -ParameterFilter { $DisplayName -eq 'ClientCertificate' } } It 'Should return Values from the Get method' { (Get-TargetResource @testParams).Ensure | Should -Be 'Absent' @@ -169,58 +193,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SecondaryIdentityCertificateForClientAuthenticationId = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' SecondaryIdentityCertificateForClientAuthenticationDisplayName = 'ClientCertificate' } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - outerIdentityPrivacyTemporaryValue = 'FakeStringValue' - eapType = 'eapTls' - forceFIPSCompliance = $True - '@odata.type' = '#microsoft.graph.windowsWiredNetworkConfiguration' - secondaryAuthenticationMethod = 'certificate' - cacheCredentials = $True - innerAuthenticationProtocolForEAPTTLS = 'unencryptedPassword' - requireCryptographicBinding = $True - authenticationType = 'none' - trustedServerCertificateNames = @('FakeStringValue') - enforce8021X = $True - authenticationRetryDelayPeriodInSeconds = 25 - performServerValidation = $True - authenticationBlockPeriodInMinutes = 25 - maximumEAPOLStartMessages = 25 - disableUserPromptForServerValidation = $True - authenticationPeriodInSeconds = 25 - eapolStartPeriodInSeconds = 25 - authenticationMethod = 'certificate' - maximumAuthenticationFailures = 25 - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @(@{ - Id = 'a485d322-13cd-43ef-beda-733f656f48ea' - DisplayName = 'RootCertificate' - }) - } -ParameterFilter { $CertificateName -eq 'rootCertificatesForServerValidation' } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @{ - Id = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - DisplayName = 'ClientCertificate' - } - } -ParameterFilter { $CertificateName -eq 'secondaryIdentityCertificateForClientAuthentication' } - - Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { - return 'a485d322-13cd-43ef-beda-733f656f48ea' - } -ParameterFilter { $DisplayName -eq 'RootCertificate' } - - Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { - return '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - } -ParameterFilter { $DisplayName -eq 'ClientCertificate' } } It 'Should return Values from the Get method' { @@ -266,50 +238,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { RootCertificatesForServerValidationIds = @('a485d322-13cd-43ef-beda-733f656f48ea') SecondaryIdentityCertificateForClientAuthenticationId = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - outerIdentityPrivacyTemporaryValue = 'FakeStringValue' - eapType = 'eapTls' - forceFIPSCompliance = $True - '@odata.type' = '#microsoft.graph.windowsWiredNetworkConfiguration' - secondaryAuthenticationMethod = 'certificate' - cacheCredentials = $True - innerAuthenticationProtocolForEAPTTLS = 'unencryptedPassword' - requireCryptographicBinding = $True - authenticationType = 'none' - trustedServerCertificateNames = @('FakeStringValue') - enforce8021X = $True - authenticationRetryDelayPeriodInSeconds = 25 - performServerValidation = $True - authenticationBlockPeriodInMinutes = 25 - maximumEAPOLStartMessages = 25 - disableUserPromptForServerValidation = $True - authenticationPeriodInSeconds = 25 - eapolStartPeriodInSeconds = 25 - authenticationMethod = 'certificate' - maximumAuthenticationFailures = 25 - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @(@{ - Id = 'a485d322-13cd-43ef-beda-733f656f48ea' - DisplayName = 'RootCertificate' - }) - } -ParameterFilter { $CertificateName -eq 'rootCertificatesForServerValidation' } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @{ - Id = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - DisplayName = 'ClientCertificate' - } - } -ParameterFilter { $CertificateName -eq 'secondaryIdentityCertificateForClientAuthentication' } } It 'Should return true from the Test method' { @@ -329,7 +257,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisableUserPromptForServerValidation = $True DisplayName = 'FakeStringValue' - EapolStartPeriodInSeconds = 25 + EapolStartPeriodInSeconds = 7 # Updated property EapType = 'eapTls' Enforce8021X = $True ForceFIPSCompliance = $True @@ -349,52 +277,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SecondaryIdentityCertificateForClientAuthenticationId = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' SecondaryIdentityCertificateForClientAuthenticationDisplayName = 'ClientCertificate' } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - eapolStartPeriodInSeconds = 7 - authenticationPeriodInSeconds = 7 - trustedServerCertificateNames = @('FakeStringValue') - authenticationBlockPeriodInMinutes = 7 - authenticationRetryDelayPeriodInSeconds = 7 - authenticationMethod = 'certificate' - authenticationType = 'none' - innerAuthenticationProtocolForEAPTTLS = 'unencryptedPassword' - outerIdentityPrivacyTemporaryValue = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsWiredNetworkConfiguration' - maximumEAPOLStartMessages = 7 - eapType = 'eapTls' - secondaryAuthenticationMethod = 'certificate' - maximumAuthenticationFailures = 7 - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @(@{ - Id = 'a485d322-13cd-43ef-beda-733f656f48ea' - DisplayName = 'RootCertificate' - }) - } -ParameterFilter { $CertificateName -eq 'rootCertificatesForServerValidation' } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @{ - Id = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - DisplayName = 'ClientCertificate' - } - } -ParameterFilter { $CertificateName -eq 'secondaryIdentityCertificateForClientAuthentication' } - - Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { - return 'a485d322-13cd-43ef-beda-733f656f48ea' - } -ParameterFilter { $DisplayName -eq 'RootCertificate' } - - Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { - return '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - } -ParameterFilter { $DisplayName -eq 'ClientCertificate' } } It 'Should return Values from the Get method' { @@ -418,52 +300,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - outerIdentityPrivacyTemporaryValue = 'FakeStringValue' - eapType = 'eapTls' - forceFIPSCompliance = $True - '@odata.type' = '#microsoft.graph.windowsWiredNetworkConfiguration' - secondaryAuthenticationMethod = 'certificate' - cacheCredentials = $True - innerAuthenticationProtocolForEAPTTLS = 'unencryptedPassword' - requireCryptographicBinding = $True - authenticationType = 'none' - trustedServerCertificateNames = @('FakeStringValue') - enforce8021X = $True - authenticationRetryDelayPeriodInSeconds = 25 - performServerValidation = $True - authenticationBlockPeriodInMinutes = 25 - maximumEAPOLStartMessages = 25 - disableUserPromptForServerValidation = $True - authenticationPeriodInSeconds = 25 - eapolStartPeriodInSeconds = 25 - authenticationMethod = 'certificate' - maximumAuthenticationFailures = 25 - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @(@{ - Id = 'a485d322-13cd-43ef-beda-733f656f48ea' - DisplayName = 'RootCertificate' - }) - } -ParameterFilter { $CertificateName -eq 'rootCertificatesForServerValidation' } - - Mock -CommandName Get-DeviceConfigurationPolicyCertificate -MockWith { - return @{ - Id = '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - DisplayName = 'ClientCertificate' - } - } -ParameterFilter { $CertificateName -eq 'secondaryIdentityCertificateForClientAuthentication' } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentLimitRestriction.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentLimitRestriction.Tests.ps1 index 4b10dd3945..730159a1c2 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentLimitRestriction.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentLimitRestriction.Tests.ps1 @@ -44,6 +44,18 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.deviceEnrollmentLimitConfiguration' + Limit = 15 + } + Id = '12345-12345-12345-12345-12345_Limit' + Priority = 1 + DisplayName = 'My DSC Restriction' + } + } + Mock -CommandName Invoke-MgGraphRequest -MockWith { } @@ -104,21 +116,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'My DSC Restriction' Ensure = 'Present' Credential = $Credential - Limit = 15 + Limit = 12 # Updated property Priority = 1 } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentLimitConfiguration' - Limit = 12 # Drift - } - Priority = 1 - Id = '12345-12345-12345-12345-12345_Limit' - DisplayName = 'My DSC Restriction'; - } - } } It 'Should return Present from the Get method' { @@ -145,18 +145,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Limit = 15 Priority = 1 } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentLimitConfiguration' - Limit = 15 - } - Id = '12345-12345-12345-12345-12345_Limit' - Priority = 1 - DisplayName = 'My DSC Restriction' - } - } } It 'Should return true from the Test method' { @@ -174,18 +162,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Priority = 1 Limit = 15 } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentLimitConfiguration' - Limit = 12 - } - Id = '12345-12345-12345-12345-12345_Limit' - Priority = 1 - DisplayName = 'My DSC Restriction' - } - } } It 'Should return Present from the Get method' { @@ -209,18 +185,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentLimitConfiguration' - Limit = 12 - } - Id = '12345-12345-12345-12345-12345_Limit' - Priority = 1 - DisplayName = 'My DSC Restriction' - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentPlatformRestriction.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentPlatformRestriction.Tests.ps1 index 53d8f74e1a..a88aae733d 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentPlatformRestriction.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentPlatformRestriction.Tests.ps1 @@ -42,6 +42,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration' + PlatformRestriction = @{ + PersonalDeviceEnrollmentBlocked = $False + PlatformBlocked = $False + } + platformType = 'ios' + } + id = '12345-12345-12345-12345-12345_SinglePlatformRestriction' + DeviceEnrollmentConfigurationType = 'singlePlatformRestriction' + Description = '' + DisplayName = 'My DSC Restriction' + Priority = 1 + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfigurationAssignment -MockWith { return @() } @@ -119,24 +137,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { personalDeviceEnrollmentBlocked = $False } -ClientOnly) } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration' - PlatformRestriction = @{ - PersonalDeviceEnrollmentBlocked = $False - PlatformBlocked = $False - } - platformType = 'ios' - } - id = '12345-12345-12345-12345-12345_SinglePlatformRestriction' - DeviceEnrollmentConfigurationType = 'singlePlatformRestriction' - Description = '' - DisplayName = 'My DSC Restriction' - Priority = 1 - } - } } It 'Should return true from the Test method' { @@ -156,27 +156,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Priority = 1 IosRestriction = (New-CimInstance -ClassName MSFT_DeviceEnrollmentPlatformRestriction -Property @{ platformBlocked = $False - personalDeviceEnrollmentBlocked = $False + personalDeviceEnrollmentBlocked = $True # Updated property } -ClientOnly) } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration' - PlatformRestriction = @{ - PersonalDeviceEnrollmentBlocked = $true; #drift - PlatformBlocked = $False - } - platformType = 'ios' - } - id = '12345-12345-12345-12345-12345_SinglePlatformRestriction' - DeviceEnrollmentConfigurationType = 'singlePlatformRestriction' - Description = '' - DisplayName = 'My DSC Restriction' - Priority = 1 - } - } } It 'Should return false from the Test method' { @@ -199,24 +181,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { personalDeviceEnrollmentBlocked = $False } -ClientOnly) } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration' - PlatformRestriction = @{ - PersonalDeviceEnrollmentBlocked = $False - PlatformBlocked = $False - } - platformType = 'ios' - } - id = '12345-12345-12345-12345-12345_SinglePlatformRestriction' - DeviceEnrollmentConfigurationType = 'singlePlatformRestriction' - Description = '' - DisplayName = 'My DSC Restriction' - Priority = 1 - } - } } It 'Should return Present from the Get method' { @@ -240,24 +204,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration' - PlatformRestriction = @{ - PersonalDeviceEnrollmentBlocked = $False - PlatformBlocked = $False - } - platformType = 'ios' - } - id = '12345-12345-12345-12345-12345_SinglePlatformRestriction' - DeviceEnrollmentConfigurationType = 'singlePlatformRestriction' - Description = '' - DisplayName = 'My DSC Restriction' - Priority = 1 - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentStatusPageWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentStatusPageWindows10.Tests.ps1 index 09d6ec1316..bc90e410c8 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentStatusPageWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceEnrollmentStatusPageWindows10.Tests.ps1 @@ -56,6 +56,29 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return @() } + Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { + return @{ + Id = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Description = 'FakeStringValue' + AdditionalProperties = @{ + trackInstallProgressForAutopilotOnly = $True + '@odata.type' = '#microsoft.graph.windows10EnrollmentCompletionPageConfiguration' + disableUserStatusTrackingAfterFirstUser = $True + installQualityUpdates = $True + showInstallationProgress = $True + selectedMobileAppIds = @('FakeGuidValue') + blockDeviceSetupRetryByUser = $True + allowDeviceUseOnInstallFailure = $True + customErrorMessage = 'FakeStringValue' + allowNonBlockingAppInstallation = $True + allowLogCollectionOnInstallFailure = $True + allowDeviceResetOnInstallFailure = $True + installProgressTimeoutInMinutes = 25 + } + } + } + Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith {} Mock Update-DeviceEnrollmentConfigurationPriority {} @@ -135,29 +158,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - trackInstallProgressForAutopilotOnly = $True - '@odata.type' = '#microsoft.graph.windows10EnrollmentCompletionPageConfiguration' - disableUserStatusTrackingAfterFirstUser = $True - installQualityUpdates = $True - showInstallationProgress = $True - selectedMobileAppIds = @('FakeGuidValue') - blockDeviceSetupRetryByUser = $True - allowDeviceUseOnInstallFailure = $True - customErrorMessage = 'FakeStringValue' - allowNonBlockingAppInstallation = $True - allowLogCollectionOnInstallFailure = $True - allowDeviceResetOnInstallFailure = $True - installProgressTimeoutInMinutes = 25 - } - } - } } It 'Should return Values from the Get method' { @@ -195,30 +195,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - trackInstallProgressForAutopilotOnly = $True - '@odata.type' = '#microsoft.graph.windows10EnrollmentCompletionPageConfiguration' - disableUserStatusTrackingAfterFirstUser = $True - installQualityUpdates = $True - showInstallationProgress = $True - selectedMobileAppIds = @('FakeGuidValue') - blockDeviceSetupRetryByUser = $True - allowDeviceUseOnInstallFailure = $True - customErrorMessage = 'FakeStringValue' - allowNonBlockingAppInstallation = $True - allowLogCollectionOnInstallFailure = $True - allowDeviceResetOnInstallFailure = $True - installProgressTimeoutInMinutes = 25 - } - Priority = 25 - } - } } It 'Should return true from the Test method' { @@ -247,30 +223,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - trackInstallProgressForAutopilotOnly = $True - '@odata.type' = '#microsoft.graph.windows10EnrollmentCompletionPageConfiguration' - disableUserStatusTrackingAfterFirstUser = $True - installQualityUpdates = $True - showInstallationProgress = $True - selectedMobileAppIds = @('FakeGuidValue') - blockDeviceSetupRetryByUser = $True - allowDeviceUseOnInstallFailure = $True - customErrorMessage = 'FakeStringValue' - allowNonBlockingAppInstallation = $True - allowLogCollectionOnInstallFailure = $True - allowDeviceResetOnInstallFailure = $True - installProgressTimeoutInMinutes = 25 - } - Priority = 25 - } - } } @@ -285,7 +237,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Id = 'FakeStringValue' DisplayName = 'FakeStringValue' Description = 'FakeStringValue' - AllowDeviceResetOnInstallFailure = $True + AllowDeviceResetOnInstallFailure = $False # Updated property AllowDeviceUseOnInstallFailure = $True AllowLogCollectionOnInstallFailure = $True AllowNonBlockingAppInstallation = $True @@ -300,22 +252,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - installProgressTimeoutInMinutes = 7 - customErrorMessage = 'FakeStringValue' - trackInstallProgressForAutopilotOnly = $False - selectedMobileAppIds = @('FakeGuidValue') - showInstallationProgress = $False - } - Priority = 7 - } - } } It 'Should return Values from the Get method' { @@ -347,28 +283,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisableUserStatusTrackingAfterFirstUser = $True InstallProgressTimeoutInMinutes = 25 InstallQualityUpdates = $True - SelectedMobileAppNames = @('FakeStringValue') + SelectedMobileAppNames = @('NewApp') # Updated property ShowInstallationProgress = $True TrackInstallProgressForAutopilotOnly = $True Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - installProgressTimeoutInMinutes = 7 - customErrorMessage = 'FakeStringValue' - trackInstallProgressForAutopilotOnly = $False - selectedMobileAppIds = @('FakeGuidValue') - showInstallationProgress = $False - } - Priority = 7 - } - } } It 'Should return Values from the Get method' { @@ -392,30 +312,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -MockWith { - return @{ - Id = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - trackInstallProgressForAutopilotOnly = $True - '@odata.type' = '#microsoft.graph.windows10EnrollmentCompletionPageConfiguration' - disableUserStatusTrackingAfterFirstUser = $True - installQualityUpdates = $True - showInstallationProgress = $True - selectedMobileAppIds = @('FakeGuidValue') - blockDeviceSetupRetryByUser = $True - allowDeviceUseOnInstallFailure = $True - customErrorMessage = 'FakeStringValue' - allowNonBlockingAppInstallation = $True - allowLogCollectionOnInstallFailure = $True - allowDeviceResetOnInstallFailure = $True - installProgressTimeoutInMinutes = 25 - } - Priority = 25 - } - } } It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceFeaturesConfigurationPolicyIOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceFeaturesConfigurationPolicyIOS.Tests.ps1 index 0562b7dc8c..c807de89c6 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceFeaturesConfigurationPolicyIOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceFeaturesConfigurationPolicyIOS.Tests.ps1 @@ -39,6 +39,88 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + DisplayName = 'FakeStringValue' + Description = 'FakeStringValue' + Id = 'ab915bca-1234-4b11-8acb-719a771139bc' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.iosDeviceFeaturesConfiguration' + wallpaperDisplayLocation = 'notConfigured' + airPrintDestinations = @( + @{ + ipAddress = '1.0.0.1' + resourcePath = 'printers/xerox_Phase' + port = 0 + forceTls = $false + } + ) + contentFilterSettings = @{ + '@odata.Type' = '#microsoft.graph.iosWebContentFilterAutoFilter' + allowedUrls = @( + 'https://www.fakeallowed.com' + ) + blockedUrls = @( + 'https://www.fakeblocked.com' + ) + } + homeScreenDockIcons = @( + @{ + '@odata.type' = '#microsoft.graph.iosHomeScreenApp' + displayName = 'Apple Store' + bundleID = 'com.apple.store.Jolly' + isWebClip = $false + } + ) + homeScreenPages = @( + @{ + icons = @( + @{ + '@odata.type' = '#microsoft.graph.iosHomeScreenApp' + displayName = 'App Store' + bundleID = 'com.apple.AppStore' + isWebClip = $false + } + ) + } + ) + notificationSettings = @( + @{ + bundleID = 'app.id' + appName = 'fakeapp' + publisher = 'fakepublisher' + enabled = $true + showInNotificationCenter = $true + showOnLockScreen = $true + alertType = 'banner' + badgesEnabled = $true + soundsEnabled = $true + previewVisibility = 'hideWhenLocked' + } + ) + singleSignOnSettings = @{ + allowedUrls = @('https://www.fakeurl.com') + displayName = 'iOS-DeviceFeatures-ContentSettingsSpecificSites' + kerberosPrincipalName = 'userPrincipalName' + kerberosRealm = 'fakerealm.com' + allowedAppsList = @( + @{ + name = 'Intune Company Portal' + appId = 'com.microsoft.companyportal' + } + ) + } + iosSingleSignOnExtension = @{ + '@odata.type' = '#microsoft.graph.iosCredentialSingleSignOnExtension' + extensionIdentifier = 'com.example.sso.credential' + teamIdentifier = '4HMSJJRMAD' + realm = 'EXAMPLE.COM' + domains = @('example.com') + } + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() @@ -70,9 +152,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ipAddress = '1.0.0.1' } -ClientOnly) ) - AssetTagTemplate = 'FakeStringValue' - ContentFilterSettings = [CimInstance[]]@( + ContentFilterSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosWebContentFilterSpecificWebsitesAccess ` -Property @{ @@ -86,7 +167,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } -ClientOnly) ) LockScreenFootnote = 'FakeStringValue' - HomeScreenDockIcons = [CimInstance[]]@( + HomeScreenDockIcons = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosHomeScreenApp ` -Property @{ @@ -97,7 +178,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) HomeScreenGridWidth = 5 HomeScreenGridHeight = 6 - HomeScreenPages = [CimInstance[]]@( + HomeScreenPages = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosHomeScreenItem ` -Property @{ @@ -112,7 +193,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) } -ClientOnly) ) - NotificationSettings = [CimInstance[]]@( + NotificationSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosNotificationSettings ` -Property @{ @@ -128,7 +209,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { appName = 'fakeapp' } -ClientOnly) ) - SingleSignOnSettings = [CimInstance[]]@( + SingleSignOnSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosSingleSignOnSettings ` -Property @{ @@ -228,7 +309,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ipAddress = '1.0.0.1' } -ClientOnly) ) - ContentFilterSettings = [CimInstance[]]@( + ContentFilterSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosWebContentFilterSpecificWebsitesAccess ` -Property @{ @@ -241,7 +322,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) } -ClientOnly) ) - HomeScreenDockIcons = [CimInstance[]]@( + HomeScreenDockIcons = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosHomeScreenApp ` -Property @{ @@ -250,7 +331,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { isWebClip = $False } -ClientOnly) ) - HomeScreenPages = [CimInstance[]]@( + HomeScreenPages = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosHomeScreenItem ` -Property @{ @@ -265,13 +346,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) } -ClientOnly) ) - NotificationSettings = [CimInstance[]]@( + NotificationSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosNotificationSettings ` -Property @{ alertType = 'banner' enabled = $True - showOnLockScreen = $True + showOnLockScreen = $False # Updated property badgesEnabled = $True soundsEnabled = $True publisher = 'fakepublisher' @@ -281,7 +362,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { appName = 'fakeapp' } -ClientOnly) ) - SingleSignOnSettings = [CimInstance[]]@( + SingleSignOnSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosSingleSignOnSettings ` -Property @{ @@ -313,93 +394,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue - CHANGED' #changed - Id = 'ab915bca-1234-4b11-8acb-719a771139bc' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosDeviceFeaturesConfiguration' - wallpaperDisplayLocation = 'notConfigured' - airPrintDestinations = @( - @{ - ipAddress = '1.0.0.1' - resourcePath = 'printers/xerox_Phase' - port = 0 - forceTls = $false - } - ) - contentFilterSettings = @{ - '@odata.Type' = '#microsoft.graph.iosWebContentFilterAutoFilter' - allowedUrls = @( - 'https://www.fakeallowed.com' - ) - blockedUrls = @( - 'https://www.fakeblocked.com' - ) - } - homeScreenDockIcons = @( - @{ - '@odata.type' = '#microsoft.graph.iosHomeScreenApp' - displayName = 'Apple Store' - bundleID = 'com.apple.store.Jolly' - isWebClip = $false - } - ) - homeScreenPages = @( - @{ - icons = @( - @{ - '@odata.type' = '#microsoft.graph.iosHomeScreenApp' - displayName = 'App Store' - bundleID = 'com.apple.AppStore' - isWebClip = $false - } - ) - } - ) - notificationSettings = @( - @{ - bundleID = 'app.id' - appName = 'fakeapp' - publisher = 'fakepublisher' - enabled = $true - showInNotificationCenter = $true - showOnLockScreen = $true - alertType = 'banner' - badgesEnabled = $true - soundsEnabled = $true - previewVisibility = 'hideWhenLocked' - } - ) - singleSignOnSettings = @{ - allowedUrls = @('https://www.fakeurl.com') - displayName = 'iOS-DeviceFeatures-ContentSettingsSpecificSites' - kerberosPrincipalName = 'userPrincipalName' - kerberosRealm = 'fakerealm.com' - allowedAppsList = @( - @{ - name = 'Intune Company Portal' - appId = 'com.microsoft.companyportal' - } - ) - } - iosSingleSignOnExtension = @{ - '@odata.type' = '#microsoft.graph.iosCredentialSingleSignOnExtension' - extensionIdentifier = 'com.example.sso.credential' - teamIdentifier = '4HMSJJRMAD' - realm = 'EXAMPLE.COM' - domains = @('example.com') - } - #end additionalproperties - } - } } - } It 'Should return Present from the Get method' { - (Get-TargetResource @testParams).Ensure | Should -Be 'Present' #-Displayname 'FakeStringValue').Ensure | Should -Be 'Present' # + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' } It 'Should return false from the Test method' { @@ -409,7 +407,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { It 'Should update the IntuneDeviceFeaturesConfigurationPolicyIOS from the Set method' { Set-TargetResource @testParams Should -Invoke -CommandName Update-MgBetaDeviceManagementDeviceConfiguration -Exactly 1 - } } @@ -432,7 +429,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ipAddress = '1.0.0.1' } -ClientOnly) ) - ContentFilterSettings = [CimInstance[]]@( + ContentFilterSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosWebContentFilterSpecificWebsitesAccess ` -Property @{ @@ -445,7 +442,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) } -ClientOnly) ) - HomeScreenDockIcons = [CimInstance[]]@( + HomeScreenDockIcons = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosHomeScreenApp ` -Property @{ @@ -454,7 +451,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { isWebClip = $False } -ClientOnly) ) - HomeScreenPages = [CimInstance[]]@( + HomeScreenPages = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosHomeScreenItem ` -Property @{ @@ -469,7 +466,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ) } -ClientOnly) ) - NotificationSettings = [CimInstance[]]@( + NotificationSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosNotificationSettings ` -Property @{ @@ -485,7 +482,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { appName = 'fakeapp' } -ClientOnly) ) - SingleSignOnSettings = [CimInstance[]]@( + SingleSignOnSettings = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_iosSingleSignOnSettings ` -Property @{ @@ -517,89 +514,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'ab915bca-1234-4b11-8acb-719a771139bc' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosDeviceFeaturesConfiguration' - wallpaperDisplayLocation = 'notConfigured' - airPrintDestinations = @( - @{ - ipAddress = '1.0.0.1' - resourcePath = 'printers/xerox_Phase' - port = 0 - forceTls = $false - } - ) - contentFilterSettings = @{ - '@odata.Type' = '#microsoft.graph.iosWebContentFilterAutoFilter' - allowedUrls = @( - 'https://www.fakeallowed.com' - ) - blockedUrls = @( - 'https://www.fakeblocked.com' - ) - } - homeScreenDockIcons = @( - @{ - '@odata.type' = '#microsoft.graph.iosHomeScreenApp' - displayName = 'Apple Store' - bundleID = 'com.apple.store.Jolly' - isWebClip = $false - } - ) - homeScreenPages = @( - @{ - icons = @( - @{ - '@odata.type' = '#microsoft.graph.iosHomeScreenApp' - displayName = 'App Store' - bundleID = 'com.apple.AppStore' - isWebClip = $false - } - ) - } - ) - notificationSettings = @( - @{ - bundleID = 'app.id' - appName = 'fakeapp' - publisher = 'fakepublisher' - enabled = $true - showInNotificationCenter = $true - showOnLockScreen = $true - alertType = 'banner' - badgesEnabled = $true - soundsEnabled = $true - previewVisibility = 'hideWhenLocked' - } - ) - singleSignOnSettings = @{ - allowedUrls = @('https://www.fakeurl.com') - displayName = 'iOS-DeviceFeatures-ContentSettingsSpecificSites' - kerberosPrincipalName = 'userPrincipalName' - kerberosRealm = 'fakerealm.com' - allowedAppsList = @( - @{ - name = 'Intune Company Portal' - appId = 'com.microsoft.companyportal' - } - ) - } - iosSingleSignOnExtension = @{ - '@odata.type' = '#microsoft.graph.iosCredentialSingleSignOnExtension' - extensionIdentifier = 'com.example.sso.credential' - teamIdentifier = '4HMSJJRMAD' - realm = 'EXAMPLE.COM' - domains = @('example.com') - } - #end additionalproperties - } - } - } } It 'Should return true from the Test method' { @@ -619,19 +533,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - RoleScopeTagIds = @('0') - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosDeviceFeaturesConfiguration' - wallpaperDisplayLocation = 'notConfigured' - } - } - } } It 'Should return Present from the Get method' { @@ -655,110 +556,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - RoleScopeTagIds = @('0') - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosDeviceFeaturesConfiguration' - airPrintDestinations = @( - @{ - ipAddress = '1.0.0.1' - resourcePath = 'printers/xerox_Phase' - port = 0 - forceTls = $false - } - ) - assetTagTemplate = 'Asset #123abc' - lockScreenFootnote = 'If Lost, Return to' - homeScreenGridWidth = 4 - homeScreenGridHeight = 5 - wallpaperDisplayLocation = 'notConfigured' - contentFilterSettings = @{ - '@odata.Type' = '#microsoft.graph.iosWebContentFilterAutoFilter' - allowedUrls = @( - 'https://www.fakeallowed.com' - ) - blockedUrls = @( - 'https://www.fakeblocked.com' - ) - } - homeScreenDockIcons = @( - @{ - '@odata.type' = '#microsoft.graph.iosHomeScreenApp' - displayName = 'Apple Store' - bundleID = 'com.apple.store.Jolly' - isWebClip = $false - } - ) - homeScreenPages = @( - @{ - icons = @( - @{ - '@odata.type' = '#microsoft.graph.iosHomeScreenApp' - displayName = 'App Store' - bundleID = 'com.apple.AppStore' - isWebClip = $false - } - ) - } - ) - notificationSettings = @( - @{ - bundleID = 'app.id' - appName = 'fakeapp' - publisher = 'fakepublisher' - enabled = $true - showInNotificationCenter = $true - showOnLockScreen = $true - alertType = 'banner' - badgesEnabled = $true - soundsEnabled = $true - previewVisibility = 'hideWhenLocked' - } - ) - singleSignOnSettings = @{ - allowedUrls = @('https://www.fakeurl.com') - displayName = 'iOS-DeviceFeatures-ContentSettingsSpecificSites' - kerberosPrincipalName = 'userPrincipalName' - kerberosRealm = 'fakerealm.com' - allowedAppsList = @( - @{ - name = 'Intune Company Portal' - appId = 'com.microsoft.companyportal' - } - ) - } - iosCredentialSingleSignOnExtension = @{ - '@odata.type' = '#microsoft.graph.iosCredentialSingleSignOnExtension' - extensionIdentifier = 'com.example.sso.credential' - teamIdentifier = '4HMSJJRMAD' - domains = @('example.com') - realm = 'EXAMPLE.COM' - configurations = @( - @{ - '@odata.type' = '#microsoft.graph.keyStringValuePair' - key = 'myString' - value = 'myvalue' - } - @{ - '@odata.type' = '#microsoft.graph.keyBooleanValuePair' - key = 'mybool' - value = $true - } - @{ - '@odata.type' = '#microsoft.graph.keyIntegerValuePair' - key = 'myInt' - value = 4 - } - ) - } - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 index 788a717aec..20940111d9 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 @@ -40,6 +40,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile -MockWith { + return @{ + Id = "164655f7-1232-4d56-ae8f-b095196a0309"; + DisplayName = "Android Owner Enrollment Profile" + Description = "Profile for enrolling Android" + TokenExpirationDateTime = "2024-12-31T23:59:59Z" + TokenCreationDateTime = "2024-12-31T23:59:59Z" + TokenValue = "your-token-value" + EnrollmentMode = "corporateOwnedWorkProfile" + EnrollmentTokenType = 'TokenType' + QrCodeContent = "your-qr-code-content" + WifiSsid = "your-wifi-ssid" + WifiPassword = "your-wifi-password" + WifiSecurityType = "wpa" + Ensure = 'Present' + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -94,24 +112,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile -MockWith { - return @{ - Id = "164655f7-1232-4d56-ae8f-b095196a0309"; - DisplayName = "Android Owner Enrollment Profile" - Description = "Profile for enrolling Android" - TokenExpirationDateTime = "2024-12-31T23:59:59Z" - TokenCreationDateTime = "2024-12-31T23:59:59Z" - TokenValue = "your-token-value" - EnrollmentMode = "corporateOwnedWorkProfile" - EnrollmentTokenType = 'TokenType' - QrCodeContent = "your-qr-code-content" - WifiSsid = "your-wifi-ssid" - WifiPassword = "your-wifi-password" - WifiSecurityType = "wpa" - Ensure = 'Present' - } - } } It 'Should return Values from the Get method' { (Get-TargetResource @testParams).Ensure | Should -Be 'Present' @@ -140,24 +140,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile -MockWith { - return @{ - Id = "164655f7-1232-4d56-ae8f-b095196a0309"; - DisplayName = "Android Owner Enrollment Profile" - Description = "Profile for enrolling Android devices" - TokenExpirationDateTime = "2024-12-31T23:59:59Z" - TokenCreationDateTime = "2024-12-31T23:59:59Z" - TokenValue = "your-token-value" - EnrollmentMode = "corporateOwnedWorkProfile" - EnrollmentTokenType = 'TokenType' - QrCodeContent = "your-qr-code-content" - WifiSsid = "your-wifi-ssid" - WifiPassword = "your-wifi-password" - WifiSecurityType = "wpa" - Ensure = 'Present' - } - } } It 'Should return true from the Test method' { @@ -179,24 +161,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile -MockWith { - return @{ - Id = "164655f7-1232-4d56-ae8f-b095196a0309"; - DisplayName = "Android Owner Enrollment Profile" - Description = "Profile for enrolling Android devices" - TokenExpirationDateTime = "2024-12-31T23:59:59Z" - TokenCreationDateTime = "2024-12-31T23:59:59Z" - TokenValue = "your-token-value" - EnrollmentMode = "corporateOwnedWorkProfile" - EnrollmentTokenType = 'TokenType' - QrCodeContent = "your-qr-code-content" - WifiSsid = "your-wifi-ssid" - WifiPassword = "your-wifi-password" - WifiSecurityType = "wpa" - Ensure = 'Present' - } - } } It 'Should return Values from the Get method' { @@ -221,25 +185,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile -MockWith { - return @{ - Id = "164655f7-1232-4d56-ae8f-b095196a0309"; - DisplayName = "Android Owner Enrollment Profile" - Description = "Profile for enrolling Android" - TokenExpirationDateTime = "2024-12-31T23:59:59Z" - TokenCreationDateTime = "2024-12-31T23:59:59Z" - TokenValue = "your-token-value" - EnrollmentMode = "corporateOwnedWorkProfile" - EnrollmentTokenType = 'TokenType' - QrCodeContent = "your-qr-code-content" - WifiSsid = "your-wifi-ssid" - WifiPassword = "your-wifi-password" - WifiSecurityType = "wpa" - Ensure = 'Present' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementComplianceSettings.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementComplianceSettings.Tests.ps1 index 639913ba3f..38a8445bd3 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementComplianceSettings.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementComplianceSettings.Tests.ps1 @@ -38,6 +38,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Update-MgBetaDeviceManagement -MockWith { } + Mock -CommandName Invoke-MgGraphRequest -MockWith { + return @{ + deviceComplianceCheckinThresholdDays = 22 + secureByDefault = $true + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -57,13 +64,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { SecureByDefault = $True; Credential = $Credential } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - deviceComplianceCheckinThresholdDays = 22 - secureByDefault = $true - } - } } It 'Should return Yes from the Get method' { @@ -78,18 +78,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name "The settings are NOT in the desired state." -Fixture { BeforeAll { $testParams = @{ - DeviceComplianceCheckinThresholdDays = 40; #Drift + DeviceComplianceCheckinThresholdDays = 40; # Updated property IsSingleInstance = "Yes"; SecureByDefault = $True; Credential = $Credential } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - deviceComplianceCheckinThresholdDays = 22 - secureByDefault = $true - } - } } It 'Should return Yes from the Get method' { @@ -114,13 +107,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - deviceComplianceCheckinThresholdDays = 22 - secureByDefault = $true - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsMacOSLobApp.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsMacOSLobApp.Tests.ps1 index 9c42b3d6e3..283120b177 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsMacOSLobApp.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsMacOSLobApp.Tests.ps1 @@ -53,6 +53,35 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceAppManagementMobileApp -MockWith { } + Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { + return @{ + Id = "ad027f94-0682-431e-97c1-827d1879fa79" + Categories = @() + Description = "TeamsForBusinessInstaller" + Developer = "Contoso" + DisplayName = "TeamsForBusinessInstaller" + InformationUrl = "" + IsFeatured = $False + Notes = "" + Owner = "" + PrivacyInformationUrl = "" + Publisher = "Contoso" + RoleScopeTagIds = @() + IgnoreVersionDetection = $True + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macOSLobApp' + minimumSupportedOperatingSystem = @{ + v11_0 = $true + } + } + Ensure = 'Present' + } + } + + Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ + return @() + } + Mock -CommandName Update-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{} # Mock Write-M365DSCHost to hide output during the tests @@ -127,35 +156,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "ad027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "TeamsForBusinessInstaller" - Developer = "Contoso" - DisplayName = "TeamsForBusinessInstaller" - InformationUrl = "" - IsFeatured = $False - Notes = "" - Owner = "" - PrivacyInformationUrl = "" - Publisher = "Contoso" - RoleScopeTagIds = @() - IgnoreVersionDetection = $True - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSLobApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - Ensure = 'Present' - } - } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '2.1 Should return Values from the Get method' { @@ -192,32 +192,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "TeamsForBusinessInstaller" - Developer = "Contoso" - DisplayName = "TeamsForBusinessInstaller" - InformationUrl = "" - IsFeatured = $False - Notes = "" - Owner = "" - PrivacyInformationUrl = "" - Publisher = "Contoso" - RoleScopeTagIds = @() - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSLobApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '3.0 Should return true from the Test method' { @@ -234,7 +208,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Developer = "Contoso" DisplayName = "TeamsForBusinessInstaller" InformationUrl = "" - IsFeatured = $False + IsFeatured = $True # Updated property MinimumSupportedOperatingSystem = [CimInstance]( New-CimInstance -ClassName MSFT_DeviceManagementMinimumOperatingSystem -Property @{ v11_0 = $true @@ -247,31 +221,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "TeamsForBusinessInstaller" - Developer = "Contoso" - DisplayName = "TeamsForBusinessInstaller drift" - InformationUrl = "" - IsFeatured = $False - Notes = "" - Owner = "" - PrivacyInformationUrl = "" - Publisher = "Contoso" - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSLobApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '4.1 Should return Values from the Get method' { @@ -293,32 +242,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "TeamsForBusinessInstaller" - Developer = "Contoso" - DisplayName = "TeamsForBusinessInstaller drift" - InformationUrl = "" - IsFeatured = $False - Notes = "" - Owner = "" - PrivacyInformationUrl = "" - Publisher = "Contoso" - RoleScopeTagIds = @() - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macOSLobApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '5.0 Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsWindowsOfficeSuiteApp.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsWindowsOfficeSuiteApp.Tests.ps1 index 6c84866a82..aeb3eed9ef 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsWindowsOfficeSuiteApp.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneMobileAppsWindowsOfficeSuiteApp.Tests.ps1 @@ -52,6 +52,43 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Remove-MgBetaDeviceAppManagementMobileApp -MockWith { } + Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ + return @() + } + + Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { + return @{ + Id = "8d027f94-0682-431e-97c1-827d1879fa79" + Categories = @() + Description = "Microsoft 365 Apps for Windows 10 and later" + DisplayName = "Microsoft 365 Apps for Windows 10 and later" + InformationUrl = "" + IsFeatured = $False + Notes = "" + PrivacyInformationUrl = "" + RoleScopeTagIds = @() + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.officeSuiteApp' + excludedApps = @{ + teams = $false + sharePointDesigner = $true + powerPoint = $false + outlook = $false + groove = $true + word = $false + lync = $true + oneNote = $false + oneDrive = $false + publisher = $false + bing = $false + visio = $false + access = $false + infoPath = $true + excel = $false + } + } + } + } Mock -CommandName Update-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{} @@ -146,42 +183,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "ad027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "Microsoft 365 Apps for Windows 10 and laterr" - DisplayName = "Microsoft 365 Apps for Windows 10 and later" - InformationUrl = "" - IsFeatured = $False - Notes = "" - PrivacyInformationUrl = "" - RoleScopeTagIds = @() - ExcludedApps = (New-CimInstance -ClassName MSFT_DeviceManagementMobileAppExcludedApp -Property @{ - teams = $false - sharePointDesigner = $true - powerPoint = $false - outlook = $false - groove = $true - word = $false - lync = $true - oneNote = $false - oneDrive = $false - publisher = $false - bing = $false - visio = $false - access = $false - infoPath = $true - excel = $false - } -ClientOnly) - Ensure = 'Present' - } - } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '2.1 Should return Values from the Get method' { @@ -199,44 +200,35 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name "3. The instance exists and values are already in the desired state" -Fixture { BeforeAll { $testParams = @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" + Id = "ad027f94-0682-431e-97c1-827d1879fa79" Categories = @() Description = "Microsoft 365 Apps for Windows 10 and later" DisplayName = "Microsoft 365 Apps for Windows 10 and later" InformationUrl = "" IsFeatured = $False + ExcludedApps = (New-CimInstance -ClassName MSFT_DeviceManagementMobileAppExcludedApp -Property @{ + teams = $false + sharePointDesigner = $true + powerPoint = $false + outlook = $false + groove = $true + word = $false + lync = $true + oneNote = $false + oneDrive = $false + publisher = $false + bing = $false + visio = $false + access = $false + infoPath = $true + excel = $false + } -ClientOnly) Notes = "" PrivacyInformationUrl = "" RoleScopeTagIds = @() Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "Microsoft 365 Apps for Windows 10 and later" - DisplayName = "Microsoft 365 Apps for Windows 10 and later" - InformationUrl = "" - IsFeatured = $False - Notes = "" - PrivacyInformationUrl = "" - RoleScopeTagIds = @() - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.officeSuiteApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - Ensure = 'Present' - } - } - - # Remove Assignments logic for now as we debug this part - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '3.0 Should return true from the Test method' { @@ -255,7 +247,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { IsFeatured = $False ExcludedApps = (New-CimInstance -ClassName MSFT_DeviceManagementMobileAppExcludedApp -Property @{ teams = $false - sharePointDesigner = $true + sharePointDesigner = $false # Updated property powerPoint = $false outlook = $false groove = $true @@ -276,45 +268,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "Microsoft 365 Apps for Windows 10 and later" - DisplayName = "Microsoft 365 Apps for Windows 10 and later drift" - InformationUrl = "" - IsFeatured = $False - Notes = "" - PrivacyInformationUrl = "" - ExcludedApps = (New-CimInstance -ClassName MSFT_DeviceManagementMobileAppExcludedApp -Property @{ - teams = $false - sharePointDesigner = $true - powerPoint = $false - outlook = $false - groove = $true - word = $false - lync = $true - oneNote = $false - oneDrive = $false - publisher = $false - bing = $false - visio = $false - access = $false - infoPath = $true - excel = $false - } -ClientOnly) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.officeSuiteApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '4.1 Should return Values from the Get method' { @@ -336,46 +289,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceAppManagementMobileApp -MockWith { - return @{ - Id = "8d027f94-0682-431e-97c1-827d1879fa79" - Categories = @() - Description = "Microsoft 365 Apps for Windows 10 and later" - DisplayName = "Microsoft 365 Apps for Windows 10 and later drift" - InformationUrl = "" - IsFeatured = $False - Notes = "" - PrivacyInformationUrl = "" - RoleScopeTagIds = @() - ExcludedApps = (New-CimInstance -ClassName MSFT_DeviceManagementMobileAppExcludedApp -Property @{ - teams = $false - sharePointDesigner = $true - powerPoint = $false - outlook = $false - groove = $true - word = $false - lync = $true - oneNote = $false - oneDrive = $false - publisher = $false - bing = $false - visio = $false - access = $false - infoPath = $true - excel = $false - } -ClientOnly) - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.officeSuiteApp' - minimumSupportedOperatingSystem = @{ - v11_0 = $true - } - } - } - } - Mock -CommandName Get-MgBetaDeviceAppManagementMobileAppAssignment -MockWith{ - return $null - } } It '5.0 Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntunePolicySets.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntunePolicySets.Tests.ps1 index 80a6701316..7b17651443 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntunePolicySets.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntunePolicySets.Tests.ps1 @@ -55,6 +55,49 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Write-Warning -MockWith { } + Mock -CommandName Get-MgbetaDeviceAppManagementPolicySet -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = "#microsoft.graph.PolicySet" + } + CreatedDateTime = "2023-01-01T00:00:00.0000000+00:00" + Description = "FakeStringValue" + DisplayName = "FakeStringValue" + ErrorCode = "noError" + GuidedDeploymentTags = @("FakeStringValue") + Id = "FakeStringValue" + LastModifiedDateTime = "2023-01-01T00:00:00.0000000+00:00" + RoleScopeTags = @("FakeStringValue") + Status = "unknown" + Assignments = @( + [pscustomobject]@{ + Target = [pscustomobject]@{ + AdditionalProperties = [pscustomobject]@{ + '@odata.type' = '#microsoft.graph.GroupAssignmentTarget' + groupId = '12345678-1234-1234-1234-1234567890ab' + } + DeviceAndAppManagementAssignmentFilterType = 'none' + DeviceAndAppManagementAssignmentFilterId = $null + + } + } + ) + Items = @( + [pscustomobject]@{ + + AdditionalProperties = [pscustomobject]@{ + '@odata.type' = '#microsoft.graph.managedAppProtectionPolicySetItem' + } + payloadId = 'T_12345678-1234-1234-1234-1234567890ab' + itemType = '#microsoft.graph.androidManagedAppProtection' + displayName = 'FakeStringValue' + guidedDeploymentTags = @('FakeStringValue') + + } + ) + } + } + $Script:exportedInstances =$null $Script:ExportMode = $false @@ -134,49 +177,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgbetaDeviceAppManagementPolicySet -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.PolicySet" - } - CreatedDateTime = "2023-01-01T00:00:00.0000000+00:00" - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - ErrorCode = "noError" - GuidedDeploymentTags = @("FakeStringValue") - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+00:00" - RoleScopeTags = @("FakeStringValue") - Status = "unknown" - Assignments = @( - [pscustomobject]@{ - Target = [pscustomobject]@{ - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.GroupAssignmentTarget' - groupId = '12345678-1234-1234-1234-1234567890ab' - } - DeviceAndAppManagementAssignmentFilterType = 'none' - DeviceAndAppManagementAssignmentFilterId = $null - - } - } - ) - Items = @( - [pscustomobject]@{ - - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.managedAppProtectionPolicySetItem' - } - payloadId = 'T_12345678-1234-1234-1234-1234567890ab' - itemType = '#microsoft.graph.androidManagedAppProtection' - displayName = 'FakeStringValue' - guidedDeploymentTags = @('FakeStringValue') - - } - ) - } - } } It 'Should return Values from the Get method' { @@ -220,50 +220,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgbetaDeviceAppManagementPolicySet -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.PolicySet" - } - CreatedDateTime = "2023-01-01T00:00:00.0000000+00:00" - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - ErrorCode = "noError" - GuidedDeploymentTags = @("FakeStringValue") - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+00:00" - RoleScopeTags = @("FakeStringValue") - Status = "unknown" - Assignments = @( - [pscustomobject]@{ - Target = [pscustomobject]@{ - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.GroupAssignmentTarget' - groupId = '12345678-1234-1234-1234-1234567890ab' - } - DeviceAndAppManagementAssignmentFilterType = 'none' - DeviceAndAppManagementAssignmentFilterId = $null - - } - } - ) - Items = @( - [pscustomobject]@{ - - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.managedAppProtectionPolicySetItem' - } - payloadId = 'T_12345678-1234-1234-1234-1234567890ab' - itemType = '#microsoft.graph.androidManagedAppProtection' - displayName = 'FakeStringValue' - guidedDeploymentTags = @('FakeStringValue') - - } - ) - - } - } } @@ -275,7 +231,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name "The IntunePolicySets exists and values are NOT in the desired state" -Fixture { BeforeAll { $testParams = @{ - Description = "UPDATED-FakeStringValue" + Description = "UPDATED-FakeStringValue" # Updated property DisplayName = "FakeStringValue" GuidedDeploymentTags = @("FakeStringValue") Id = "FakeStringValue" @@ -299,46 +255,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgbetaDeviceAppManagementPolicySet -MockWith { - return @{ - CreatedDateTime = "2023-01-01T00:00:00.0000000+00:00" - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - ErrorCode = "noError" - GuidedDeploymentTags = @("FakeStringValue") - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+00:00" - RoleScopeTags = @("FakeStringValue") - Status = "unknown" - Assignments = @( - [pscustomobject]@{ - Target = [pscustomobject]@{ - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.GroupAssignmentTarget' - groupId = '12345678-1234-1234-1234-1234567890ab' - } - DeviceAndAppManagementAssignmentFilterType = 'none' - DeviceAndAppManagementAssignmentFilterId = $null - - } - } - ) - Items = @( - [pscustomobject]@{ - - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.managedAppProtectionPolicySetItem' - } - payloadId = 'T_12345678-1234-1234-1234-1234567890ab' - itemType = '#microsoft.graph.androidManagedAppProtection' - displayName = 'FakeStringValue' - guidedDeploymentTags = @('FakeStringValue') - - } - ) - } - } } It 'Should return Values from the Get method' { @@ -362,50 +278,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgbetaDeviceAppManagementPolicySet -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = "#microsoft.graph.PolicySet" - } - CreatedDateTime = "2023-01-01T00:00:00.0000000+00:00" - Description = "FakeStringValue" - DisplayName = "FakeStringValue" - ErrorCode = "noError" - GuidedDeploymentTags = @("FakeStringValue") - Id = "FakeStringValue" - LastModifiedDateTime = "2023-01-01T00:00:00.0000000+00:00" - RoleScopeTags = @("FakeStringValue") - Status = "unknown" - Assignments = @( - [pscustomobject]@{ - Target = [pscustomobject]@{ - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.GroupAssignmentTarget' - groupId = '12345678-1234-1234-1234-1234567890ab' - } - DeviceAndAppManagementAssignmentFilterType = 'none' - DeviceAndAppManagementAssignmentFilterId = $null - - } - } - ) - Items = @( - [pscustomobject]@{ - - AdditionalProperties = [pscustomobject]@{ - '@odata.type' = '#microsoft.graph.managedAppProtectionPolicySetItem' - } - payloadId = 'T_12345678-1234-1234-1234-1234567890ab' - itemType = '#microsoft.graph.androidManagedAppProtection' - displayName = 'FakeStringValue' - guidedDeploymentTags = @('FakeStringValue') - - } - ) - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleAssignment.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleAssignment.Tests.ps1 index 842c99be56..5b79247153 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleAssignment.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleAssignment.Tests.ps1 @@ -49,13 +49,28 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementRoleAssignment -MockWith { + return @{ + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + Members = @('FakeStringValue') + resourceScopes = @('FakeStringValue') + ScopeType = 'resourceScope' + } + } Mock -CommandName Get-MgDeviceManagementRoleDefinition -MockWith { return @() } - Mock -CommandName Get-MgDeviceManagementRoleDefinitionRoleAssignment -MockWith { return @() } + Mock -CommandName Get-MgGroup -MockWith { + return @{ + Displayname = 'FakeStringValue' + Id = 'FakeStringValue' + } + } # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -102,27 +117,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ScopeType = 'resourceScope' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleAssignment -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - ScopeType = 'resourceScope' - } - } - Mock -CommandName Get-MgDeviceManagementRoleDefinition -MockWith { - return @() - } - Mock -CommandName Get-MgDeviceManagementRoleDefinitionRoleAssignment -MockWith { - return @() - } - Mock -CommandName Get-MgGroup -MockWith { - return @{ - Displayname = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -151,30 +145,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ScopeType = 'resourceScope' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleAssignment -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - Members = @('FakeStringValue') - resourceScopes = @('FakeStringValue') - ScopeType = 'resourceScope' - - } - } - Mock -CommandName Get-MgDeviceManagementRoleDefinition -MockWith { - return @() - } - Mock -CommandName Get-MgDeviceManagementRoleDefinitionRoleAssignment -MockWith { - return @() - } - Mock -CommandName Get-MgGroup -MockWith { - return @{ - Displayname = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } @@ -191,37 +161,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Id = 'FakeStringValue' Ensure = 'Present' RoleDefinition = '7fbbd347-98de-431d-942b-cf5bea92998d' - MembersDisplayNames = @('FakeStringValue') + MembersDisplayNames = @('OtherMember') # Updated property resourceScopesDisplayNames = @('FakeStringValue') ScopeType = 'resourceScope' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleAssignment -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.' - - } - Description = 'StringValue' - DisplayName = 'StringValue' - Id = 'StringValue' - ScopeType = 'resourceScope' - - } - } - Mock -CommandName Get-MgDeviceManagementRoleDefinition -MockWith { - return @() - } - Mock -CommandName Get-MgDeviceManagementRoleDefinitionRoleAssignment -MockWith { - return @() - } - Mock -CommandName Get-MgGroup -MockWith { - return @{ - Displayname = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -245,23 +189,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleAssignment -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - ScopeType = 'resourceScope' - } - } - Mock -CommandName Get-MgDeviceManagementRoleDefinition -MockWith { - return @() - } - Mock -CommandName Get-MgDeviceManagementRoleDefinitionRoleAssignment -MockWith { - return @() - } - } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleDefinition.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleDefinition.Tests.ps1 index 92c652e91b..67c96544eb 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleDefinition.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleDefinition.Tests.ps1 @@ -46,6 +46,21 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementRoleDefinition -MockWith { + return @{ + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + IsBuiltIn = $True + RolePermissions = @{ + ResourceActions = @{ + AllowedResourceActions = @('Microsoft.Intune_Organization_Read', 'Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read', 'Microsoft.Intune_Roles_Update') + NotAllowedResourceActions = @() + } + } + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -95,21 +110,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleDefinition -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $True - RolePermissions = @{ - ResourceActions = @{ - AllowedResourceActions = @('Microsoft.Intune_Organization_Read', 'Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read', 'Microsoft.Intune_Roles_Update') - NotAllowedResourceActions = @() - } - } - } - } } It 'Should return Values from the Get method' { @@ -137,21 +137,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleDefinition -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $True - RolePermissions = @{ - ResourceActions = @{ - AllowedResourceActions = @('Microsoft.Intune_Organization_Read', 'Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read', 'Microsoft.Intune_Roles_Update') - NotAllowedResourceActions = @() - } - } - } - } } @@ -167,26 +152,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'FakeStringValue' Id = 'FakeStringValue' IsBuiltIn = $True - allowedResourceActions = @('Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read', 'Microsoft.Intune_Roles_Update') + allowedResourceActions = @('Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read') # Updated property notallowedResourceActions = @() Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleDefinition -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $True - RolePermissions = @{ - ResourceActions = @{ - AllowedResourceActions = @('Microsoft.Intune_Organization_Read', 'Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read', 'Microsoft.Intune_Roles_Update') - NotAllowedResourceActions = @() - } - } - } - } } It 'Should return Values from the Get method' { @@ -210,25 +180,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleDefinition -MockWith { - return @{ - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $True - RolePermissions = @{ - ResourceActions = @{ - AllowedResourceActions = @('Microsoft.Intune_Organization_Read', 'Microsoft.Intune_Roles_Create', 'Microsoft.Intune_Roles_Read', 'Microsoft.Intune_Roles_Update') - NotAllowedResourceActions = @() - } - } - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceAndAppManagementRoleDefinition' - } - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 index 982c44a16c..60b15a5027 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 @@ -49,6 +49,18 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementRoleScopeTag -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.RoleScopeTag' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + IsBuiltIn = $True + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -96,18 +108,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleScopeTag -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.RoleScopeTag' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $True - } - } } It 'Should return Values from the Get method' { @@ -133,18 +133,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleScopeTag -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.RoleScopeTag' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $True - } - } } It 'Should return true from the Test method' { @@ -155,20 +143,12 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneRoleScopeTag exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - Description = 'FakeStringValue' + Description = 'OtherFakeStringValue' # Updated property DisplayName = 'FakeStringValue' Id = 'FakeStringValue' Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleScopeTag -MockWith { - return @{ - Description = 'FakeWrongStringValue' - DisplayName = 'FakeWrongStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -192,18 +172,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementRoleScopeTag -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.RoleScopeTag' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - IsBuiltIn = $false - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneSettingCatalogCustomPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneSettingCatalogCustomPolicyWindows10.Tests.ps1 index c3c49542d3..f086945103 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneSettingCatalogCustomPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneSettingCatalogCustomPolicyWindows10.Tests.ps1 @@ -46,6 +46,99 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementConfigurationPolicy -MockWith { + return @{ + Description = 'FakeStringValue' + Id = 'FakeStringValue' + Name = 'FakeStringValue' + Platforms = 'windows10' + Settings = @( + @{ + SettingInstance = @{ + AdditionalProperties = @{ + simpleSettingValue = @{ + value = 'fakeValue' + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' + } + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' + } + SettingDefinitionId = 'stringSettingDefinitionId' + } + } + @{ + SettingInstance = @{ + AdditionalProperties = @{ + simpleSettingValue = @{ + valueState = 'invalid' + value = 'fakeValue' + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' + } + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' + } + SettingDefinitionId = 'secretSettingDefinitionId' + } + } + @{ + SettingInstance = @{ + AdditionalProperties = @{ + simpleSettingValue = @{ + value = 25 + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationIntegerSettingValue' + } + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' + } + SettingDefinitionId = 'integerSettingDefinitionId' + } + } + @{ + SettingInstance = @{ + AdditionalProperties = @{ + choiceSettingValue = @{ + value = 'choiceSettingValue' + children = @() + } + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance' + } + SettingDefinitionId = 'choiceSettingDefinitionId' + } + } + @{ + SettingInstance = @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance' + groupSettingValue = @{ + children = @( + @{ + simpleSettingValue = @{ + value = 'fakeValue' + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' + } + SettingDefinitionId = 'stringSettingDefinitionId' + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' + } + @{ + simpleSettingValue = @{ + valueState = 'invalid' + value = 'fakeValue' + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' + } + SettingDefinitionId = 'secretSettingDefinitionId' + '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' + } + ) + } + } + SettingDefinitionId = 'groupSettingDefinitionId' + } + } + ) + Technologies = 'mdm' + TemplateReference = @{ + TemplateFamily = 'none' + } + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -56,6 +149,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { } + Mock -CommandName Update-IntuneDeviceConfigurationPolicy -MockWith { + } } # Test contexts Context -Name 'The IntuneSettingCatalogCustomPolicyWindows10 should exist but it DOES NOT' -Fixture { @@ -235,99 +330,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementConfigurationPolicy -MockWith { - return @{ - Description = 'FakeStringValue' - Id = 'FakeStringValue' - Name = 'FakeStringValue' - Platforms = 'windows10' - Settings = @( - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - StringValue = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'stringSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - valueState = 'invalid' - StringValue = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'secretSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - IntValue = 25 - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationIntegerSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'integerSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - choiceSettingValue = @{ - value = 'choiceSettingValue' - children = @() - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance' - } - SettingDefinitionId = 'stringSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingValue' - groupSettingValue = @{ - children = @( - @{ - simpleSettingValue = @{ - StringValue = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - SettingDefinitionId = 'stringSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - @{ - simpleSettingValue = @{ - valueState = 'invalid' - StringValue = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - SettingDefinitionId = 'secretSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - ) - } - } - SettingDefinitionId = 'groupSettingDefinitionId' - } - } - ) - Technologies = 'mdm' - TemplateReference = @{ - TemplateFamily = 'none' - } - } - } } It 'Should return Values from the Get method' { @@ -343,6 +345,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Should -Invoke -CommandName Remove-MgBetaDeviceManagementConfigurationPolicy -Exactly 1 } } + Context -Name 'The IntuneSettingCatalogCustomPolicyWindows10 Exists and Values are already in the desired state' -Fixture { BeforeAll { $testParams = @{ @@ -397,7 +400,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { odataType = '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance' SettingDefinitionId = 'groupSettingDefinitionId' groupSettingValue = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementConfigurationGroupSettingValue -Property @{ - odataType = '#microsoft.graph.deviceManagementConfigurationGroupSettingValue' + #odataType = '#microsoft.graph.deviceManagementConfigurationGroupSettingValue' children = [CimInstance[]]@( (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementConfigurationSettingInstance -Property @{ simpleSettingValue = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementConfigurationSimpleSettingValue -Property @{ @@ -425,103 +428,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementConfigurationPolicy -MockWith { - return @{ - Description = 'FakeStringValue' - Id = 'FakeStringValue' - Name = 'FakeStringValue' - Platforms = 'windows10' - Settings = @( - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'stringSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - valueState = 'invalid' - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'secretSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - value = 25 - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationIntegerSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'integerSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - choiceSettingValue = @{ - value = 'choiceSettingValue' - children = @() - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance' - } - SettingDefinitionId = 'choiceSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - SettingDefinitionId = 'groupSettingDefinitionId' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance' - groupSettingValue = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingValue' - children = @( - @{ - simpleSettingValue = @{ - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - SettingDefinitionId = 'stringSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - @{ - simpleSettingValue = @{ - valueState = 'invalid' - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - SettingDefinitionId = 'secretSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - ) - } - } - } - } - ) - Technologies = 'mdm' - TemplateReference = @{ - TemplateFamily = 'none' - } - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -594,7 +502,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementConfigurationSettingInstance -Property @{ simpleSettingValue = (New-CimInstance -ClassName MSFT_MicrosoftGraphdeviceManagementConfigurationSimpleSettingValue -Property @{ valueState = 'invalid' - StringValue = 'fakeValue' + StringValue = 'updatedValue' # Updated property odataType = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' } -ClientOnly) SettingDefinitionId = 'secretSettingDefinitionId' @@ -609,103 +517,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementConfigurationPolicy -MockWith { - return @{ - Description = 'FakeStringValue' - Id = 'FakeStringValue' - Name = 'FakeStringValue' - Platforms = 'windows10' - Settings = @( - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'stringSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - valueState = 'invalid' - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'secretSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - value = 25 - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationIntegerSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'integerSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - choiceSettingValue = @{ - value = 'choiceSettingValue' - children = @() - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance' - } - SettingDefinitionId = 'choiceSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - SettingDefinitionId = 'groupSettingDefinitionId' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance' - groupSettingValue = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingValue' - children = @( - @{ - simpleSettingValue = @{ - value = 'fakeValueDrift' #Drift - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - SettingDefinitionId = 'stringSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - @{ - simpleSettingValue = @{ - valueState = 'invalid' - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - SettingDefinitionId = 'secretSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - ) - } - } - } - } - ) - Technologies = 'mdm' - TemplateReference = @{ - TemplateFamily = 'none' - } - } - } - - Mock -CommandName Update-IntuneDeviceConfigurationPolicy -MockWith { - } } It 'Should return Values from the Get method' { @@ -729,101 +540,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementConfigurationPolicy -MockWith { - return @{ - Description = 'FakeStringValue' - Id = 'FakeStringValue' - Name = 'FakeStringValue' - Platforms = 'windows10' - Settings = @( - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'stringSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - valueState = 'invalid' - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'secretSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - simpleSettingValue = @{ - value = 25 - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationIntegerSettingValue' - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - SettingDefinitionId = 'integerSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - AdditionalProperties = @{ - choiceSettingValue = @{ - value = 'choiceSettingValue' - children = @() - } - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance' - } - SettingDefinitionId = 'choiceSettingDefinitionId' - } - } - @{ - SettingInstance = @{ - SettingDefinitionId = 'groupSettingDefinitionId' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance' - groupSettingValue = @{ - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationGroupSettingValue' - children = @( - @{ - simpleSettingValue = @{ - value = 'fakeValueDrift' #Drift - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationStringSettingValue' - } - SettingDefinitionId = 'stringSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - @{ - simpleSettingValue = @{ - valueState = 'invalid' - value = 'fakeValue' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSecretSettingValue' - } - SettingDefinitionId = 'secretSettingDefinitionId' - '@odata.type' = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance' - } - ) - } - } - } - } - ) - Technologies = 'mdm' - TemplateReference = @{ - TemplateFamily = 'none' - } - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidEnterprise.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidEnterprise.Tests.ps1 index a008ec6a07..68d92b0742 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidEnterprise.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidEnterprise.Tests.ps1 @@ -39,8 +39,20 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + DisplayName = 'Test IntuneTrustedRootCertificateAndroidEnterprise' + Description = 'Test IntuneTrustedRootCertificateAndroidEnterprise Description' + Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' + AdditionalProperties = @{ + certFileName = "FakeStringValue" + trustedRootCertificate = "fakestringvalue0" + '@odata.type' = '#microsoft.graph.androidTrustedRootCertificate' + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -89,27 +101,14 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test IntuneTrustedRootCertificateAndroidEnterprise' Description = 'Test IntuneTrustedRootCertificateAndroidEnterprise Description' certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" + trustedRootCertificate = "OtherCertificate" # Updated property Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneTrustedRootCertificateAndroidEnterprise' - Description = 'Different Value' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" - '@odata.type' = '#microsoft.graph.androidTrustedRootCertificate' - } - } - } } It 'Should return Present from the Get method' { - (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' } It 'Should return false from the Test method' { @@ -119,7 +118,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { It 'Should update the IntuneTrustedRootCertificateAndroidEnterprise from the Set method' { Set-TargetResource @testParams Should -Invoke -CommandName Update-MgBetaDeviceManagementDeviceConfiguration -Exactly 1 - } } @@ -133,19 +131,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneTrustedRootCertificateAndroidEnterprise' - Description = 'Test IntuneTrustedRootCertificateAndroidEnterprise Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" - '@odata.type' = '#microsoft.graph.androidTrustedRootCertificate' - } - } - } } It 'Should return true from the Test method' { @@ -163,19 +148,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneTrustedRootCertificateAndroidEnterprise' - Description = 'Test IntuneTrustedRootCertificateAndroidEnterprise Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" - '@odata.type' = '#microsoft.graph.androidTrustedRootCertificate' - } - } - } } It 'Should return Present from the Get method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidWork.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidWork.Tests.ps1 index cc50350683..a82e2fcd01 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidWork.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneTrustedRootCertificateAndroidWork.Tests.ps1 @@ -39,8 +39,20 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + DisplayName = 'Test IntuneTrustedRootCertificateAndroidWork' + Description = 'Test IntuneTrustedRootCertificateAndroidWork Description' + Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' + AdditionalProperties = @{ + certFileName = "FakeStringValue" + trustedRootCertificate = "fakestringvalue0" + '@odata.type' = '#microsoft.graph.androidWorkProfileTrustedRootCertificate' + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -89,23 +101,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test IntuneTrustedRootCertificateAndroidWork' Description = 'Test IntuneTrustedRootCertificateAndroidWork Description' certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" + trustedRootCertificate = "OtherCertificate" # Updated property Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneTrustedRootCertificateAndroidWork' - Description = 'Different Value' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" - '@odata.type' = '#microsoft.graph.androidWorkProfileTrustedRootCertificate' - } - } - } } It 'Should return Present from the Get method' { @@ -119,7 +118,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { It 'Should update the IntuneTrustedRootCertificateAndroidWork from the Set method' { Set-TargetResource @testParams Should -Invoke -CommandName Update-MgBetaDeviceManagementDeviceConfiguration -Exactly 1 - } } @@ -133,19 +131,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneTrustedRootCertificateAndroidWork' - Description = 'Test IntuneTrustedRootCertificateAndroidWork Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" - '@odata.type' = '#microsoft.graph.androidWorkProfileTrustedRootCertificate' - } - } - } } It 'Should return true from the Test method' { @@ -199,19 +184,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'Test IntuneTrustedRootCertificateAndroidWork' - Description = 'Test IntuneTrustedRootCertificateAndroidWork Description' - Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' - AdditionalProperties = @{ - certFileName = "FakeStringValue" - trustedRootCertificate = "fakestringvalue0" - '@odata.type' = '#microsoft.graph.androidWorkProfileTrustedRootCertificate' - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidEnterprise.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidEnterprise.Tests.ps1 index 176ddbbcde..c93c37c4e5 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidEnterprise.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidEnterprise.Tests.ps1 @@ -39,8 +39,55 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + Id = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Description = 'FakeStringValue' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidVpnConfiguration' + authenticationMethod = 'usernameAndPassword' + connectionName = 'FakeStringValue' + connectionType = 'ciscoAnyConnect' + proxyServer = @( + @{ + port = 80 + automaticConfigurationScriptUrl = 'https://www.test.com' + address = 'proxy.test.com' + } + ) + servers = @( + @{ + isDefaultServer = $True + description = 'server' + address = 'vpn.test.com' + } + ) + customData = @( + @{ + key = 'FakeStringValue' + value = 'FakeStringValue' + } + ) + customKeyValueData = @( + @{ + name = 'FakeStringValue' + value = 'FakeStringValue' + } + ) + targetedMobileApps = @( + @{ + name = 'FakeStringValue' + publisher = 'FakeStringValue' + appStoreUrl = 'FakeStringValue' + appId = 'FakeStringValue' + } + ) + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -159,7 +206,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { (New-CimInstance ` -ClassName MSFT_CustomData ` -Property @{ - key = 'FakeStringValue' + key = 'OtherKey' # Updated property value = 'FakeStringValue' } -ClientOnly) ) @@ -184,58 +231,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - customData = @( - @{ - key = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - customKeyValueData = @( - @{ - name = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.CHANGED.com' #changed value - } - ) - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - targetedMobileApps = @( - @{ - name = 'FakeStringValue' - publisher = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - appId = 'FakeStringValue' - } - ) - } - } - } } It 'Should return Present from the Get method' { - (Get-TargetResource @testParams).Ensure | Should -Be 'Present' #-Displayname 'FakeStringValue').Ensure | Should -Be 'Present' # + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' } It 'Should return false from the Test method' { @@ -304,53 +303,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - customData = @( - @{ - key = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - customKeyValueData = @( - @{ - name = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - targetedMobileApps = @( - @{ - name = 'FakeStringValue' - publisher = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - appId = 'FakeStringValue' - } - ) - } - } - } } It 'Should return true from the Test method' { @@ -387,33 +339,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - } - } - } } It 'Should return Present from the Get method' { @@ -437,33 +362,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidWork.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidWork.Tests.ps1 index a5cd4a0a46..b082008915 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidWork.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyAndroidWork.Tests.ps1 @@ -39,8 +39,55 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + Id = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Description = 'FakeStringValue' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidWorkProfileVpnConfiguration' + authenticationMethod = 'usernameAndPassword' + connectionName = 'FakeStringValue' + connectionType = 'ciscoAnyConnect' + proxyServer = @( + @{ + port = 80 + automaticConfigurationScriptUrl = 'https://www.test.com' + address = 'proxy.test.com' + } + ) + servers = @( + @{ + isDefaultServer = $True + description = 'server' + address = 'vpn.test.com' + } + ) + customData = @( + @{ + key = 'FakeStringValue' + value = 'FakeStringValue' + } + ) + customKeyValueData = @( + @{ + name = 'FakeStringValue' + value = 'FakeStringValue' + } + ) + targetedMobileApps = @( + @{ + name = 'FakeStringValue' + publisher = 'FakeStringValue' + appStoreUrl = 'FakeStringValue' + appId = 'FakeStringValue' + } + ) + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -167,7 +214,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { (New-CimInstance ` -ClassName MSFT_CustomData ` -Property @{ - name = 'FakeStringValue' + name = 'UpdatedName' # Updated property value = 'FakeStringValue' } -ClientOnly) ) @@ -184,58 +231,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - customData = @( - @{ - key = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - customKeyValueData = @( - @{ - name = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.CHANGED.com' #changed value - } - ) - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - targetedMobileApps = @( - @{ - name = 'FakeStringValue' - publisher = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - appId = 'FakeStringValue' - } - ) - } - } - } } It 'Should return Present from the Get method' { - (Get-TargetResource @testParams).Ensure | Should -Be 'Present' #-Displayname 'FakeStringValue').Ensure | Should -Be 'Present' # + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' } It 'Should return false from the Test method' { @@ -304,53 +303,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - customData = @( - @{ - key = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - customKeyValueData = @( - @{ - name = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - targetedMobileApps = @( - @{ - name = 'FakeStringValue' - publisher = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - appId = 'FakeStringValue' - } - ) - } - } - } } It 'Should return true from the Test method' { @@ -387,33 +339,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - } - } - } } It 'Should return Present from the Get method' { @@ -437,33 +362,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnect' - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - servers = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 index cdf79cc891..3f232d0d9a 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 @@ -39,8 +39,74 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -MockWith { } - Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + DisplayName = 'FakeStringValue' + Description = 'FakeStringValue' + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.iosVpnConfiguration' + authenticationMethod = 'usernameAndPassword' + connectionName = 'FakeStringValue' + connectionType = 'ciscoAnyConnectV2' + enableSplitTunneling = $False + enablePerApp = $False + optInToDeviceIdSharing = $True + proxyServer = @( + @{ + port = 80 + automaticConfigurationScriptUrl = 'https://www.test.com' + address = 'proxy.test.com' + } + ) + server = @( + @{ + isDefaultServer = $True + description = 'server' + address = 'vpn.test.com' + } + ) + customData = @( + @{ + key = 'FakeStringValue' + value = 'FakeStringValue' + } + ) + customKeyValueData = @( + @{ + name = 'FakeStringValue' + value = 'FakeStringValue' + } + ) + onDemandRules = @( + @{ + ssids = 'FakeStringValue' + dnsSearchDomains = 'FakeStringValue' + probeUrl = 'FakeStringValue' + action = 'ignore' + domainAction = 'neverConnect' + domains = 'FakeStringValue' + probeRequiredUrl = 'FakeStringValue' + interfaceTypeMatch = 'notConfigured' + dnsServerAddressMatch = 'FakeStringValue' + } + ) + targetedMobileApps = @( + @{ + name = 'FakeStringValue' + publisher = 'FakeStringValue' + appStoreUrl = 'FakeStringValue' + appId = 'FakeStringValue' + } + ) + safariDomains = @{} + associatedDomains = @{} + excludedDomains = @{} + excludeList = @{} + } + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -MockWith { return @() } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -166,7 +232,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { (New-CimInstance ` -ClassName MSFT_MicrosoftvpnProxyServer ` -Property @{ - port = 80 + port = 443 # Updated property automaticConfigurationScriptUrl = 'https://www.test.com' address = 'proxy.test.com' } -ClientOnly) @@ -228,76 +294,10 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnectV2' - customData = @( - @{ - key = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - customKeyValueData = @( - @{ - name = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - enableSplitTunneling = $False - enablePerApp = $False - disableOnDemandUserOverride = $True - disconnectOnIdle = $True - optInToDeviceIdSharing = $True - onDemandRules = @(` - @{ - ssids = 'FakeStringValue' - dnsSearchDomains = 'FakeStringValue' - probeUrl = 'FakeStringValue' - action = 'ignore' - domainAction = 'neverConnect' - domains = 'FakeStringValue' - probeRequiredUrl = 'FakeStringValue' - interfaceTypeMatch = 'notConfigured' - dnsServerAddressMatch = 'FakeStringValue' - } - ) - server = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.CHANGED.com' #changed value - } - ) - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - targetedMobileApps = @( - @{ - name = 'FakeStringValue' - publisher = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - appId = 'FakeStringValue' - } - ) - } - } - } } It 'Should return Present from the Get method' { - (Get-TargetResource @testParams).Ensure | Should -Be 'Present' #-Displayname 'FakeStringValue').Ensure | Should -Be 'Present' # + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' } It 'Should return false from the Test method' { @@ -388,73 +388,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnectV2' - enableSplitTunneling = $False - enablePerApp = $False - optInToDeviceIdSharing = $True - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - server = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - customData = @( - @{ - key = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - customKeyValueData = @( - @{ - name = 'FakeStringValue' - value = 'FakeStringValue' - } - ) - onDemandRules = @( - @{ - ssids = 'FakeStringValue' - dnsSearchDomains = 'FakeStringValue' - probeUrl = 'FakeStringValue' - action = 'ignore' - domainAction = 'neverConnect' - domains = 'FakeStringValue' - probeRequiredUrl = 'FakeStringValue' - interfaceTypeMatch = 'notConfigured' - dnsServerAddressMatch = 'FakeStringValue' - } - ) - targetedMobileApps = @( - @{ - name = 'FakeStringValue' - publisher = 'FakeStringValue' - appStoreUrl = 'FakeStringValue' - appId = 'FakeStringValue' - } - ) - safariDomains = @{} - associatedDomains = @{} - excludedDomains = @{} - excludeList = @{} - } - } - } } It 'Should return true from the Test method' { @@ -494,36 +427,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnectV2' - enableSplitTunneling = $False - enablePerApp = $False - optInToDeviceIdSharing = $True - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - server = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - } - } - } } It 'Should return Present from the Get method' { @@ -547,36 +450,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosVpnConfiguration' - authenticationMethod = 'usernameAndPassword' - connectionName = 'FakeStringValue' - connectionType = 'ciscoAnyConnectV2' - enableSplitTunneling = $False - enablePerApp = $False - optInToDeviceIdSharing = $True - proxyServer = @( - @{ - port = 80 - automaticConfigurationScriptUrl = 'https://www.test.com' - address = 'proxy.test.com' - } - ) - server = @( - @{ - isDefaultServer = $True - description = 'server' - address = 'vpn.test.com' - } - ) - } - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.Tests.ps1 index 0d4cf9abe5..c55956d65d 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -48,6 +47,30 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + NetworkName = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration' + PreSharedKey = 'FakeStringValue' + WiFiSecurityType = 'open' + ConnectAutomatically = $True + Ssid = 'FakeStringValue' + ProxyManualAddress = 'FakeStringValue' + ProxySettings = 'none' + ConnectWhenNetworkNameIsHidden = $True + ProxyAutomaticConfigurationUrl = 'FakeStringValue' + PreSharedKeyIsSet = $True + ProxyExclusionList = 'FakeStringValue' + ProxyManualPort = 25 + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -74,7 +97,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ProxySettings = 'none' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } @@ -113,35 +135,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ProxySettings = 'none' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - NetworkName = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration' - PreSharedKey = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - ProxySettings = 'none' - ConnectWhenNetworkNameIsHidden = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKeyIsSet = $True - ProxyExclusionList = 'FakeStringValue' - ProxyManualPort = 25 - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -175,38 +171,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ProxySettings = 'none' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - NetworkName = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration' - PreSharedKey = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - ProxySettings = 'none' - ConnectWhenNetworkNameIsHidden = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKeyIsSet = $True - ProxyExclusionList = 'FakeStringValue' - ProxyManualPort = 25 - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -226,36 +195,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ProxyAutomaticConfigurationUrl = 'FakeStringValue' ProxyExclusionList = 'FakeStringValue' ProxyManualAddress = 'FakeStringValue' - ProxyManualPort = 25 + ProxyManualPort = 8443 # Updated property ProxySettings = 'none' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ProxyExclusionList = 'FakeStringValue' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ProxyManualPort = 7 - ProxySettings = 'none' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -279,32 +225,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - NetworkName = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration' - PreSharedKey = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - ProxySettings = 'none' - ConnectWhenNetworkNameIsHidden = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKeyIsSet = $True - ProxyExclusionList = 'FakeStringValue' - ProxyManualPort = 25 - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.Tests.ps1 index 1c4a274fbe..d02ae9fdce 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -48,6 +47,23 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidWorkProfileWifiConfiguration' + NetworkName = 'FakeStringValue' + WiFiSecurityType = 'open' + ConnectAutomatically = $True + ConnectWhenNetworkNameIsHidden = $True + Ssid = 'FakeStringValue' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -67,7 +83,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } @@ -99,28 +114,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -136,6 +132,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Should -Invoke -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -Exactly 1 } } + Context -Name 'The IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile Exists and Values are already in the desired state' -Fixture { BeforeAll { $testParams = @{ @@ -147,31 +144,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -180,7 +157,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - ConnectAutomatically = $True + ConnectAutomatically = $False # Updated property ConnectWhenNetworkNameIsHidden = $True Description = 'FakeStringValue' DisplayName = 'FakeStringValue' @@ -188,26 +165,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - Ssid = 'FakeStringValue' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - '@odata.type' = '#microsoft.graph.androidWorkProfileWifiConfiguration' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -230,25 +190,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidWorkProfileWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidForWork.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidForWork.Tests.ps1 index b79f1cb34c..3c78b2d909 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidForWork.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidForWork.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -48,6 +47,23 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.androidForWorkWifiConfiguration' + NetworkName = 'FakeStringValue' + WiFiSecurityType = 'open' + ConnectAutomatically = $True + ConnectWhenNetworkNameIsHidden = $True + Ssid = 'FakeStringValue' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -67,7 +83,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } @@ -99,28 +114,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidForWorkWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -147,31 +143,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidForWorkWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -180,7 +156,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneWifiConfigurationPolicyAndroidForWork exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - ConnectAutomatically = $True + ConnectAutomatically = $False # Updated property ConnectWhenNetworkNameIsHidden = $True Description = 'FakeStringValue' DisplayName = 'FakeStringValue' @@ -188,26 +164,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { NetworkName = 'FakeStringValue' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - Ssid = 'FakeStringValue' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - '@odata.type' = '#microsoft.graph.androidForWorkWifiConfiguration' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -230,25 +189,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.androidForWorkWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 index f2499a6638..17cb04e249 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -48,6 +47,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.aospDeviceOwnerWifiConfiguration' + NetworkName = 'FakeStringValue' + WiFiSecurityType = 'open' + ConnectAutomatically = $True + PreSharedKey = 'FakeStringValue' + ConnectWhenNetworkNameIsHidden = $True + Ssid = 'FakeStringValue' + PreSharedKeyIsSet = $True + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -69,7 +86,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKeyIsSet = $True Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } @@ -103,30 +119,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKeyIsSet = $True Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.aospDeviceOwnerWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - PreSharedKeyIsSet = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -155,33 +150,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKeyIsSet = $True Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.aospDeviceOwnerWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - PreSharedKeyIsSet = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -200,27 +173,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKeyIsSet = $True Ssid = 'FakeStringValue' WiFiSecurityType = 'open' - Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - Ssid = 'FakeStringValue' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - PreSharedKey = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.aospDeviceOwnerWifiConfiguration' - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -243,27 +198,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.aospDeviceOwnerWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - Ssid = 'FakeStringValue' - PreSharedKeyIsSet = $True - - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyIOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyIOS.Tests.ps1 index 22aebeeef4..9cf70525f8 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyIOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyIOS.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -48,6 +47,28 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + ProxyManualPort = 25 + '@odata.type' = '#microsoft.graph.iosWifiConfiguration' + NetworkName = 'FakeStringValue' + WiFiSecurityType = 'open' + DisableMacAddressRandomization = $True + ConnectAutomatically = $True + ProxyAutomaticConfigurationUrl = 'FakeStringValue' + PreSharedKey = 'FakeStringValue' + ConnectWhenNetworkNameIsHidden = $True + ProxySettings = 'automatic' + Ssid = 'FakeStringValue' + ProxyManualAddress = 'FakeStringValue' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -113,28 +134,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ProxyManualPort = 25 - '@odata.type' = '#microsoft.graph.iosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - DisableMacAddressRandomization = $True - ConnectAutomatically = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -150,6 +149,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Should -Invoke -CommandName Remove-MgBetaDeviceManagementDeviceConfiguration -Exactly 1 } } + Context -Name 'The IntuneWifiConfigurationPolicyIOS Exists and Values are already in the desired state' -Fixture { BeforeAll { $testParams = @{ @@ -170,28 +170,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ProxyManualPort = 25 - '@odata.type' = '#microsoft.graph.iosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - DisableMacAddressRandomization = $True - ConnectAutomatically = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return true from the Test method' { @@ -212,32 +190,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKey = 'FakeStringValue' ProxyAutomaticConfigurationUrl = 'FakeStringValue' ProxyManualAddress = 'FakeStringValue' - ProxyManualPort = 25 + ProxyManualPort = 8443 # Updated property ProxySettings = 'automatic' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.iosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ProxyManualPort = 7 - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -260,29 +219,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ProxyManualPort = 25 - '@odata.type' = '#microsoft.graph.iosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - DisableMacAddressRandomization = $True - ConnectAutomatically = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyMacOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyMacOS.Tests.ps1 index 2d83cf2647..e55f4c3d87 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyMacOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyMacOS.Tests.ps1 @@ -48,6 +48,27 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + ProxyManualPort = 25 + '@odata.type' = '#microsoft.graph.macosWifiConfiguration' + NetworkName = 'FakeStringValue' + WiFiSecurityType = 'open' + ConnectAutomatically = $True + ProxyAutomaticConfigurationUrl = 'FakeStringValue' + PreSharedKey = 'FakeStringValue' + ConnectWhenNetworkNameIsHidden = $True + ProxySettings = 'automatic' + Ssid = 'FakeStringValue' + ProxyManualAddress = 'FakeStringValue' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -111,27 +132,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ProxyManualPort = 25 - '@odata.type' = '#microsoft.graph.macosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -166,30 +166,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ProxyManualPort = 25 - '@odata.type' = '#microsoft.graph.macosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -207,32 +185,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKey = 'FakeStringValue' ProxyAutomaticConfigurationUrl = 'FakeStringValue' ProxyManualAddress = 'FakeStringValue' - ProxyManualPort = 25 + ProxyManualPort = 8443 # Updated property ProxySettings = 'automatic' Ssid = 'FakeStringValue' WiFiSecurityType = 'open' Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.macosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ProxyManualPort = 7 - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -255,28 +214,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ProxyManualPort = 25 - '@odata.type' = '#microsoft.graph.macosWifiConfiguration' - NetworkName = 'FakeStringValue' - WiFiSecurityType = 'open' - ConnectAutomatically = $True - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySettings = 'automatic' - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyWindows10.Tests.ps1 index 5f5a40b9b1..5baace7fd2 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyWindows10.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -48,6 +47,31 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + ForceFIPSCompliance = $True + NetworkName = 'FakeStringValue' + MeteredConnectionLimit = 'unrestricted' + '@odata.type' = '#microsoft.graph.windowsWifiConfiguration' + PreSharedKey = 'FakeStringValue' + WifiSecurityType = 'open' + ProxyManualPort = 25 + ProxyManualAddress = 'FakeStringValue' + ConnectWhenNetworkNameIsHidden = $True + ProxySetting = 'automatic' + ProxyAutomaticConfigurationUrl = 'FakeStringValue' + ConnectAutomatically = $True + ConnectToPreferredNetwork = $True + Ssid = 'FakeStringValue' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + Id = 'FakeStringValue' + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -117,31 +141,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ForceFIPSCompliance = $True - NetworkName = 'FakeStringValue' - MeteredConnectionLimit = 'unrestricted' - '@odata.type' = '#microsoft.graph.windowsWifiConfiguration' - PreSharedKey = 'FakeStringValue' - WifiSecurityType = 'open' - ProxyManualPort = 25 - ProxyManualAddress = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySetting = 'automatic' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - ConnectAutomatically = $True - ConnectToPreferredNetwork = $True - Ssid = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -179,34 +178,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ForceFIPSCompliance = $True - NetworkName = 'FakeStringValue' - MeteredConnectionLimit = 'unrestricted' - '@odata.type' = '#microsoft.graph.windowsWifiConfiguration' - PreSharedKey = 'FakeStringValue' - WifiSecurityType = 'open' - ProxyManualPort = 25 - ProxyManualAddress = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySetting = 'automatic' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - ConnectAutomatically = $True - ConnectToPreferredNetwork = $True - Ssid = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -227,34 +200,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PreSharedKey = 'FakeStringValue' ProxyAutomaticConfigurationUrl = 'FakeStringValue' ProxyManualAddress = 'FakeStringValue' - ProxyManualPort = 25 + ProxyManualPort = 8443 # Updated property ProxySetting = 'automatic' Ssid = 'FakeStringValue' WifiSecurityType = 'open' Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.windowsWifiConfiguration' - NetworkName = 'FakeStringValue' - MeteredConnectionLimit = 'unrestricted' - WifiSecurityType = 'open' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - PreSharedKey = 'FakeStringValue' - ProxyManualPort = 7 - Ssid = 'FakeStringValue' - ProxyManualAddress = 'FakeStringValue' - ProxySetting = 'automatic' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } It 'Should return Values from the Get method' { @@ -277,32 +229,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - ForceFIPSCompliance = $True - NetworkName = 'FakeStringValue' - MeteredConnectionLimit = 'unrestricted' - '@odata.type' = '#microsoft.graph.windowsWifiConfiguration' - PreSharedKey = 'FakeStringValue' - WifiSecurityType = 'open' - ProxyManualPort = 25 - ProxyManualAddress = 'FakeStringValue' - ConnectWhenNetworkNameIsHidden = $True - ProxySetting = 'automatic' - ProxyAutomaticConfigurationUrl = 'FakeStringValue' - ConnectAutomatically = $True - ConnectToPreferredNetwork = $True - Ssid = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - Id = 'FakeStringValue' - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.Tests.ps1 index d12bf367de..28458f5d29 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined.Tests.ps1 @@ -46,6 +46,42 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { + return @{ + AdditionalProperties = @{ + hybridAzureADJoinSkipConnectivityCheck = $True + '@odata.type' = '#microsoft.graph.activeDirectoryWindowsAutopilotDeploymentProfile' + } + Description = 'FakeStringValue' + DeviceNameTemplate = 'FakeStringValue' + DeviceType = 'windowsPc' + DisplayName = 'FakeStringValue' + EnableWhiteGlove = $True + EnrollmentStatusScreenSettings = @{ + HideInstallationProgress = $True + BlockDeviceSetupRetryByUser = $True + AllowLogCollectionOnInstallFailure = $True + AllowDeviceUseBeforeProfileAndAppInstallComplete = $True + InstallProgressTimeoutInMinutes = 25 + CustomErrorMessage = 'FakeStringValue' + AllowDeviceUseOnInstallFailure = $True + } + ExtractHardwareHash = $True + Id = 'FakeStringValue' + Language = 'FakeStringValue' + ManagementServiceAppId = 'FakeStringValue' + OutOfBoxExperienceSettings = @{ + HideEULA = $True + HideEscapeLink = $True + HidePrivacySettings = $True + DeviceUsageType = 'singleUser' + SkipKeyboardSelectionPage = $True + UserType = 'administrator' + } + + } + } + Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfileAssignment -MockWith { } @@ -144,42 +180,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - AdditionalProperties = @{ - hybridAzureADJoinSkipConnectivityCheck = $True - '@odata.type' = '#microsoft.graph.activeDirectoryWindowsAutopilotDeploymentProfile' - } - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnableWhiteGlove = $True - EnrollmentStatusScreenSettings = @{ - HideInstallationProgress = $True - BlockDeviceSetupRetryByUser = $True - AllowLogCollectionOnInstallFailure = $True - AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 - CustomErrorMessage = 'FakeStringValue' - AllowDeviceUseOnInstallFailure = $True - } - ExtractHardwareHash = $True - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - HideEULA = $True - HideEscapeLink = $True - HidePrivacySettings = $True - DeviceUsageType = 'singleUser' - SkipKeyboardSelectionPage = $True - UserType = 'administrator' - } - - } - } } It 'Should return Values from the Get method' { @@ -228,45 +228,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - AdditionalProperties = @{ - hybridAzureADJoinSkipConnectivityCheck = $True - '@odata.type' = '#microsoft.graph.activeDirectoryWindowsAutopilotDeploymentProfile' - } - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnableWhiteGlove = $True - EnrollmentStatusScreenSettings = @{ - HideInstallationProgress = $True - BlockDeviceSetupRetryByUser = $True - AllowLogCollectionOnInstallFailure = $True - AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 - CustomErrorMessage = 'FakeStringValue' - AllowDeviceUseOnInstallFailure = $True - } - ExtractHardwareHash = $True - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - HideEULA = $True - HideEscapeLink = $True - HidePrivacySettings = $True - DeviceUsageType = 'singleUser' - SkipKeyboardSelectionPage = $True - UserType = 'administrator' - } - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -285,7 +248,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { BlockDeviceSetupRetryByUser = $True AllowLogCollectionOnInstallFailure = $True AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 + InstallProgressTimeoutInMinutes = 30 # Updated property CustomErrorMessage = 'FakeStringValue' AllowDeviceUseOnInstallFailure = $True } -ClientOnly) @@ -305,26 +268,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnrollmentStatusScreenSettings = @{ - InstallProgressTimeoutInMinutes = 7 - CustomErrorMessage = 'FakeStringValue' - } - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - DeviceUsageType = 'singleUser' - UserType = 'administrator' - } - } - } } It 'Should return Values from the Get method' { @@ -348,43 +291,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - AdditionalProperties = @{ - hybridAzureADJoinSkipConnectivityCheck = $True - '@odata.type' = '#microsoft.graph.activeDirectoryWindowsAutopilotDeploymentProfile' - } - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnableWhiteGlove = $True - EnrollmentStatusScreenSettings = @{ - HideInstallationProgress = $True - BlockDeviceSetupRetryByUser = $True - AllowLogCollectionOnInstallFailure = $True - AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 - CustomErrorMessage = 'FakeStringValue' - AllowDeviceUseOnInstallFailure = $True - } - ExtractHardwareHash = $True - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - HideEULA = $True - HideEscapeLink = $True - HidePrivacySettings = $True - DeviceUsageType = 'singleUser' - SkipKeyboardSelectionPage = $True - UserType = 'administrator' - } - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADJoined.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADJoined.Tests.ps1 index 3832eeec06..ed3c4b1860 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADJoined.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsAutopilotDeploymentProfileAzureADJoined.Tests.ps1 @@ -46,6 +46,41 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.azureADWindowsAutopilotDeploymentProfile' + } + Description = 'FakeStringValue' + DeviceNameTemplate = 'FakeStringValue' + DeviceType = 'windowsPc' + DisplayName = 'FakeStringValue' + EnableWhiteGlove = $True + EnrollmentStatusScreenSettings = @{ + HideInstallationProgress = $True + BlockDeviceSetupRetryByUser = $True + AllowLogCollectionOnInstallFailure = $True + AllowDeviceUseBeforeProfileAndAppInstallComplete = $True + InstallProgressTimeoutInMinutes = 25 + CustomErrorMessage = 'FakeStringValue' + AllowDeviceUseOnInstallFailure = $True + } + ExtractHardwareHash = $True + Id = 'FakeStringValue' + Language = 'FakeStringValue' + ManagementServiceAppId = 'FakeStringValue' + OutOfBoxExperienceSettings = @{ + HideEULA = $True + HideEscapeLink = $True + HidePrivacySettings = $True + DeviceUsageType = 'singleUser' + SkipKeyboardSelectionPage = $True + UserType = 'administrator' + } + + } + } + Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfileAssignment -MockWith { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -139,41 +174,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.azureADWindowsAutopilotDeploymentProfile' - } - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnableWhiteGlove = $True - EnrollmentStatusScreenSettings = @{ - HideInstallationProgress = $True - BlockDeviceSetupRetryByUser = $True - AllowLogCollectionOnInstallFailure = $True - AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 - CustomErrorMessage = 'FakeStringValue' - AllowDeviceUseOnInstallFailure = $True - } - ExtractHardwareHash = $True - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - HideEULA = $True - HideEscapeLink = $True - HidePrivacySettings = $True - DeviceUsageType = 'singleUser' - SkipKeyboardSelectionPage = $True - UserType = 'administrator' - } - - } - } } It 'Should return Values from the Get method' { @@ -221,44 +221,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.azureADWindowsAutopilotDeploymentProfile' - } - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnableWhiteGlove = $True - EnrollmentStatusScreenSettings = @{ - HideInstallationProgress = $True - BlockDeviceSetupRetryByUser = $True - AllowLogCollectionOnInstallFailure = $True - AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 - CustomErrorMessage = 'FakeStringValue' - AllowDeviceUseOnInstallFailure = $True - } - ExtractHardwareHash = $True - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - HideEULA = $True - HideEscapeLink = $True - HidePrivacySettings = $True - DeviceUsageType = 'singleUser' - SkipKeyboardSelectionPage = $True - UserType = 'administrator' - } - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -277,7 +241,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { BlockDeviceSetupRetryByUser = $True AllowLogCollectionOnInstallFailure = $True AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 + InstallProgressTimeoutInMinutes = 30 # Updated property CustomErrorMessage = 'FakeStringValue' AllowDeviceUseOnInstallFailure = $True } -ClientOnly) @@ -296,26 +260,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnrollmentStatusScreenSettings = @{ - InstallProgressTimeoutInMinutes = 7 - CustomErrorMessage = 'FakeStringValue' - } - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - DeviceUsageType = 'singleUser' - UserType = 'administrator' - } - } - } } It 'Should return Values from the Get method' { @@ -339,42 +283,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsAutopilotDeploymentProfile -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.azureADWindowsAutopilotDeploymentProfile' - } - Description = 'FakeStringValue' - DeviceNameTemplate = 'FakeStringValue' - DeviceType = 'windowsPc' - DisplayName = 'FakeStringValue' - EnableWhiteGlove = $True - EnrollmentStatusScreenSettings = @{ - HideInstallationProgress = $True - BlockDeviceSetupRetryByUser = $True - AllowLogCollectionOnInstallFailure = $True - AllowDeviceUseBeforeProfileAndAppInstallComplete = $True - InstallProgressTimeoutInMinutes = 25 - CustomErrorMessage = 'FakeStringValue' - AllowDeviceUseOnInstallFailure = $True - } - ExtractHardwareHash = $True - Id = 'FakeStringValue' - Language = 'FakeStringValue' - ManagementServiceAppId = 'FakeStringValue' - OutOfBoxExperienceSettings = @{ - HideEULA = $True - HideEscapeLink = $True - HidePrivacySettings = $True - DeviceUsageType = 'singleUser' - SkipKeyboardSelectionPage = $True - UserType = 'administrator' - } - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.Tests.ps1 index ef5dbe4656..ef22358242 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.Tests.ps1 @@ -47,6 +47,124 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceAppManagementMdmWindowsInformationProtectionPolicy -MockWith { + return @{ + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.MdmWindowsInformationProtectionPolicy' + } + AzureRightsManagementServicesAllowed = $True + DataRecoveryCertificate = @{ + Description = 'FakeStringValue' + ExpirationDateTime = '2023-01-01T00:00:00.0000000+00:00' + SubjectName = 'FakeStringValue' + } + Description = 'FakeStringValue' + DisplayName = 'FakeStringValue' + EnforcementLevel = 'noProtection' + EnterpriseDomain = 'FakeStringValue' + EnterpriseInternalProxyServers = @( + @{ + DisplayName = 'FakeStringValue' + Resources = @('FakeStringValue') + } + ) + EnterpriseIPRanges = @( + @{ + DisplayName = 'FakeStringValue' + Ranges = @( + @{ + AdditionalProperties = @{ + cidrAddress = 'FakeStringValue' + upperAddress = 'FakeStringValue' + lowerAddress = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.iPv4CidrRange' + } + } + ) + } + ) + EnterpriseIPRangesAreAuthoritative = $True + EnterpriseNetworkDomainNames = @( + @{ + DisplayName = 'FakeStringValue' + Resources = @('FakeStringValue') + } + ) + EnterpriseProtectedDomainNames = @( + @{ + DisplayName = 'FakeStringValue' + Resources = @('FakeStringValue') + } + ) + EnterpriseProxiedDomains = @( + @{ + DisplayName = 'FakeStringValue' + ProxiedDomains = @( + @{ + Proxy = 'FakeStringValue' + IpAddressOrFQDN = 'FakeStringValue' + } + ) + } + ) + EnterpriseProxyServers = @( + @{ + DisplayName = 'FakeStringValue' + Resources = @('FakeStringValue') + } + ) + EnterpriseProxyServersAreAuthoritative = $True + ExemptApps = @( + @{ + Description = 'FakeStringValue' + AdditionalProperties = @{ + binaryName = 'FakeStringValue' + binaryVersionLow = 'FakeStringValue' + binaryVersionHigh = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' + } + Denied = $True + PublisherName = 'FakeStringValue' + ProductName = 'FakeStringValue' + DisplayName = 'FakeStringValue' + } + ) + IconsVisible = $True + Id = 'FakeStringValue' + IndexingEncryptedStoresOrItemsBlocked = $True + NeutralDomainResources = @( + @{ + DisplayName = 'FakeStringValue' + Resources = @('FakeStringValue') + } + ) + ProtectedApps = @( + @{ + Description = 'FakeStringValue' + AdditionalProperties = @{ + binaryName = 'FakeStringValue' + binaryVersionLow = 'FakeStringValue' + binaryVersionHigh = 'FakeStringValue' + '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' + } + Denied = $True + PublisherName = 'FakeStringValue' + ProductName = 'FakeStringValue' + DisplayName = 'FakeStringValue' + } + ) + ProtectionUnderLockConfigRequired = $True + RevokeOnUnenrollDisabled = $True + SmbAutoEncryptedFileExtensions = @( + @{ + DisplayName = 'FakeStringValue' + Resources = @('FakeStringValue') + } + ) + + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -281,124 +399,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMdmWindowsInformationProtectionPolicy -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.MdmWindowsInformationProtectionPolicy' - } - AzureRightsManagementServicesAllowed = $True - DataRecoveryCertificate = @{ - Description = 'FakeStringValue' - ExpirationDateTime = '2023-01-01T00:00:00.0000000+00:00' - SubjectName = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - EnforcementLevel = 'noProtection' - EnterpriseDomain = 'FakeStringValue' - EnterpriseInternalProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseIPRanges = @( - @{ - DisplayName = 'FakeStringValue' - Ranges = @( - @{ - AdditionalProperties = @{ - cidrAddress = 'FakeStringValue' - upperAddress = 'FakeStringValue' - lowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - } - ) - } - ) - EnterpriseIPRangesAreAuthoritative = $True - EnterpriseNetworkDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProtectedDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxiedDomains = @( - @{ - DisplayName = 'FakeStringValue' - ProxiedDomains = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - } - ) - EnterpriseProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxyServersAreAuthoritative = $True - ExemptApps = @( - @{ - Description = 'FakeStringValue' - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - Denied = $True - PublisherName = 'FakeStringValue' - ProductName = 'FakeStringValue' - DisplayName = 'FakeStringValue' - } - ) - IconsVisible = $True - Id = 'FakeStringValue' - IndexingEncryptedStoresOrItemsBlocked = $True - NeutralDomainResources = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - ProtectedApps = @( - @{ - Description = 'FakeStringValue' - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - Denied = $True - PublisherName = 'FakeStringValue' - ProductName = 'FakeStringValue' - DisplayName = 'FakeStringValue' - } - ) - ProtectionUnderLockConfigRequired = $True - RevokeOnUnenrollDisabled = $True - SmbAutoEncryptedFileExtensions = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - - } - } } It 'Should return Values from the Get method' { @@ -519,127 +519,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMdmWindowsInformationProtectionPolicy -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.MdmWindowsInformationProtectionPolicy' - } - AzureRightsManagementServicesAllowed = $True - DataRecoveryCertificate = @{ - Description = 'FakeStringValue' - ExpirationDateTime = '2023-01-01T00:00:00.0000000+00:00' - SubjectName = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - EnforcementLevel = 'noProtection' - EnterpriseDomain = 'FakeStringValue' - EnterpriseInternalProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseIPRanges = @( - @{ - DisplayName = 'FakeStringValue' - Ranges = @( - @{ - AdditionalProperties = @{ - cidrAddress = 'FakeStringValue' - upperAddress = 'FakeStringValue' - lowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - } - ) - } - ) - EnterpriseIPRangesAreAuthoritative = $True - EnterpriseNetworkDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProtectedDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxiedDomains = @( - @{ - DisplayName = 'FakeStringValue' - ProxiedDomains = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - } - ) - EnterpriseProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxyServersAreAuthoritative = $True - ExemptApps = @( - @{ - Description = 'FakeStringValue' - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - Denied = $True - PublisherName = 'FakeStringValue' - ProductName = 'FakeStringValue' - DisplayName = 'FakeStringValue' - } - ) - IconsVisible = $True - Id = 'FakeStringValue' - IndexingEncryptedStoresOrItemsBlocked = $True - NeutralDomainResources = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - ProtectedApps = @( - @{ - Description = 'FakeStringValue' - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - Denied = $True - PublisherName = 'FakeStringValue' - ProductName = 'FakeStringValue' - DisplayName = 'FakeStringValue' - } - ) - ProtectionUnderLockConfigRequired = $True - RevokeOnUnenrollDisabled = $True - SmbAutoEncryptedFileExtensions = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - - } - } } - It 'Should return true from the Test method' { Test-TargetResource @testParams | Should -Be $true } @@ -692,7 +573,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { (New-CimInstance -ClassName MSFT_MicrosoftGraphwindowsInformationProtectionProxiedDomainCollection -Property @{ DisplayName = 'FakeStringValue' ProxiedDomains = (New-CimInstance -ClassName MSFT_MicrosoftGraphproxiedDomain -Property @{ - Proxy = 'FakeStringValue' + Proxy = 'DefinedProxy' # Updated property IpAddressOrFQDN = 'FakeStringValue' } -ClientOnly) } -ClientOnly) @@ -750,111 +631,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMdmWindowsInformationProtectionPolicy -MockWith { - return @{ - DataRecoveryCertificate = @{ - Description = 'FakeStringValue' - ExpirationDateTime = '2023-01-01T00:00:00.0000000+00:00' - SubjectName = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - EnforcementLevel = 'noProtection' - EnterpriseDomain = 'FakeStringValue' - EnterpriseInternalProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseIPRanges = @( - @{ - DisplayName = 'FakeStringValue' - Ranges = @( - @{ - AdditionalProperties = @{ - cidrAddress = 'FakeStringValue' - upperAddress = 'FakeStringValue' - lowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - } - ) - } - ) - EnterpriseNetworkDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProtectedDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxiedDomains = @( - @{ - DisplayName = 'FakeStringValue' - ProxiedDomains = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - } - ) - EnterpriseProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - ExemptApps = @( - @{ - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - PublisherName = 'FakeStringValue' - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - ProductName = 'FakeStringValue' - } - ) - Id = 'FakeStringValue' - NeutralDomainResources = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - ProtectedApps = @( - @{ - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - PublisherName = 'FakeStringValue' - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - ProductName = 'FakeStringValue' - } - ) - SmbAutoEncryptedFileExtensions = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - } - } } It 'Should return Values from the Get method' { @@ -878,125 +654,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceAppManagementMdmWindowsInformationProtectionPolicy -MockWith { - return @{ - AdditionalProperties = @{ - '@odata.type' = '#microsoft.graph.MdmWindowsInformationProtectionPolicy' - } - AzureRightsManagementServicesAllowed = $True - DataRecoveryCertificate = @{ - Description = 'FakeStringValue' - ExpirationDateTime = '2023-01-01T00:00:00.0000000+00:00' - SubjectName = 'FakeStringValue' - } - Description = 'FakeStringValue' - DisplayName = 'FakeStringValue' - EnforcementLevel = 'noProtection' - EnterpriseDomain = 'FakeStringValue' - EnterpriseInternalProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseIPRanges = @( - @{ - DisplayName = 'FakeStringValue' - Ranges = @( - @{ - AdditionalProperties = @{ - cidrAddress = 'FakeStringValue' - upperAddress = 'FakeStringValue' - lowerAddress = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.iPv4CidrRange' - } - } - ) - } - ) - EnterpriseIPRangesAreAuthoritative = $True - EnterpriseNetworkDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProtectedDomainNames = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxiedDomains = @( - @{ - DisplayName = 'FakeStringValue' - ProxiedDomains = @( - @{ - Proxy = 'FakeStringValue' - IpAddressOrFQDN = 'FakeStringValue' - } - ) - } - ) - EnterpriseProxyServers = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - EnterpriseProxyServersAreAuthoritative = $True - ExemptApps = @( - @{ - Description = 'FakeStringValue' - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - Denied = $True - PublisherName = 'FakeStringValue' - ProductName = 'FakeStringValue' - DisplayName = 'FakeStringValue' - } - ) - IconsVisible = $True - Id = 'FakeStringValue' - IndexingEncryptedStoresOrItemsBlocked = $True - NeutralDomainResources = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - ProtectedApps = @( - @{ - Description = 'FakeStringValue' - AdditionalProperties = @{ - binaryName = 'FakeStringValue' - binaryVersionLow = 'FakeStringValue' - binaryVersionHigh = 'FakeStringValue' - '@odata.type' = '#microsoft.graph.windowsInformationProtectionDesktopApp' - } - Denied = $True - PublisherName = 'FakeStringValue' - ProductName = 'FakeStringValue' - DisplayName = 'FakeStringValue' - } - ) - ProtectionUnderLockConfigRequired = $True - RevokeOnUnenrollDisabled = $True - SmbAutoEncryptedFileExtensions = @( - @{ - DisplayName = 'FakeStringValue' - Resources = @('FakeStringValue') - } - ) - - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessDriverUpdateProfileWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessDriverUpdateProfileWindows10.Tests.ps1 index 05caad9230..8b63573ca7 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessDriverUpdateProfileWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessDriverUpdateProfileWindows10.Tests.ps1 @@ -43,6 +43,19 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Invoke-MgGraphRequest -MockWith { + return @{ + value = @( + @{ + ApprovalType = 'manual' + DisplayName = 'FakeStringValue' + Description = 'FakeStringValue' + Id = 'FakeStringValue' + } + ) + } + } + # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } @@ -89,19 +102,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - value = @( - @{ - ApprovalType = 'manual' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - } - ) - } - } } It 'Should return Values from the Get method' { @@ -148,24 +148,13 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name "The IntuneWindowsUpdateForBusinessDriverUpdateProfileWindows10 exists and values are NOT in the desired state" -Fixture { BeforeAll { $testParams = @{ - ApprovalType = 'manual' + ApprovalType = 'automatic' # Updated property DisplayName = 'FakeStringValue' Description = 'FakeStringValue' Id = 'FakeStringValue' Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - value = @{ - ApprovalType = 'manual' - DisplayName = 'FakeStringValue1234' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - } - } - } } It 'Should return Values from the Get method' { @@ -189,18 +178,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Invoke-MgGraphRequest -MockWith { - return @{ - value = @{ - ApprovalType = 'manual' - DisplayName = 'FakeStringValue' - Description = 'FakeStringValue' - Id = 'FakeStringValue' - } - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessQualityUpdateProfileWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessQualityUpdateProfileWindows10.Tests.ps1 index 6558b65abd..f9e027331b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessQualityUpdateProfileWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessQualityUpdateProfileWindows10.Tests.ps1 @@ -52,6 +52,19 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Write-Warning -MockWith { } + Mock -CommandName Get-MgBetaDeviceManagementWindowsQualityUpdateProfile -MockWith { + return @{ + Description = "Description" + DisplayName = "IntuneQualityUpdate" + ExpeditedUpdateSettings = @{ + DaysUntilForcedReboot = 0 + QualityUpdateRelease = "2024-06-11T00:00:00Z" + } + Id = "FakeStringValue" + RoleScopeTagIds = @("0") + } + } + $Script:exportedInstances =$null $Script:ExportMode = $false @@ -137,19 +150,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsQualityUpdateProfile -MockWith { - return @{ - Description = "Description" - DisplayName = "IntuneQualityUpdate" - ExpeditedUpdateSettings = @{ - DaysUntilForcedReboot = 0 - QualityUpdateRelease = "2024-06-11T00:00:00Z" - } - Id = "FakeStringValue" - RoleScopeTagIds = @("0") - } - } } It 'Should return Values from the Get method' { @@ -186,19 +186,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsQualityUpdateProfile -MockWith { - return @{ - Description = "Description" - DisplayName = "IntuneQualityUpdate" - ExpeditedUpdateSettings = @{ - DaysUntilForcedReboot = 0 - QualityUpdateRelease = "2024-06-11T00:00:00Z" - } - Id = "FakeStringValue" - RoleScopeTagIds = @("0") - } - } } It 'Should return true from the Test method' { @@ -219,7 +206,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = "Description" DisplayName = "IntuneQualityUpdate" ExpeditedUpdateSettings = (New-CimInstance -ClassName MSFT_MicrosoftGraphExpeditedWindowsQualityUpdateSettings -Property @{ - DaysUntilForcedReboot = 0 + DaysUntilForcedReboot = 1 # Updated property QualityUpdateRelease = "2024-06-11T00:00:00Z" } -ClientOnly) Id = "FakeStringValue" @@ -227,19 +214,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential; } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsQualityUpdateProfile -MockWith { - return @{ - Description = "Description" - DisplayName = "IntuneQualityUpdate" - ExpeditedUpdateSettings = @{ - DaysUntilForcedReboot = 1 #drift - QualityUpdateRelease = "2024-06-11T00:00:00Z" - } - Id = "FakeStringValue" - RoleScopeTagIds = @("0") - } - } } It 'Should return Values from the Get method' { @@ -263,19 +237,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementWindowsQualityUpdateProfile -MockWith { - return @{ - Description = "Description" - DisplayName = "IntuneQualityUpdate" - ExpeditedUpdateSettings = @{ - DaysUntilForcedReboot = 0 - QualityUpdateRelease = "2024-06-11T00:00:00Z" - } - Id = "FakeStringValue" - RoleScopeTagIds = @("0") - } - } } It 'Should Reverse Engineer resource from the Export method' { diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.Tests.ps1 index 35de41d17a..170e34f92b 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.Tests.ps1 @@ -40,6 +40,57 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return 'Credentials' } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { + return @{ + AdditionalProperties = @{ + postponeRebootUntilAfterDeadline = $True + featureUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' + businessReadyUpdatesOnly = 'userDefined' + updateWeeks = 'userDefined' + qualityUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' + skipChecksBeforeRestart = $True + deadlineForFeatureUpdatesInDays = 25 + featureUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' + qualityUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' + scheduleImminentRestartWarningInMinutes = 25 + featureUpdatesDeferralPeriodInDays = 25 + driversExcluded = $True + featureUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' + deadlineForQualityUpdatesInDays = 25 + deliveryOptimizationMode = 'userDefined' + scheduleRestartWarningInHours = 25 + prereleaseFeatures = 'userDefined' + featureUpdatesPaused = $True + updateNotificationLevel = 'notConfigured' + automaticUpdateMode = 'userDefined' + allowWindows11Upgrade = $True + featureUpdatesRollbackWindowInDays = 25 + engagedRestartTransitionScheduleInDays = 25 + engagedRestartDeadlineInDays = 25 + qualityUpdatesDeferralPeriodInDays = 25 + qualityUpdatesPaused = $True + deadlineGracePeriodInDays = 25 + autoRestartNotificationDismissal = 'notConfigured' + installationSchedule = @{ + activeHoursStart = '00:00:00' + scheduledInstallTime = '00:00:00' + scheduledInstallDay = 'userDefined' + activeHoursEnd = '00:00:00' + '@odata.type' = '#microsoft.graph.windowsUpdateActiveHoursInstall' + } + engagedRestartSnoozeScheduleInDays = 25 + '@odata.type' = '#microsoft.graph.windowsUpdateForBusinessConfiguration' + qualityUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' + userPauseAccess = 'notConfigured' + userWindowsUpdateScanAccess = 'notConfigured' + microsoftUpdateServiceAllowed = $True + } + description = 'FakeStringValue' + displayName = 'FakeStringValue' + id = 'FakeStringValue' + } + } + Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { } Mock -CommandName Update-DeviceConfigurationPolicyAssignment -MockWith { @@ -167,57 +218,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Absent' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - postponeRebootUntilAfterDeadline = $True - featureUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - businessReadyUpdatesOnly = 'userDefined' - updateWeeks = 'userDefined' - qualityUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - skipChecksBeforeRestart = $True - deadlineForFeatureUpdatesInDays = 25 - featureUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - qualityUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - scheduleImminentRestartWarningInMinutes = 25 - featureUpdatesDeferralPeriodInDays = 25 - driversExcluded = $True - featureUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - deadlineForQualityUpdatesInDays = 25 - deliveryOptimizationMode = 'userDefined' - scheduleRestartWarningInHours = 25 - prereleaseFeatures = 'userDefined' - featureUpdatesPaused = $True - updateNotificationLevel = 'notConfigured' - automaticUpdateMode = 'userDefined' - allowWindows11Upgrade = $True - featureUpdatesRollbackWindowInDays = 25 - engagedRestartTransitionScheduleInDays = 25 - engagedRestartDeadlineInDays = 25 - qualityUpdatesDeferralPeriodInDays = 25 - qualityUpdatesPaused = $True - deadlineGracePeriodInDays = 25 - autoRestartNotificationDismissal = 'notConfigured' - installationSchedule = @{ - activeHoursStart = '00:00:00' - scheduledInstallTime = '00:00:00' - scheduledInstallDay = 'userDefined' - activeHoursEnd = '00:00:00' - '@odata.type' = '#microsoft.graph.windowsUpdateActiveHoursInstall' - } - engagedRestartSnoozeScheduleInDays = 25 - '@odata.type' = '#microsoft.graph.windowsUpdateForBusinessConfiguration' - qualityUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - userPauseAccess = 'notConfigured' - userWindowsUpdateScanAccess = 'notConfigured' - microsoftUpdateServiceAllowed = $True - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -283,57 +283,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - postponeRebootUntilAfterDeadline = $True - featureUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - businessReadyUpdatesOnly = 'userDefined' - updateWeeks = 'userDefined' - qualityUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - skipChecksBeforeRestart = $True - deadlineForFeatureUpdatesInDays = 25 - featureUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - qualityUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - scheduleImminentRestartWarningInMinutes = 25 - featureUpdatesDeferralPeriodInDays = 25 - driversExcluded = $True - featureUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - deadlineForQualityUpdatesInDays = 25 - deliveryOptimizationMode = 'userDefined' - scheduleRestartWarningInHours = 25 - prereleaseFeatures = 'userDefined' - featureUpdatesPaused = $True - updateNotificationLevel = 'notConfigured' - automaticUpdateMode = 'userDefined' - allowWindows11Upgrade = $True - featureUpdatesRollbackWindowInDays = 25 - engagedRestartTransitionScheduleInDays = 25 - engagedRestartDeadlineInDays = 25 - qualityUpdatesDeferralPeriodInDays = 25 - qualityUpdatesPaused = $True - deadlineGracePeriodInDays = 25 - autoRestartNotificationDismissal = 'notConfigured' - installationSchedule = @{ - activeHoursStart = '00:00:00' - scheduledInstallTime = '00:00:00' - scheduledInstallDay = 'userDefined' - activeHoursEnd = '00:00:00' - '@odata.type' = '#microsoft.graph.windowsUpdateActiveHoursInstall' - } - engagedRestartSnoozeScheduleInDays = 25 - '@odata.type' = '#microsoft.graph.windowsUpdateForBusinessConfiguration' - qualityUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - userPauseAccess = 'notConfigured' - userWindowsUpdateScanAccess = 'notConfigured' - microsoftUpdateServiceAllowed = $True - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return true from the Test method' { @@ -344,7 +293,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10 exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - AllowWindows11Upgrade = $True + AllowWindows11Upgrade = $False # Updated property AutomaticUpdateMode = 'userDefined' AutoRestartNotificationDismissal = 'notConfigured' BusinessReadyUpdatesOnly = 'userDefined' @@ -390,50 +339,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Ensure = 'Present' Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - automaticUpdateMode = 'userDefined' - deliveryOptimizationMode = 'userDefined' - deadlineForQualityUpdatesInDays = 7 - featureUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - featureUpdatesDeferralPeriodInDays = 7 - scheduleImminentRestartWarningInMinutes = 7 - scheduleRestartWarningInHours = 7 - qualityUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - deadlineForFeatureUpdatesInDays = 7 - updateWeeks = 'userDefined' - qualityUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - businessReadyUpdatesOnly = 'userDefined' - featureUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - featureUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - qualityUpdatesDeferralPeriodInDays = 7 - updateNotificationLevel = 'notConfigured' - '@odata.type' = '#microsoft.graph.WindowsUpdateForBusinessConfiguration' - engagedRestartSnoozeScheduleInDays = 7 - installationSchedule = @{ - activeHoursStart = '00:00:00' - scheduledInstallTime = '00:00:00' - scheduledInstallDay = 'userDefined' - activeHoursEnd = '00:00:00' - '@odata.type' = '#microsoft.graph.windowsUpdateActiveHoursInstall' - } - autoRestartNotificationDismissal = 'notConfigured' - userWindowsUpdateScanAccess = 'notConfigured' - deadlineGracePeriodInDays = 7 - engagedRestartDeadlineInDays = 7 - userPauseAccess = 'notConfigured' - qualityUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - engagedRestartTransitionScheduleInDays = 7 - prereleaseFeatures = 'userDefined' - featureUpdatesRollbackWindowInDays = 7 - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } It 'Should return Values from the Get method' { @@ -457,60 +362,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ Credential = $Credential } - - Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { - return @{ - AdditionalProperties = @{ - postponeRebootUntilAfterDeadline = $True - featureUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - businessReadyUpdatesOnly = 'userDefined' - updateWeeks = 'userDefined' - qualityUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - skipChecksBeforeRestart = $True - deadlineForFeatureUpdatesInDays = 25 - featureUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - qualityUpdatesPauseExpiryDateTime = '2023-01-01T00:00:00.0000000+00:00' - scheduleImminentRestartWarningInMinutes = 25 - featureUpdatesDeferralPeriodInDays = 25 - driversExcluded = $True - featureUpdatesPauseStartDate = '2023-01-01T00:00:00.0000000' - deadlineForQualityUpdatesInDays = 25 - deliveryOptimizationMode = 'userDefined' - scheduleRestartWarningInHours = 25 - prereleaseFeatures = 'userDefined' - featureUpdatesPaused = $True - updateNotificationLevel = 'notConfigured' - automaticUpdateMode = 'userDefined' - allowWindows11Upgrade = $True - featureUpdatesRollbackWindowInDays = 25 - engagedRestartTransitionScheduleInDays = 25 - engagedRestartDeadlineInDays = 25 - qualityUpdatesDeferralPeriodInDays = 25 - qualityUpdatesPaused = $True - deadlineGracePeriodInDays = 25 - autoRestartNotificationDismissal = 'notConfigured' - installationSchedule = @{ - AdditionalProperties = @{ - activeHoursStart = '00:00:00' - scheduledInstallTime = '00:00:00' - scheduledInstallDay = 'userDefined' - activeHoursEnd = '00:00:00' - '@odata.type' = '#microsoft.graph.windowsUpdateActiveHoursInstall' - } - } - engagedRestartSnoozeScheduleInDays = 25 - '@odata.type' = '#microsoft.graph.windowsUpdateForBusinessConfiguration' - qualityUpdatesRollbackStartDateTime = '2023-01-01T00:00:00.0000000+00:00' - userPauseAccess = 'notConfigured' - userWindowsUpdateScanAccess = 'notConfigured' - microsoftUpdateServiceAllowed = $True - } - description = 'FakeStringValue' - displayName = 'FakeStringValue' - id = 'FakeStringValue' - } - } } + It 'Should Reverse Engineer resource from the Export method' { $result = Export-TargetResource @testParams $result | Should -Not -BeNullOrEmpty From d9ae5f7f5a44fd7db92969e94500dfb17015ff97 Mon Sep 17 00:00:00 2001 From: Fabien Tschanz Date: Mon, 16 Jun 2025 08:36:08 +0200 Subject: [PATCH 3/3] Fix unit tests --- ..._IntuneDeviceConfigurationPolicyMacOS.psm1 | 18 +-- ...figurationWiredNetworkPolicyWindows10.psm1 | 6 +- .../MSFT_IntuneVPNConfigurationPolicyIOS.psm1 | 46 +++---- ...leMDMPushNotificationCertificate.Tests.ps1 | 5 +- ...istrativeTemplatePolicyWindows10.Tests.ps1 | 3 +- ...viceConfigurationCustomPolicyiOS.Tests.ps1 | 4 +- ...onPolicyAndroidOpenSourceProject.Tests.ps1 | 3 +- ...neDeviceConfigurationPolicyMacOS.Tests.ps1 | 117 +++++++++--------- ...rustedCertificatePolicyWindows10.Tests.ps1 | 2 +- ...ationWiredNetworkPolicyWindows10.Tests.ps1 | 6 +- ...roidDeviceOwnerEnrollmentProfile.Tests.ps1 | 3 +- ...crosoft365DSC.IntuneRoleScopeTag.Tests.ps1 | 2 +- ....IntuneVPNConfigurationPolicyIOS.Tests.ps1 | 3 +- ...onPolicyAndroidOpenSourceProject.Tests.ps1 | 2 +- 14 files changed, 108 insertions(+), 112 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 index 3c83425d7f..85296c55d5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 @@ -802,14 +802,14 @@ function Set-TargetResource Write-Verbose -Message "Creating {$DisplayName}" $PSBoundParameters.Remove('Assignments') | Out-Null - $CreateParameters = ([Hashtable]$PSBoundParameters).clone() + $CreateParameters = ([Hashtable]$PSBoundParameters).Clone() $CreateParameters = Remove-M365DSCAuthenticationParameter -BoundParameters $CreateParameters $CreateParameters = Rename-M365DSCCimInstanceParameter -Properties $CreateParameters $CreateParameters.Remove('Id') | Out-Null - foreach ($key in ($CreateParameters.clone()).Keys) + foreach ($key in ($CreateParameters.Clone()).Keys) { - if ($CreateParameters[$key].getType().Fullname -like '*CimInstance*') + if ($CreateParameters[$key].GetType().Fullname -like '*CimInstance*') { $CreateParameters[$key] = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $CreateParameters[$key] } @@ -838,7 +838,7 @@ function Set-TargetResource Write-Verbose -Message "Updating {$DisplayName}" $PSBoundParameters.Remove('Assignments') | Out-Null - $UpdateParameters = ([Hashtable]$PSBoundParameters).clone() + $UpdateParameters = ([Hashtable]$PSBoundParameters).Clone() $UpdateParameters = Remove-M365DSCAuthenticationParameter -BoundParameters $UpdateParameters $UpdateParameters = Rename-M365DSCCimInstanceParameter -Properties $UpdateParameters @@ -854,9 +854,9 @@ function Set-TargetResource $UpdateParameters.Remove('Id') | Out-Null - foreach ($key in ($UpdateParameters.clone()).Keys) + foreach ($key in ($UpdateParameters.Clone()).Keys) { - if ($UpdateParameters[$key].getType().Fullname -like '*CimInstance*') + if ($UpdateParameters[$key].GetType().Fullname -like '*CimInstance*') { $UpdateParameters[$key] = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $UpdateParameters[$key] } @@ -866,7 +866,7 @@ function Set-TargetResource { $UpdateParameters.add('AdditionalProperties', $AdditionalProperties) }#> - $UpdateParameters.add('@odata.type', '#microsoft.graph.macOSGeneralDeviceConfiguration') + $UpdateParameters.Add('@odata.type', '#microsoft.graph.macOSGeneralDeviceConfiguration') #$UpdateParameters.remove('emailInDomainSuffixes') #$UpdateParameters.remove('updateDelayPolicy') @@ -1241,9 +1241,9 @@ function Test-TargetResource foreach ($key in $ValuesToCheck.Keys) { if (($null -ne $CurrentValues[$key]) ` - -and ($CurrentValues[$key].getType().Name -eq 'DateTime')) + -and ($CurrentValues[$key].GetType().Name -eq 'DateTime')) { - $CurrentValues[$key] = $CurrentValues[$key].toString() + $CurrentValues[$key] = $CurrentValues[$key].ToString() } } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 index acf5ac0b90..e4cb36f685 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10/MSFT_IntuneDeviceConfigurationWiredNetworkPolicyWindows10.psm1 @@ -665,15 +665,15 @@ function Set-TargetResource $BoundParameters.Remove('SecondaryRootCertificateForClientValidationId') | Out-Null $BoundParameters.Remove('SecondaryRootCertificateForClientValidationDisplayName') | Out-Null - $UpdateParameters = ([Hashtable]$BoundParameters).clone() + $UpdateParameters = ([Hashtable]$BoundParameters).Clone() $UpdateParameters = Rename-M365DSCCimInstanceParameter -Properties $UpdateParameters $UpdateParameters.Remove('Id') | Out-Null - $keys = (([Hashtable]$UpdateParameters).clone()).Keys + $keys = (([Hashtable]$UpdateParameters).Clone()).Keys foreach ($key in $keys) { - if ($null -ne $UpdateParameters.$key -and $UpdateParameters.$key.getType().Name -like '*cimInstance*') + if ($null -ne $UpdateParameters.$key -and $UpdateParameters.$key.GetType().Name -like '*cimInstance*') { $UpdateParameters.$key = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $UpdateParameters.$key } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 index a9d6d0c623..b605f9b742 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneVPNConfigurationPolicyIOS/MSFT_IntuneVPNConfigurationPolicyIOS.psm1 @@ -611,7 +611,7 @@ function Set-TargetResource { Write-Verbose -Message "Creating {$DisplayName}" $BoundParameters.Remove('Assignments') | Out-Null - $CreateParameters = ([Hashtable]$BoundParameters).clone() + $CreateParameters = ([Hashtable]$BoundParameters).Clone() $CreateParameters = Rename-M365DSCCimInstanceParameter -Properties $CreateParameters $AdditionalProperties = Get-M365DSCAdditionalProperties -Properties ($CreateParameters) @@ -619,16 +619,16 @@ function Set-TargetResource { if ($key -ne '@odata.type') { - $keyName = $key.substring(0, 1).ToUpper() + $key.substring(1, $key.length - 1) - $CreateParameters.remove($keyName) + $keyName = $key.Substring(0, 1).ToUpper() + $key.Substring(1, $key.length - 1) + $CreateParameters.Remove($keyName) } } $CreateParameters.Remove('Id') | Out-Null - foreach ($key in ($CreateParameters.clone()).Keys) + foreach ($key in ($CreateParameters.Clone()).Keys) { - if ($CreateParameters[$key].getType().Fullname -like '*CimInstance*') + if ($CreateParameters[$key].GetType().Fullname -like '*CimInstance*') { $CreateParameters[$key] = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $CreateParameters[$key] } @@ -637,15 +637,15 @@ function Set-TargetResource if ($AdditionalProperties.server) { $AdditionalProperties.Remove('server') #this is not in a format Update-MgBetaDeviceManagementDeviceConfiguration will accept - $AdditionalProperties.add('server',$serverHashtable) #replaced with the hashtable we created earlier + $AdditionalProperties.Add('server',$serverHashtable) #replaced with the hashtable we created earlier } if ($AdditionalProperties.proxyServer) { $AdditionalProperties.Remove('proxyServer') #this is not in a format Update-MgBetaDeviceManagementDeviceConfiguration will accept - $AdditionalProperties.add('proxyServer',$proxyHashtable) #replaced with the hashtable we created earlier + $AdditionalProperties.Add('proxyServer',$proxyHashtable) #replaced with the hashtable we created earlier } - $CreateParameters.add('AdditionalProperties', $AdditionalProperties) + $CreateParameters.Add('AdditionalProperties', $AdditionalProperties) #region resource generator code $policy = New-MgBetaDeviceManagementDeviceConfiguration @CreateParameters @@ -664,7 +664,7 @@ function Set-TargetResource Write-Verbose -Message "Updating {$DisplayName}" $BoundParameters.Remove('Assignments') | Out-Null - $UpdateParameters = ([Hashtable]$BoundParameters).clone() + $UpdateParameters = ([Hashtable]$BoundParameters).Clone() $UpdateParameters = Rename-M365DSCCimInstanceParameter -Properties $UpdateParameters $AdditionalProperties = Get-M365DSCAdditionalProperties -Properties ($UpdateParameters) @@ -672,16 +672,16 @@ function Set-TargetResource { if ($key -ne '@odata.type') { - $keyName = $key.substring(0, 1).ToUpper() + $key.substring(1, $key.length - 1) - $UpdateParameters.remove($keyName) + $keyName = $key.Substring(0, 1).ToUpper() + $key.Substring(1, $key.Length - 1) + $UpdateParameters.Remove($keyName) } } $UpdateParameters.Remove('Id') | Out-Null - foreach ($key in ($UpdateParameters.clone()).Keys) + foreach ($key in ($UpdateParameters.Clone()).Keys) { - if ($UpdateParameters[$key].getType().Fullname -like '*CimInstance*') + if ($UpdateParameters[$key].GetType().Fullname -like '*CimInstance*') { $UpdateParameters[$key] = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $UpdateParameters[$key] } @@ -693,23 +693,23 @@ function Set-TargetResource if ($AdditionalProperties.server) { $AdditionalProperties.Remove('server') #this is not in a format Update-MgBetaDeviceManagementDeviceConfiguration will accept - $AdditionalProperties.add('server',$serverHashtable) #replaced with the hashtable we created earlier + $AdditionalProperties.Add('server',$serverHashtable) #replaced with the hashtable we created earlier } if ($AdditionalProperties.proxyServer) { $AdditionalProperties.Remove('proxyServer') #this is not in a format Update-MgBetaDeviceManagementDeviceConfiguration will accept - $AdditionalProperties.add('proxyServer',$proxyHashtable) #replaced with the hashtable we created earlier + $AdditionalProperties.Add('proxyServer',$proxyHashtable) #replaced with the hashtable we created earlier } #add the additional properties to the updateparameters - $UpdateParameters.add('AdditionalProperties', $AdditionalProperties) + $UpdateParameters.Add('AdditionalProperties', $AdditionalProperties) } #region resource generator code Update-MgBetaDeviceManagementDeviceConfiguration @UpdateParameters ` -DeviceConfigurationId $currentInstance.Id $assignmentsHash = ConvertTo-IntunePolicyAssignment -IncludeDeviceFilter:$true -Assignments $Assignments - Update-DeviceConfigurationPolicyAssignment -DeviceConfigurationPolicyId $currentInstance.id ` + Update-DeviceConfigurationPolicyAssignment -DeviceConfigurationPolicyId $currentInstance.Id ` -Targets $assignmentsHash ` -Repository 'deviceManagement/deviceConfigurations' #endregion @@ -919,7 +919,7 @@ function Test-TargetResource Write-Verbose -Message "Testing configuration of {$Id}" $CurrentValues = Get-TargetResource @PSBoundParameters - $ValuesToCheck = ([Hashtable]$PSBoundParameters).clone() + $ValuesToCheck = ([Hashtable]$PSBoundParameters).Clone() $testResult = $true #Compare Cim instances @@ -949,9 +949,9 @@ function Test-TargetResource foreach ($key in $ValuesToCheck.Keys) { if (($null -ne $CurrentValues[$key]) ` - -and ($CurrentValues[$key].getType().Name -eq 'DateTime')) + -and ($CurrentValues[$key].GetType().Name -eq 'DateTime')) { - $CurrentValues[$key] = $CurrentValues[$key].toString() + $CurrentValues[$key] = $CurrentValues[$key].ToString() } } @@ -1251,15 +1251,15 @@ function Get-M365DSCAdditionalProperties ) $results = @{'@odata.type' = '#microsoft.graph.iosVpnConfiguration' } - $cloneProperties = $Properties.clone() + $cloneProperties = $Properties.Clone() foreach ($property in $cloneProperties.Keys) { if ($property -in ($additionalProperties) ) { $propertyName = $property[0].ToString().ToLower() + $property.Substring(1, $property.Length - 1) - if ($properties.$property -and $properties.$property.getType().FullName -like '*CIMInstance*') + if ($properties.$property -and $properties.$property.GetType().FullName -like '*CIMInstance*') { - if ($properties.$property.getType().FullName -like '*[[\]]') + if ($properties.$property.GetType().FullName -like '*[[\]]') { $array = @() foreach ($item in $properties.$property) diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 index 4592beba3f..1244610be9 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneAppleMDMPushNotificationCertificate.Tests.ps1 @@ -44,7 +44,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { return @{ - AppleIdentifier = "Patched cert"; + AppleIdentifier = "Apple ID"; Certificate = "Test cert"; Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; } @@ -60,7 +60,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Update-MgBetaDeviceManagementApplePushNotificationCertificate -MockWith { } - $Script:exportedInstances =$null + $Script:exportedInstance = $null $Script:ExportMode = $false } @@ -73,7 +73,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Certificate = "Test cert"; Id = "66f4ec83-754f-4a59-a73d-e3182cc636a5"; DataSharingConsetGranted = $True; - Ensure = 'Present'; Credential = $Credential; } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 index 31ac311717..70662e7498 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationAdministrativeTemplatePolicyWindows10.Tests.ps1 @@ -64,7 +64,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementGroupPolicyConfigurationDefinitionValue -MockWith { return @( @{ - ConfigurationType = 'fakeConfigurationType' + ConfigurationType = 'policy' Enabled = $true Id = 'fakeDefinitionValueId' PolicyConfigurationIngestionType = 'unknown' @@ -115,7 +115,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Update-DeviceConfigurationGroupPolicyDefinitionValue -MockWith { } - $Script:exportedInstances = $null $Script:exportedInstance = $null $Script:ExportMode = $false } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 index b59f50f0ba..4fdc937be1 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationCustomPolicyiOS.Tests.ps1 @@ -42,7 +42,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { return @{ DisplayName = 'Test IntuneDeviceConfigurationCustomPolicyiOS' - Description = 'Different Value' + Description = 'Test IntuneDeviceConfigurationCustomPolicyiOS Description' Id = 'e30954ac-a65e-4dcb-ab79-91d45f3c52b4' AdditionalProperties = @{ Payload = 'PHJvb3Q+PC9yb290Pg==' @@ -62,7 +62,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } - $Script:exportedInstances =$null + $Script:exportedInstance = $null $Script:ExportMode = $false } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 index 6d178fd618..832c25b337 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 @@ -24,7 +24,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $secpasswd = ConvertTo-SecureString (New-Guid | Out-String) -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) - Mock -CommandName Confirm-M365DSCDependencies -MockWith { } @@ -49,7 +48,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ScreenCaptureBlocked = $True PasswordMinimumLength = 25 BluetoothBlocked = $True - '@odata.type' = '#microsoft.graph.' + '@odata.type' = '#microsoft.graph.aospDeviceOwnerDeviceConfiguration' AppsBlockInstallFromUnknownSources = $True FactoryResetBlocked = $True CameraBlocked = $True diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 index 6c82dd3309..32db0e78cf 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyMacOS.Tests.ps1 @@ -49,66 +49,67 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { return @{ - AdditionalProperties = @{'@odata.type' = '#microsoft.graph.macosGeneralDeviceConfiguration' } - TouchIdTimeoutInHours = 25 + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macosGeneralDeviceConfiguration' + TouchIdTimeoutInHours = 25 + AirDropBlocked = $True + ClassroomAppForceUnpromptedScreenObservation = $True + KeychainBlockCloudSync = $True + AppleWatchBlockAutoUnlock = $True + ScreenCaptureBlocked = $True + MultiplayerGamingBlocked = $True + WallpaperModificationBlocked = $True + CameraBlocked = $True + ICloudBlockActivityContinuation = $True + SpotlightBlockInternetResults = $True + SafariBlockAutofill = $True + PasswordBlockAutoFill = $True + PasswordRequiredType = 'deviceDefault' + PasswordMaximumAttemptCount = 25 + ClassroomForceAutomaticallyJoinClasses = $True + ICloudPrivateRelayBlocked = $True + PasswordBlockModification = $True + ICloudBlockCalendar = $True + ICloudBlockAddressBook = $True + SoftwareUpdatesEnforcedDelayInDays = 25 + ICloudBlockReminders = $True + PasswordBlockSimple = $True + PasswordBlockAirDropSharing = $True + ICloudBlockBookmarks = $True + PasswordRequired = $True + KeyboardBlockDictation = $True + SoftwareUpdateMajorOSDeferredInstallDelayInDays = 25 + ContentCachingBlocked = $True + ICloudDesktopAndDocumentsBlocked = $True + UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' + PasswordPreviousPasswordBlockCount = 25 + AddingGameCenterFriendsBlocked = $True + PasswordMinimumLength = 25 + EraseContentAndSettingsBlocked = $True + ICloudBlockNotes = $True + ICloudBlockPhotoLibrary = $True + ICloudBlockMail = $True + PasswordMinutesOfInactivityBeforeScreenTimeout = 25 + PasswordExpirationDays = 25 + PasswordBlockFingerprintUnlock = $True + PasswordBlockProximityRequests = $True + SoftwareUpdateNonOSDeferredInstallDelayInDays = 25 + ITunesBlockMusicService = $True + DefinitionLookupBlocked = $True + ClassroomForceRequestPermissionToLeaveClasses = $True + ClassroomAppBlockRemoteScreenObservation = $True + SoftwareUpdateMinorOSDeferredInstallDelayInDays = 25 + ITunesBlockFileSharing = $True + GameCenterBlocked = $True + ICloudBlockDocumentSync = $True + PasswordMinimumCharacterSetCount = 25 + PasswordMinutesOfInactivityBeforeLock = 25 + ClassroomForceUnpromptedAppAndDeviceLock = $True + PasswordMinutesUntilFailedLoginReset = 25 + } Description = 'FakeStringValue' - AirDropBlocked = $True - ClassroomAppForceUnpromptedScreenObservation = $True - KeychainBlockCloudSync = $True DisplayName = 'FakeStringValue' - AppleWatchBlockAutoUnlock = $True - ScreenCaptureBlocked = $True - MultiplayerGamingBlocked = $True - WallpaperModificationBlocked = $True - CameraBlocked = $True - ICloudBlockActivityContinuation = $True - SpotlightBlockInternetResults = $True - SafariBlockAutofill = $True - PasswordBlockAutoFill = $True - PasswordRequiredType = 'deviceDefault' - PasswordMaximumAttemptCount = 25 - ClassroomForceAutomaticallyJoinClasses = $True - ICloudPrivateRelayBlocked = $True - PasswordBlockModification = $True - ICloudBlockCalendar = $True - ICloudBlockAddressBook = $True - SoftwareUpdatesEnforcedDelayInDays = 25 - ICloudBlockReminders = $True - PasswordBlockSimple = $True - PasswordBlockAirDropSharing = $True - ICloudBlockBookmarks = $True - PasswordRequired = $True - KeyboardBlockDictation = $True - SoftwareUpdateMajorOSDeferredInstallDelayInDays = 25 - ContentCachingBlocked = $True - ICloudDesktopAndDocumentsBlocked = $True - UpdateDelayPolicy = 'delayMajorOsUpdateVisibility' - PasswordPreviousPasswordBlockCount = 25 - AddingGameCenterFriendsBlocked = $True Id = 'FakeStringValue' - PasswordMinimumLength = 25 - EraseContentAndSettingsBlocked = $True - ICloudBlockNotes = $True - ICloudBlockPhotoLibrary = $True - ICloudBlockMail = $True - PasswordMinutesOfInactivityBeforeScreenTimeout = 25 - PasswordExpirationDays = 25 - PasswordBlockFingerprintUnlock = $True - PasswordBlockProximityRequests = $True - SoftwareUpdateNonOSDeferredInstallDelayInDays = 25 - ITunesBlockMusicService = $True - DefinitionLookupBlocked = $True - ClassroomForceRequestPermissionToLeaveClasses = $True - ClassroomAppBlockRemoteScreenObservation = $True - SoftwareUpdateMinorOSDeferredInstallDelayInDays = 25 - ITunesBlockFileSharing = $True - GameCenterBlocked = $True - ICloudBlockDocumentSync = $True - PasswordMinimumCharacterSetCount = 25 - PasswordMinutesOfInactivityBeforeLock = 25 - ClassroomForceUnpromptedAppAndDeviceLock = $True - PasswordMinutesUntilFailedLoginReset = 25 - } } @@ -265,7 +266,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PasswordMinutesOfInactivityBeforeLock = 25 ClassroomForceUnpromptedAppAndDeviceLock = $True PasswordMinutesUntilFailedLoginReset = 25 - Ensure = 'Absent' Credential = $Credential } @@ -346,7 +346,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { PasswordMinutesOfInactivityBeforeLock = 25 ClassroomForceUnpromptedAppAndDeviceLock = $True PasswordMinutesUntilFailedLoginReset = 25 - Ensure = 'Present' Credential = $Credential } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 index ca681f27d4..39eff9a3e5 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationTrustedCertificatePolicyWindows10.Tests.ps1 @@ -142,7 +142,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { $testParams = @{ CertFileName = "FakeStringValue" Description = "FakeStringValue" - DestinationStore = "userCertStoreRoot" # Updated property + DestinationStore = "userCertStoreIntermediate" # Updated property DisplayName = "FakeStringValue" Id = "FakeStringValue" Ensure = 'Present' diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 index 15bac33c97..88a4e1fff0 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationWiredNetworkPolicyWindows10.Tests.ps1 @@ -47,7 +47,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { # Mock Write-M365DSCHost to hide output during the tests Mock -CommandName Write-M365DSCHost -MockWith { } - $Script:exportedInstances =$null + $Script:exportedInstance = $null $Script:ExportMode = $false Mock -CommandName Get-MgBetaDeviceManagementDeviceConfigurationAssignment -MockWith { @@ -99,11 +99,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { return 'a485d322-13cd-43ef-beda-733f656f48ea' - } -ParameterFilter { $DisplayName -eq 'RootCertificate' } + } -ParameterFilter { $CertificateDisplayName -eq 'RootCertificate' } Mock -CommandName Get-IntuneDeviceConfigurationCertificateId -MockWith { return '0b9aef2f-1671-4260-8eb9-3ab3138e176a' - } -ParameterFilter { $DisplayName -eq 'ClientCertificate' } + } -ParameterFilter { $CertificateDisplayName -eq 'ClientCertificate' } Mock -CommandName Update-DeviceConfigurationPolicyCertificateId -MockWith { } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 index 20940111d9..63a22909e4 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile.Tests.ps1 @@ -44,7 +44,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return @{ Id = "164655f7-1232-4d56-ae8f-b095196a0309"; DisplayName = "Android Owner Enrollment Profile" - Description = "Profile for enrolling Android" + Description = "Profile for enrolling Android devices" TokenExpirationDateTime = "2024-12-31T23:59:59Z" TokenCreationDateTime = "2024-12-31T23:59:59Z" TokenValue = "your-token-value" @@ -54,7 +54,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { WifiSsid = "your-wifi-ssid" WifiPassword = "your-wifi-password" WifiSecurityType = "wpa" - Ensure = 'Present' } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 index 60b15a5027..8ed0f882c2 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneRoleScopeTag.Tests.ps1 @@ -57,7 +57,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Description = 'FakeStringValue' DisplayName = 'FakeStringValue' Id = 'FakeStringValue' - IsBuiltIn = $True + IsBuiltIn = $False } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 index 3f232d0d9a..f35acf83c3 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneVPNConfigurationPolicyIOS.Tests.ps1 @@ -41,6 +41,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Mock -CommandName Get-MgBetaDeviceManagementDeviceConfiguration -MockWith { return @{ + Id = 'FakeStringValue' DisplayName = 'FakeStringValue' Description = 'FakeStringValue' AdditionalProperties = @{ @@ -183,7 +184,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { dnsServerAddressMatch = 'FakeStringValue' } -ClientOnly) ) - targetedMobileApps = [CimInstance[]]@( + targetedMobileApps = [CimInstance[]]@( (New-CimInstance ` -ClassName MSFT_targetedMobileApps ` -Property @{ diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 index 17cb04e249..6490a44b31 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneWifiConfigurationPolicyAndroidOpenSourceProject.Tests.ps1 @@ -163,7 +163,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Context -Name 'The IntuneWifiConfigurationPolicyAndroidOpenSourceProject exists and values are NOT in the desired state' -Fixture { BeforeAll { $testParams = @{ - ConnectAutomatically = $True + ConnectAutomatically = $False # Updated property ConnectWhenNetworkNameIsHidden = $True Description = 'FakeStringValue' DisplayName = 'FakeStringValue'