Optimization

Get

Retrieve Image Optimization Settings

GET/api/AVD/Template/{id}/Optimization
Path parameters
id*integer (int32)

Retrieve the Image Optimization by id

Response

Success

Body
enableOptimizationboolean

Whether Optimization is enabled or not

optimizationTypeOptimizationTypeEnum (enum)

Optimization Type

0 = Automatic,1 = Manual
windowsDefenderATPWindowsDefenderATP (object)

Image Optimization - Windows Defender ATP

windowsComponentsWindowsComponents (object)

Image Optimization - Windows Components

windowsDefenderATPEnabledboolean

Whether Windows Defender ATP is enabled or not

windowsComponentsEnabledboolean

Whether Windows Components is enabled or not

windowsServicesEnabledboolean

Whether Windows Services is enabled or not

windowsScheduledTasksEnabledboolean

Whether Windows Scheduled Task is enabled or not

windowsAdvancedOptionsEnabledboolean

Whether Windows Advanced Options is enabled or not

networkPerformanceEnabledboolean

Whether Network Performance is enabled or not

registryEnabledboolean

Whether Registry is enabled or not

visualEffectsEnabledboolean

Whether Visual Effects is enabled or not

diskCleanupEnabledboolean

Whether Disk Cleanup is enabled or not

customScriptEnabledboolean

Whether Custom Script is enabled or not

windowsServicesWindowsServices (object)

Image Optimization - Windows Services

windowsAdvancedOptionsWindowsAdvancedOptions (object)

Image Optimization - Windows Advanced Options

networkPerformanceNetworkPerformance (object)

Image Optimization - Network Performance

customScriptCustomScript (object)

Image Optimization - Custom Script

diskCleanupDiskCleanup (object)

Image Optimization - Disk Cleanup

visualEffectsVisualEffects (object)

Image Optimization - Visual Effects

windowsScheduledTasksWindowsScheduledTasks (object)

Image Optimization - Windows Scheduled Tasks A List of Windows Scheduled Task settings

registryRegistries (object)

Image Optimization - Registries A list of Registries

uwpAppsUWPApps (object)

Image Optimization - UWPApps

