// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta device-management virtual-endpoint cloud-pcs rename post --cloud-pcid {cloudPC-id} --body '{\
displayName: "Cloud PC-HR"\
}\
'
POST https://graph.microsoft.com/beta/me/cloudPCs/36bd4942-0ca8-11ed-861d-0242ac120002/rename
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Me.CloudPCs["{cloudPC-id}"].Rename.PostAsync(null);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.me().cloudPCs().byCloudPCId("{cloudPC-id}").rename().post(null);
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->me()->cloudPCs()->byCloudPCId('cloudPC-id')->rename()->post()->wait();