PATCH https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations/{deviceConfigurationId}
Content-type: application/json
Content-length: 9822
{
"@odata.type": "#microsoft.graph.windows10GeneralConfiguration",
"description": "Description value",
"displayName": "Display Name value",
"version": 7,
"enterpriseCloudPrintDiscoveryEndPoint": "Enterprise Cloud Print Discovery End Point value",
"enterpriseCloudPrintOAuthAuthority": "Enterprise Cloud Print OAuth Authority value",
"enterpriseCloudPrintOAuthClientIdentifier": "Enterprise Cloud Print OAuth Client Identifier value",
"enterpriseCloudPrintResourceIdentifier": "Enterprise Cloud Print Resource Identifier value",
"enterpriseCloudPrintDiscoveryMaxLimit": 5,
"enterpriseCloudPrintMopriaDiscoveryResourceIdentifier": "Enterprise Cloud Print Mopria Discovery Resource Identifier value",
"searchBlockDiacritics": true,
"searchDisableAutoLanguageDetection": true,
"searchDisableIndexingEncryptedItems": true,
"searchEnableRemoteQueries": true,
"searchDisableIndexerBackoff": true,
"searchDisableIndexingRemovableDrive": true,
"searchEnableAutomaticIndexSizeManangement": true,
"diagnosticsDataSubmissionMode": "none",
"oneDriveDisableFileSync": true,
"smartScreenEnableAppInstallControl": true,
"personalizationDesktopImageUrl": "https://example.com/personalizationDesktopImageUrl/",
"personalizationLockScreenImageUrl": "https://example.com/personalizationLockScreenImageUrl/",
"bluetoothAllowedServices": [
"Bluetooth Allowed Services value"
],
"bluetoothBlockAdvertising": true,
"bluetoothBlockDiscoverableMode": true,
"bluetoothBlockPrePairing": true,
"edgeBlockAutofill": true,
"edgeBlocked": true,
"edgeCookiePolicy": "allow",
"edgeBlockDeveloperTools": true,
"edgeBlockSendingDoNotTrackHeader": true,
"edgeBlockExtensions": true,
"edgeBlockInPrivateBrowsing": true,
"edgeBlockJavaScript": true,
"edgeBlockPasswordManager": true,
"edgeBlockAddressBarDropdown": true,
"edgeBlockCompatibilityList": true,
"edgeClearBrowsingDataOnExit": true,
"edgeAllowStartPagesModification": true,
"edgeDisableFirstRunPage": true,
"edgeBlockLiveTileDataCollection": true,
"edgeSyncFavoritesWithInternetExplorer": true,
"cellularBlockDataWhenRoaming": true,
"cellularBlockVpn": true,
"cellularBlockVpnWhenRoaming": true,
"defenderRequireRealTimeMonitoring": true,
"defenderRequireBehaviorMonitoring": true,
"defenderRequireNetworkInspectionSystem": true,
"defenderScanDownloads": true,
"defenderScanScriptsLoadedInInternetExplorer": true,
"defenderBlockEndUserAccess": true,
"defenderSignatureUpdateIntervalInHours": 6,
"defenderMonitorFileActivity": "disable",
"defenderDaysBeforeDeletingQuarantinedMalware": 12,
"defenderScanMaxCpu": 2,
"defenderScanArchiveFiles": true,
"defenderScanIncomingMail": true,
"defenderScanRemovableDrivesDuringFullScan": true,
"defenderScanMappedNetworkDrivesDuringFullScan": true,
"defenderScanNetworkFiles": true,
"defenderRequireCloudProtection": true,
"defenderCloudBlockLevel": "high",
"defenderPromptForSampleSubmission": "alwaysPrompt",
"defenderScheduledQuickScanTime": "11:58:49.3840000",
"defenderScanType": "disabled",
"defenderSystemScanSchedule": "everyday",
"defenderScheduledScanTime": "11:59:10.9990000",
"defenderDetectedMalwareActions": {
"@odata.type": "microsoft.graph.defenderDetectedMalwareActions",
"lowSeverity": "clean",
"moderateSeverity": "clean",
"highSeverity": "clean",
"severeSeverity": "clean"
},
"defenderFileExtensionsToExclude": [
"Defender File Extensions To Exclude value"
],
"defenderFilesAndFoldersToExclude": [
"Defender Files And Folders To Exclude value"
],
"defenderProcessesToExclude": [
"Defender Processes To Exclude value"
],
"lockScreenAllowTimeoutConfiguration": true,
"lockScreenBlockActionCenterNotifications": true,
"lockScreenBlockCortana": true,
"lockScreenBlockToastNotifications": true,
"lockScreenTimeoutInSeconds": 10,
"passwordBlockSimple": true,
"passwordExpirationDays": 6,
"passwordMinimumLength": 5,
"passwordMinutesOfInactivityBeforeScreenTimeout": 14,
"passwordMinimumCharacterSetCount": 0,
"passwordPreviousPasswordBlockCount": 2,
"passwordRequired": true,
"passwordRequireWhenResumeFromIdleState": true,
"passwordRequiredType": "alphanumeric",
"passwordSignInFailureCountBeforeFactoryReset": 12,
"privacyAdvertisingId": "blocked",
"privacyAutoAcceptPairingAndConsentPrompts": true,
"privacyBlockInputPersonalization": true,
"startBlockUnpinningAppsFromTaskbar": true,
"startMenuAppListVisibility": "collapse",
"startMenuHideChangeAccountSettings": true,
"startMenuHideFrequentlyUsedApps": true,
"startMenuHideHibernate": true,
"startMenuHideLock": true,
"startMenuHidePowerButton": true,
"startMenuHideRecentJumpLists": true,
"startMenuHideRecentlyAddedApps": true,
"startMenuHideRestartOptions": true,
"startMenuHideShutDown": true,
"startMenuHideSignOut": true,
"startMenuHideSleep": true,
"startMenuHideSwitchAccount": true,
"startMenuHideUserTile": true,
"startMenuLayoutEdgeAssetsXml": "c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA==",
"startMenuLayoutXml": "c3RhcnRNZW51TGF5b3V0WG1s",
"startMenuMode": "fullScreen",
"startMenuPinnedFolderDocuments": "hide",
"startMenuPinnedFolderDownloads": "hide",
"startMenuPinnedFolderFileExplorer": "hide",
"startMenuPinnedFolderHomeGroup": "hide",
"startMenuPinnedFolderMusic": "hide",
"startMenuPinnedFolderNetwork": "hide",
"startMenuPinnedFolderPersonalFolder": "hide",
"startMenuPinnedFolderPictures": "hide",
"startMenuPinnedFolderSettings": "hide",
"startMenuPinnedFolderVideos": "hide",
"settingsBlockSettingsApp": true,
"settingsBlockSystemPage": true,
"settingsBlockDevicesPage": true,
"settingsBlockNetworkInternetPage": true,
"settingsBlockPersonalizationPage": true,
"settingsBlockAccountsPage": true,
"settingsBlockTimeLanguagePage": true,
"settingsBlockEaseOfAccessPage": true,
"settingsBlockPrivacyPage": true,
"settingsBlockUpdateSecurityPage": true,
"settingsBlockAppsPage": true,
"settingsBlockGamingPage": true,
"windowsSpotlightBlockConsumerSpecificFeatures": true,
"windowsSpotlightBlocked": true,
"windowsSpotlightBlockOnActionCenter": true,
"windowsSpotlightBlockTailoredExperiences": true,
"windowsSpotlightBlockThirdPartyNotifications": true,
"windowsSpotlightBlockWelcomeExperience": true,
"windowsSpotlightBlockWindowsTips": true,
"windowsSpotlightConfigureOnLockScreen": "disabled",
"networkProxyApplySettingsDeviceWide": true,
"networkProxyDisableAutoDetect": true,
"networkProxyAutomaticConfigurationUrl": "https://example.com/networkProxyAutomaticConfigurationUrl/",
"networkProxyServer": {
"@odata.type": "microsoft.graph.windows10NetworkProxyServer",
"address": "Address value",
"exceptions": [
"Exceptions value"
],
"useForLocalAddresses": true
},
"accountsBlockAddingNonMicrosoftAccountEmail": true,
"antiTheftModeBlocked": true,
"bluetoothBlocked": true,
"cameraBlocked": true,
"connectedDevicesServiceBlocked": true,
"certificatesBlockManualRootCertificateInstallation": true,
"copyPasteBlocked": true,
"cortanaBlocked": true,
"deviceManagementBlockFactoryResetOnMobile": true,
"deviceManagementBlockManualUnenroll": true,
"safeSearchFilter": "strict",
"edgeBlockPopups": true,
"edgeBlockSearchSuggestions": true,
"edgeBlockSendingIntranetTrafficToInternetExplorer": true,
"edgeSendIntranetTrafficToInternetExplorer": true,
"edgeRequireSmartScreen": true,
"edgeEnterpriseModeSiteListLocation": "Edge Enterprise Mode Site List Location value",
"edgeFirstRunUrl": "https://example.com/edgeFirstRunUrl/",
"edgeSearchEngine": {
"@odata.type": "microsoft.graph.edgeSearchEngineBase"
},
"edgeHomepageUrls": [
"Edge Homepage Urls value"
],
"edgeBlockAccessToAboutFlags": true,
"smartScreenBlockPromptOverride": true,
"smartScreenBlockPromptOverrideForFiles": true,
"webRtcBlockLocalhostIpAddress": true,
"internetSharingBlocked": true,
"settingsBlockAddProvisioningPackage": true,
"settingsBlockRemoveProvisioningPackage": true,
"settingsBlockChangeSystemTime": true,
"settingsBlockEditDeviceName": true,
"settingsBlockChangeRegion": true,
"settingsBlockChangeLanguage": true,
"settingsBlockChangePowerSleep": true,
"locationServicesBlocked": true,
"microsoftAccountBlocked": true,
"microsoftAccountBlockSettingsSync": true,
"nfcBlocked": true,
"resetProtectionModeBlocked": true,
"screenCaptureBlocked": true,
"storageBlockRemovableStorage": true,
"storageRequireMobileDeviceEncryption": true,
"usbBlocked": true,
"voiceRecordingBlocked": true,
"wiFiBlockAutomaticConnectHotspots": true,
"wiFiBlocked": true,
"wiFiBlockManualConfiguration": true,
"wiFiScanInterval": 0,
"wirelessDisplayBlockProjectionToThisDevice": true,
"wirelessDisplayBlockUserInputFromReceiver": true,
"wirelessDisplayRequirePinForPairing": true,
"windowsStoreBlocked": true,
"appsAllowTrustedAppsSideloading": "blocked",
"windowsStoreBlockAutoUpdate": true,
"developerUnlockSetting": "blocked",
"sharedUserAppDataAllowed": true,
"appsBlockWindowsStoreOriginatedApps": true,
"windowsStoreEnablePrivateStoreOnly": true,
"storageRestrictAppDataToSystemVolume": true,
"storageRestrictAppInstallToSystemVolume": true,
"gameDvrBlocked": true,
"experienceBlockDeviceDiscovery": true,
"experienceBlockErrorDialogWhenNoSIM": true,
"experienceBlockTaskSwitcher": true,
"logonBlockFastUserSwitching": true,
"tenantLockdownRequireNetworkDuringOutOfBoxExperience": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Windows10GeneralConfiguration
{
OdataType = "#microsoft.graph.windows10GeneralConfiguration",
Description = "Description value",
DisplayName = "Display Name value",
Version = 7,
EnterpriseCloudPrintDiscoveryEndPoint = "Enterprise Cloud Print Discovery End Point value",
EnterpriseCloudPrintOAuthAuthority = "Enterprise Cloud Print OAuth Authority value",
EnterpriseCloudPrintOAuthClientIdentifier = "Enterprise Cloud Print OAuth Client Identifier value",
EnterpriseCloudPrintResourceIdentifier = "Enterprise Cloud Print Resource Identifier value",
EnterpriseCloudPrintDiscoveryMaxLimit = 5,
EnterpriseCloudPrintMopriaDiscoveryResourceIdentifier = "Enterprise Cloud Print Mopria Discovery Resource Identifier value",
SearchBlockDiacritics = true,
SearchDisableAutoLanguageDetection = true,
SearchDisableIndexingEncryptedItems = true,
SearchEnableRemoteQueries = true,
SearchDisableIndexerBackoff = true,
SearchDisableIndexingRemovableDrive = true,
SearchEnableAutomaticIndexSizeManangement = true,
DiagnosticsDataSubmissionMode = DiagnosticDataSubmissionMode.None,
OneDriveDisableFileSync = true,
SmartScreenEnableAppInstallControl = true,
PersonalizationDesktopImageUrl = "https://example.com/personalizationDesktopImageUrl/",
PersonalizationLockScreenImageUrl = "https://example.com/personalizationLockScreenImageUrl/",
BluetoothAllowedServices = new List<string>
{
"Bluetooth Allowed Services value",
},
BluetoothBlockAdvertising = true,
BluetoothBlockDiscoverableMode = true,
BluetoothBlockPrePairing = true,
EdgeBlockAutofill = true,
EdgeBlocked = true,
EdgeCookiePolicy = EdgeCookiePolicy.Allow,
EdgeBlockDeveloperTools = true,
EdgeBlockSendingDoNotTrackHeader = true,
EdgeBlockExtensions = true,
EdgeBlockInPrivateBrowsing = true,
EdgeBlockJavaScript = true,
EdgeBlockPasswordManager = true,
EdgeBlockAddressBarDropdown = true,
EdgeBlockCompatibilityList = true,
EdgeClearBrowsingDataOnExit = true,
EdgeAllowStartPagesModification = true,
EdgeDisableFirstRunPage = true,
EdgeBlockLiveTileDataCollection = true,
EdgeSyncFavoritesWithInternetExplorer = true,
CellularBlockDataWhenRoaming = true,
CellularBlockVpn = true,
CellularBlockVpnWhenRoaming = true,
DefenderRequireRealTimeMonitoring = true,
DefenderRequireBehaviorMonitoring = true,
DefenderRequireNetworkInspectionSystem = true,
DefenderScanDownloads = true,
DefenderScanScriptsLoadedInInternetExplorer = true,
DefenderBlockEndUserAccess = true,
DefenderSignatureUpdateIntervalInHours = 6,
DefenderMonitorFileActivity = DefenderMonitorFileActivity.Disable,
DefenderDaysBeforeDeletingQuarantinedMalware = 12,
DefenderScanMaxCpu = 2,
DefenderScanArchiveFiles = true,
DefenderScanIncomingMail = true,
DefenderScanRemovableDrivesDuringFullScan = true,
DefenderScanMappedNetworkDrivesDuringFullScan = true,
DefenderScanNetworkFiles = true,
DefenderRequireCloudProtection = true,
DefenderCloudBlockLevel = DefenderCloudBlockLevelType.High,
DefenderPromptForSampleSubmission = DefenderPromptForSampleSubmission.AlwaysPrompt,
DefenderScheduledQuickScanTime = new Time(DateTime.Parse("11:58:49.3840000")),
DefenderScanType = DefenderScanType.Disabled,
DefenderSystemScanSchedule = WeeklySchedule.Everyday,
DefenderScheduledScanTime = new Time(DateTime.Parse("11:59:10.9990000")),
DefenderDetectedMalwareActions = new DefenderDetectedMalwareActions
{
OdataType = "microsoft.graph.defenderDetectedMalwareActions",
LowSeverity = DefenderThreatAction.Clean,
ModerateSeverity = DefenderThreatAction.Clean,
HighSeverity = DefenderThreatAction.Clean,
SevereSeverity = DefenderThreatAction.Clean,
},
DefenderFileExtensionsToExclude = new List<string>
{
"Defender File Extensions To Exclude value",
},
DefenderFilesAndFoldersToExclude = new List<string>
{
"Defender Files And Folders To Exclude value",
},
DefenderProcessesToExclude = new List<string>
{
"Defender Processes To Exclude value",
},
LockScreenAllowTimeoutConfiguration = true,
LockScreenBlockActionCenterNotifications = true,
LockScreenBlockCortana = true,
LockScreenBlockToastNotifications = true,
LockScreenTimeoutInSeconds = 10,
PasswordBlockSimple = true,
PasswordExpirationDays = 6,
PasswordMinimumLength = 5,
PasswordMinutesOfInactivityBeforeScreenTimeout = 14,
PasswordMinimumCharacterSetCount = 0,
PasswordPreviousPasswordBlockCount = 2,
PasswordRequired = true,
PasswordRequireWhenResumeFromIdleState = true,
PasswordRequiredType = RequiredPasswordType.Alphanumeric,
PasswordSignInFailureCountBeforeFactoryReset = 12,
PrivacyAdvertisingId = StateManagementSetting.Blocked,
PrivacyAutoAcceptPairingAndConsentPrompts = true,
PrivacyBlockInputPersonalization = true,
StartBlockUnpinningAppsFromTaskbar = true,
StartMenuAppListVisibility = WindowsStartMenuAppListVisibilityType.Collapse,
StartMenuHideChangeAccountSettings = true,
StartMenuHideFrequentlyUsedApps = true,
StartMenuHideHibernate = true,
StartMenuHideLock = true,
StartMenuHidePowerButton = true,
StartMenuHideRecentJumpLists = true,
StartMenuHideRecentlyAddedApps = true,
StartMenuHideRestartOptions = true,
StartMenuHideShutDown = true,
StartMenuHideSignOut = true,
StartMenuHideSleep = true,
StartMenuHideSwitchAccount = true,
StartMenuHideUserTile = true,
StartMenuLayoutEdgeAssetsXml = Convert.FromBase64String("c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA=="),
StartMenuLayoutXml = Convert.FromBase64String("c3RhcnRNZW51TGF5b3V0WG1s"),
StartMenuMode = WindowsStartMenuModeType.FullScreen,
StartMenuPinnedFolderDocuments = VisibilitySetting.Hide,
StartMenuPinnedFolderDownloads = VisibilitySetting.Hide,
StartMenuPinnedFolderFileExplorer = VisibilitySetting.Hide,
StartMenuPinnedFolderHomeGroup = VisibilitySetting.Hide,
StartMenuPinnedFolderMusic = VisibilitySetting.Hide,
StartMenuPinnedFolderNetwork = VisibilitySetting.Hide,
StartMenuPinnedFolderPersonalFolder = VisibilitySetting.Hide,
StartMenuPinnedFolderPictures = VisibilitySetting.Hide,
StartMenuPinnedFolderSettings = VisibilitySetting.Hide,
StartMenuPinnedFolderVideos = VisibilitySetting.Hide,
SettingsBlockSettingsApp = true,
SettingsBlockSystemPage = true,
SettingsBlockDevicesPage = true,
SettingsBlockNetworkInternetPage = true,
SettingsBlockPersonalizationPage = true,
SettingsBlockAccountsPage = true,
SettingsBlockTimeLanguagePage = true,
SettingsBlockEaseOfAccessPage = true,
SettingsBlockPrivacyPage = true,
SettingsBlockUpdateSecurityPage = true,
SettingsBlockAppsPage = true,
SettingsBlockGamingPage = true,
WindowsSpotlightBlockConsumerSpecificFeatures = true,
WindowsSpotlightBlocked = true,
WindowsSpotlightBlockOnActionCenter = true,
WindowsSpotlightBlockTailoredExperiences = true,
WindowsSpotlightBlockThirdPartyNotifications = true,
WindowsSpotlightBlockWelcomeExperience = true,
WindowsSpotlightBlockWindowsTips = true,
WindowsSpotlightConfigureOnLockScreen = WindowsSpotlightEnablementSettings.Disabled,
NetworkProxyApplySettingsDeviceWide = true,
NetworkProxyDisableAutoDetect = true,
NetworkProxyAutomaticConfigurationUrl = "https://example.com/networkProxyAutomaticConfigurationUrl/",
NetworkProxyServer = new Windows10NetworkProxyServer
{
OdataType = "microsoft.graph.windows10NetworkProxyServer",
Address = "Address value",
Exceptions = new List<string>
{
"Exceptions value",
},
UseForLocalAddresses = true,
},
AccountsBlockAddingNonMicrosoftAccountEmail = true,
AntiTheftModeBlocked = true,
BluetoothBlocked = true,
CameraBlocked = true,
ConnectedDevicesServiceBlocked = true,
CertificatesBlockManualRootCertificateInstallation = true,
CopyPasteBlocked = true,
CortanaBlocked = true,
DeviceManagementBlockFactoryResetOnMobile = true,
DeviceManagementBlockManualUnenroll = true,
SafeSearchFilter = SafeSearchFilterType.Strict,
EdgeBlockPopups = true,
EdgeBlockSearchSuggestions = true,
EdgeBlockSendingIntranetTrafficToInternetExplorer = true,
EdgeSendIntranetTrafficToInternetExplorer = true,
EdgeRequireSmartScreen = true,
EdgeEnterpriseModeSiteListLocation = "Edge Enterprise Mode Site List Location value",
EdgeFirstRunUrl = "https://example.com/edgeFirstRunUrl/",
EdgeSearchEngine = new EdgeSearchEngineBase
{
OdataType = "microsoft.graph.edgeSearchEngineBase",
},
EdgeHomepageUrls = new List<string>
{
"Edge Homepage Urls value",
},
EdgeBlockAccessToAboutFlags = true,
SmartScreenBlockPromptOverride = true,
SmartScreenBlockPromptOverrideForFiles = true,
WebRtcBlockLocalhostIpAddress = true,
InternetSharingBlocked = true,
SettingsBlockAddProvisioningPackage = true,
SettingsBlockRemoveProvisioningPackage = true,
SettingsBlockChangeSystemTime = true,
SettingsBlockEditDeviceName = true,
SettingsBlockChangeRegion = true,
SettingsBlockChangeLanguage = true,
SettingsBlockChangePowerSleep = true,
LocationServicesBlocked = true,
MicrosoftAccountBlocked = true,
MicrosoftAccountBlockSettingsSync = true,
NfcBlocked = true,
ResetProtectionModeBlocked = true,
ScreenCaptureBlocked = true,
StorageBlockRemovableStorage = true,
StorageRequireMobileDeviceEncryption = true,
UsbBlocked = true,
VoiceRecordingBlocked = true,
WiFiBlockAutomaticConnectHotspots = true,
WiFiBlocked = true,
WiFiBlockManualConfiguration = true,
WiFiScanInterval = 0,
WirelessDisplayBlockProjectionToThisDevice = true,
WirelessDisplayBlockUserInputFromReceiver = true,
WirelessDisplayRequirePinForPairing = true,
WindowsStoreBlocked = true,
AppsAllowTrustedAppsSideloading = StateManagementSetting.Blocked,
WindowsStoreBlockAutoUpdate = true,
DeveloperUnlockSetting = StateManagementSetting.Blocked,
SharedUserAppDataAllowed = true,
AppsBlockWindowsStoreOriginatedApps = true,
WindowsStoreEnablePrivateStoreOnly = true,
StorageRestrictAppDataToSystemVolume = true,
StorageRestrictAppInstallToSystemVolume = true,
GameDvrBlocked = true,
ExperienceBlockDeviceDiscovery = true,
ExperienceBlockErrorDialogWhenNoSIM = true,
ExperienceBlockTaskSwitcher = true,
LogonBlockFastUserSwitching = true,
TenantLockdownRequireNetworkDuringOutOfBoxExperience = true,
};
// 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);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
mgc device-management device-configurations patch --device-configuration-id {deviceConfiguration-id} --body '{\
"@odata.type": "#microsoft.graph.windows10GeneralConfiguration",\
"description": "Description value",\
"displayName": "Display Name value",\
"version": 7,\
"enterpriseCloudPrintDiscoveryEndPoint": "Enterprise Cloud Print Discovery End Point value",\
"enterpriseCloudPrintOAuthAuthority": "Enterprise Cloud Print OAuth Authority value",\
"enterpriseCloudPrintOAuthClientIdentifier": "Enterprise Cloud Print OAuth Client Identifier value",\
"enterpriseCloudPrintResourceIdentifier": "Enterprise Cloud Print Resource Identifier value",\
"enterpriseCloudPrintDiscoveryMaxLimit": 5,\
"enterpriseCloudPrintMopriaDiscoveryResourceIdentifier": "Enterprise Cloud Print Mopria Discovery Resource Identifier value",\
"searchBlockDiacritics": true,\
"searchDisableAutoLanguageDetection": true,\
"searchDisableIndexingEncryptedItems": true,\
"searchEnableRemoteQueries": true,\
"searchDisableIndexerBackoff": true,\
"searchDisableIndexingRemovableDrive": true,\
"searchEnableAutomaticIndexSizeManangement": true,\
"diagnosticsDataSubmissionMode": "none",\
"oneDriveDisableFileSync": true,\
"smartScreenEnableAppInstallControl": true,\
"personalizationDesktopImageUrl": "https://example.com/personalizationDesktopImageUrl/",\
"personalizationLockScreenImageUrl": "https://example.com/personalizationLockScreenImageUrl/",\
"bluetoothAllowedServices": [\
"Bluetooth Allowed Services value"\
],\
"bluetoothBlockAdvertising": true,\
"bluetoothBlockDiscoverableMode": true,\
"bluetoothBlockPrePairing": true,\
"edgeBlockAutofill": true,\
"edgeBlocked": true,\
"edgeCookiePolicy": "allow",\
"edgeBlockDeveloperTools": true,\
"edgeBlockSendingDoNotTrackHeader": true,\
"edgeBlockExtensions": true,\
"edgeBlockInPrivateBrowsing": true,\
"edgeBlockJavaScript": true,\
"edgeBlockPasswordManager": true,\
"edgeBlockAddressBarDropdown": true,\
"edgeBlockCompatibilityList": true,\
"edgeClearBrowsingDataOnExit": true,\
"edgeAllowStartPagesModification": true,\
"edgeDisableFirstRunPage": true,\
"edgeBlockLiveTileDataCollection": true,\
"edgeSyncFavoritesWithInternetExplorer": true,\
"cellularBlockDataWhenRoaming": true,\
"cellularBlockVpn": true,\
"cellularBlockVpnWhenRoaming": true,\
"defenderRequireRealTimeMonitoring": true,\
"defenderRequireBehaviorMonitoring": true,\
"defenderRequireNetworkInspectionSystem": true,\
"defenderScanDownloads": true,\
"defenderScanScriptsLoadedInInternetExplorer": true,\
"defenderBlockEndUserAccess": true,\
"defenderSignatureUpdateIntervalInHours": 6,\
"defenderMonitorFileActivity": "disable",\
"defenderDaysBeforeDeletingQuarantinedMalware": 12,\
"defenderScanMaxCpu": 2,\
"defenderScanArchiveFiles": true,\
"defenderScanIncomingMail": true,\
"defenderScanRemovableDrivesDuringFullScan": true,\
"defenderScanMappedNetworkDrivesDuringFullScan": true,\
"defenderScanNetworkFiles": true,\
"defenderRequireCloudProtection": true,\
"defenderCloudBlockLevel": "high",\
"defenderPromptForSampleSubmission": "alwaysPrompt",\
"defenderScheduledQuickScanTime": "11:58:49.3840000",\
"defenderScanType": "disabled",\
"defenderSystemScanSchedule": "everyday",\
"defenderScheduledScanTime": "11:59:10.9990000",\
"defenderDetectedMalwareActions": {\
"@odata.type": "microsoft.graph.defenderDetectedMalwareActions",\
"lowSeverity": "clean",\
"moderateSeverity": "clean",\
"highSeverity": "clean",\
"severeSeverity": "clean"\
},\
"defenderFileExtensionsToExclude": [\
"Defender File Extensions To Exclude value"\
],\
"defenderFilesAndFoldersToExclude": [\
"Defender Files And Folders To Exclude value"\
],\
"defenderProcessesToExclude": [\
"Defender Processes To Exclude value"\
],\
"lockScreenAllowTimeoutConfiguration": true,\
"lockScreenBlockActionCenterNotifications": true,\
"lockScreenBlockCortana": true,\
"lockScreenBlockToastNotifications": true,\
"lockScreenTimeoutInSeconds": 10,\
"passwordBlockSimple": true,\
"passwordExpirationDays": 6,\
"passwordMinimumLength": 5,\
"passwordMinutesOfInactivityBeforeScreenTimeout": 14,\
"passwordMinimumCharacterSetCount": 0,\
"passwordPreviousPasswordBlockCount": 2,\
"passwordRequired": true,\
"passwordRequireWhenResumeFromIdleState": true,\
"passwordRequiredType": "alphanumeric",\
"passwordSignInFailureCountBeforeFactoryReset": 12,\
"privacyAdvertisingId": "blocked",\
"privacyAutoAcceptPairingAndConsentPrompts": true,\
"privacyBlockInputPersonalization": true,\
"startBlockUnpinningAppsFromTaskbar": true,\
"startMenuAppListVisibility": "collapse",\
"startMenuHideChangeAccountSettings": true,\
"startMenuHideFrequentlyUsedApps": true,\
"startMenuHideHibernate": true,\
"startMenuHideLock": true,\
"startMenuHidePowerButton": true,\
"startMenuHideRecentJumpLists": true,\
"startMenuHideRecentlyAddedApps": true,\
"startMenuHideRestartOptions": true,\
"startMenuHideShutDown": true,\
"startMenuHideSignOut": true,\
"startMenuHideSleep": true,\
"startMenuHideSwitchAccount": true,\
"startMenuHideUserTile": true,\
"startMenuLayoutEdgeAssetsXml": "c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA==",\
"startMenuLayoutXml": "c3RhcnRNZW51TGF5b3V0WG1s",\
"startMenuMode": "fullScreen",\
"startMenuPinnedFolderDocuments": "hide",\
"startMenuPinnedFolderDownloads": "hide",\
"startMenuPinnedFolderFileExplorer": "hide",\
"startMenuPinnedFolderHomeGroup": "hide",\
"startMenuPinnedFolderMusic": "hide",\
"startMenuPinnedFolderNetwork": "hide",\
"startMenuPinnedFolderPersonalFolder": "hide",\
"startMenuPinnedFolderPictures": "hide",\
"startMenuPinnedFolderSettings": "hide",\
"startMenuPinnedFolderVideos": "hide",\
"settingsBlockSettingsApp": true,\
"settingsBlockSystemPage": true,\
"settingsBlockDevicesPage": true,\
"settingsBlockNetworkInternetPage": true,\
"settingsBlockPersonalizationPage": true,\
"settingsBlockAccountsPage": true,\
"settingsBlockTimeLanguagePage": true,\
"settingsBlockEaseOfAccessPage": true,\
"settingsBlockPrivacyPage": true,\
"settingsBlockUpdateSecurityPage": true,\
"settingsBlockAppsPage": true,\
"settingsBlockGamingPage": true,\
"windowsSpotlightBlockConsumerSpecificFeatures": true,\
"windowsSpotlightBlocked": true,\
"windowsSpotlightBlockOnActionCenter": true,\
"windowsSpotlightBlockTailoredExperiences": true,\
"windowsSpotlightBlockThirdPartyNotifications": true,\
"windowsSpotlightBlockWelcomeExperience": true,\
"windowsSpotlightBlockWindowsTips": true,\
"windowsSpotlightConfigureOnLockScreen": "disabled",\
"networkProxyApplySettingsDeviceWide": true,\
"networkProxyDisableAutoDetect": true,\
"networkProxyAutomaticConfigurationUrl": "https://example.com/networkProxyAutomaticConfigurationUrl/",\
"networkProxyServer": {\
"@odata.type": "microsoft.graph.windows10NetworkProxyServer",\
"address": "Address value",\
"exceptions": [\
"Exceptions value"\
],\
"useForLocalAddresses": true\
},\
"accountsBlockAddingNonMicrosoftAccountEmail": true,\
"antiTheftModeBlocked": true,\
"bluetoothBlocked": true,\
"cameraBlocked": true,\
"connectedDevicesServiceBlocked": true,\
"certificatesBlockManualRootCertificateInstallation": true,\
"copyPasteBlocked": true,\
"cortanaBlocked": true,\
"deviceManagementBlockFactoryResetOnMobile": true,\
"deviceManagementBlockManualUnenroll": true,\
"safeSearchFilter": "strict",\
"edgeBlockPopups": true,\
"edgeBlockSearchSuggestions": true,\
"edgeBlockSendingIntranetTrafficToInternetExplorer": true,\
"edgeSendIntranetTrafficToInternetExplorer": true,\
"edgeRequireSmartScreen": true,\
"edgeEnterpriseModeSiteListLocation": "Edge Enterprise Mode Site List Location value",\
"edgeFirstRunUrl": "https://example.com/edgeFirstRunUrl/",\
"edgeSearchEngine": {\
"@odata.type": "microsoft.graph.edgeSearchEngineBase"\
},\
"edgeHomepageUrls": [\
"Edge Homepage Urls value"\
],\
"edgeBlockAccessToAboutFlags": true,\
"smartScreenBlockPromptOverride": true,\
"smartScreenBlockPromptOverrideForFiles": true,\
"webRtcBlockLocalhostIpAddress": true,\
"internetSharingBlocked": true,\
"settingsBlockAddProvisioningPackage": true,\
"settingsBlockRemoveProvisioningPackage": true,\
"settingsBlockChangeSystemTime": true,\
"settingsBlockEditDeviceName": true,\
"settingsBlockChangeRegion": true,\
"settingsBlockChangeLanguage": true,\
"settingsBlockChangePowerSleep": true,\
"locationServicesBlocked": true,\
"microsoftAccountBlocked": true,\
"microsoftAccountBlockSettingsSync": true,\
"nfcBlocked": true,\
"resetProtectionModeBlocked": true,\
"screenCaptureBlocked": true,\
"storageBlockRemovableStorage": true,\
"storageRequireMobileDeviceEncryption": true,\
"usbBlocked": true,\
"voiceRecordingBlocked": true,\
"wiFiBlockAutomaticConnectHotspots": true,\
"wiFiBlocked": true,\
"wiFiBlockManualConfiguration": true,\
"wiFiScanInterval": 0,\
"wirelessDisplayBlockProjectionToThisDevice": true,\
"wirelessDisplayBlockUserInputFromReceiver": true,\
"wirelessDisplayRequirePinForPairing": true,\
"windowsStoreBlocked": true,\
"appsAllowTrustedAppsSideloading": "blocked",\
"windowsStoreBlockAutoUpdate": true,\
"developerUnlockSetting": "blocked",\
"sharedUserAppDataAllowed": true,\
"appsBlockWindowsStoreOriginatedApps": true,\
"windowsStoreEnablePrivateStoreOnly": true,\
"storageRestrictAppDataToSystemVolume": true,\
"storageRestrictAppInstallToSystemVolume": true,\
"gameDvrBlocked": true,\
"experienceBlockDeviceDiscovery": true,\
"experienceBlockErrorDialogWhenNoSIM": true,\
"experienceBlockTaskSwitcher": true,\
"logonBlockFastUserSwitching": true,\
"tenantLockdownRequireNetworkDuringOutOfBoxExperience": true\
}\
'
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewDeviceConfiguration()
description := "Description value"
requestBody.SetDescription(&description)
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
version := int32(7)
requestBody.SetVersion(&version)
enterpriseCloudPrintDiscoveryEndPoint := "Enterprise Cloud Print Discovery End Point value"
requestBody.SetEnterpriseCloudPrintDiscoveryEndPoint(&enterpriseCloudPrintDiscoveryEndPoint)
enterpriseCloudPrintOAuthAuthority := "Enterprise Cloud Print OAuth Authority value"
requestBody.SetEnterpriseCloudPrintOAuthAuthority(&enterpriseCloudPrintOAuthAuthority)
enterpriseCloudPrintOAuthClientIdentifier := "Enterprise Cloud Print OAuth Client Identifier value"
requestBody.SetEnterpriseCloudPrintOAuthClientIdentifier(&enterpriseCloudPrintOAuthClientIdentifier)
enterpriseCloudPrintResourceIdentifier := "Enterprise Cloud Print Resource Identifier value"
requestBody.SetEnterpriseCloudPrintResourceIdentifier(&enterpriseCloudPrintResourceIdentifier)
enterpriseCloudPrintDiscoveryMaxLimit := int32(5)
requestBody.SetEnterpriseCloudPrintDiscoveryMaxLimit(&enterpriseCloudPrintDiscoveryMaxLimit)
enterpriseCloudPrintMopriaDiscoveryResourceIdentifier := "Enterprise Cloud Print Mopria Discovery Resource Identifier value"
requestBody.SetEnterpriseCloudPrintMopriaDiscoveryResourceIdentifier(&enterpriseCloudPrintMopriaDiscoveryResourceIdentifier)
searchBlockDiacritics := true
requestBody.SetSearchBlockDiacritics(&searchBlockDiacritics)
searchDisableAutoLanguageDetection := true
requestBody.SetSearchDisableAutoLanguageDetection(&searchDisableAutoLanguageDetection)
searchDisableIndexingEncryptedItems := true
requestBody.SetSearchDisableIndexingEncryptedItems(&searchDisableIndexingEncryptedItems)
searchEnableRemoteQueries := true
requestBody.SetSearchEnableRemoteQueries(&searchEnableRemoteQueries)
searchDisableIndexerBackoff := true
requestBody.SetSearchDisableIndexerBackoff(&searchDisableIndexerBackoff)
searchDisableIndexingRemovableDrive := true
requestBody.SetSearchDisableIndexingRemovableDrive(&searchDisableIndexingRemovableDrive)
searchEnableAutomaticIndexSizeManangement := true
requestBody.SetSearchEnableAutomaticIndexSizeManangement(&searchEnableAutomaticIndexSizeManangement)
diagnosticsDataSubmissionMode := graphmodels.NONE_DIAGNOSTICDATASUBMISSIONMODE
requestBody.SetDiagnosticsDataSubmissionMode(&diagnosticsDataSubmissionMode)
oneDriveDisableFileSync := true
requestBody.SetOneDriveDisableFileSync(&oneDriveDisableFileSync)
smartScreenEnableAppInstallControl := true
requestBody.SetSmartScreenEnableAppInstallControl(&smartScreenEnableAppInstallControl)
personalizationDesktopImageUrl := "https://example.com/personalizationDesktopImageUrl/"
requestBody.SetPersonalizationDesktopImageUrl(&personalizationDesktopImageUrl)
personalizationLockScreenImageUrl := "https://example.com/personalizationLockScreenImageUrl/"
requestBody.SetPersonalizationLockScreenImageUrl(&personalizationLockScreenImageUrl)
bluetoothAllowedServices := []string {
"Bluetooth Allowed Services value",
}
requestBody.SetBluetoothAllowedServices(bluetoothAllowedServices)
bluetoothBlockAdvertising := true
requestBody.SetBluetoothBlockAdvertising(&bluetoothBlockAdvertising)
bluetoothBlockDiscoverableMode := true
requestBody.SetBluetoothBlockDiscoverableMode(&bluetoothBlockDiscoverableMode)
bluetoothBlockPrePairing := true
requestBody.SetBluetoothBlockPrePairing(&bluetoothBlockPrePairing)
edgeBlockAutofill := true
requestBody.SetEdgeBlockAutofill(&edgeBlockAutofill)
edgeBlocked := true
requestBody.SetEdgeBlocked(&edgeBlocked)
edgeCookiePolicy := graphmodels.ALLOW_EDGECOOKIEPOLICY
requestBody.SetEdgeCookiePolicy(&edgeCookiePolicy)
edgeBlockDeveloperTools := true
requestBody.SetEdgeBlockDeveloperTools(&edgeBlockDeveloperTools)
edgeBlockSendingDoNotTrackHeader := true
requestBody.SetEdgeBlockSendingDoNotTrackHeader(&edgeBlockSendingDoNotTrackHeader)
edgeBlockExtensions := true
requestBody.SetEdgeBlockExtensions(&edgeBlockExtensions)
edgeBlockInPrivateBrowsing := true
requestBody.SetEdgeBlockInPrivateBrowsing(&edgeBlockInPrivateBrowsing)
edgeBlockJavaScript := true
requestBody.SetEdgeBlockJavaScript(&edgeBlockJavaScript)
edgeBlockPasswordManager := true
requestBody.SetEdgeBlockPasswordManager(&edgeBlockPasswordManager)
edgeBlockAddressBarDropdown := true
requestBody.SetEdgeBlockAddressBarDropdown(&edgeBlockAddressBarDropdown)
edgeBlockCompatibilityList := true
requestBody.SetEdgeBlockCompatibilityList(&edgeBlockCompatibilityList)
edgeClearBrowsingDataOnExit := true
requestBody.SetEdgeClearBrowsingDataOnExit(&edgeClearBrowsingDataOnExit)
edgeAllowStartPagesModification := true
requestBody.SetEdgeAllowStartPagesModification(&edgeAllowStartPagesModification)
edgeDisableFirstRunPage := true
requestBody.SetEdgeDisableFirstRunPage(&edgeDisableFirstRunPage)
edgeBlockLiveTileDataCollection := true
requestBody.SetEdgeBlockLiveTileDataCollection(&edgeBlockLiveTileDataCollection)
edgeSyncFavoritesWithInternetExplorer := true
requestBody.SetEdgeSyncFavoritesWithInternetExplorer(&edgeSyncFavoritesWithInternetExplorer)
cellularBlockDataWhenRoaming := true
requestBody.SetCellularBlockDataWhenRoaming(&cellularBlockDataWhenRoaming)
cellularBlockVpn := true
requestBody.SetCellularBlockVpn(&cellularBlockVpn)
cellularBlockVpnWhenRoaming := true
requestBody.SetCellularBlockVpnWhenRoaming(&cellularBlockVpnWhenRoaming)
defenderRequireRealTimeMonitoring := true
requestBody.SetDefenderRequireRealTimeMonitoring(&defenderRequireRealTimeMonitoring)
defenderRequireBehaviorMonitoring := true
requestBody.SetDefenderRequireBehaviorMonitoring(&defenderRequireBehaviorMonitoring)
defenderRequireNetworkInspectionSystem := true
requestBody.SetDefenderRequireNetworkInspectionSystem(&defenderRequireNetworkInspectionSystem)
defenderScanDownloads := true
requestBody.SetDefenderScanDownloads(&defenderScanDownloads)
defenderScanScriptsLoadedInInternetExplorer := true
requestBody.SetDefenderScanScriptsLoadedInInternetExplorer(&defenderScanScriptsLoadedInInternetExplorer)
defenderBlockEndUserAccess := true
requestBody.SetDefenderBlockEndUserAccess(&defenderBlockEndUserAccess)
defenderSignatureUpdateIntervalInHours := int32(6)
requestBody.SetDefenderSignatureUpdateIntervalInHours(&defenderSignatureUpdateIntervalInHours)
defenderMonitorFileActivity := graphmodels.DISABLE_DEFENDERMONITORFILEACTIVITY
requestBody.SetDefenderMonitorFileActivity(&defenderMonitorFileActivity)
defenderDaysBeforeDeletingQuarantinedMalware := int32(12)
requestBody.SetDefenderDaysBeforeDeletingQuarantinedMalware(&defenderDaysBeforeDeletingQuarantinedMalware)
defenderScanMaxCpu := int32(2)
requestBody.SetDefenderScanMaxCpu(&defenderScanMaxCpu)
defenderScanArchiveFiles := true
requestBody.SetDefenderScanArchiveFiles(&defenderScanArchiveFiles)
defenderScanIncomingMail := true
requestBody.SetDefenderScanIncomingMail(&defenderScanIncomingMail)
defenderScanRemovableDrivesDuringFullScan := true
requestBody.SetDefenderScanRemovableDrivesDuringFullScan(&defenderScanRemovableDrivesDuringFullScan)
defenderScanMappedNetworkDrivesDuringFullScan := true
requestBody.SetDefenderScanMappedNetworkDrivesDuringFullScan(&defenderScanMappedNetworkDrivesDuringFullScan)
defenderScanNetworkFiles := true
requestBody.SetDefenderScanNetworkFiles(&defenderScanNetworkFiles)
defenderRequireCloudProtection := true
requestBody.SetDefenderRequireCloudProtection(&defenderRequireCloudProtection)
defenderCloudBlockLevel := graphmodels.HIGH_DEFENDERCLOUDBLOCKLEVELTYPE
requestBody.SetDefenderCloudBlockLevel(&defenderCloudBlockLevel)
defenderPromptForSampleSubmission := graphmodels.ALWAYSPROMPT_DEFENDERPROMPTFORSAMPLESUBMISSION
requestBody.SetDefenderPromptForSampleSubmission(&defenderPromptForSampleSubmission)
defenderScheduledQuickScanTime := 11:58:49.3840000
requestBody.SetDefenderScheduledQuickScanTime(&defenderScheduledQuickScanTime)
defenderScanType := graphmodels.DISABLED_DEFENDERSCANTYPE
requestBody.SetDefenderScanType(&defenderScanType)
defenderSystemScanSchedule := graphmodels.EVERYDAY_WEEKLYSCHEDULE
requestBody.SetDefenderSystemScanSchedule(&defenderSystemScanSchedule)
defenderScheduledScanTime := 11:59:10.9990000
requestBody.SetDefenderScheduledScanTime(&defenderScheduledScanTime)
defenderDetectedMalwareActions := graphmodels.NewDefenderDetectedMalwareActions()
lowSeverity := graphmodels.CLEAN_DEFENDERTHREATACTION
defenderDetectedMalwareActions.SetLowSeverity(&lowSeverity)
moderateSeverity := graphmodels.CLEAN_DEFENDERTHREATACTION
defenderDetectedMalwareActions.SetModerateSeverity(&moderateSeverity)
highSeverity := graphmodels.CLEAN_DEFENDERTHREATACTION
defenderDetectedMalwareActions.SetHighSeverity(&highSeverity)
severeSeverity := graphmodels.CLEAN_DEFENDERTHREATACTION
defenderDetectedMalwareActions.SetSevereSeverity(&severeSeverity)
requestBody.SetDefenderDetectedMalwareActions(defenderDetectedMalwareActions)
defenderFileExtensionsToExclude := []string {
"Defender File Extensions To Exclude value",
}
requestBody.SetDefenderFileExtensionsToExclude(defenderFileExtensionsToExclude)
defenderFilesAndFoldersToExclude := []string {
"Defender Files And Folders To Exclude value",
}
requestBody.SetDefenderFilesAndFoldersToExclude(defenderFilesAndFoldersToExclude)
defenderProcessesToExclude := []string {
"Defender Processes To Exclude value",
}
requestBody.SetDefenderProcessesToExclude(defenderProcessesToExclude)
lockScreenAllowTimeoutConfiguration := true
requestBody.SetLockScreenAllowTimeoutConfiguration(&lockScreenAllowTimeoutConfiguration)
lockScreenBlockActionCenterNotifications := true
requestBody.SetLockScreenBlockActionCenterNotifications(&lockScreenBlockActionCenterNotifications)
lockScreenBlockCortana := true
requestBody.SetLockScreenBlockCortana(&lockScreenBlockCortana)
lockScreenBlockToastNotifications := true
requestBody.SetLockScreenBlockToastNotifications(&lockScreenBlockToastNotifications)
lockScreenTimeoutInSeconds := int32(10)
requestBody.SetLockScreenTimeoutInSeconds(&lockScreenTimeoutInSeconds)
passwordBlockSimple := true
requestBody.SetPasswordBlockSimple(&passwordBlockSimple)
passwordExpirationDays := int32(6)
requestBody.SetPasswordExpirationDays(&passwordExpirationDays)
passwordMinimumLength := int32(5)
requestBody.SetPasswordMinimumLength(&passwordMinimumLength)
passwordMinutesOfInactivityBeforeScreenTimeout := int32(14)
requestBody.SetPasswordMinutesOfInactivityBeforeScreenTimeout(&passwordMinutesOfInactivityBeforeScreenTimeout)
passwordMinimumCharacterSetCount := int32(0)
requestBody.SetPasswordMinimumCharacterSetCount(&passwordMinimumCharacterSetCount)
passwordPreviousPasswordBlockCount := int32(2)
requestBody.SetPasswordPreviousPasswordBlockCount(&passwordPreviousPasswordBlockCount)
passwordRequired := true
requestBody.SetPasswordRequired(&passwordRequired)
passwordRequireWhenResumeFromIdleState := true
requestBody.SetPasswordRequireWhenResumeFromIdleState(&passwordRequireWhenResumeFromIdleState)
passwordRequiredType := graphmodels.ALPHANUMERIC_REQUIREDPASSWORDTYPE
requestBody.SetPasswordRequiredType(&passwordRequiredType)
passwordSignInFailureCountBeforeFactoryReset := int32(12)
requestBody.SetPasswordSignInFailureCountBeforeFactoryReset(&passwordSignInFailureCountBeforeFactoryReset)
privacyAdvertisingId := graphmodels.BLOCKED_STATEMANAGEMENTSETTING
requestBody.SetPrivacyAdvertisingId(&privacyAdvertisingId)
privacyAutoAcceptPairingAndConsentPrompts := true
requestBody.SetPrivacyAutoAcceptPairingAndConsentPrompts(&privacyAutoAcceptPairingAndConsentPrompts)
privacyBlockInputPersonalization := true
requestBody.SetPrivacyBlockInputPersonalization(&privacyBlockInputPersonalization)
startBlockUnpinningAppsFromTaskbar := true
requestBody.SetStartBlockUnpinningAppsFromTaskbar(&startBlockUnpinningAppsFromTaskbar)
startMenuAppListVisibility := graphmodels.COLLAPSE_WINDOWSSTARTMENUAPPLISTVISIBILITYTYPE
requestBody.SetStartMenuAppListVisibility(&startMenuAppListVisibility)
startMenuHideChangeAccountSettings := true
requestBody.SetStartMenuHideChangeAccountSettings(&startMenuHideChangeAccountSettings)
startMenuHideFrequentlyUsedApps := true
requestBody.SetStartMenuHideFrequentlyUsedApps(&startMenuHideFrequentlyUsedApps)
startMenuHideHibernate := true
requestBody.SetStartMenuHideHibernate(&startMenuHideHibernate)
startMenuHideLock := true
requestBody.SetStartMenuHideLock(&startMenuHideLock)
startMenuHidePowerButton := true
requestBody.SetStartMenuHidePowerButton(&startMenuHidePowerButton)
startMenuHideRecentJumpLists := true
requestBody.SetStartMenuHideRecentJumpLists(&startMenuHideRecentJumpLists)
startMenuHideRecentlyAddedApps := true
requestBody.SetStartMenuHideRecentlyAddedApps(&startMenuHideRecentlyAddedApps)
startMenuHideRestartOptions := true
requestBody.SetStartMenuHideRestartOptions(&startMenuHideRestartOptions)
startMenuHideShutDown := true
requestBody.SetStartMenuHideShutDown(&startMenuHideShutDown)
startMenuHideSignOut := true
requestBody.SetStartMenuHideSignOut(&startMenuHideSignOut)
startMenuHideSleep := true
requestBody.SetStartMenuHideSleep(&startMenuHideSleep)
startMenuHideSwitchAccount := true
requestBody.SetStartMenuHideSwitchAccount(&startMenuHideSwitchAccount)
startMenuHideUserTile := true
requestBody.SetStartMenuHideUserTile(&startMenuHideUserTile)
startMenuLayoutEdgeAssetsXml := []byte("c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA==")
requestBody.SetStartMenuLayoutEdgeAssetsXml(&startMenuLayoutEdgeAssetsXml)
startMenuLayoutXml := []byte("c3RhcnRNZW51TGF5b3V0WG1s")
requestBody.SetStartMenuLayoutXml(&startMenuLayoutXml)
startMenuMode := graphmodels.FULLSCREEN_WINDOWSSTARTMENUMODETYPE
requestBody.SetStartMenuMode(&startMenuMode)
startMenuPinnedFolderDocuments := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderDocuments(&startMenuPinnedFolderDocuments)
startMenuPinnedFolderDownloads := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderDownloads(&startMenuPinnedFolderDownloads)
startMenuPinnedFolderFileExplorer := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderFileExplorer(&startMenuPinnedFolderFileExplorer)
startMenuPinnedFolderHomeGroup := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderHomeGroup(&startMenuPinnedFolderHomeGroup)
startMenuPinnedFolderMusic := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderMusic(&startMenuPinnedFolderMusic)
startMenuPinnedFolderNetwork := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderNetwork(&startMenuPinnedFolderNetwork)
startMenuPinnedFolderPersonalFolder := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderPersonalFolder(&startMenuPinnedFolderPersonalFolder)
startMenuPinnedFolderPictures := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderPictures(&startMenuPinnedFolderPictures)
startMenuPinnedFolderSettings := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderSettings(&startMenuPinnedFolderSettings)
startMenuPinnedFolderVideos := graphmodels.HIDE_VISIBILITYSETTING
requestBody.SetStartMenuPinnedFolderVideos(&startMenuPinnedFolderVideos)
settingsBlockSettingsApp := true
requestBody.SetSettingsBlockSettingsApp(&settingsBlockSettingsApp)
settingsBlockSystemPage := true
requestBody.SetSettingsBlockSystemPage(&settingsBlockSystemPage)
settingsBlockDevicesPage := true
requestBody.SetSettingsBlockDevicesPage(&settingsBlockDevicesPage)
settingsBlockNetworkInternetPage := true
requestBody.SetSettingsBlockNetworkInternetPage(&settingsBlockNetworkInternetPage)
settingsBlockPersonalizationPage := true
requestBody.SetSettingsBlockPersonalizationPage(&settingsBlockPersonalizationPage)
settingsBlockAccountsPage := true
requestBody.SetSettingsBlockAccountsPage(&settingsBlockAccountsPage)
settingsBlockTimeLanguagePage := true
requestBody.SetSettingsBlockTimeLanguagePage(&settingsBlockTimeLanguagePage)
settingsBlockEaseOfAccessPage := true
requestBody.SetSettingsBlockEaseOfAccessPage(&settingsBlockEaseOfAccessPage)
settingsBlockPrivacyPage := true
requestBody.SetSettingsBlockPrivacyPage(&settingsBlockPrivacyPage)
settingsBlockUpdateSecurityPage := true
requestBody.SetSettingsBlockUpdateSecurityPage(&settingsBlockUpdateSecurityPage)
settingsBlockAppsPage := true
requestBody.SetSettingsBlockAppsPage(&settingsBlockAppsPage)
settingsBlockGamingPage := true
requestBody.SetSettingsBlockGamingPage(&settingsBlockGamingPage)
windowsSpotlightBlockConsumerSpecificFeatures := true
requestBody.SetWindowsSpotlightBlockConsumerSpecificFeatures(&windowsSpotlightBlockConsumerSpecificFeatures)
windowsSpotlightBlocked := true
requestBody.SetWindowsSpotlightBlocked(&windowsSpotlightBlocked)
windowsSpotlightBlockOnActionCenter := true
requestBody.SetWindowsSpotlightBlockOnActionCenter(&windowsSpotlightBlockOnActionCenter)
windowsSpotlightBlockTailoredExperiences := true
requestBody.SetWindowsSpotlightBlockTailoredExperiences(&windowsSpotlightBlockTailoredExperiences)
windowsSpotlightBlockThirdPartyNotifications := true
requestBody.SetWindowsSpotlightBlockThirdPartyNotifications(&windowsSpotlightBlockThirdPartyNotifications)
windowsSpotlightBlockWelcomeExperience := true
requestBody.SetWindowsSpotlightBlockWelcomeExperience(&windowsSpotlightBlockWelcomeExperience)
windowsSpotlightBlockWindowsTips := true
requestBody.SetWindowsSpotlightBlockWindowsTips(&windowsSpotlightBlockWindowsTips)
windowsSpotlightConfigureOnLockScreen := graphmodels.DISABLED_WINDOWSSPOTLIGHTENABLEMENTSETTINGS
requestBody.SetWindowsSpotlightConfigureOnLockScreen(&windowsSpotlightConfigureOnLockScreen)
networkProxyApplySettingsDeviceWide := true
requestBody.SetNetworkProxyApplySettingsDeviceWide(&networkProxyApplySettingsDeviceWide)
networkProxyDisableAutoDetect := true
requestBody.SetNetworkProxyDisableAutoDetect(&networkProxyDisableAutoDetect)
networkProxyAutomaticConfigurationUrl := "https://example.com/networkProxyAutomaticConfigurationUrl/"
requestBody.SetNetworkProxyAutomaticConfigurationUrl(&networkProxyAutomaticConfigurationUrl)
networkProxyServer := graphmodels.NewWindows10NetworkProxyServer()
address := "Address value"
networkProxyServer.SetAddress(&address)
exceptions := []string {
"Exceptions value",
}
networkProxyServer.SetExceptions(exceptions)
useForLocalAddresses := true
networkProxyServer.SetUseForLocalAddresses(&useForLocalAddresses)
requestBody.SetNetworkProxyServer(networkProxyServer)
accountsBlockAddingNonMicrosoftAccountEmail := true
requestBody.SetAccountsBlockAddingNonMicrosoftAccountEmail(&accountsBlockAddingNonMicrosoftAccountEmail)
antiTheftModeBlocked := true
requestBody.SetAntiTheftModeBlocked(&antiTheftModeBlocked)
bluetoothBlocked := true
requestBody.SetBluetoothBlocked(&bluetoothBlocked)
cameraBlocked := true
requestBody.SetCameraBlocked(&cameraBlocked)
connectedDevicesServiceBlocked := true
requestBody.SetConnectedDevicesServiceBlocked(&connectedDevicesServiceBlocked)
certificatesBlockManualRootCertificateInstallation := true
requestBody.SetCertificatesBlockManualRootCertificateInstallation(&certificatesBlockManualRootCertificateInstallation)
copyPasteBlocked := true
requestBody.SetCopyPasteBlocked(©PasteBlocked)
cortanaBlocked := true
requestBody.SetCortanaBlocked(&cortanaBlocked)
deviceManagementBlockFactoryResetOnMobile := true
requestBody.SetDeviceManagementBlockFactoryResetOnMobile(&deviceManagementBlockFactoryResetOnMobile)
deviceManagementBlockManualUnenroll := true
requestBody.SetDeviceManagementBlockManualUnenroll(&deviceManagementBlockManualUnenroll)
safeSearchFilter := graphmodels.STRICT_SAFESEARCHFILTERTYPE
requestBody.SetSafeSearchFilter(&safeSearchFilter)
edgeBlockPopups := true
requestBody.SetEdgeBlockPopups(&edgeBlockPopups)
edgeBlockSearchSuggestions := true
requestBody.SetEdgeBlockSearchSuggestions(&edgeBlockSearchSuggestions)
edgeBlockSendingIntranetTrafficToInternetExplorer := true
requestBody.SetEdgeBlockSendingIntranetTrafficToInternetExplorer(&edgeBlockSendingIntranetTrafficToInternetExplorer)
edgeSendIntranetTrafficToInternetExplorer := true
requestBody.SetEdgeSendIntranetTrafficToInternetExplorer(&edgeSendIntranetTrafficToInternetExplorer)
edgeRequireSmartScreen := true
requestBody.SetEdgeRequireSmartScreen(&edgeRequireSmartScreen)
edgeEnterpriseModeSiteListLocation := "Edge Enterprise Mode Site List Location value"
requestBody.SetEdgeEnterpriseModeSiteListLocation(&edgeEnterpriseModeSiteListLocation)
edgeFirstRunUrl := "https://example.com/edgeFirstRunUrl/"
requestBody.SetEdgeFirstRunUrl(&edgeFirstRunUrl)
edgeSearchEngine := graphmodels.NewEdgeSearchEngineBase()
requestBody.SetEdgeSearchEngine(edgeSearchEngine)
edgeHomepageUrls := []string {
"Edge Homepage Urls value",
}
requestBody.SetEdgeHomepageUrls(edgeHomepageUrls)
edgeBlockAccessToAboutFlags := true
requestBody.SetEdgeBlockAccessToAboutFlags(&edgeBlockAccessToAboutFlags)
smartScreenBlockPromptOverride := true
requestBody.SetSmartScreenBlockPromptOverride(&smartScreenBlockPromptOverride)
smartScreenBlockPromptOverrideForFiles := true
requestBody.SetSmartScreenBlockPromptOverrideForFiles(&smartScreenBlockPromptOverrideForFiles)
webRtcBlockLocalhostIpAddress := true
requestBody.SetWebRtcBlockLocalhostIpAddress(&webRtcBlockLocalhostIpAddress)
internetSharingBlocked := true
requestBody.SetInternetSharingBlocked(&internetSharingBlocked)
settingsBlockAddProvisioningPackage := true
requestBody.SetSettingsBlockAddProvisioningPackage(&settingsBlockAddProvisioningPackage)
settingsBlockRemoveProvisioningPackage := true
requestBody.SetSettingsBlockRemoveProvisioningPackage(&settingsBlockRemoveProvisioningPackage)
settingsBlockChangeSystemTime := true
requestBody.SetSettingsBlockChangeSystemTime(&settingsBlockChangeSystemTime)
settingsBlockEditDeviceName := true
requestBody.SetSettingsBlockEditDeviceName(&settingsBlockEditDeviceName)
settingsBlockChangeRegion := true
requestBody.SetSettingsBlockChangeRegion(&settingsBlockChangeRegion)
settingsBlockChangeLanguage := true
requestBody.SetSettingsBlockChangeLanguage(&settingsBlockChangeLanguage)
settingsBlockChangePowerSleep := true
requestBody.SetSettingsBlockChangePowerSleep(&settingsBlockChangePowerSleep)
locationServicesBlocked := true
requestBody.SetLocationServicesBlocked(&locationServicesBlocked)
microsoftAccountBlocked := true
requestBody.SetMicrosoftAccountBlocked(µsoftAccountBlocked)
microsoftAccountBlockSettingsSync := true
requestBody.SetMicrosoftAccountBlockSettingsSync(µsoftAccountBlockSettingsSync)
nfcBlocked := true
requestBody.SetNfcBlocked(&nfcBlocked)
resetProtectionModeBlocked := true
requestBody.SetResetProtectionModeBlocked(&resetProtectionModeBlocked)
screenCaptureBlocked := true
requestBody.SetScreenCaptureBlocked(&screenCaptureBlocked)
storageBlockRemovableStorage := true
requestBody.SetStorageBlockRemovableStorage(&storageBlockRemovableStorage)
storageRequireMobileDeviceEncryption := true
requestBody.SetStorageRequireMobileDeviceEncryption(&storageRequireMobileDeviceEncryption)
usbBlocked := true
requestBody.SetUsbBlocked(&usbBlocked)
voiceRecordingBlocked := true
requestBody.SetVoiceRecordingBlocked(&voiceRecordingBlocked)
wiFiBlockAutomaticConnectHotspots := true
requestBody.SetWiFiBlockAutomaticConnectHotspots(&wiFiBlockAutomaticConnectHotspots)
wiFiBlocked := true
requestBody.SetWiFiBlocked(&wiFiBlocked)
wiFiBlockManualConfiguration := true
requestBody.SetWiFiBlockManualConfiguration(&wiFiBlockManualConfiguration)
wiFiScanInterval := int32(0)
requestBody.SetWiFiScanInterval(&wiFiScanInterval)
wirelessDisplayBlockProjectionToThisDevice := true
requestBody.SetWirelessDisplayBlockProjectionToThisDevice(&wirelessDisplayBlockProjectionToThisDevice)
wirelessDisplayBlockUserInputFromReceiver := true
requestBody.SetWirelessDisplayBlockUserInputFromReceiver(&wirelessDisplayBlockUserInputFromReceiver)
wirelessDisplayRequirePinForPairing := true
requestBody.SetWirelessDisplayRequirePinForPairing(&wirelessDisplayRequirePinForPairing)
windowsStoreBlocked := true
requestBody.SetWindowsStoreBlocked(&windowsStoreBlocked)
appsAllowTrustedAppsSideloading := graphmodels.BLOCKED_STATEMANAGEMENTSETTING
requestBody.SetAppsAllowTrustedAppsSideloading(&appsAllowTrustedAppsSideloading)
windowsStoreBlockAutoUpdate := true
requestBody.SetWindowsStoreBlockAutoUpdate(&windowsStoreBlockAutoUpdate)
developerUnlockSetting := graphmodels.BLOCKED_STATEMANAGEMENTSETTING
requestBody.SetDeveloperUnlockSetting(&developerUnlockSetting)
sharedUserAppDataAllowed := true
requestBody.SetSharedUserAppDataAllowed(&sharedUserAppDataAllowed)
appsBlockWindowsStoreOriginatedApps := true
requestBody.SetAppsBlockWindowsStoreOriginatedApps(&appsBlockWindowsStoreOriginatedApps)
windowsStoreEnablePrivateStoreOnly := true
requestBody.SetWindowsStoreEnablePrivateStoreOnly(&windowsStoreEnablePrivateStoreOnly)
storageRestrictAppDataToSystemVolume := true
requestBody.SetStorageRestrictAppDataToSystemVolume(&storageRestrictAppDataToSystemVolume)
storageRestrictAppInstallToSystemVolume := true
requestBody.SetStorageRestrictAppInstallToSystemVolume(&storageRestrictAppInstallToSystemVolume)
gameDvrBlocked := true
requestBody.SetGameDvrBlocked(&gameDvrBlocked)
experienceBlockDeviceDiscovery := true
requestBody.SetExperienceBlockDeviceDiscovery(&experienceBlockDeviceDiscovery)
experienceBlockErrorDialogWhenNoSIM := true
requestBody.SetExperienceBlockErrorDialogWhenNoSIM(&experienceBlockErrorDialogWhenNoSIM)
experienceBlockTaskSwitcher := true
requestBody.SetExperienceBlockTaskSwitcher(&experienceBlockTaskSwitcher)
logonBlockFastUserSwitching := true
requestBody.SetLogonBlockFastUserSwitching(&logonBlockFastUserSwitching)
tenantLockdownRequireNetworkDuringOutOfBoxExperience := true
requestBody.SetTenantLockdownRequireNetworkDuringOutOfBoxExperience(&tenantLockdownRequireNetworkDuringOutOfBoxExperience)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
deviceConfigurations, err := graphClient.DeviceManagement().DeviceConfigurations().ByDeviceConfigurationId("deviceConfiguration-id").Patch(context.Background(), requestBody, nil)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Windows10GeneralConfiguration deviceConfiguration = new Windows10GeneralConfiguration();
deviceConfiguration.setOdataType("#microsoft.graph.windows10GeneralConfiguration");
deviceConfiguration.setDescription("Description value");
deviceConfiguration.setDisplayName("Display Name value");
deviceConfiguration.setVersion(7);
deviceConfiguration.setEnterpriseCloudPrintDiscoveryEndPoint("Enterprise Cloud Print Discovery End Point value");
deviceConfiguration.setEnterpriseCloudPrintOAuthAuthority("Enterprise Cloud Print OAuth Authority value");
deviceConfiguration.setEnterpriseCloudPrintOAuthClientIdentifier("Enterprise Cloud Print OAuth Client Identifier value");
deviceConfiguration.setEnterpriseCloudPrintResourceIdentifier("Enterprise Cloud Print Resource Identifier value");
deviceConfiguration.setEnterpriseCloudPrintDiscoveryMaxLimit(5);
deviceConfiguration.setEnterpriseCloudPrintMopriaDiscoveryResourceIdentifier("Enterprise Cloud Print Mopria Discovery Resource Identifier value");
deviceConfiguration.setSearchBlockDiacritics(true);
deviceConfiguration.setSearchDisableAutoLanguageDetection(true);
deviceConfiguration.setSearchDisableIndexingEncryptedItems(true);
deviceConfiguration.setSearchEnableRemoteQueries(true);
deviceConfiguration.setSearchDisableIndexerBackoff(true);
deviceConfiguration.setSearchDisableIndexingRemovableDrive(true);
deviceConfiguration.setSearchEnableAutomaticIndexSizeManangement(true);
deviceConfiguration.setDiagnosticsDataSubmissionMode(DiagnosticDataSubmissionMode.None);
deviceConfiguration.setOneDriveDisableFileSync(true);
deviceConfiguration.setSmartScreenEnableAppInstallControl(true);
deviceConfiguration.setPersonalizationDesktopImageUrl("https://example.com/personalizationDesktopImageUrl/");
deviceConfiguration.setPersonalizationLockScreenImageUrl("https://example.com/personalizationLockScreenImageUrl/");
LinkedList<String> bluetoothAllowedServices = new LinkedList<String>();
bluetoothAllowedServices.add("Bluetooth Allowed Services value");
deviceConfiguration.setBluetoothAllowedServices(bluetoothAllowedServices);
deviceConfiguration.setBluetoothBlockAdvertising(true);
deviceConfiguration.setBluetoothBlockDiscoverableMode(true);
deviceConfiguration.setBluetoothBlockPrePairing(true);
deviceConfiguration.setEdgeBlockAutofill(true);
deviceConfiguration.setEdgeBlocked(true);
deviceConfiguration.setEdgeCookiePolicy(EdgeCookiePolicy.Allow);
deviceConfiguration.setEdgeBlockDeveloperTools(true);
deviceConfiguration.setEdgeBlockSendingDoNotTrackHeader(true);
deviceConfiguration.setEdgeBlockExtensions(true);
deviceConfiguration.setEdgeBlockInPrivateBrowsing(true);
deviceConfiguration.setEdgeBlockJavaScript(true);
deviceConfiguration.setEdgeBlockPasswordManager(true);
deviceConfiguration.setEdgeBlockAddressBarDropdown(true);
deviceConfiguration.setEdgeBlockCompatibilityList(true);
deviceConfiguration.setEdgeClearBrowsingDataOnExit(true);
deviceConfiguration.setEdgeAllowStartPagesModification(true);
deviceConfiguration.setEdgeDisableFirstRunPage(true);
deviceConfiguration.setEdgeBlockLiveTileDataCollection(true);
deviceConfiguration.setEdgeSyncFavoritesWithInternetExplorer(true);
deviceConfiguration.setCellularBlockDataWhenRoaming(true);
deviceConfiguration.setCellularBlockVpn(true);
deviceConfiguration.setCellularBlockVpnWhenRoaming(true);
deviceConfiguration.setDefenderRequireRealTimeMonitoring(true);
deviceConfiguration.setDefenderRequireBehaviorMonitoring(true);
deviceConfiguration.setDefenderRequireNetworkInspectionSystem(true);
deviceConfiguration.setDefenderScanDownloads(true);
deviceConfiguration.setDefenderScanScriptsLoadedInInternetExplorer(true);
deviceConfiguration.setDefenderBlockEndUserAccess(true);
deviceConfiguration.setDefenderSignatureUpdateIntervalInHours(6);
deviceConfiguration.setDefenderMonitorFileActivity(DefenderMonitorFileActivity.Disable);
deviceConfiguration.setDefenderDaysBeforeDeletingQuarantinedMalware(12);
deviceConfiguration.setDefenderScanMaxCpu(2);
deviceConfiguration.setDefenderScanArchiveFiles(true);
deviceConfiguration.setDefenderScanIncomingMail(true);
deviceConfiguration.setDefenderScanRemovableDrivesDuringFullScan(true);
deviceConfiguration.setDefenderScanMappedNetworkDrivesDuringFullScan(true);
deviceConfiguration.setDefenderScanNetworkFiles(true);
deviceConfiguration.setDefenderRequireCloudProtection(true);
deviceConfiguration.setDefenderCloudBlockLevel(DefenderCloudBlockLevelType.High);
deviceConfiguration.setDefenderPromptForSampleSubmission(DefenderPromptForSampleSubmission.AlwaysPrompt);
LocalTime defenderScheduledQuickScanTime = LocalTime.parse("11:58:49.3840000");
deviceConfiguration.setDefenderScheduledQuickScanTime(defenderScheduledQuickScanTime);
deviceConfiguration.setDefenderScanType(DefenderScanType.Disabled);
deviceConfiguration.setDefenderSystemScanSchedule(WeeklySchedule.Everyday);
LocalTime defenderScheduledScanTime = LocalTime.parse("11:59:10.9990000");
deviceConfiguration.setDefenderScheduledScanTime(defenderScheduledScanTime);
DefenderDetectedMalwareActions defenderDetectedMalwareActions = new DefenderDetectedMalwareActions();
defenderDetectedMalwareActions.setOdataType("microsoft.graph.defenderDetectedMalwareActions");
defenderDetectedMalwareActions.setLowSeverity(DefenderThreatAction.Clean);
defenderDetectedMalwareActions.setModerateSeverity(DefenderThreatAction.Clean);
defenderDetectedMalwareActions.setHighSeverity(DefenderThreatAction.Clean);
defenderDetectedMalwareActions.setSevereSeverity(DefenderThreatAction.Clean);
deviceConfiguration.setDefenderDetectedMalwareActions(defenderDetectedMalwareActions);
LinkedList<String> defenderFileExtensionsToExclude = new LinkedList<String>();
defenderFileExtensionsToExclude.add("Defender File Extensions To Exclude value");
deviceConfiguration.setDefenderFileExtensionsToExclude(defenderFileExtensionsToExclude);
LinkedList<String> defenderFilesAndFoldersToExclude = new LinkedList<String>();
defenderFilesAndFoldersToExclude.add("Defender Files And Folders To Exclude value");
deviceConfiguration.setDefenderFilesAndFoldersToExclude(defenderFilesAndFoldersToExclude);
LinkedList<String> defenderProcessesToExclude = new LinkedList<String>();
defenderProcessesToExclude.add("Defender Processes To Exclude value");
deviceConfiguration.setDefenderProcessesToExclude(defenderProcessesToExclude);
deviceConfiguration.setLockScreenAllowTimeoutConfiguration(true);
deviceConfiguration.setLockScreenBlockActionCenterNotifications(true);
deviceConfiguration.setLockScreenBlockCortana(true);
deviceConfiguration.setLockScreenBlockToastNotifications(true);
deviceConfiguration.setLockScreenTimeoutInSeconds(10);
deviceConfiguration.setPasswordBlockSimple(true);
deviceConfiguration.setPasswordExpirationDays(6);
deviceConfiguration.setPasswordMinimumLength(5);
deviceConfiguration.setPasswordMinutesOfInactivityBeforeScreenTimeout(14);
deviceConfiguration.setPasswordMinimumCharacterSetCount(0);
deviceConfiguration.setPasswordPreviousPasswordBlockCount(2);
deviceConfiguration.setPasswordRequired(true);
deviceConfiguration.setPasswordRequireWhenResumeFromIdleState(true);
deviceConfiguration.setPasswordRequiredType(RequiredPasswordType.Alphanumeric);
deviceConfiguration.setPasswordSignInFailureCountBeforeFactoryReset(12);
deviceConfiguration.setPrivacyAdvertisingId(StateManagementSetting.Blocked);
deviceConfiguration.setPrivacyAutoAcceptPairingAndConsentPrompts(true);
deviceConfiguration.setPrivacyBlockInputPersonalization(true);
deviceConfiguration.setStartBlockUnpinningAppsFromTaskbar(true);
deviceConfiguration.setStartMenuAppListVisibility(EnumSet.of(WindowsStartMenuAppListVisibilityType.Collapse));
deviceConfiguration.setStartMenuHideChangeAccountSettings(true);
deviceConfiguration.setStartMenuHideFrequentlyUsedApps(true);
deviceConfiguration.setStartMenuHideHibernate(true);
deviceConfiguration.setStartMenuHideLock(true);
deviceConfiguration.setStartMenuHidePowerButton(true);
deviceConfiguration.setStartMenuHideRecentJumpLists(true);
deviceConfiguration.setStartMenuHideRecentlyAddedApps(true);
deviceConfiguration.setStartMenuHideRestartOptions(true);
deviceConfiguration.setStartMenuHideShutDown(true);
deviceConfiguration.setStartMenuHideSignOut(true);
deviceConfiguration.setStartMenuHideSleep(true);
deviceConfiguration.setStartMenuHideSwitchAccount(true);
deviceConfiguration.setStartMenuHideUserTile(true);
byte[] startMenuLayoutEdgeAssetsXml = Base64.getDecoder().decode("c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA==");
deviceConfiguration.setStartMenuLayoutEdgeAssetsXml(startMenuLayoutEdgeAssetsXml);
byte[] startMenuLayoutXml = Base64.getDecoder().decode("c3RhcnRNZW51TGF5b3V0WG1s");
deviceConfiguration.setStartMenuLayoutXml(startMenuLayoutXml);
deviceConfiguration.setStartMenuMode(WindowsStartMenuModeType.FullScreen);
deviceConfiguration.setStartMenuPinnedFolderDocuments(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderDownloads(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderFileExplorer(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderHomeGroup(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderMusic(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderNetwork(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderPersonalFolder(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderPictures(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderSettings(VisibilitySetting.Hide);
deviceConfiguration.setStartMenuPinnedFolderVideos(VisibilitySetting.Hide);
deviceConfiguration.setSettingsBlockSettingsApp(true);
deviceConfiguration.setSettingsBlockSystemPage(true);
deviceConfiguration.setSettingsBlockDevicesPage(true);
deviceConfiguration.setSettingsBlockNetworkInternetPage(true);
deviceConfiguration.setSettingsBlockPersonalizationPage(true);
deviceConfiguration.setSettingsBlockAccountsPage(true);
deviceConfiguration.setSettingsBlockTimeLanguagePage(true);
deviceConfiguration.setSettingsBlockEaseOfAccessPage(true);
deviceConfiguration.setSettingsBlockPrivacyPage(true);
deviceConfiguration.setSettingsBlockUpdateSecurityPage(true);
deviceConfiguration.setSettingsBlockAppsPage(true);
deviceConfiguration.setSettingsBlockGamingPage(true);
deviceConfiguration.setWindowsSpotlightBlockConsumerSpecificFeatures(true);
deviceConfiguration.setWindowsSpotlightBlocked(true);
deviceConfiguration.setWindowsSpotlightBlockOnActionCenter(true);
deviceConfiguration.setWindowsSpotlightBlockTailoredExperiences(true);
deviceConfiguration.setWindowsSpotlightBlockThirdPartyNotifications(true);
deviceConfiguration.setWindowsSpotlightBlockWelcomeExperience(true);
deviceConfiguration.setWindowsSpotlightBlockWindowsTips(true);
deviceConfiguration.setWindowsSpotlightConfigureOnLockScreen(WindowsSpotlightEnablementSettings.Disabled);
deviceConfiguration.setNetworkProxyApplySettingsDeviceWide(true);
deviceConfiguration.setNetworkProxyDisableAutoDetect(true);
deviceConfiguration.setNetworkProxyAutomaticConfigurationUrl("https://example.com/networkProxyAutomaticConfigurationUrl/");
Windows10NetworkProxyServer networkProxyServer = new Windows10NetworkProxyServer();
networkProxyServer.setOdataType("microsoft.graph.windows10NetworkProxyServer");
networkProxyServer.setAddress("Address value");
LinkedList<String> exceptions = new LinkedList<String>();
exceptions.add("Exceptions value");
networkProxyServer.setExceptions(exceptions);
networkProxyServer.setUseForLocalAddresses(true);
deviceConfiguration.setNetworkProxyServer(networkProxyServer);
deviceConfiguration.setAccountsBlockAddingNonMicrosoftAccountEmail(true);
deviceConfiguration.setAntiTheftModeBlocked(true);
deviceConfiguration.setBluetoothBlocked(true);
deviceConfiguration.setCameraBlocked(true);
deviceConfiguration.setConnectedDevicesServiceBlocked(true);
deviceConfiguration.setCertificatesBlockManualRootCertificateInstallation(true);
deviceConfiguration.setCopyPasteBlocked(true);
deviceConfiguration.setCortanaBlocked(true);
deviceConfiguration.setDeviceManagementBlockFactoryResetOnMobile(true);
deviceConfiguration.setDeviceManagementBlockManualUnenroll(true);
deviceConfiguration.setSafeSearchFilter(SafeSearchFilterType.Strict);
deviceConfiguration.setEdgeBlockPopups(true);
deviceConfiguration.setEdgeBlockSearchSuggestions(true);
deviceConfiguration.setEdgeBlockSendingIntranetTrafficToInternetExplorer(true);
deviceConfiguration.setEdgeSendIntranetTrafficToInternetExplorer(true);
deviceConfiguration.setEdgeRequireSmartScreen(true);
deviceConfiguration.setEdgeEnterpriseModeSiteListLocation("Edge Enterprise Mode Site List Location value");
deviceConfiguration.setEdgeFirstRunUrl("https://example.com/edgeFirstRunUrl/");
EdgeSearchEngineBase edgeSearchEngine = new EdgeSearchEngineBase();
edgeSearchEngine.setOdataType("microsoft.graph.edgeSearchEngineBase");
deviceConfiguration.setEdgeSearchEngine(edgeSearchEngine);
LinkedList<String> edgeHomepageUrls = new LinkedList<String>();
edgeHomepageUrls.add("Edge Homepage Urls value");
deviceConfiguration.setEdgeHomepageUrls(edgeHomepageUrls);
deviceConfiguration.setEdgeBlockAccessToAboutFlags(true);
deviceConfiguration.setSmartScreenBlockPromptOverride(true);
deviceConfiguration.setSmartScreenBlockPromptOverrideForFiles(true);
deviceConfiguration.setWebRtcBlockLocalhostIpAddress(true);
deviceConfiguration.setInternetSharingBlocked(true);
deviceConfiguration.setSettingsBlockAddProvisioningPackage(true);
deviceConfiguration.setSettingsBlockRemoveProvisioningPackage(true);
deviceConfiguration.setSettingsBlockChangeSystemTime(true);
deviceConfiguration.setSettingsBlockEditDeviceName(true);
deviceConfiguration.setSettingsBlockChangeRegion(true);
deviceConfiguration.setSettingsBlockChangeLanguage(true);
deviceConfiguration.setSettingsBlockChangePowerSleep(true);
deviceConfiguration.setLocationServicesBlocked(true);
deviceConfiguration.setMicrosoftAccountBlocked(true);
deviceConfiguration.setMicrosoftAccountBlockSettingsSync(true);
deviceConfiguration.setNfcBlocked(true);
deviceConfiguration.setResetProtectionModeBlocked(true);
deviceConfiguration.setScreenCaptureBlocked(true);
deviceConfiguration.setStorageBlockRemovableStorage(true);
deviceConfiguration.setStorageRequireMobileDeviceEncryption(true);
deviceConfiguration.setUsbBlocked(true);
deviceConfiguration.setVoiceRecordingBlocked(true);
deviceConfiguration.setWiFiBlockAutomaticConnectHotspots(true);
deviceConfiguration.setWiFiBlocked(true);
deviceConfiguration.setWiFiBlockManualConfiguration(true);
deviceConfiguration.setWiFiScanInterval(0);
deviceConfiguration.setWirelessDisplayBlockProjectionToThisDevice(true);
deviceConfiguration.setWirelessDisplayBlockUserInputFromReceiver(true);
deviceConfiguration.setWirelessDisplayRequirePinForPairing(true);
deviceConfiguration.setWindowsStoreBlocked(true);
deviceConfiguration.setAppsAllowTrustedAppsSideloading(StateManagementSetting.Blocked);
deviceConfiguration.setWindowsStoreBlockAutoUpdate(true);
deviceConfiguration.setDeveloperUnlockSetting(StateManagementSetting.Blocked);
deviceConfiguration.setSharedUserAppDataAllowed(true);
deviceConfiguration.setAppsBlockWindowsStoreOriginatedApps(true);
deviceConfiguration.setWindowsStoreEnablePrivateStoreOnly(true);
deviceConfiguration.setStorageRestrictAppDataToSystemVolume(true);
deviceConfiguration.setStorageRestrictAppInstallToSystemVolume(true);
deviceConfiguration.setGameDvrBlocked(true);
deviceConfiguration.setExperienceBlockDeviceDiscovery(true);
deviceConfiguration.setExperienceBlockErrorDialogWhenNoSIM(true);
deviceConfiguration.setExperienceBlockTaskSwitcher(true);
deviceConfiguration.setLogonBlockFastUserSwitching(true);
deviceConfiguration.setTenantLockdownRequireNetworkDuringOutOfBoxExperience(true);
DeviceConfiguration result = graphClient.deviceManagement().deviceConfigurations().byDeviceConfigurationId("{deviceConfiguration-id}").patch(deviceConfiguration);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const deviceConfiguration = {
'@odata.type': '#microsoft.graph.windows10GeneralConfiguration',
description: 'Description value',
displayName: 'Display Name value',
version: 7,
enterpriseCloudPrintDiscoveryEndPoint: 'Enterprise Cloud Print Discovery End Point value',
enterpriseCloudPrintOAuthAuthority: 'Enterprise Cloud Print OAuth Authority value',
enterpriseCloudPrintOAuthClientIdentifier: 'Enterprise Cloud Print OAuth Client Identifier value',
enterpriseCloudPrintResourceIdentifier: 'Enterprise Cloud Print Resource Identifier value',
enterpriseCloudPrintDiscoveryMaxLimit: 5,
enterpriseCloudPrintMopriaDiscoveryResourceIdentifier: 'Enterprise Cloud Print Mopria Discovery Resource Identifier value',
searchBlockDiacritics: true,
searchDisableAutoLanguageDetection: true,
searchDisableIndexingEncryptedItems: true,
searchEnableRemoteQueries: true,
searchDisableIndexerBackoff: true,
searchDisableIndexingRemovableDrive: true,
searchEnableAutomaticIndexSizeManangement: true,
diagnosticsDataSubmissionMode: 'none',
oneDriveDisableFileSync: true,
smartScreenEnableAppInstallControl: true,
personalizationDesktopImageUrl: 'https://example.com/personalizationDesktopImageUrl/',
personalizationLockScreenImageUrl: 'https://example.com/personalizationLockScreenImageUrl/',
bluetoothAllowedServices: [
'Bluetooth Allowed Services value'
],
bluetoothBlockAdvertising: true,
bluetoothBlockDiscoverableMode: true,
bluetoothBlockPrePairing: true,
edgeBlockAutofill: true,
edgeBlocked: true,
edgeCookiePolicy: 'allow',
edgeBlockDeveloperTools: true,
edgeBlockSendingDoNotTrackHeader: true,
edgeBlockExtensions: true,
edgeBlockInPrivateBrowsing: true,
edgeBlockJavaScript: true,
edgeBlockPasswordManager: true,
edgeBlockAddressBarDropdown: true,
edgeBlockCompatibilityList: true,
edgeClearBrowsingDataOnExit: true,
edgeAllowStartPagesModification: true,
edgeDisableFirstRunPage: true,
edgeBlockLiveTileDataCollection: true,
edgeSyncFavoritesWithInternetExplorer: true,
cellularBlockDataWhenRoaming: true,
cellularBlockVpn: true,
cellularBlockVpnWhenRoaming: true,
defenderRequireRealTimeMonitoring: true,
defenderRequireBehaviorMonitoring: true,
defenderRequireNetworkInspectionSystem: true,
defenderScanDownloads: true,
defenderScanScriptsLoadedInInternetExplorer: true,
defenderBlockEndUserAccess: true,
defenderSignatureUpdateIntervalInHours: 6,
defenderMonitorFileActivity: 'disable',
defenderDaysBeforeDeletingQuarantinedMalware: 12,
defenderScanMaxCpu: 2,
defenderScanArchiveFiles: true,
defenderScanIncomingMail: true,
defenderScanRemovableDrivesDuringFullScan: true,
defenderScanMappedNetworkDrivesDuringFullScan: true,
defenderScanNetworkFiles: true,
defenderRequireCloudProtection: true,
defenderCloudBlockLevel: 'high',
defenderPromptForSampleSubmission: 'alwaysPrompt',
defenderScheduledQuickScanTime: '11:58:49.3840000',
defenderScanType: 'disabled',
defenderSystemScanSchedule: 'everyday',
defenderScheduledScanTime: '11:59:10.9990000',
defenderDetectedMalwareActions: {
'@odata.type': 'microsoft.graph.defenderDetectedMalwareActions',
lowSeverity: 'clean',
moderateSeverity: 'clean',
highSeverity: 'clean',
severeSeverity: 'clean'
},
defenderFileExtensionsToExclude: [
'Defender File Extensions To Exclude value'
],
defenderFilesAndFoldersToExclude: [
'Defender Files And Folders To Exclude value'
],
defenderProcessesToExclude: [
'Defender Processes To Exclude value'
],
lockScreenAllowTimeoutConfiguration: true,
lockScreenBlockActionCenterNotifications: true,
lockScreenBlockCortana: true,
lockScreenBlockToastNotifications: true,
lockScreenTimeoutInSeconds: 10,
passwordBlockSimple: true,
passwordExpirationDays: 6,
passwordMinimumLength: 5,
passwordMinutesOfInactivityBeforeScreenTimeout: 14,
passwordMinimumCharacterSetCount: 0,
passwordPreviousPasswordBlockCount: 2,
passwordRequired: true,
passwordRequireWhenResumeFromIdleState: true,
passwordRequiredType: 'alphanumeric',
passwordSignInFailureCountBeforeFactoryReset: 12,
privacyAdvertisingId: 'blocked',
privacyAutoAcceptPairingAndConsentPrompts: true,
privacyBlockInputPersonalization: true,
startBlockUnpinningAppsFromTaskbar: true,
startMenuAppListVisibility: 'collapse',
startMenuHideChangeAccountSettings: true,
startMenuHideFrequentlyUsedApps: true,
startMenuHideHibernate: true,
startMenuHideLock: true,
startMenuHidePowerButton: true,
startMenuHideRecentJumpLists: true,
startMenuHideRecentlyAddedApps: true,
startMenuHideRestartOptions: true,
startMenuHideShutDown: true,
startMenuHideSignOut: true,
startMenuHideSleep: true,
startMenuHideSwitchAccount: true,
startMenuHideUserTile: true,
startMenuLayoutEdgeAssetsXml: 'c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA==',
startMenuLayoutXml: 'c3RhcnRNZW51TGF5b3V0WG1s',
startMenuMode: 'fullScreen',
startMenuPinnedFolderDocuments: 'hide',
startMenuPinnedFolderDownloads: 'hide',
startMenuPinnedFolderFileExplorer: 'hide',
startMenuPinnedFolderHomeGroup: 'hide',
startMenuPinnedFolderMusic: 'hide',
startMenuPinnedFolderNetwork: 'hide',
startMenuPinnedFolderPersonalFolder: 'hide',
startMenuPinnedFolderPictures: 'hide',
startMenuPinnedFolderSettings: 'hide',
startMenuPinnedFolderVideos: 'hide',
settingsBlockSettingsApp: true,
settingsBlockSystemPage: true,
settingsBlockDevicesPage: true,
settingsBlockNetworkInternetPage: true,
settingsBlockPersonalizationPage: true,
settingsBlockAccountsPage: true,
settingsBlockTimeLanguagePage: true,
settingsBlockEaseOfAccessPage: true,
settingsBlockPrivacyPage: true,
settingsBlockUpdateSecurityPage: true,
settingsBlockAppsPage: true,
settingsBlockGamingPage: true,
windowsSpotlightBlockConsumerSpecificFeatures: true,
windowsSpotlightBlocked: true,
windowsSpotlightBlockOnActionCenter: true,
windowsSpotlightBlockTailoredExperiences: true,
windowsSpotlightBlockThirdPartyNotifications: true,
windowsSpotlightBlockWelcomeExperience: true,
windowsSpotlightBlockWindowsTips: true,
windowsSpotlightConfigureOnLockScreen: 'disabled',
networkProxyApplySettingsDeviceWide: true,
networkProxyDisableAutoDetect: true,
networkProxyAutomaticConfigurationUrl: 'https://example.com/networkProxyAutomaticConfigurationUrl/',
networkProxyServer: {
'@odata.type': 'microsoft.graph.windows10NetworkProxyServer',
address: 'Address value',
exceptions: [
'Exceptions value'
],
useForLocalAddresses: true
},
accountsBlockAddingNonMicrosoftAccountEmail: true,
antiTheftModeBlocked: true,
bluetoothBlocked: true,
cameraBlocked: true,
connectedDevicesServiceBlocked: true,
certificatesBlockManualRootCertificateInstallation: true,
copyPasteBlocked: true,
cortanaBlocked: true,
deviceManagementBlockFactoryResetOnMobile: true,
deviceManagementBlockManualUnenroll: true,
safeSearchFilter: 'strict',
edgeBlockPopups: true,
edgeBlockSearchSuggestions: true,
edgeBlockSendingIntranetTrafficToInternetExplorer: true,
edgeSendIntranetTrafficToInternetExplorer: true,
edgeRequireSmartScreen: true,
edgeEnterpriseModeSiteListLocation: 'Edge Enterprise Mode Site List Location value',
edgeFirstRunUrl: 'https://example.com/edgeFirstRunUrl/',
edgeSearchEngine: {
'@odata.type': 'microsoft.graph.edgeSearchEngineBase'
},
edgeHomepageUrls: [
'Edge Homepage Urls value'
],
edgeBlockAccessToAboutFlags: true,
smartScreenBlockPromptOverride: true,
smartScreenBlockPromptOverrideForFiles: true,
webRtcBlockLocalhostIpAddress: true,
internetSharingBlocked: true,
settingsBlockAddProvisioningPackage: true,
settingsBlockRemoveProvisioningPackage: true,
settingsBlockChangeSystemTime: true,
settingsBlockEditDeviceName: true,
settingsBlockChangeRegion: true,
settingsBlockChangeLanguage: true,
settingsBlockChangePowerSleep: true,
locationServicesBlocked: true,
microsoftAccountBlocked: true,
microsoftAccountBlockSettingsSync: true,
nfcBlocked: true,
resetProtectionModeBlocked: true,
screenCaptureBlocked: true,
storageBlockRemovableStorage: true,
storageRequireMobileDeviceEncryption: true,
usbBlocked: true,
voiceRecordingBlocked: true,
wiFiBlockAutomaticConnectHotspots: true,
wiFiBlocked: true,
wiFiBlockManualConfiguration: true,
wiFiScanInterval: 0,
wirelessDisplayBlockProjectionToThisDevice: true,
wirelessDisplayBlockUserInputFromReceiver: true,
wirelessDisplayRequirePinForPairing: true,
windowsStoreBlocked: true,
appsAllowTrustedAppsSideloading: 'blocked',
windowsStoreBlockAutoUpdate: true,
developerUnlockSetting: 'blocked',
sharedUserAppDataAllowed: true,
appsBlockWindowsStoreOriginatedApps: true,
windowsStoreEnablePrivateStoreOnly: true,
storageRestrictAppDataToSystemVolume: true,
storageRestrictAppInstallToSystemVolume: true,
gameDvrBlocked: true,
experienceBlockDeviceDiscovery: true,
experienceBlockErrorDialogWhenNoSIM: true,
experienceBlockTaskSwitcher: true,
logonBlockFastUserSwitching: true,
tenantLockdownRequireNetworkDuringOutOfBoxExperience: true
};
await client.api('/deviceManagement/deviceConfigurations/{deviceConfigurationId}')
.update(deviceConfiguration);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Windows10GeneralConfiguration;
use Microsoft\Graph\Generated\Models\DiagnosticDataSubmissionMode;
use Microsoft\Graph\Generated\Models\EdgeCookiePolicy;
use Microsoft\Graph\Generated\Models\DefenderMonitorFileActivity;
use Microsoft\Graph\Generated\Models\DefenderCloudBlockLevelType;
use Microsoft\Graph\Generated\Models\DefenderPromptForSampleSubmission;
use Microsoft\Kiota\Abstractions\Types\Time;
use Microsoft\Graph\Generated\Models\DefenderScanType;
use Microsoft\Graph\Generated\Models\WeeklySchedule;
use Microsoft\Graph\Generated\Models\DefenderDetectedMalwareActions;
use Microsoft\Graph\Generated\Models\DefenderThreatAction;
use Microsoft\Graph\Generated\Models\RequiredPasswordType;
use Microsoft\Graph\Generated\Models\StateManagementSetting;
use Microsoft\Graph\Generated\Models\WindowsStartMenuAppListVisibilityType;
use Microsoft\Graph\Generated\Models\WindowsStartMenuModeType;
use Microsoft\Graph\Generated\Models\VisibilitySetting;
use Microsoft\Graph\Generated\Models\WindowsSpotlightEnablementSettings;
use Microsoft\Graph\Generated\Models\Windows10NetworkProxyServer;
use Microsoft\Graph\Generated\Models\SafeSearchFilterType;
use Microsoft\Graph\Generated\Models\EdgeSearchEngineBase;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Windows10GeneralConfiguration();
$requestBody->setOdataType('#microsoft.graph.windows10GeneralConfiguration');
$requestBody->setDescription('Description value');
$requestBody->setDisplayName('Display Name value');
$requestBody->setVersion(7);
$requestBody->setEnterpriseCloudPrintDiscoveryEndPoint('Enterprise Cloud Print Discovery End Point value');
$requestBody->setEnterpriseCloudPrintOAuthAuthority('Enterprise Cloud Print OAuth Authority value');
$requestBody->setEnterpriseCloudPrintOAuthClientIdentifier('Enterprise Cloud Print OAuth Client Identifier value');
$requestBody->setEnterpriseCloudPrintResourceIdentifier('Enterprise Cloud Print Resource Identifier value');
$requestBody->setEnterpriseCloudPrintDiscoveryMaxLimit(5);
$requestBody->setEnterpriseCloudPrintMopriaDiscoveryResourceIdentifier('Enterprise Cloud Print Mopria Discovery Resource Identifier value');
$requestBody->setSearchBlockDiacritics(true);
$requestBody->setSearchDisableAutoLanguageDetection(true);
$requestBody->setSearchDisableIndexingEncryptedItems(true);
$requestBody->setSearchEnableRemoteQueries(true);
$requestBody->setSearchDisableIndexerBackoff(true);
$requestBody->setSearchDisableIndexingRemovableDrive(true);
$requestBody->setSearchEnableAutomaticIndexSizeManangement(true);
$requestBody->setDiagnosticsDataSubmissionMode(new DiagnosticDataSubmissionMode('none'));
$requestBody->setOneDriveDisableFileSync(true);
$requestBody->setSmartScreenEnableAppInstallControl(true);
$requestBody->setPersonalizationDesktopImageUrl('https://example.com/personalizationDesktopImageUrl/');
$requestBody->setPersonalizationLockScreenImageUrl('https://example.com/personalizationLockScreenImageUrl/');
$requestBody->setBluetoothAllowedServices(['Bluetooth Allowed Services value', ]);
$requestBody->setBluetoothBlockAdvertising(true);
$requestBody->setBluetoothBlockDiscoverableMode(true);
$requestBody->setBluetoothBlockPrePairing(true);
$requestBody->setEdgeBlockAutofill(true);
$requestBody->setEdgeBlocked(true);
$requestBody->setEdgeCookiePolicy(new EdgeCookiePolicy('allow'));
$requestBody->setEdgeBlockDeveloperTools(true);
$requestBody->setEdgeBlockSendingDoNotTrackHeader(true);
$requestBody->setEdgeBlockExtensions(true);
$requestBody->setEdgeBlockInPrivateBrowsing(true);
$requestBody->setEdgeBlockJavaScript(true);
$requestBody->setEdgeBlockPasswordManager(true);
$requestBody->setEdgeBlockAddressBarDropdown(true);
$requestBody->setEdgeBlockCompatibilityList(true);
$requestBody->setEdgeClearBrowsingDataOnExit(true);
$requestBody->setEdgeAllowStartPagesModification(true);
$requestBody->setEdgeDisableFirstRunPage(true);
$requestBody->setEdgeBlockLiveTileDataCollection(true);
$requestBody->setEdgeSyncFavoritesWithInternetExplorer(true);
$requestBody->setCellularBlockDataWhenRoaming(true);
$requestBody->setCellularBlockVpn(true);
$requestBody->setCellularBlockVpnWhenRoaming(true);
$requestBody->setDefenderRequireRealTimeMonitoring(true);
$requestBody->setDefenderRequireBehaviorMonitoring(true);
$requestBody->setDefenderRequireNetworkInspectionSystem(true);
$requestBody->setDefenderScanDownloads(true);
$requestBody->setDefenderScanScriptsLoadedInInternetExplorer(true);
$requestBody->setDefenderBlockEndUserAccess(true);
$requestBody->setDefenderSignatureUpdateIntervalInHours(6);
$requestBody->setDefenderMonitorFileActivity(new DefenderMonitorFileActivity('disable'));
$requestBody->setDefenderDaysBeforeDeletingQuarantinedMalware(12);
$requestBody->setDefenderScanMaxCpu(2);
$requestBody->setDefenderScanArchiveFiles(true);
$requestBody->setDefenderScanIncomingMail(true);
$requestBody->setDefenderScanRemovableDrivesDuringFullScan(true);
$requestBody->setDefenderScanMappedNetworkDrivesDuringFullScan(true);
$requestBody->setDefenderScanNetworkFiles(true);
$requestBody->setDefenderRequireCloudProtection(true);
$requestBody->setDefenderCloudBlockLevel(new DefenderCloudBlockLevelType('high'));
$requestBody->setDefenderPromptForSampleSubmission(new DefenderPromptForSampleSubmission('alwaysPrompt'));
$requestBody->setDefenderScheduledQuickScanTime(new Time('11:58:49.3840000'));
$requestBody->setDefenderScanType(new DefenderScanType('disabled'));
$requestBody->setDefenderSystemScanSchedule(new WeeklySchedule('everyday'));
$requestBody->setDefenderScheduledScanTime(new Time('11:59:10.9990000'));
$defenderDetectedMalwareActions = new DefenderDetectedMalwareActions();
$defenderDetectedMalwareActions->setOdataType('microsoft.graph.defenderDetectedMalwareActions');
$defenderDetectedMalwareActions->setLowSeverity(new DefenderThreatAction('clean'));
$defenderDetectedMalwareActions->setModerateSeverity(new DefenderThreatAction('clean'));
$defenderDetectedMalwareActions->setHighSeverity(new DefenderThreatAction('clean'));
$defenderDetectedMalwareActions->setSevereSeverity(new DefenderThreatAction('clean'));
$requestBody->setDefenderDetectedMalwareActions($defenderDetectedMalwareActions);
$requestBody->setDefenderFileExtensionsToExclude(['Defender File Extensions To Exclude value', ]);
$requestBody->setDefenderFilesAndFoldersToExclude(['Defender Files And Folders To Exclude value', ]);
$requestBody->setDefenderProcessesToExclude(['Defender Processes To Exclude value', ]);
$requestBody->setLockScreenAllowTimeoutConfiguration(true);
$requestBody->setLockScreenBlockActionCenterNotifications(true);
$requestBody->setLockScreenBlockCortana(true);
$requestBody->setLockScreenBlockToastNotifications(true);
$requestBody->setLockScreenTimeoutInSeconds(10);
$requestBody->setPasswordBlockSimple(true);
$requestBody->setPasswordExpirationDays(6);
$requestBody->setPasswordMinimumLength(5);
$requestBody->setPasswordMinutesOfInactivityBeforeScreenTimeout(14);
$requestBody->setPasswordMinimumCharacterSetCount(0);
$requestBody->setPasswordPreviousPasswordBlockCount(2);
$requestBody->setPasswordRequired(true);
$requestBody->setPasswordRequireWhenResumeFromIdleState(true);
$requestBody->setPasswordRequiredType(new RequiredPasswordType('alphanumeric'));
$requestBody->setPasswordSignInFailureCountBeforeFactoryReset(12);
$requestBody->setPrivacyAdvertisingId(new StateManagementSetting('blocked'));
$requestBody->setPrivacyAutoAcceptPairingAndConsentPrompts(true);
$requestBody->setPrivacyBlockInputPersonalization(true);
$requestBody->setStartBlockUnpinningAppsFromTaskbar(true);
$requestBody->setStartMenuAppListVisibility(new WindowsStartMenuAppListVisibilityType('collapse'));
$requestBody->setStartMenuHideChangeAccountSettings(true);
$requestBody->setStartMenuHideFrequentlyUsedApps(true);
$requestBody->setStartMenuHideHibernate(true);
$requestBody->setStartMenuHideLock(true);
$requestBody->setStartMenuHidePowerButton(true);
$requestBody->setStartMenuHideRecentJumpLists(true);
$requestBody->setStartMenuHideRecentlyAddedApps(true);
$requestBody->setStartMenuHideRestartOptions(true);
$requestBody->setStartMenuHideShutDown(true);
$requestBody->setStartMenuHideSignOut(true);
$requestBody->setStartMenuHideSleep(true);
$requestBody->setStartMenuHideSwitchAccount(true);
$requestBody->setStartMenuHideUserTile(true);
$requestBody->setStartMenuLayoutEdgeAssetsXml(\GuzzleHttp\Psr7\Utils::streamFor(base64_decode('c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA==')));
$requestBody->setStartMenuLayoutXml(\GuzzleHttp\Psr7\Utils::streamFor(base64_decode('c3RhcnRNZW51TGF5b3V0WG1s')));
$requestBody->setStartMenuMode(new WindowsStartMenuModeType('fullScreen'));
$requestBody->setStartMenuPinnedFolderDocuments(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderDownloads(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderFileExplorer(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderHomeGroup(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderMusic(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderNetwork(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderPersonalFolder(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderPictures(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderSettings(new VisibilitySetting('hide'));
$requestBody->setStartMenuPinnedFolderVideos(new VisibilitySetting('hide'));
$requestBody->setSettingsBlockSettingsApp(true);
$requestBody->setSettingsBlockSystemPage(true);
$requestBody->setSettingsBlockDevicesPage(true);
$requestBody->setSettingsBlockNetworkInternetPage(true);
$requestBody->setSettingsBlockPersonalizationPage(true);
$requestBody->setSettingsBlockAccountsPage(true);
$requestBody->setSettingsBlockTimeLanguagePage(true);
$requestBody->setSettingsBlockEaseOfAccessPage(true);
$requestBody->setSettingsBlockPrivacyPage(true);
$requestBody->setSettingsBlockUpdateSecurityPage(true);
$requestBody->setSettingsBlockAppsPage(true);
$requestBody->setSettingsBlockGamingPage(true);
$requestBody->setWindowsSpotlightBlockConsumerSpecificFeatures(true);
$requestBody->setWindowsSpotlightBlocked(true);
$requestBody->setWindowsSpotlightBlockOnActionCenter(true);
$requestBody->setWindowsSpotlightBlockTailoredExperiences(true);
$requestBody->setWindowsSpotlightBlockThirdPartyNotifications(true);
$requestBody->setWindowsSpotlightBlockWelcomeExperience(true);
$requestBody->setWindowsSpotlightBlockWindowsTips(true);
$requestBody->setWindowsSpotlightConfigureOnLockScreen(new WindowsSpotlightEnablementSettings('disabled'));
$requestBody->setNetworkProxyApplySettingsDeviceWide(true);
$requestBody->setNetworkProxyDisableAutoDetect(true);
$requestBody->setNetworkProxyAutomaticConfigurationUrl('https://example.com/networkProxyAutomaticConfigurationUrl/');
$networkProxyServer = new Windows10NetworkProxyServer();
$networkProxyServer->setOdataType('microsoft.graph.windows10NetworkProxyServer');
$networkProxyServer->setAddress('Address value');
$networkProxyServer->setExceptions(['Exceptions value', ]);
$networkProxyServer->setUseForLocalAddresses(true);
$requestBody->setNetworkProxyServer($networkProxyServer);
$requestBody->setAccountsBlockAddingNonMicrosoftAccountEmail(true);
$requestBody->setAntiTheftModeBlocked(true);
$requestBody->setBluetoothBlocked(true);
$requestBody->setCameraBlocked(true);
$requestBody->setConnectedDevicesServiceBlocked(true);
$requestBody->setCertificatesBlockManualRootCertificateInstallation(true);
$requestBody->setCopyPasteBlocked(true);
$requestBody->setCortanaBlocked(true);
$requestBody->setDeviceManagementBlockFactoryResetOnMobile(true);
$requestBody->setDeviceManagementBlockManualUnenroll(true);
$requestBody->setSafeSearchFilter(new SafeSearchFilterType('strict'));
$requestBody->setEdgeBlockPopups(true);
$requestBody->setEdgeBlockSearchSuggestions(true);
$requestBody->setEdgeBlockSendingIntranetTrafficToInternetExplorer(true);
$requestBody->setEdgeSendIntranetTrafficToInternetExplorer(true);
$requestBody->setEdgeRequireSmartScreen(true);
$requestBody->setEdgeEnterpriseModeSiteListLocation('Edge Enterprise Mode Site List Location value');
$requestBody->setEdgeFirstRunUrl('https://example.com/edgeFirstRunUrl/');
$edgeSearchEngine = new EdgeSearchEngineBase();
$edgeSearchEngine->setOdataType('microsoft.graph.edgeSearchEngineBase');
$requestBody->setEdgeSearchEngine($edgeSearchEngine);
$requestBody->setEdgeHomepageUrls(['Edge Homepage Urls value', ]);
$requestBody->setEdgeBlockAccessToAboutFlags(true);
$requestBody->setSmartScreenBlockPromptOverride(true);
$requestBody->setSmartScreenBlockPromptOverrideForFiles(true);
$requestBody->setWebRtcBlockLocalhostIpAddress(true);
$requestBody->setInternetSharingBlocked(true);
$requestBody->setSettingsBlockAddProvisioningPackage(true);
$requestBody->setSettingsBlockRemoveProvisioningPackage(true);
$requestBody->setSettingsBlockChangeSystemTime(true);
$requestBody->setSettingsBlockEditDeviceName(true);
$requestBody->setSettingsBlockChangeRegion(true);
$requestBody->setSettingsBlockChangeLanguage(true);
$requestBody->setSettingsBlockChangePowerSleep(true);
$requestBody->setLocationServicesBlocked(true);
$requestBody->setMicrosoftAccountBlocked(true);
$requestBody->setMicrosoftAccountBlockSettingsSync(true);
$requestBody->setNfcBlocked(true);
$requestBody->setResetProtectionModeBlocked(true);
$requestBody->setScreenCaptureBlocked(true);
$requestBody->setStorageBlockRemovableStorage(true);
$requestBody->setStorageRequireMobileDeviceEncryption(true);
$requestBody->setUsbBlocked(true);
$requestBody->setVoiceRecordingBlocked(true);
$requestBody->setWiFiBlockAutomaticConnectHotspots(true);
$requestBody->setWiFiBlocked(true);
$requestBody->setWiFiBlockManualConfiguration(true);
$requestBody->setWiFiScanInterval(0);
$requestBody->setWirelessDisplayBlockProjectionToThisDevice(true);
$requestBody->setWirelessDisplayBlockUserInputFromReceiver(true);
$requestBody->setWirelessDisplayRequirePinForPairing(true);
$requestBody->setWindowsStoreBlocked(true);
$requestBody->setAppsAllowTrustedAppsSideloading(new StateManagementSetting('blocked'));
$requestBody->setWindowsStoreBlockAutoUpdate(true);
$requestBody->setDeveloperUnlockSetting(new StateManagementSetting('blocked'));
$requestBody->setSharedUserAppDataAllowed(true);
$requestBody->setAppsBlockWindowsStoreOriginatedApps(true);
$requestBody->setWindowsStoreEnablePrivateStoreOnly(true);
$requestBody->setStorageRestrictAppDataToSystemVolume(true);
$requestBody->setStorageRestrictAppInstallToSystemVolume(true);
$requestBody->setGameDvrBlocked(true);
$requestBody->setExperienceBlockDeviceDiscovery(true);
$requestBody->setExperienceBlockErrorDialogWhenNoSIM(true);
$requestBody->setExperienceBlockTaskSwitcher(true);
$requestBody->setLogonBlockFastUserSwitching(true);
$requestBody->setTenantLockdownRequireNetworkDuringOutOfBoxExperience(true);
$result = $graphServiceClient->deviceManagement()->deviceConfigurations()->byDeviceConfigurationId('deviceConfiguration-id')->patch($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.DeviceManagement
$params = @{
"@odata.type" = "#microsoft.graph.windows10GeneralConfiguration"
description = "Description value"
displayName = "Display Name value"
version = 7
enterpriseCloudPrintDiscoveryEndPoint = "Enterprise Cloud Print Discovery End Point value"
enterpriseCloudPrintOAuthAuthority = "Enterprise Cloud Print OAuth Authority value"
enterpriseCloudPrintOAuthClientIdentifier = "Enterprise Cloud Print OAuth Client Identifier value"
enterpriseCloudPrintResourceIdentifier = "Enterprise Cloud Print Resource Identifier value"
enterpriseCloudPrintDiscoveryMaxLimit =
enterpriseCloudPrintMopriaDiscoveryResourceIdentifier = "Enterprise Cloud Print Mopria Discovery Resource Identifier value"
searchBlockDiacritics = $true
searchDisableAutoLanguageDetection = $true
searchDisableIndexingEncryptedItems = $true
searchEnableRemoteQueries = $true
searchDisableIndexerBackoff = $true
searchDisableIndexingRemovableDrive = $true
searchEnableAutomaticIndexSizeManangement = $true
diagnosticsDataSubmissionMode = "none"
oneDriveDisableFileSync = $true
smartScreenEnableAppInstallControl = $true
personalizationDesktopImageUrl = "https://example.com/personalizationDesktopImageUrl/"
personalizationLockScreenImageUrl = "https://example.com/personalizationLockScreenImageUrl/"
bluetoothAllowedServices = @(
"Bluetooth Allowed Services value"
)
bluetoothBlockAdvertising = $true
bluetoothBlockDiscoverableMode = $true
bluetoothBlockPrePairing = $true
edgeBlockAutofill = $true
edgeBlocked = $true
edgeCookiePolicy = "allow"
edgeBlockDeveloperTools = $true
edgeBlockSendingDoNotTrackHeader = $true
edgeBlockExtensions = $true
edgeBlockInPrivateBrowsing = $true
edgeBlockJavaScript = $true
edgeBlockPasswordManager = $true
edgeBlockAddressBarDropdown = $true
edgeBlockCompatibilityList = $true
edgeClearBrowsingDataOnExit = $true
edgeAllowStartPagesModification = $true
edgeDisableFirstRunPage = $true
edgeBlockLiveTileDataCollection = $true
edgeSyncFavoritesWithInternetExplorer = $true
cellularBlockDataWhenRoaming = $true
cellularBlockVpn = $true
cellularBlockVpnWhenRoaming = $true
defenderRequireRealTimeMonitoring = $true
defenderRequireBehaviorMonitoring = $true
defenderRequireNetworkInspectionSystem = $true
defenderScanDownloads = $true
defenderScanScriptsLoadedInInternetExplorer = $true
defenderBlockEndUserAccess = $true
defenderSignatureUpdateIntervalInHours =
defenderMonitorFileActivity = "disable"
defenderDaysBeforeDeletingQuarantinedMalware =
defenderScanMaxCpu =
defenderScanArchiveFiles = $true
defenderScanIncomingMail = $true
defenderScanRemovableDrivesDuringFullScan = $true
defenderScanMappedNetworkDrivesDuringFullScan = $true
defenderScanNetworkFiles = $true
defenderRequireCloudProtection = $true
defenderCloudBlockLevel = "high"
defenderPromptForSampleSubmission = "alwaysPrompt"
defenderScheduledQuickScanTime = "11:58:49.3840000"
defenderScanType = "disabled"
defenderSystemScanSchedule = "everyday"
defenderScheduledScanTime = "11:59:10.9990000"
defenderDetectedMalwareActions = @{
"@odata.type" = "microsoft.graph.defenderDetectedMalwareActions"
lowSeverity = "clean"
moderateSeverity = "clean"
highSeverity = "clean"
severeSeverity = "clean"
}
defenderFileExtensionsToExclude = @(
"Defender File Extensions To Exclude value"
)
defenderFilesAndFoldersToExclude = @(
"Defender Files And Folders To Exclude value"
)
defenderProcessesToExclude = @(
"Defender Processes To Exclude value"
)
lockScreenAllowTimeoutConfiguration = $true
lockScreenBlockActionCenterNotifications = $true
lockScreenBlockCortana = $true
lockScreenBlockToastNotifications = $true
lockScreenTimeoutInSeconds =
passwordBlockSimple = $true
passwordExpirationDays =
passwordMinimumLength =
passwordMinutesOfInactivityBeforeScreenTimeout =
passwordMinimumCharacterSetCount =
passwordPreviousPasswordBlockCount =
passwordRequired = $true
passwordRequireWhenResumeFromIdleState = $true
passwordRequiredType = "alphanumeric"
passwordSignInFailureCountBeforeFactoryReset =
privacyAdvertisingId = "blocked"
privacyAutoAcceptPairingAndConsentPrompts = $true
privacyBlockInputPersonalization = $true
startBlockUnpinningAppsFromTaskbar = $true
startMenuAppListVisibility = "collapse"
startMenuHideChangeAccountSettings = $true
startMenuHideFrequentlyUsedApps = $true
startMenuHideHibernate = $true
startMenuHideLock = $true
startMenuHidePowerButton = $true
startMenuHideRecentJumpLists = $true
startMenuHideRecentlyAddedApps = $true
startMenuHideRestartOptions = $true
startMenuHideShutDown = $true
startMenuHideSignOut = $true
startMenuHideSleep = $true
startMenuHideSwitchAccount = $true
startMenuHideUserTile = $true
startMenuLayoutEdgeAssetsXml = "c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA=="
startMenuLayoutXml = "c3RhcnRNZW51TGF5b3V0WG1s"
startMenuMode = "fullScreen"
startMenuPinnedFolderDocuments = "hide"
startMenuPinnedFolderDownloads = "hide"
startMenuPinnedFolderFileExplorer = "hide"
startMenuPinnedFolderHomeGroup = "hide"
startMenuPinnedFolderMusic = "hide"
startMenuPinnedFolderNetwork = "hide"
startMenuPinnedFolderPersonalFolder = "hide"
startMenuPinnedFolderPictures = "hide"
startMenuPinnedFolderSettings = "hide"
startMenuPinnedFolderVideos = "hide"
settingsBlockSettingsApp = $true
settingsBlockSystemPage = $true
settingsBlockDevicesPage = $true
settingsBlockNetworkInternetPage = $true
settingsBlockPersonalizationPage = $true
settingsBlockAccountsPage = $true
settingsBlockTimeLanguagePage = $true
settingsBlockEaseOfAccessPage = $true
settingsBlockPrivacyPage = $true
settingsBlockUpdateSecurityPage = $true
settingsBlockAppsPage = $true
settingsBlockGamingPage = $true
windowsSpotlightBlockConsumerSpecificFeatures = $true
windowsSpotlightBlocked = $true
windowsSpotlightBlockOnActionCenter = $true
windowsSpotlightBlockTailoredExperiences = $true
windowsSpotlightBlockThirdPartyNotifications = $true
windowsSpotlightBlockWelcomeExperience = $true
windowsSpotlightBlockWindowsTips = $true
windowsSpotlightConfigureOnLockScreen = "disabled"
networkProxyApplySettingsDeviceWide = $true
networkProxyDisableAutoDetect = $true
networkProxyAutomaticConfigurationUrl = "https://example.com/networkProxyAutomaticConfigurationUrl/"
networkProxyServer = @{
"@odata.type" = "microsoft.graph.windows10NetworkProxyServer"
address = "Address value"
exceptions = @(
"Exceptions value"
)
useForLocalAddresses = $true
}
accountsBlockAddingNonMicrosoftAccountEmail = $true
antiTheftModeBlocked = $true
bluetoothBlocked = $true
cameraBlocked = $true
connectedDevicesServiceBlocked = $true
certificatesBlockManualRootCertificateInstallation = $true
copyPasteBlocked = $true
cortanaBlocked = $true
deviceManagementBlockFactoryResetOnMobile = $true
deviceManagementBlockManualUnenroll = $true
safeSearchFilter = "strict"
edgeBlockPopups = $true
edgeBlockSearchSuggestions = $true
edgeBlockSendingIntranetTrafficToInternetExplorer = $true
edgeSendIntranetTrafficToInternetExplorer = $true
edgeRequireSmartScreen = $true
edgeEnterpriseModeSiteListLocation = "Edge Enterprise Mode Site List Location value"
edgeFirstRunUrl = "https://example.com/edgeFirstRunUrl/"
edgeSearchEngine = @{
"@odata.type" = "microsoft.graph.edgeSearchEngineBase"
}
edgeHomepageUrls = @(
"Edge Homepage Urls value"
)
edgeBlockAccessToAboutFlags = $true
smartScreenBlockPromptOverride = $true
smartScreenBlockPromptOverrideForFiles = $true
webRtcBlockLocalhostIpAddress = $true
internetSharingBlocked = $true
settingsBlockAddProvisioningPackage = $true
settingsBlockRemoveProvisioningPackage = $true
settingsBlockChangeSystemTime = $true
settingsBlockEditDeviceName = $true
settingsBlockChangeRegion = $true
settingsBlockChangeLanguage = $true
settingsBlockChangePowerSleep = $true
locationServicesBlocked = $true
microsoftAccountBlocked = $true
microsoftAccountBlockSettingsSync = $true
nfcBlocked = $true
resetProtectionModeBlocked = $true
screenCaptureBlocked = $true
storageBlockRemovableStorage = $true
storageRequireMobileDeviceEncryption = $true
usbBlocked = $true
voiceRecordingBlocked = $true
wiFiBlockAutomaticConnectHotspots = $true
wiFiBlocked = $true
wiFiBlockManualConfiguration = $true
wiFiScanInterval =
wirelessDisplayBlockProjectionToThisDevice = $true
wirelessDisplayBlockUserInputFromReceiver = $true
wirelessDisplayRequirePinForPairing = $true
windowsStoreBlocked = $true
appsAllowTrustedAppsSideloading = "blocked"
windowsStoreBlockAutoUpdate = $true
developerUnlockSetting = "blocked"
sharedUserAppDataAllowed = $true
appsBlockWindowsStoreOriginatedApps = $true
windowsStoreEnablePrivateStoreOnly = $true
storageRestrictAppDataToSystemVolume = $true
storageRestrictAppInstallToSystemVolume = $true
gameDvrBlocked = $true
experienceBlockDeviceDiscovery = $true
experienceBlockErrorDialogWhenNoSIM = $true
experienceBlockTaskSwitcher = $true
logonBlockFastUserSwitching = $true
tenantLockdownRequireNetworkDuringOutOfBoxExperience = $true
}
Update-MgDeviceManagementDeviceConfiguration -DeviceConfigurationId $deviceConfigurationId -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.windows10_general_configuration import Windows10GeneralConfiguration
from msgraph.generated.models.diagnostic_data_submission_mode import DiagnosticDataSubmissionMode
from msgraph.generated.models.edge_cookie_policy import EdgeCookiePolicy
from msgraph.generated.models.defender_monitor_file_activity import DefenderMonitorFileActivity
from msgraph.generated.models.defender_cloud_block_level_type import DefenderCloudBlockLevelType
from msgraph.generated.models.defender_prompt_for_sample_submission import DefenderPromptForSampleSubmission
from msgraph.generated.models.defender_scan_type import DefenderScanType
from msgraph.generated.models.weekly_schedule import WeeklySchedule
from msgraph.generated.models.defender_detected_malware_actions import DefenderDetectedMalwareActions
from msgraph.generated.models.defender_threat_action import DefenderThreatAction
from msgraph.generated.models.required_password_type import RequiredPasswordType
from msgraph.generated.models.state_management_setting import StateManagementSetting
from msgraph.generated.models.windows_start_menu_app_list_visibility_type import WindowsStartMenuAppListVisibilityType
from msgraph.generated.models.windows_start_menu_mode_type import WindowsStartMenuModeType
from msgraph.generated.models.visibility_setting import VisibilitySetting
from msgraph.generated.models.windows_spotlight_enablement_settings import WindowsSpotlightEnablementSettings
from msgraph.generated.models.windows10_network_proxy_server import Windows10NetworkProxyServer
from msgraph.generated.models.safe_search_filter_type import SafeSearchFilterType
from msgraph.generated.models.edge_search_engine_base import EdgeSearchEngineBase
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Windows10GeneralConfiguration(
odata_type = "#microsoft.graph.windows10GeneralConfiguration",
description = "Description value",
display_name = "Display Name value",
version = 7,
enterprise_cloud_print_discovery_end_point = "Enterprise Cloud Print Discovery End Point value",
enterprise_cloud_print_o_auth_authority = "Enterprise Cloud Print OAuth Authority value",
enterprise_cloud_print_o_auth_client_identifier = "Enterprise Cloud Print OAuth Client Identifier value",
enterprise_cloud_print_resource_identifier = "Enterprise Cloud Print Resource Identifier value",
enterprise_cloud_print_discovery_max_limit = 5,
enterprise_cloud_print_mopria_discovery_resource_identifier = "Enterprise Cloud Print Mopria Discovery Resource Identifier value",
search_block_diacritics = True,
search_disable_auto_language_detection = True,
search_disable_indexing_encrypted_items = True,
search_enable_remote_queries = True,
search_disable_indexer_backoff = True,
search_disable_indexing_removable_drive = True,
search_enable_automatic_index_size_manangement = True,
diagnostics_data_submission_mode = DiagnosticDataSubmissionMode.None,
one_drive_disable_file_sync = True,
smart_screen_enable_app_install_control = True,
personalization_desktop_image_url = "https://example.com/personalizationDesktopImageUrl/",
personalization_lock_screen_image_url = "https://example.com/personalizationLockScreenImageUrl/",
bluetooth_allowed_services = [
"Bluetooth Allowed Services value",
],
bluetooth_block_advertising = True,
bluetooth_block_discoverable_mode = True,
bluetooth_block_pre_pairing = True,
edge_block_autofill = True,
edge_blocked = True,
edge_cookie_policy = EdgeCookiePolicy.Allow,
edge_block_developer_tools = True,
edge_block_sending_do_not_track_header = True,
edge_block_extensions = True,
edge_block_in_private_browsing = True,
edge_block_java_script = True,
edge_block_password_manager = True,
edge_block_address_bar_dropdown = True,
edge_block_compatibility_list = True,
edge_clear_browsing_data_on_exit = True,
edge_allow_start_pages_modification = True,
edge_disable_first_run_page = True,
edge_block_live_tile_data_collection = True,
edge_sync_favorites_with_internet_explorer = True,
cellular_block_data_when_roaming = True,
cellular_block_vpn = True,
cellular_block_vpn_when_roaming = True,
defender_require_real_time_monitoring = True,
defender_require_behavior_monitoring = True,
defender_require_network_inspection_system = True,
defender_scan_downloads = True,
defender_scan_scripts_loaded_in_internet_explorer = True,
defender_block_end_user_access = True,
defender_signature_update_interval_in_hours = 6,
defender_monitor_file_activity = DefenderMonitorFileActivity.Disable,
defender_days_before_deleting_quarantined_malware = 12,
defender_scan_max_cpu = 2,
defender_scan_archive_files = True,
defender_scan_incoming_mail = True,
defender_scan_removable_drives_during_full_scan = True,
defender_scan_mapped_network_drives_during_full_scan = True,
defender_scan_network_files = True,
defender_require_cloud_protection = True,
defender_cloud_block_level = DefenderCloudBlockLevelType.High,
defender_prompt_for_sample_submission = DefenderPromptForSampleSubmission.AlwaysPrompt,
defender_scheduled_quick_scan_time = "11:58:49.3840000",
defender_scan_type = DefenderScanType.Disabled,
defender_system_scan_schedule = WeeklySchedule.Everyday,
defender_scheduled_scan_time = "11:59:10.9990000",
defender_detected_malware_actions = DefenderDetectedMalwareActions(
odata_type = "microsoft.graph.defenderDetectedMalwareActions",
low_severity = DefenderThreatAction.Clean,
moderate_severity = DefenderThreatAction.Clean,
high_severity = DefenderThreatAction.Clean,
severe_severity = DefenderThreatAction.Clean,
),
defender_file_extensions_to_exclude = [
"Defender File Extensions To Exclude value",
],
defender_files_and_folders_to_exclude = [
"Defender Files And Folders To Exclude value",
],
defender_processes_to_exclude = [
"Defender Processes To Exclude value",
],
lock_screen_allow_timeout_configuration = True,
lock_screen_block_action_center_notifications = True,
lock_screen_block_cortana = True,
lock_screen_block_toast_notifications = True,
lock_screen_timeout_in_seconds = 10,
password_block_simple = True,
password_expiration_days = 6,
password_minimum_length = 5,
password_minutes_of_inactivity_before_screen_timeout = 14,
password_minimum_character_set_count = 0,
password_previous_password_block_count = 2,
password_required = True,
password_require_when_resume_from_idle_state = True,
password_required_type = RequiredPasswordType.Alphanumeric,
password_sign_in_failure_count_before_factory_reset = 12,
privacy_advertising_id = StateManagementSetting.Blocked,
privacy_auto_accept_pairing_and_consent_prompts = True,
privacy_block_input_personalization = True,
start_block_unpinning_apps_from_taskbar = True,
start_menu_app_list_visibility = WindowsStartMenuAppListVisibilityType.Collapse,
start_menu_hide_change_account_settings = True,
start_menu_hide_frequently_used_apps = True,
start_menu_hide_hibernate = True,
start_menu_hide_lock = True,
start_menu_hide_power_button = True,
start_menu_hide_recent_jump_lists = True,
start_menu_hide_recently_added_apps = True,
start_menu_hide_restart_options = True,
start_menu_hide_shut_down = True,
start_menu_hide_sign_out = True,
start_menu_hide_sleep = True,
start_menu_hide_switch_account = True,
start_menu_hide_user_tile = True,
start_menu_layout_edge_assets_xml = base64.urlsafe_b64decode("c3RhcnRNZW51TGF5b3V0RWRnZUFzc2V0c1htbA=="),
start_menu_layout_xml = base64.urlsafe_b64decode("c3RhcnRNZW51TGF5b3V0WG1s"),
start_menu_mode = WindowsStartMenuModeType.FullScreen,
start_menu_pinned_folder_documents = VisibilitySetting.Hide,
start_menu_pinned_folder_downloads = VisibilitySetting.Hide,
start_menu_pinned_folder_file_explorer = VisibilitySetting.Hide,
start_menu_pinned_folder_home_group = VisibilitySetting.Hide,
start_menu_pinned_folder_music = VisibilitySetting.Hide,
start_menu_pinned_folder_network = VisibilitySetting.Hide,
start_menu_pinned_folder_personal_folder = VisibilitySetting.Hide,
start_menu_pinned_folder_pictures = VisibilitySetting.Hide,
start_menu_pinned_folder_settings = VisibilitySetting.Hide,
start_menu_pinned_folder_videos = VisibilitySetting.Hide,
settings_block_settings_app = True,
settings_block_system_page = True,
settings_block_devices_page = True,
settings_block_network_internet_page = True,
settings_block_personalization_page = True,
settings_block_accounts_page = True,
settings_block_time_language_page = True,
settings_block_ease_of_access_page = True,
settings_block_privacy_page = True,
settings_block_update_security_page = True,
settings_block_apps_page = True,
settings_block_gaming_page = True,
windows_spotlight_block_consumer_specific_features = True,
windows_spotlight_blocked = True,
windows_spotlight_block_on_action_center = True,
windows_spotlight_block_tailored_experiences = True,
windows_spotlight_block_third_party_notifications = True,
windows_spotlight_block_welcome_experience = True,
windows_spotlight_block_windows_tips = True,
windows_spotlight_configure_on_lock_screen = WindowsSpotlightEnablementSettings.Disabled,
network_proxy_apply_settings_device_wide = True,
network_proxy_disable_auto_detect = True,
network_proxy_automatic_configuration_url = "https://example.com/networkProxyAutomaticConfigurationUrl/",
network_proxy_server = Windows10NetworkProxyServer(
odata_type = "microsoft.graph.windows10NetworkProxyServer",
address = "Address value",
exceptions = [
"Exceptions value",
],
use_for_local_addresses = True,
),
accounts_block_adding_non_microsoft_account_email = True,
anti_theft_mode_blocked = True,
bluetooth_blocked = True,
camera_blocked = True,
connected_devices_service_blocked = True,
certificates_block_manual_root_certificate_installation = True,
copy_paste_blocked = True,
cortana_blocked = True,
device_management_block_factory_reset_on_mobile = True,
device_management_block_manual_unenroll = True,
safe_search_filter = SafeSearchFilterType.Strict,
edge_block_popups = True,
edge_block_search_suggestions = True,
edge_block_sending_intranet_traffic_to_internet_explorer = True,
edge_send_intranet_traffic_to_internet_explorer = True,
edge_require_smart_screen = True,
edge_enterprise_mode_site_list_location = "Edge Enterprise Mode Site List Location value",
edge_first_run_url = "https://example.com/edgeFirstRunUrl/",
edge_search_engine = EdgeSearchEngineBase(
odata_type = "microsoft.graph.edgeSearchEngineBase",
),
edge_homepage_urls = [
"Edge Homepage Urls value",
],
edge_block_access_to_about_flags = True,
smart_screen_block_prompt_override = True,
smart_screen_block_prompt_override_for_files = True,
web_rtc_block_localhost_ip_address = True,
internet_sharing_blocked = True,
settings_block_add_provisioning_package = True,
settings_block_remove_provisioning_package = True,
settings_block_change_system_time = True,
settings_block_edit_device_name = True,
settings_block_change_region = True,
settings_block_change_language = True,
settings_block_change_power_sleep = True,
location_services_blocked = True,
microsoft_account_blocked = True,
microsoft_account_block_settings_sync = True,
nfc_blocked = True,
reset_protection_mode_blocked = True,
screen_capture_blocked = True,
storage_block_removable_storage = True,
storage_require_mobile_device_encryption = True,
usb_blocked = True,
voice_recording_blocked = True,
wi_fi_block_automatic_connect_hotspots = True,
wi_fi_blocked = True,
wi_fi_block_manual_configuration = True,
wi_fi_scan_interval = 0,
wireless_display_block_projection_to_this_device = True,
wireless_display_block_user_input_from_receiver = True,
wireless_display_require_pin_for_pairing = True,
windows_store_blocked = True,
apps_allow_trusted_apps_sideloading = StateManagementSetting.Blocked,
windows_store_block_auto_update = True,
developer_unlock_setting = StateManagementSetting.Blocked,
shared_user_app_data_allowed = True,
apps_block_windows_store_originated_apps = True,
windows_store_enable_private_store_only = True,
storage_restrict_app_data_to_system_volume = True,
storage_restrict_app_install_to_system_volume = True,
game_dvr_blocked = True,
experience_block_device_discovery = True,
experience_block_error_dialog_when_no_s_i_m = True,
experience_block_task_switcher = True,
logon_block_fast_user_switching = True,
tenant_lockdown_require_network_during_out_of_box_experience = True,
)
result = await graph_client.device_management.device_configurations.by_device_configuration_id('deviceConfiguration-id').patch(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
以下は、応答の例です。 注: 簡潔にするために、ここに示す応答オブジェクトは切り詰められている場合があります。 実際の呼び出しではすべてのプロパティが返されます。