Indica que tipos de contas podem ser usadas em um PC compartilhado. Os valores possíveis são: guest, domain.
allowLocalStorage
Boolean
Especifica se o armazenamento local é permitido em um PC compartilhado.
disableAccountManager
Boolean
Desabilita o gerente de contas para o modo de PC compartilhado.
disableEduPolicies
Boolean
Especifica se as políticas padrão de ambiente de educação do PC compartilhado devem ser desabilitadas. Para o Windows 10 RS2 e posterior, essa política será aplicada sem configurar Enabled como true.
disablePowerPolicies
Boolean
Especifica se as políticas padrão de energia do PC compartilhado devem ser desabilitadas.
disableSignInOnResume
Boolean
Desabilita o requisito de entrar sempre que o dispositivo sai do modo de suspensão.
enabled
Boolean
Habilita o modo de PC compartilhado e aplica as políticas de PC compartilhadas.
idleTimeBeforeSleepInSeconds
Int32
Especifica o tempo em segundos que um dispositivo deve ficar ocioso antes de o PC entrar em suspensão. Definir esse valor como 0 impede que o tempo limite de suspensão ocorra.
kioskAppDisplayName
String
Especifica o texto de exibição para a conta mostrada na tela de entrada que inicializa o aplicativo especificado por SetKioskAppUserModelId. Aplicável somente quando KioskAppUserModelId está definido.
kioskAppUserModelId
String
Especifica a ID do modelo de usuário do aplicativo para uso com acesso atribuído.
maintenanceStartTime
TimeOfDay
Especifica o horário de início diário da hora de manutenção.
Resposta
Se tiver êxito, este método retornará o código de resposta 200 OK e um objeto sharedPCConfiguration atualizado no corpo da resposta.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SharedPCConfiguration
{
OdataType = "#microsoft.graph.sharedPCConfiguration",
Description = "Description value",
DisplayName = "Display Name value",
Version = 7,
AccountManagerPolicy = new SharedPCAccountManagerPolicy
{
OdataType = "microsoft.graph.sharedPCAccountManagerPolicy",
AccountDeletionPolicy = SharedPCAccountDeletionPolicyType.DiskSpaceThreshold,
CacheAccountsAboveDiskFreePercentage = 4,
InactiveThresholdDays = 5,
RemoveAccountsBelowDiskFreePercentage = 5,
},
AllowedAccounts = SharedPCAllowedAccountType.Domain,
AllowLocalStorage = true,
DisableAccountManager = true,
DisableEduPolicies = true,
DisablePowerPolicies = true,
DisableSignInOnResume = true,
Enabled = true,
IdleTimeBeforeSleepInSeconds = 12,
KioskAppDisplayName = "Kiosk App Display Name value",
KioskAppUserModelId = "Kiosk App User Model Id value",
MaintenanceStartTime = new Time(DateTime.Parse("11:59:24.7240000")),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceConfigurations["{deviceConfiguration-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SharedPCConfiguration deviceConfiguration = new SharedPCConfiguration();
deviceConfiguration.setOdataType("#microsoft.graph.sharedPCConfiguration");
deviceConfiguration.setDescription("Description value");
deviceConfiguration.setDisplayName("Display Name value");
deviceConfiguration.setVersion(7);
SharedPCAccountManagerPolicy accountManagerPolicy = new SharedPCAccountManagerPolicy();
accountManagerPolicy.setOdataType("microsoft.graph.sharedPCAccountManagerPolicy");
accountManagerPolicy.setAccountDeletionPolicy(SharedPCAccountDeletionPolicyType.DiskSpaceThreshold);
accountManagerPolicy.setCacheAccountsAboveDiskFreePercentage(4);
accountManagerPolicy.setInactiveThresholdDays(5);
accountManagerPolicy.setRemoveAccountsBelowDiskFreePercentage(5);
deviceConfiguration.setAccountManagerPolicy(accountManagerPolicy);
deviceConfiguration.setAllowedAccounts(EnumSet.of(SharedPCAllowedAccountType.Domain));
deviceConfiguration.setAllowLocalStorage(true);
deviceConfiguration.setDisableAccountManager(true);
deviceConfiguration.setDisableEduPolicies(true);
deviceConfiguration.setDisablePowerPolicies(true);
deviceConfiguration.setDisableSignInOnResume(true);
deviceConfiguration.setEnabled(true);
deviceConfiguration.setIdleTimeBeforeSleepInSeconds(12);
deviceConfiguration.setKioskAppDisplayName("Kiosk App Display Name value");
deviceConfiguration.setKioskAppUserModelId("Kiosk App User Model Id value");
LocalTime maintenanceStartTime = LocalTime.parse("11:59:24.7240000");
deviceConfiguration.setMaintenanceStartTime(maintenanceStartTime);
DeviceConfiguration result = graphClient.deviceManagement().deviceConfigurations().byDeviceConfigurationId("{deviceConfiguration-id}").patch(deviceConfiguration);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SharedPCConfiguration;
use Microsoft\Graph\Generated\Models\SharedPCAccountManagerPolicy;
use Microsoft\Graph\Generated\Models\SharedPCAccountDeletionPolicyType;
use Microsoft\Graph\Generated\Models\SharedPCAllowedAccountType;
use Microsoft\Kiota\Abstractions\Types\Time;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SharedPCConfiguration();
$requestBody->setOdataType('#microsoft.graph.sharedPCConfiguration');
$requestBody->setDescription('Description value');
$requestBody->setDisplayName('Display Name value');
$requestBody->setVersion(7);
$accountManagerPolicy = new SharedPCAccountManagerPolicy();
$accountManagerPolicy->setOdataType('microsoft.graph.sharedPCAccountManagerPolicy');
$accountManagerPolicy->setAccountDeletionPolicy(new SharedPCAccountDeletionPolicyType('diskSpaceThreshold'));
$accountManagerPolicy->setCacheAccountsAboveDiskFreePercentage(4);
$accountManagerPolicy->setInactiveThresholdDays(5);
$accountManagerPolicy->setRemoveAccountsBelowDiskFreePercentage(5);
$requestBody->setAccountManagerPolicy($accountManagerPolicy);
$requestBody->setAllowedAccounts(new SharedPCAllowedAccountType('domain'));
$requestBody->setAllowLocalStorage(true);
$requestBody->setDisableAccountManager(true);
$requestBody->setDisableEduPolicies(true);
$requestBody->setDisablePowerPolicies(true);
$requestBody->setDisableSignInOnResume(true);
$requestBody->setEnabled(true);
$requestBody->setIdleTimeBeforeSleepInSeconds(12);
$requestBody->setKioskAppDisplayName('Kiosk App Display Name value');
$requestBody->setKioskAppUserModelId('Kiosk App User Model Id value');
$requestBody->setMaintenanceStartTime(new Time('11:59:24.7240000'));
$result = $graphServiceClient->deviceManagement()->deviceConfigurations()->byDeviceConfigurationId('deviceConfiguration-id')->patch($requestBody)->wait();
Veja a seguir um exemplo da resposta. Observação: o objeto response mostrado aqui pode estar truncado por motivos de concisão. Todas as propriedades serão retornadas de uma chamada real.