Request
const response = await fetch('/api/AVD/Template/{id}/Optimization', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "enableOptimization": false,
  "optimizationType": [
    "0 = Automatic",
    "1 = Manual"
  ],
  "windowsDefenderATP": {
    "winDefATPTurnOffOn": [
      "0 = TurnOffWindowsDefenderATP",
      "1 = TurnOnWindowsDefenderATP"
    ],
    "disableRealTimeProtection": false,
    "excludeFolders": [
      "text"
    ],
    "excludeProcesses": [
      "text"
    ],
    "excludeExtension": [
      "text"
    ]
  },
  "windowsComponents": {
    "windowsComponentsList": [
      {
        "type": [
          "0 = Predefined",
          "1 = Custom"
        ],
        "componentName": "text",
        "displayName": "text",
        "aliases": "text"
      }
    ]
  },
  "windowsDefenderATPEnabled": false,
  "windowsComponentsEnabled": false,
  "windowsServicesEnabled": false,
  "windowsScheduledTasksEnabled": false,
  "windowsAdvancedOptionsEnabled": false,
  "networkPerformanceEnabled": false,
  "registryEnabled": false,
  "visualEffectsEnabled": false,
  "diskCleanupEnabled": false,
  "customScriptEnabled": false,
  "windowsServices": {
    "windowsServicesList": [
      {
        "type": [
          "0 = Predefined",
          "1 = Custom"
        ],
        "serviceName": "text",
        "displayName": "text",
        "aliases": "text"
      }
    ]
  },
  "windowsAdvancedOptions": {
    "partialStartLayoutContent": "text",
    "hibernate": false,
    "teleCollection": false,
    "systemRestore": false,
    "additionalErrorReport": false,
    "tiles": false,
    "cortana": false,
    "microsoftConsumerExperience": false,
    "windowsTips": false,
    "commonProgramGroups": false,
    "partialStartMenu": false
  },
  "networkPerformance": {
    "fileInfoCacheEnable": false,
    "directoryCacheEnable": false,
    "fileNotFoundCacheEnable": false,
    "dormantFileLimitEnable": false,
    "disableTCP": false,
    "disableIPv6CompEnable": false,
    "disableIPv6ToIPv4": false,
    "disableIsaTap": false
  },
  "customScript": {
    "arguments": "text",
    "command": "text",
    "initDir": "text",
    "user": "text"
  },
  "diskCleanup": {
    "cleanupWinSxSFolder": false,
    "cleanupSystemFiles": false,
    "cleanupTemporaryFileLogs": false,
    "removeOneDrive": false,
    "deleteUserProfiles": false
  },
  "visualEffects": {
    "visualEffectsTypes": [
      "0 = LetWindowsChooseWhatsBest",
      "1 = AdjustForBestAppearance",
      "2 = AdjustForBestPerformance",
      "3 = Custom"
    ],
    "animateControlSelectElements": false,
    "animateWindowsWhenMinimizingMaximizing": false,
    "animateTaskbar": false,
    "enablePeek": false,
    "fadeSlideMenus": false,
    "fadeSlideToolTips": false,
    "fadeOutMenuItems": false,
    "saveTaskbarThumbnail": false,
    "showShadowUnderMouse": false,
    "shadowUnderWindows": false,
    "thumbnailsInsteadOfIcons": false,
    "showTranslucentSelection": false,
    "showWindowsContentWhilstDragging": false,
    "slideOpenComboBoxes": false,
    "smoothEdgesScreenFonts": false,
    "smoothScrollListBoxes": false,
    "dropShadowsIcon": false
  },
  "windowsScheduledTasks": {
    "windowsScheduledTasksList": [
      {
        "task": "text",
        "location": "text",
        "type": [
          "0 = Folder",
          "1 = Task"
        ]
      }
    ]
  },
  "registry": {
    "registryList": [
      {
        "action": [
          "0 = Add",
          "1 = Modify",
          "2 = Delete"
        ],
        "registryName": "text",
        "displayName": "text",
        "hiveType": [
          "0 = HKEY_CURRENT_CONFIG",
          "1 = HKEY_USERS",
          "2 = HKEY_LOCAL_MACHINE",
          "3 = HKEY_CLASSES_ROOT"
        ],
        "path": "text",
        "regType": [
          "0 = REG_SZ",
          "1 = REG_DWORD",
          "2 = REG_QWORD",
          "3 = REG_MULTI_SZ",
          "4 = REG_EXPAND_SZ"
        ],
        "stringValue": "text"
      }
    ]
  },
  "uwpApps": {
    "allExcept": [
      "text"
    ],
    "followingPkgs": [
      "text"
    ],
    "removeType": [
      "0 = AllExcept",
      "1 = FollowingPkgs"
    ]
  }
}

Update

Update the Image Optimization settings with the specified ID.

PUT/api/AVD/Template/{id}/Optimization
Path parameters
id*integer (int32)

The ID for which to modify the Image Optimization.

Body

Image Optimization Settings.

enableOptimizationnullable boolean

Whether Optimization is Enabled or not

optimizationTypeOptimizationTypeEnum (enum)

Optimization Type

0 = Automatic,1 = Manual
windowsDefenderATPEnablednullable boolean

Whether Windows Defender ATP is enabled or not

windowsComponentsEnablednullable boolean

Whether Windows Components is enabled or not

windowsServicesEnablednullable boolean

Whether Windows Services is enabled or not

windowsScheduledTasksEnablednullable boolean

Whether Windows Scheduled Task is enabled or not

windowsAdvancedOptionsEnablednullable boolean

Whether Windows Advanced Options is enabled or not

networkPerformanceEnablednullable boolean

Whether Network Performance is enabled or not

registryEnablednullable boolean

Whether Registry is enabled or not

visualEffectsEnablednullable boolean

Whether Visual Effects is enabled or not

diskCleanupEnablednullable boolean

Whether Disk Cleanup is enabled or not

customScriptEnablednullable boolean

Whether Custom Script is enabled or not

winDefATPTurnOffOnWindowsDefenderATPEnable (enum)

Windows enable options

0 = TurnOffWindowsDefenderATP,1 = TurnOnWindowsDefenderATP
disableRealTimeProtectionnullable boolean

Disable Real Time Protection

excludeFoldersnullable array of string

Exclude Folders List

excludeProcessesnullable array of string

Exclude Processes

excludeExtensionnullable array of string

Exclude Extensions

partialStartLayoutContentnullable string

Partial Start menu layout

hibernatenullable boolean

Whether Hibernate is enabled or not

teleCollectionnullable boolean

