< Back
Set-ALImage
Post
NAME Set-ALImage
SYNOPSIS
Edits values of a image(template)
SYNTAX
Set-ALImage [-websession] <Object> [-id] <String> [[-name] <String>] [[-description] <String>] [[-connectorid]
<String>] [[-osrevid] <String>] [[-platrevid] <String>] [[-applayerid] <Array>] [[-apprevid] <Array>]
[[-ElasticLayerMode] <String>] [[-diskformat] <String>] [[-size] <String>] [[-icon] <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Edits values of a image(template)
PARAMETERS
-websession <Object>
Existing Webrequest session for ELM Appliance
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-id <String>
ID of image
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-name <String>
Name of the image
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-description <String>
Description of the image
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-connectorid <String>
ID of Connector to use
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-osrevid <String>
Operating system layer version ID
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-platrevid <String>
Platform layer version ID
Required? false
Position? 7
Default value
Accept pipeline input? false
Accept wildcard characters? false
-applayerid <Array>
Application layer ID
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-apprevid <Array>
Application layer version ID
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ElasticLayerMode <String>
Elastic Layer setting for the image. Options "None","Session","Office365","SessionOffice365","Desktop"
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-diskformat <String>
Disk format of the image
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false
-size <String>
Size of layer in MB
Required? false
Position? 12
Default value
Accept pipeline input? false
Accept wildcard characters? false
-icon <String>
Icon ID
Required? false
Position? 13
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$fileshare = Get-ALRemoteshare -websession $websession
$connector = Get-ALconnector -websession $websession -type Create|where{$_.name -eq "MYvCenter"}
$oss = Get-ALOsLayer -websession $websession|where{$_.name -eq "Windows 10 x64"}
$osrevs = get-aloslayerdetail -websession $websession -id $oss.id
$osrevid = $osrevs.Revisions.OsLayerRevisionDetail|where{$_.state -eq "Deployable"}|Sort-Object revision
-Descending|select -First 1
$plats = Get-ALPlatformlayer -websession $websession|where{$_.name -eq "Windows 10 VDA"}
$platrevs = get-alplatformlayerdetail -websession $websession -id $plats.id
$platformrevid = $platrevs.Revisions.PlatformLayerRevisionDetail|where{$_.state -eq "Deployable"}|Sort-Object
revision -Descending|select -First 1
$image = Get-ALimage -websession $websession|where{$_.name -eq "Windows 10 Accounting"}
Set-alimage -websession $websession -name $images.Name -description "My new description" -connectorid
$connector.id -osrevid $osrevid.Id -platrevid $platformrevid.id -id $image.Id -ElasticLayerMode Session
-diskformat $connector.ValidDiskFormats.DiskFormat
### Edit image with latest revision for a specific app or apps ***
$apps = @("Winscp","7-zip")
$applayerids = foreach ($app in $apps){Get-ALapplayer -websession $websession|where{$_.name -eq $app}}
$apprevs = foreach ($applayerid in $applayerids){get-alapplayerDetail -websession $websession -id $applayerid.Id}
$apprevid = foreach ($apprev in $apprevs){$apprev.Revisions.AppLayerRevisionDetail|where{$_.state -eq
"Deployable"}|Sort-Object DisplayedVersion -Descending|select -First 1}
Set-alimage -websession $websession -name $images.Name -description "My new description" -connectorid
$connector.id -osrevid $osrevid.Id -platrevid $platformrevid.id -id $image.Id -ElasticLayerMode Session
-diskformat $connector.ValidDiskFormats.DiskFormat -applayerid $apprevid.LayerId -apprevid $apprevid.Id
RELATED LINKS
SYNOPSIS
Edits values of a image(template)
SYNTAX
Set-ALImage [-websession] <Object> [-id] <String> [[-name] <String>] [[-description] <String>] [[-connectorid]
<String>] [[-osrevid] <String>] [[-platrevid] <String>] [[-applayerid] <Array>] [[-apprevid] <Array>]
[[-ElasticLayerMode] <String>] [[-diskformat] <String>] [[-size] <String>] [[-icon] <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Edits values of a image(template)
PARAMETERS
-websession <Object>
Existing Webrequest session for ELM Appliance
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-id <String>
ID of image
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-name <String>
Name of the image
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-description <String>
Description of the image
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-connectorid <String>
ID of Connector to use
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-osrevid <String>
Operating system layer version ID
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-platrevid <String>
Platform layer version ID
Required? false
Position? 7
Default value
Accept pipeline input? false
Accept wildcard characters? false
-applayerid <Array>
Application layer ID
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-apprevid <Array>
Application layer version ID
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ElasticLayerMode <String>
Elastic Layer setting for the image. Options "None","Session","Office365","SessionOffice365","Desktop"
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-diskformat <String>
Disk format of the image
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false
-size <String>
Size of layer in MB
Required? false
Position? 12
Default value
Accept pipeline input? false
Accept wildcard characters? false
-icon <String>
Icon ID
Required? false
Position? 13
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$fileshare = Get-ALRemoteshare -websession $websession
$connector = Get-ALconnector -websession $websession -type Create|where{$_.name -eq "MYvCenter"}
$oss = Get-ALOsLayer -websession $websession|where{$_.name -eq "Windows 10 x64"}
$osrevs = get-aloslayerdetail -websession $websession -id $oss.id
$osrevid = $osrevs.Revisions.OsLayerRevisionDetail|where{$_.state -eq "Deployable"}|Sort-Object revision
-Descending|select -First 1
$plats = Get-ALPlatformlayer -websession $websession|where{$_.name -eq "Windows 10 VDA"}
$platrevs = get-alplatformlayerdetail -websession $websession -id $plats.id
$platformrevid = $platrevs.Revisions.PlatformLayerRevisionDetail|where{$_.state -eq "Deployable"}|Sort-Object
revision -Descending|select -First 1
$image = Get-ALimage -websession $websession|where{$_.name -eq "Windows 10 Accounting"}
Set-alimage -websession $websession -name $images.Name -description "My new description" -connectorid
$connector.id -osrevid $osrevid.Id -platrevid $platformrevid.id -id $image.Id -ElasticLayerMode Session
-diskformat $connector.ValidDiskFormats.DiskFormat
### Edit image with latest revision for a specific app or apps ***
$apps = @("Winscp","7-zip")
$applayerids = foreach ($app in $apps){Get-ALapplayer -websession $websession|where{$_.name -eq $app}}
$apprevs = foreach ($applayerid in $applayerids){get-alapplayerDetail -websession $websession -id $applayerid.Id}
$apprevid = foreach ($apprev in $apprevs){$apprev.Revisions.AppLayerRevisionDetail|where{$_.state -eq
"Deployable"}|Sort-Object DisplayedVersion -Descending|select -First 1}
Set-alimage -websession $websession -name $images.Name -description "My new description" -connectorid
$connector.id -osrevid $osrevid.Id -platrevid $platformrevid.id -id $image.Id -ElasticLayerMode Session
-diskformat $connector.ValidDiskFormats.DiskFormat -applayerid $apprevid.LayerId -apprevid $apprevid.Id
RELATED LINKS