Remove-LXCAOSImage

This cmdlet removes an operating-system image and its image profiles from the OS-images repository.

Note: You can pipe OSImage objects to this cmdlet.

Syntax

Remove-LXCAOSImage [-Connection LXCAConnection] 
                    -ImageID String
                   [-Force]
                   [CommonParameter]

Remove-LXCAOSImage [-Connection LXCAConnection] 
                    -OSImage OSImage 
                   [-Force]
                   [CommonParameter]

Remove-LXCAOSImage [-Connection LXCAConnection] 
                    -ProfileID String 
                   [-Force]
                   [CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-ImageID String
Specifies the OS image ID. The cmdlet removes the OS image and its image profiles.
-OSImage OSImage
Specifies the operating-system image. The cmdlet removes the image and its image profiles.
Tip: To obtain the OSImage object, use the Get-LXCAOSImage cmdlet.
-ProfileID String
Specifies the image profile ID. The cmdlet removes the image profile.
-Force
When specified, the cmdlet removes the image or imageprofile without prompting for confirmation about the removal.
CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

This cmdlets removes the image or image profile (or both) from the OS-images repository. No objects are returned.

Examples

The following example removes an OS image from the OS image repository.

$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred

$images = Get-LXCAOSImage
Remove-LXCAOSImage -OSImage $images[0]

Disconnect-LXCA

Related links