VMware vSphere PowerCLI Reference by Alan Renouf & Luc Dekens
Author:Alan Renouf & Luc Dekens
Language: eng
Format: epub
Publisher: Sybex
Published: 2011-03-16T16:00:00+00:00
The script in Listing 12-6 produced a listing like this:
Name Type IScsiHbaName
---- ---- ------------
192.168.111.1:3260 Send iqn.1998-01.com.vmware:esx41-35fe03...
192.168.111.1:3260 Static iqn.1998-01.com.vmware:esx41-35fe03...
Unfortunately, as we worked with this automation, we found a few problems with the Get-IScsiHbaTarget cmdlet in the PowerCLI build we used for this book (VMware vSphere PowerCLI, version 4.1). To bypass these problems and as an example of how you can use the vSphere object properties from your scripts, we provide the Get-IScsiHbaTargets function in Listing 12-7, which emulates the Get-IScsiHbaTarget cmdlet. The function also shows you if the CHAP setting is enabled for each target and if it was inherited from the CHAP settings of the parent.
Listing 12-7: Get-IScsiHbaTargets function
function Get-IScsiHbaTargets{
<#
.SYNOPSIS
Returns the iScsi targets
.DESCRIPTION
The function returns all the iScsi targets of the
requested Type for one or more iScsi HBAs
.PARAMETER IScsiHba
The iScsi HBA(s) for which you want to retrieve the
targets
.PARAMETER Type
The type of iScsi HBA targets you want to retrieve.
The valid values are Send and Static
.NOTES
Source: Automating vSphere Administration
Authors: Luc Dekens, Arnim van Lieshout, Jonathan Medd,
Alan Renouf, Glenn Sizemore.PARAMETER SqlServer
.EXAMPLE
PS> Get-IScsiHbaTargets -IScsiHba $hba -Type Static
.EXAMPLE
PS> Get-VMHost MyESX | ′
>> Get-VMHostHba -Type IScsi | ′
>> Get-IScsiHbaTargets
#>
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7767)
Filmora Efficient Editing by Alexander Zacharias(5790)
The Infinite Retina by Robert Scoble Irena Cronin(5271)
Learn Wireshark - Fundamentals of Wireshark. by Lisa Bock(3981)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3935)
Edit Like a Pro with iMovie by Regit(3431)
Linux Administration Best Practices by Scott Alan Miller(2858)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic & Jasmin Redzepagic(2836)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2521)
Mastering PowerShell Scripting - Fourth Edition by Chris Dent(2405)
Docker on Windows by Stoneman Elton(2319)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2315)
Creative Projects for Rust Programmers by Carlo Milanesi(2255)
Hands-On AWS Penetration Testing with Kali Linux by Karl Gilbert(2109)
Hands-On Linux for Architects by Denis Salamanca(2052)
Programming in C (4th Edition) (Developer's Library) by Stephen G. Kochan(2005)
Computers For Seniors For Dummies by Nancy C. Muir(2001)
The Old New Thing by Raymond Chen(1941)
Linux Kernel Debugging by Kaiwan N Billimoria(1762)