Whether TeleCollection is enabled or not

systemRestorenullable boolean

Whether System Restore is enabled or not

additionalErrorReportnullable boolean

Whether Additional Error Reporting is enabled or not

tilesnullable boolean

Whether Tiles is enabled or not

cortananullable boolean

Whether Cortana is enabled or not

microsoftConsumerExperiencenullable boolean

Whether Microsoft Consumer Experience is enabled or not

windowsTipsnullable boolean

Whether Windows Tips is enabled or not

commonProgramGroupsnullable boolean

Whether Common Program Groups is enabled or not

partialStartMenunullable boolean

Whether Partial Start Menu is enabled or not

dirCacheMaxnullable integer (int32)

Directory Cache Value

dormantFileLimitnullable integer (int32)

Dormant File Limit Value

fileNotFoundCachenullable integer (int32)

File Not Found Cache Value

fileInfoCachenullable integer (int32)

File Info Cache Value

fileInfoCacheEnablenullable boolean

Whether File Info Cache is enabled or not

directoryCacheEnablenullable boolean

Whether Directory Cache is enabled or not

fileNotFoundCacheEnablenullable boolean

Whether File Not Found Cache is enabled or not

dormantFileLimitEnablenullable boolean

Whether Dormant File Limit is enabled or not

disableTCPnullable boolean

Whether Disable TCP is enabled or not

disableIPv6CompEnablenullable boolean

Whether Disable IPv6 Components is enabled or not

disableIPv6ToIPv4nullable boolean

Whether Disable IPv6 To IPv4 is enabled or not

disableIsaTapnullable boolean

Whether Disable IsaTap for IPv6 is enabled or not

argumentsnullable string

Arguments

commandnullable string

Command

initDirnullable string

Initial Directory

usernullable string

User

passwordnullable string

Password

cleanupWinSxSFoldernullable boolean

Whether Clean up windows SxS Folder is enabled or not

cleanupSystemFilesnullable boolean

Whether Clean up system files is enabled or not

cleanupTemporaryFileLogsnullable boolean

Whether Clean up temporary file logs is enabled or not

removeOneDrivenullable boolean

Whether Remove One Drives is enabled or not

deleteUserProfilesnullable boolean

Whether Delete User Profiles is enabled or not

visualEffectsTypesVisualEffectsType (enum)

Visual Effects Type

0 = LetWindowsChooseWhatsBest,1 = AdjustForBestAppearance,2 = AdjustForBestPerformance,3 = Custom
animateControlSelectElementsnullable boolean

Whether Animate Control Select Elements is enabled or not

animateWindowsWhenMinimizingMaximizingnullable boolean

Whether Animate Windows When Minimizing Or Maximizing is enabled or not

animateTaskbarnullable boolean

Whether Animate Taskbar is enabled or not

enablePeeknullable boolean

Whether Peek is enabled or not

fadeSlideMenusnullable boolean

Whether Fade Slide Menus is enabled or not

fadeSlideToolTipsnullable boolean

Whether Fade Slide Tool Tips is enabled or not

fadeOutMenuItemsnullable boolean

Whether Fade Out Menu Items is enabled or not

saveTaskbarThumbnailnullable boolean

Whether Taskbar Thumbnail is enabled or not

showShadowUnderMousenullable boolean

Whether Shadow Under Mouse is enabled or not

shadowUnderWindowsnullable boolean

Whether Shadow Under Windows is enabled or not

thumbnailsInsteadOfIconsnullable boolean

Whether Thumbnails instead of icons is enabled or not

showTranslucentSelectionnullable boolean

Whether Translucent Selection is enabled or not

showWindowsContentWhilstDraggingnullable boolean

Whether Windows Content Whilst Dragging is enabled or not

slideOpenComboBoxesnullable boolean

Whether Slide open combo boxes is enabled or not

smoothEdgesScreenFontsnullable boolean

Whether Smooth Edges Screen Fonts is enabled or not

smoothScrollListBoxesnullable boolean

Whether Smooth Scroll List Boxes is enabled or not

dropShadowsIconnullable boolean

Whether Drop Shadow Icon is enabled or not

forceboolean

Force Optimization.

Response

No Content

Request
const response = await fetch('/api/AVD/Template/{id}/Optimization', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "detail": "text",
  "instance": "text"
}

Last updated

Other Resources

Feedback

© 2024 Parallels International GmbH. All rights reserved.