Académique Documents
Professionnel Documents
Culture Documents
com
Hal
Rottenberg hal@halr9000.com
Introduction
Feature overview
Demo 1: new providers
New Cmdlets
Demo 2: wiki deploy
Demo 3: Creating a VM
Demo 4: Access VI SDK
Programming
API
Scripting
API
PowerShell snap-in
Client-side automation objects
correspond to server-side managed
objects and managed entities
Not just a web service wrapper
Favors action-oriented cmdlets over object
methods
Goal: 80% of tasks will not require SDK
Ability to access the SDK for more
complex tasks
Fully
supported:
Unofficially
supported:
Works
Includes
Count Name
----- ---1 Add
1 Connect
1 Disconnect
1 Dismount
37 Get
Datacenter,...
1 Mount
7 Move
Folde...
19 New
CustomField...
20 Remove
Cu...
2 Restart
27 Set
CustomField...
1 Shutdown
2 Start
3 Stop
2 Suspend
1 Test
VimDatastore provider
Hierarchical management of Folders, Datacenters,
VMHosts, VMs using VimInventory provider
Name
---VimDatastore
VimInventory
Capabilities
-----------Filter, ShouldProcess
Filter
Drives
-----{DS}
{VI}
VimInventory
VimDatastore
New-PSDrive
-Root '/'
New-PSDrive
-Root '/'
EXPERIMENTA
L!
Get-VM
Get-VMHost
PS > Get-VM
Name
PS
> Get-VMHost
---SDK-RHAS4U4
Name
SDK-W2003ENT
---fudgeapp01
192.168.0.51
fudgedb01
192.168.0.55
vcenter.halr9000.com
fudgedb02
SDK-XPSP2
Get-CDDrive
Get-Cluster
Memory (MB)
----------512
Id
256
-256
HostSys...
512
HostSys...
1500
1024
256
:
:
:
:
:
:
HAEnabled
: False
VMware.VimAutomation.Client20.ConnectInfoImpl
HAAdmissionControlEnabled : False
VirtualMachine-vm-158/3000
HAFailoverLevel
: 1
CD/DVD Drive 1
DRSEnabled
: False
DRSMode
: FullyAutomated
CustomFields
: {}
ID
: ClusterComputeResource-domain-c44
Name
: Test Cluster
New-Datacenter
New-Cluster
Add-VMHost
New-VM
Create
folders wiki-style
Cmdlets
New-VM
used:
Remove-Snapshot
Move-VM
Set-NetworkAdapter
Restart-VMGuest
Cmdlets
used:
New-Snapshot
get-vm
Get-VIEvent
Get-Task
Get-Log
Get-Stat
Cmdlets
used:
Get-VIEvent
When
ISCSI
Configuration
VI Toolkit: http://vmware.com/go/powershell
VI Toolkit blog:
http://blogs.vmware.com/vipowershell/
VI Toolkit Community:
http://communities.vmware.com/community/d
eveloper/windows_toolkit
PowerShellCommunity.org:
http://powershellcommunity.org
PowerScripting Podcast:
http://powerscripting.net
Managing VI with PowerShell: TFM:
http://sapienpress.com/vmware.asp
Hals Blog: http://halr9000.com