Closed AshleyYangSZ closed 2 years ago
Thanks for bringing this to our attention.
Unfortunately, Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult
is defined as a valid API path in the CSDL metadata, our single source of truth. Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult
already exists and is mapped to the right API, i.e.,
Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult
-> /deviceManagement/deviceCustomAttributeShellScripts/{deviceCustomAttributeShellScript-id}/userRunStates/{deviceManagementScriptUserState-id}/deviceRunStates/{deviceManagementScriptDeviceState-id}/managedDevice/getCloudPcRemoteActionResults
.Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult
-> /deviceManagement/managedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
..../deviceCustomAttributeShellScripts/{id}/userRunStates/{id}/deviceRunStates
.../deviceCustomAttributeShellScripts/{id}/userRunStates/{id}/deviceRunStates/managedDevice
.../deviceCustomAttributeShellScripts/{id}/userRunStates/{id}/deviceRunStates/managedDevice/getCloudPcRemoteActionResults
The workload owner should provide a fix by removing the ContainsTarget="true"
from deviceRunStates
navigation properties on deviceManagementScriptUserState
entity. Alternatively, we can apply an XSLT transform to remove the ContainsTarget="true"
as a temporary fix.
Hi @peombwa Thanks for you explanation, since I'm not the owner of the two metadata, could we move forward with the second option? _Alternatively, we can apply an XSLT transform to remove the ContainsTarget="true" as a temporary fix firstly?
@AshleyYangSZ. Awesome! I'll remove them.
We should also remove the following unsupported paths/commands:
Only the commands highlighted in yellow are supported.
Related to https://github.com/microsoftgraph/msgraph-sdk-powershell/pull/1221#issuecomment-1130019432.
The workload has already fixed the issue in the metadata:
➜ Find-MgGraphCommand -Command .*-Mg.*RemoteActionResult
Command Module URI
------- ------ ---
Get-MgDeviceManagementComanagedDeviceCloudPcRemoteActionResult DeviceManagement.Functions /deviceManagement/comanagedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult DeviceManagement.Functions /deviceManagement/managedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
Get-MgUserManagedDeviceCloudPcRemoteActionResult Users.Functions /users/{user-id}/managedDevices/{managedDevice-id}/getCloudPcRemoteActionResults
➜ Find-MgGraphCommand -Command .*-MgBulkReprovision.*
Command Module URI
------- ------ ---
Invoke-MgBulkReprovisionDeviceManagementComanagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/comanagedDevices/bulkReprovisionCloudPc
Invoke-MgBulkReprovisionDeviceManagementManagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/managedDevices/bulkReprovisionCloudPc
Invoke-MgBulkReprovisionUserManagedDeviceCloudPc Users.Actions /users/{user-id}/managedDevices/bulkReprovisionCloudPc
➜ Find-MgGraphCommand -Command .*-MgBulkRestore.*
Command Module URI
------- ------ ---
Invoke-MgBulkRestoreDeviceManagementComanagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/comanagedDevices/bulkRestoreCloudPc
Invoke-MgBulkRestoreDeviceManagementManagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/managedDevices/bulkRestoreCloudPc
Invoke-MgBulkRestoreUserManagedDeviceCloudPc Users.Actions /users/{user-id}/managedDevices/bulkRestoreCloudPc
➜ Find-MgGraphCommand -Command .*-MgReprovision.*
Command Module URI
------- ------ ---
Invoke-MgReprovisionDeviceManagementComanagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/comanagedDevices/{managedDevice-id}/reprovisionCloudPc
Invoke-MgReprovisionDeviceManagementManagedDeviceCloudPc DeviceManagement.Actions /deviceManagement/managedDevices/{managedDevice-id}/reprovisionCloudPc
Invoke-MgReprovisionUserManagedDeviceCloudPc Users.Actions /users/{user-id}/managedDevices/{managedDevice-id}/reprovisionCloudPc
The refreshed commands will be available as part of https://github.com/microsoftgraph/msgraph-sdk-powershell/pull/1330.
Issue found by this https://twitter.com/alexandair/status/1504088670718017537?t=Ze2i48cMhOHxyn202NCjjA&s=19 And the link to the doc: https://docs.microsoft.com/en-us/powershell/module/microsoft.graph.devicemanagement.functions/get-mgdevicemanagementdevicecustomattributeshellscriptuserrunstatedevicerunstatemanageddevicecloudpcremoteactionresult?view=graph-powershell-beta
Get-MgDeviceManagementDeviceCustomAttributeShellScriptUserRunStateDeviceRunStateManagedDeviceCloudPcRemoteActionResult
This should be
Get-MgDeviceManagementManagedDeviceCloudPcRemoteActionResult