< Back

Remove-ALAppassignment

Mon Jan 13, 2020 7:51 am

NAME Remove-ALAppassignment



SYNOPSIS

Removes a layer(application) assignment to image(template)





SYNTAX

Remove-ALAppassignment [-websession] <Object> [-applayerid] <String> [-imageid] <String> [-WhatIf] [-Confirm]

[<CommonParameters>]





DESCRIPTION

Removes a layer(application) assignment to 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



-applayerid <String>



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-imageid <String>

Image or template where application should be removed



Required? true

Position? 3

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:\\>$image = Get-ALimage -websession $websession|where{$_.name -eq "Accounting}



$app = Get-ALapplayer -websession $websession|where{$_.name -eq "Libre Office"}

$apprevs = get-alapplayer -websession $websession -id $app.Id

$apprevid = $apprevs.Revisions.AppLayerRevisionDetail|where{$_.state -eq "Deployable"}|Sort-Object revision

-Descending|select -First 1

remove-alappassignment -websession $websession -applayerid $apprevid.LayerId -imageid $image.id











RELATED LINKS