This pull request includes changes across several PowerShell scripts used for device management.
Removed Select-MgProfile cmdlet from all scripts as v2.x of the PowerShell Graph SDK defaults to the v1.0 endpoints
For scripts using the beta Graph endpoints, changed the module import lines to the equivalent Microsoft.Graph.Beta submodules.
For scripts using the beta Graph endpoints, converted the equivalent cmdlets to the Beta versions (E.G. Get-MgUser to Get-MgBetaUser)
Changes to module import:
AndroidEnterprise/Get-AndroidDedicatedDeviceQRCode.ps1, AndroidEnterprise/Get-AndroidDeviceOwnerProfiles.ps1, AndroidEnterprise/Get-AndroidWorkProfileConfiguration.ps1, AppleEnrollment/ADEProfile_Assign.ps1, AppleEnrollment/ADEProfile_Assign_CSV.ps1, AppleEnrollment/ADE_Sync.ps1: Updated the import statements to use the beta version of the Microsoft.Graph.DeviceManagement.Enrollment and Microsoft.Graph.DeviceManagement.Actions modules instead of the stable version. [1][2][3][4][5][6]
Changes to function usage:
AOSPEnrollmentProfileManagement/AOSP_Token_Renew_Export.ps1: Modified the Get-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile function to fetch all enrollment profiles and then filter the AOSP enrollment profiles, instead of using the -Filter parameter.
AndroidEnterprise/Get-AndroidDedicatedDeviceQRCode.ps1, AndroidEnterprise/Get-AndroidDeviceOwnerProfiles.ps1, AndroidEnterprise/Get-AndroidWorkProfileConfiguration.ps1, AppleEnrollment/ADEProfile_Assign.ps1, AppleEnrollment/ADEProfile_Assign_CSV.ps1: Updated the usage of various functions to use the beta version instead of the stable version. [1][2][3][4][5][6][7][8][9][10][11][12]
Removal of explicit Graph profile selection:
AppConfigurationPolicy/AppConfigurationPolicy_Export.ps1, AppConfigurationPolicy/AppConfigurationPolicy_ImportFromJSON.ps1, AppProtectionPolicy/ManagedAppPolicy_Add.ps1, AppProtectionPolicy/ManagedAppPolicy_Add_Assign.ps1, AppProtectionPolicy/ManagedAppPolicy_AppRegistrationSummary.ps1, AppProtectionPolicy/ManagedAppPolicy_Export.ps1, AppProtectionPolicy/ManagedAppPolicy_Get.ps1, AppProtectionPolicy/ManagedAppPolicy_Import_From_JSON.ps1, AppProtectionPolicy/ManagedAppPolicy_MobileAppIdentifier_Get.ps1, AppProtectionPolicy/ManagedAppPolicy_Wipe.ps1, AppleEnrollment/ADEProfile_Assign.ps1, AppleEnrollment/ADEProfile_Assign_CSV.ps1: Removed the explicit selection of the Graph profile using Select-MgProfile. [1][2][3][4][5][6][7][8][9][10][11][12]
This pull request includes changes across several PowerShell scripts used for device management.
Changes to module import:
AndroidEnterprise/Get-AndroidDedicatedDeviceQRCode.ps1
,AndroidEnterprise/Get-AndroidDeviceOwnerProfiles.ps1
,AndroidEnterprise/Get-AndroidWorkProfileConfiguration.ps1
,AppleEnrollment/ADEProfile_Assign.ps1
,AppleEnrollment/ADEProfile_Assign_CSV.ps1
,AppleEnrollment/ADE_Sync.ps1
: Updated the import statements to use the beta version of theMicrosoft.Graph.DeviceManagement.Enrollment
andMicrosoft.Graph.DeviceManagement.Actions
modules instead of the stable version. [1] [2] [3] [4] [5] [6]Changes to function usage:
AOSPEnrollmentProfileManagement/AOSP_Token_Renew_Export.ps1
: Modified theGet-MgBetaDeviceManagementAndroidDeviceOwnerEnrollmentProfile
function to fetch all enrollment profiles and then filter the AOSP enrollment profiles, instead of using the-Filter
parameter.AndroidEnterprise/Get-AndroidDedicatedDeviceQRCode.ps1
,AndroidEnterprise/Get-AndroidDeviceOwnerProfiles.ps1
,AndroidEnterprise/Get-AndroidWorkProfileConfiguration.ps1
,AppleEnrollment/ADEProfile_Assign.ps1
,AppleEnrollment/ADEProfile_Assign_CSV.ps1
: Updated the usage of various functions to use the beta version instead of the stable version. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Removal of explicit Graph profile selection:
AppConfigurationPolicy/AppConfigurationPolicy_Export.ps1
,AppConfigurationPolicy/AppConfigurationPolicy_ImportFromJSON.ps1
,AppProtectionPolicy/ManagedAppPolicy_Add.ps1
,AppProtectionPolicy/ManagedAppPolicy_Add_Assign.ps1
,AppProtectionPolicy/ManagedAppPolicy_AppRegistrationSummary.ps1
,AppProtectionPolicy/ManagedAppPolicy_Export.ps1
,AppProtectionPolicy/ManagedAppPolicy_Get.ps1
,AppProtectionPolicy/ManagedAppPolicy_Import_From_JSON.ps1
,AppProtectionPolicy/ManagedAppPolicy_MobileAppIdentifier_Get.ps1
,AppProtectionPolicy/ManagedAppPolicy_Wipe.ps1
,AppleEnrollment/ADEProfile_Assign.ps1
,AppleEnrollment/ADEProfile_Assign_CSV.ps1
: Removed the explicit selection of the Graph profile usingSelect-MgProfile
. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]