In this talk I outline the growth of PowerShell's ability to manage the infrastructure stack. I highlight some core challenges, and provide potential solutions for future challenges and environments at scale.
Axa Assurance Maroc - Insurer Innovation Award 2024
Managing the Infrastructure Stack with PowerShell
1. Managing the Infrastructure
Stack with PowerShell
Josh Atwell
Developer Advocate
SolidFire, now part of NetApp
@josh_atwell
#PSHSUMMIT
2. Celebrating 10 Years of PowerShell
2006 - 2016
• Jeffrey Snover
• Kenneth Hansen
• Lee Holmes
• Narayanan Lakshmanan
• Hemant Mahawar
• Bruce Payette
• Hitesh Raigandhi
• Dan Travison
• Jim Truher
• Krishna Vutukuri
Congratulations to
the team members
who’ve been there
since the beginning…
...and thanks for all
the great work!
5. Twitter Poll
I polled twitter to see how many layers
people are managing with PowerShell
6. We Now Have
• More Layers
• More complexity
• Consumption models
have shifted
Seeking
• Management at Scale
• DevOps / Lean Ops
• More IT as a Service
Physical Hardware
Operating System
App
Virtualization
NSX
ACI
vCenter Server
vRealize Suite
Orchestrator
Operating System
App App
VIO
Hyper-V
System Center
Orchestrator
7. Let’s Start with the Tools
When you’re a hammer every problem is a nail.
8. More APIs = More PowerShell
Growth of infrastructure extensibility means more opportunities for PowerShell and its users
14. Physical
Operating System
App
Virtualization
VMDK / VHD
Datastore
Storage
Volume/Lun
Disk / Mount
Hard Drives
Which VMDK?
Which Datastore?
Which Lun?
Process{
$scsiID = ((Get-ScsiLun -Datastore $datastore).CanonicalName).Split(".")[1]
$result = Get-SFVolume | Where{$_.ScsiNAAdeviceID -eq $scsiID}
Return $result
}
15. DMZDSC in the DMZ
Operating System
App DSC
vCenter Server
ESXi
DSC
DSC
VMware Tools
https://github.com/DevOpsForVMwareAdministrators/powershell-dsc
?
# Copy the script to the designated directory on
target VM
Copy-VMGuestFile -Source $script -Destination
$mofpath -LocalToGuest -VM $vm -
HostCredential $cred -Server $vcenter -
GuestCredential $guestcred
# Invoke the copied script on the target VM
Invoke-VMScript -ScriptText $moffile -VM $vm -
HostCredential $cred -Server
$global:DefaultVIServer -GuestCredential
$guestcred
No Open Ports
19. Multiple Providers
• PSSnapin vs Modules
• Each Vendor has an installer
• $env:PSModulePath
Defaults
• $homeDocumentsWindowsPow
erShellModules;
$pshomeModules.
20. Physical
Operating System
App
Virtualization
VMDK / VHD
Datastore
Storage
Volume/Lun
Disk / Mount
Hard Drives
Which VMDK?
Which Datastore?
Which Lun?
Query for that information can be cumbersome
Collect All | Filter | Grab Piece you really wanted
22. Application DNA
Applying Relationship Maps
Physical
Operating
System
Virtualization
Virtual Switch
Uplink
Ethernet Port
Switch Port
Storage
Adapter
VMDK / VHD
Datastore
Volume/Lun
Disk / Mount
Hard Drives
JSON
XML
CSV
SQL DB
vRAM
Sys Memory
pRAM
Server
ESXi Host