-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: backup the Windows 365 Cloud PC settings #125
Comments
Hello! I'm so sorry for late reply. I've been so busy the last couple of months so I've had almost no time for the project. I gad a quick look at the apis. Should be possible but I don't have this in my dev tenant so I might have some problems testing it. Cheers! |
Hej Mikael
no problem at all.
First of all, thanks for creating such a great tool,
i have done a quick dump from the tenant i am currently using that i hope can be to some use, the text file contains the API used and the return JSON from graph explorer for the policy and the assigment in the policy. if you need me to test anything once you have had a look just say and i will give it a go
Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
Sent with [Proton Mail](https://proton.me/) secure email.
------- Original Message -------
On Tuesday, April 11th, 2023 at 15:12, Mikael Karlsson ***@***.***> wrote:
Hello!
I'm so sorry for late reply. I've been so busy the last couple of months so I've had almost no time for the project.
I gad a quick look at the apis. Should be possible but I don't have this in my dev tenant so I might have some problems testing it.
Cheers!
—
Reply to this email directly, [view it on GitHub](#125 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABU7DYBMQP7O72U63Y4QLELXAVKEJANCNFSM6AAAAAAWAT3HDQ).
You are receiving this because you authored the thread.Message ID: ***@***.***>
Add-ViewItem (New-Object PSObject -Property @{
Title = "W365 Provisioning Policies"
Id = "W365ProvisioningPolicies"
API = "/deviceManagement/virtualEndpoint/provisioningPolicies"
Permissons=@("CloudPC.Read.All") or @("CloudPC.ReadWrite.All")
})
Link used to get the current Provisioning policies
https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies
Return JSON from endpoint:
{
***@***.***": "https://graph.microsoft.com/beta/$metadata#deviceManagement/virtualEndpoint/provisioningPolicies",
"value": [
{
"id": "d4221624-5b1d-46f7-96d2-5ea9145dcfa5",
"displayName": "W365_SEA_AADJ_W11_ENT_2vCPU_8GB_256GB",
"description": "",
"imageId": "MicrosoftWindowsDesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"imageType": "gallery",
"enableSingleSignOn": true,
"onPremisesConnectionId": null,
"cloudPcNamingTemplate": null,
"provisioningType": "dedicated",
"managedBy": "windows365",
"domainJoinConfiguration": {
"type": "azureADJoin",
"regionName": "southeastasia",
"onPremisesConnectionId": null,
"regionGroup": "asia"
},
"domainJoinConfigurations": [
{
"type": "azureADJoin",
"regionName": "southeastasia",
"onPremisesConnectionId": null,
"regionGroup": "asia"
}
],
"microsoftManagedDesktop": {
"type": "notManaged",
"profile": ""
},
"windowsSettings": {
"language": "en-US"
}
},
{
"id": "a3122670-fac3-43b0-87f6-ffa8900df5b3",
"displayName": "W365_WEU_AADJ_W11_ENT_4vCPU_16GB_256GB",
"description": "",
"imageId": "MicrosoftWindowsDesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"imageType": "gallery",
"enableSingleSignOn": true,
"onPremisesConnectionId": null,
"cloudPcNamingTemplate": null,
"provisioningType": "dedicated",
"managedBy": "windows365",
"domainJoinConfiguration": {
"type": "azureADJoin",
"regionName": "westeurope",
"onPremisesConnectionId": null,
"regionGroup": "europeUnion"
},
"domainJoinConfigurations": [
{
"type": "azureADJoin",
"regionName": "westeurope",
"onPremisesConnectionId": null,
"regionGroup": "europeUnion"
}
],
"microsoftManagedDesktop": {
"type": "notManaged",
"profile": ""
},
"windowsSettings": {
"language": "en-US"
}
},
{
"id": "4ab21bc-0059-4a79-a18e-a0e943c4fef9",
"displayName": "W365_CUS_AADJ_W11_ENT_2vCPU_8GB_256GB",
"description": "",
"imageId": "MicrosoftWindowsDesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"imageType": "gallery",
"enableSingleSignOn": true,
"onPremisesConnectionId": null,
"cloudPcNamingTemplate": null,
"provisioningType": "dedicated",
"managedBy": "windows365",
"domainJoinConfiguration": {
"type": "azureADJoin",
"regionName": "centralus",
"onPremisesConnectionId": null,
"regionGroup": "usCentral"
},
"domainJoinConfigurations": [
{
"type": "azureADJoin",
"regionName": "centralus",
"onPremisesConnectionId": null,
"regionGroup": "usCentral"
}
],
"microsoftManagedDesktop": {
"type": "notManaged",
"profile": ""
},
"windowsSettings": {
"language": "en-US"
}
},
{
"id": "dbe2237c-ad06-458c-9eca-220aca3c4e38",
"displayName": "W365_WEU_AADJ_W11_ENT_2vCPU_8GB_256GB",
"description": "",
"imageId": "MicrosoftWindowsDesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"imageType": "gallery",
"enableSingleSignOn": true,
"onPremisesConnectionId": null,
"cloudPcNamingTemplate": null,
"provisioningType": "dedicated",
"managedBy": "windows365",
"domainJoinConfiguration": {
"type": "azureADJoin",
"regionName": "westeurope",
"onPremisesConnectionId": null,
"regionGroup": "europeUnion"
},
"domainJoinConfigurations": [
{
"type": "azureADJoin",
"regionName": "westeurope",
"onPremisesConnectionId": null,
"regionGroup": "europeUnion"
}
],
"microsoftManagedDesktop": {
"type": "notManaged",
"profile": ""
},
"windowsSettings": {
"language": "en-US"
}
},
{
"id": "2c3c249a-3378-4f3c-b972-8f4e207a83d0",
"displayName": "W365_WEU_AADJ_W11_ENT_2vCPU_8GB_256GB-Dynamic365",
"description": "Provisioning policy for Dynmics 365 consultants",
"imageId": "MicrosoftWindowsDesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"imageType": "gallery",
"enableSingleSignOn": false,
"onPremisesConnectionId": "aaaa00aa-a000-0aa0-a000-a00a0a0aa00a",
"cloudPcNamingTemplate": null,
"provisioningType": "dedicated",
"managedBy": "windows365",
"domainJoinConfiguration": {
"type": "azureADJoin",
"regionName": null,
"onPremisesConnectionId": "aaaa00aa-a000-0aa0-a000-a00a0a0aa00a",
"regionGroup": null
},
"domainJoinConfigurations": [
{
"type": "azureADJoin",
"regionName": null,
"onPremisesConnectionId": "aaaa00aa-a000-0aa0-a000-a00a0a0aa00a",
"regionGroup": null
}
],
"microsoftManagedDesktop": {
"type": "notManaged",
"profile": ""
},
"windowsSettings": {
"language": "en-US"
}
}
]
}
Link used to get the current assigment of the policy
https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/2c3c249a-3378-4f3c-b972-8f4e207a83d0?$expand=assignments&$select=*
Return JSON from endpoint:
{
***@***.***": "https://graph.microsoft.com/beta/$metadata#deviceManagement/virtualEndpoint/provisioningPolicies(*,assignments())/$entity",
"id": "2c3c249a-3378-4f3c-b972-8f4e207a83d0",
"displayName": "W365_WEU_AADJ_W11_ENT_2vCPU_8GB_256GB-Dynamic365",
"description": "Provisioning policy for Dynmics 365 consultants",
"imageId": "MicrosoftWindowsDesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 22H2",
"imageType": "gallery",
"enableSingleSignOn": true,
"onPremisesConnectionId": "aaaa00aa-a000-0aa0-a000-a00a0a0aa00a",
"cloudPcNamingTemplate": null,
"provisioningType": "dedicated",
"managedBy": "windows365",
"domainJoinConfiguration": {
"type": "azureADJoin",
"regionName": null,
"onPremisesConnectionId": "aaaa00aa-a000-0aa0-a000-a00a0a0aa00a",
"regionGroup": null
},
"domainJoinConfigurations": [
{
"type": "azureADJoin",
"regionName": null,
"onPremisesConnectionId": "aaaa00aa-a000-0aa0-a000-a00a0a0aa00a",
"regionGroup": null
}
],
"microsoftManagedDesktop": {
"type": "notManaged",
"profile": ""
},
"windowsSettings": {
"language": "en-US"
},
***@***.***": "https://graph.microsoft.com/beta/$metadata#deviceManagement/virtualEndpoint/provisioningPolicies('2c3c249a-3378-4f3c-b972-8f4e207a83d0')/assignments",
"assignments": [
{
"id": "e5621078-839e-4d08-8a52-5482e4fd3721",
"target": {
***@***.***": "#microsoft.graph.cloudPcManagementGroupAssignmentTarget",
"groupId": "e5611078-839e-4d08-8a52-5322e4fd3721",
"servicePlanId": null
}
}
]
}
Add-ViewItem (New-Object PSObject -Property @{
Title = "W365 User Settings"
Id = "W365UserSettings"
API = "/deviceManagement/virtualEndpoint/userSettings"
Permissons=@("CloudPC.Read.All") or ("CloudPC.ReadWrite.All")
})
Link used to get the current assigment of the policy
https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/userSettings
Return JSON from endpoint:
{
***@***.***": "https://graph.microsoft.com/beta/$metadata#deviceManagement/virtualEndpoint/userSettings",
"value": [
{
"id": "30ab88fc-6390-4bca-b6aa-fc0f7b363527",
"displayName": "AAD_S_U_W365_Default_Policy",
"selfServiceEnabled": false,
"localAdminEnabled": false,
"lastModifiedDateTime": "2022-05-16T12:21:02.6358607Z",
"createdDateTime": "2022-05-16T12:21:02.6358607Z",
"restorePointSetting": {
"frequencyInHours": 4,
"userRestoreEnabled": true
}
}
]
}
Link used to get the current assigment of the policy
https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/userSettings/30ab88fc-6390-4bca-b6aa-fc0f7b363527?$expand=assignments
Return JSON from endpoint:
{
***@***.***": "https://graph.microsoft.com/beta/$metadata#deviceManagement/virtualEndpoint/userSettings(assignments())/$entity",
"id": "30ab88fc-6390-4bca-b6aa-fc0f7b363527",
"displayName": "AAD_S_U_W365_Default_Policy",
"selfServiceEnabled": false,
"localAdminEnabled": false,
"lastModifiedDateTime": "2022-05-16T12:21:02.6358607Z",
"createdDateTime": "2022-05-16T12:21:02.6358607Z",
"restorePointSetting": {
"frequencyInHours": 4,
"userRestoreEnabled": true
},
***@***.***": "https://graph.microsoft.com/beta/$metadata#deviceManagement/virtualEndpoint/userSettings('30ab88fc-6390-4bca-b6aa-fc0f7b363527')/assignments",
"assignments": [
{
"id": "8674aa0d-ec57-45be-80d6-c788d7c6105a",
"createdDateTime": "2022-11-09T13:55:37.1355386Z",
"target": {
***@***.***": "#microsoft.graph.cloudPcManagementGroupAssignmentTarget",
"groupId": "8674aa0d-ec57-45be-80d6-c788d7c6105a",
"servicePlanId": null
}
},
{
"id": "e5711078-839e-4d08-8a52-5482e4fd3721",
"createdDateTime": "2022-08-26T11:01:14.4750954Z",
"target": {
***@***.***": "#microsoft.graph.cloudPcManagementGroupAssignmentTarget",
"groupId": "e5711078-839e-4d08-8a52-5482e4fd3721",
"servicePlanId": null
}
},
{
"id": "c0ea8ae1-fbb7-408d-acd6-78eae4c7f76c",
"createdDateTime": "2022-08-17T13:06:48.9243117Z",
"target": {
***@***.***": "#microsoft.graph.cloudPcManagementGroupAssignmentTarget",
"groupId": "c0ea8ae1-fbb7-408d-acd6-78eae4c7f76c",
"servicePlanId": null
}
},
{
"id": "ea762258-9028-42c8-9368-76564e3be46a",
"createdDateTime": "2022-08-17T13:06:48.9237494Z",
"target": {
***@***.***": "#microsoft.graph.cloudPcManagementGroupAssignmentTarget",
"groupId": "ea762258-9028-42c8-9368-76564e3be46a",
"servicePlanId": null
}
},
{
"id": "c758fe0f-f7b8-496c-b364-5d98f86d71b5",
"createdDateTime": "2022-06-20T19:44:47.8071051Z",
"target": {
***@***.***": "#microsoft.graph.cloudPcManagementGroupAssignmentTarget",
"groupId": "c758fe0f-f7b8-496c-b364-5d98f86d71b5",
"servicePlanId": null
}
}
]
}
|
Hello! Thank you for the kind words. I'll try to add this so you can test. Add support for export is normally the easy part. It's the import that can be tricky. I'll see if I can do this soon. I have a bunch of things to fix once I get dome time to work on this. Cheers! |
Okay great to know, i will try and see if i can find out of doing the import from the export i have done and get back to you with my findings
…On Wed, Apr 12, 2023 at 14:55, Mikael Karlsson ***@***.***> wrote:
Hello!
Thank you for the kind words.
I'll try to add this so you can test. Add support for export is normally the easy part. It's the import that can be tricky.
I'll see if I can do this soon. I have a bunch of things to fix once I get dome time to work on this.
Cheers!
—
Reply to this email directly, [view it on GitHub](#125 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABU7DYFFJHMXTA3N4EQYCWTXA2Q5NANCNFSM6AAAAAAWAT3HDQ).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
so did some test yesterday and was able to succesfully import the policy and user assigment for following endpoint (deviceManagement/virtualEndpoint/userSettings), the json file i used to restore contained the assignments as well, so it first restore the policy and then the asssigment, i will try and do the same for the (deviceManagement/virtualEndpoint/provisioningPolicies) endpoint and get back to you `$W365UserSettings = Get-Content -LiteralPath "C:\temp\W365_USER_SETTINGS_BACKUP_TEST.json" -Raw | ConvertFrom-Json $UserAssigmentBody = @{ Invoke-MgGraphRequest -Method POST -Body |
Seem like same code can be used for the (deviceManagement/virtualEndpoint/provisioningPolicies) endpoint, was able to succesfully import both policy and assignmets `$W365ProvisioningProfile = Get-Content -LiteralPath "C:\temp\W365_PROVISIONG_PROFILE_BACKUP_TEST.json" -Raw | ConvertFrom-Json $UserAssigmentBody = @{ Invoke-MgGraphRequest -Method POST -Body |
Can you try this version. Export should work but not sure about import. Some policies has extra properties to remove before import. Cheers! |
Hi Mikael
Sorry for the delay, i have test now and import and export works without any issue :)
Sent from Proton Mail for iOS
…On Wed, Apr 19, 2023 at 15:27, Mikael Karlsson ***@***.***> wrote:
Can you try this version. Export should work but not sure about import. Some policies has extra properties to remove before import.
Cheers!
[EndpointManager.zip](https://github.com/Micke-K/IntuneManagement/files/11273577/EndpointManager.zip)
—
Reply to this email directly, [view it on GitHub](#125 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABU7DYBHOLEADEKLXMC543DXB7R5RANCNFSM6AAAAAAWAT3HDQ).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hello! |
You bet you can thanks for the new feature
Sent from Proton Mail for iOS
…On Wed, Jun 7, 2023 at 11:54, Mikael Karlsson ***@***.***(mailto:On Wed, Jun 7, 2023 at 11:54, Mikael Karlsson <<a href=)> wrote:
Hello!
Can I close this issue?
Cheers!
—
Reply to this email directly, [view it on GitHub](#125 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABU7DYAVUBCRKBDUU7MUKF3XKBFVPANCNFSM6AAAAAAWAT3HDQ).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thank you! |
Hi
would it possible to get the cloudPC settings added/backup as well
from following 2 endpoints
/deviceManagement/virtualEndpoint/provisioningPolicies
deviceManagement/virtualEndpoint/userSettings
fantastisk work by the way
The text was updated successfully, but these errors were encountered: