Scsi Category | Vmware PowerCLI Reference

Scsi Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations

Step 1: Retrieve a object by running a Get command

You can READ objects by using Get-ScsiController cmdlet. See example below:

# Retrieves the SCSI controllers of the VM1 and VM2 virtual machines.

Get-VM VM1, VM2 | Get-ScsiController

Step 2 : Run commands from the CRUD group

You can CREATE objects by using New-ScsiController cmdlet. See example below:

# Creates a new 10GB hard disk and a new SCSI controller with default values for the BusSharingMode and Type properties.

$vm = Get-VM VM | New-HardDisk -CapacityKB 10485760 | New-ScsiController
You can UPDATE objects by using Set-ScsiController cmdlet. See example below:

# Configures the bus sharing mode of the SCSI controllers of a virtual machine to Physical mode.

Get-ScsiController -VM VM | Set-ScsiController -BusSharingMode Physical

Step 3: Explore More Related Commands:


Get-ScsiLun This cmdlet retrieves the SCSI devices available on the vCenter Server system.
Get-ScsiLunPath This cmdlet retrieves the list of vmhba paths to a specified SCSI device.
Set-ScsiLun This cmdlet modifies the configuration of a SCSI device.
Set-ScsiLunPath This cmdlet configures a vmhba path to a SCSI device.