SlideShare a Scribd company logo
1 of 166
Windows PowerShell An introduction to...
Dale Lane [email_address] IBM Hursley Park
What is Windows PowerShell? How does PowerShell work? How can I 'hack' PowerShell so that  it can be used with my product? Agenda
What is Windows PowerShell?
What is Windows PowerShell for?
What is Windows PowerShell for? ADMIN
What is Windows PowerShell for? ADMIN Building GUIs on  top of PowerShell
What is Windows PowerShell for? ADMIN Interactive  command shell
What is Windows PowerShell for? ADMIN Scripting
What is Windows PowerShell for? ADMIN COM Scripting  for WMI
What is Windows PowerShell for? ADMIN
How does PowerShell  work?
 
 
Get-Process
Get-Process
a verb a noun Get-Process
http://msdn2.microsoft.com/en-us/library/ms714428.aspx The verbs
The verbs Consistent Learnable Readable
 
Get-Process |  Where { $_.Handles -gt 500 } |  Sort Handles | Format-Table
HELP!
HELP! Get-Command Get-Help Get-PSDrive Get-Members
 
What command do I need?
 
How does it work?
How does it work?
How does it work?
How does it work?
How does it work?
 
 
 
 
 
 
 
Consistent Get-Process |  Where { $_.Handles -gt 500 } |  Sort Handles | Format-Table
 
What data stores are available?
 
Windows Registry
 
Certificates
 
Environment variables
 
Variables
'dir' ?
 
Aliases
 
 
Stopping a process kill -9 `ps -aef  | grep 'notepad'  | grep -v grep  | awk '{print $2}'`
Stopping a process kill -9 `ps -aef  | grep 'notepad'  | grep -v grep  | awk '{print $2}'` Why so complicated?
Stopping a process Get-Process notepad  | Stop-Process
Stopping a process Get-Process notepad  | Stop-Process Why so much easier?
 
 
 
 
 
 
 
 
 
Select Where Sort Compare
 
 
 
 
 
 
 
 
-Confirm -Verbose -WhatIf -Debug
 
 
 
 
Get-Process | Export-Csv
 
 
 
 
 
 
Using .NET
 
 
 
 
 
 
 
 
 
([xml](new-object Net.WebClient) .DownloadString ($bbc_news_rss_url)).rss.channel.item | Select title, Desc*, *date  -first 8
 
 
 
How can I  “ hack” PowerShell?
Why?
WebSphere MQ “ Queue” “ Message” “ Queue  Manager”
 
a verb a noun Get-Process
a verb product  name object  type http://msdn2.microsoft.com/en-us/library/ms714657.aspx Get-ProdObject
 
 
“ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
“ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
“ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
“ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
 
Get-Command Get-*WMQ*Queue
Get-WMQQueue
Where {$_.Name -like “SALES.*”  -and  $_.CurrentDepth -gt  ($_.MaximumDepth - 10)}
Select Name,  CurrentDepth,  MaximumDepth
 
 
ForEach-Object -process  {Set-WMQQueue $_  -MaximumDepth  ($_.MaximumDepth * 2)}
ForEach-Object -process  {Set-WMQQueue $_  -MaximumDepth  ($_.MaximumDepth * 2)}
 
 
Get-Member
 
 
Where {$_.CreationDateTime  -ge $(Get-Date -month 10 -day 15 -year 2007) -and  $_.CreationDateTime -le $(Get-Date -month 10 -day 20 -year 2007)}
“ Set the maximum depth for all cluster queues that start with a letter between 'D' and 'K'to 20.”
“ Set the maximum depth for all cluster queues that start with a letter between 'D' and 'K'to 20.” Get-WMQQueue * * | Where  {$_.Name -like "[D-K]*" -and $_.ClusterName -ne ''}  | Set-WMQQueue -MaximumDepth 20
“ Set the maximum depth for all cluster queues that start with a letter between 'D' and 'K'to 20.” Get-WMQQueue * * | Where  {$_.Name -like "[D-K]*" -and $_.ClusterName -ne ''}  | Set-WMQQueue -MAXDEPTH 20
“ Get a list of non-system sender channels, showing the name, connection name, transmission queue, SSL Cipher Spec, and the name of the queue manager it is on.”
“ Get a list of non-system sender channels, showing the name, connection name, transmission queue, SSL Cipher Spec, and the name of the queue manager it is on.” Get-WMQChannel * * | Where {$_.ChannelType -eq [IBM.WMQ.MQC]::MQCHT_SENDER -and $_.Name -match  "^(?!SYSTEM).*"} | Select Name, Conn*Name, Trans*Name, SSLCiph*, @{e={$_.QueueManager.Name};n='Host'}  Name  ConnectionName  TransmissionQueueName  SSLCipherSpec  Host  ----  --------------  ---------------------  -------------  ----  SECURE  dlane.hursley.ibm.com(9090)  TRANS1  NULL_MD5  post  SECURE.R  dlane.hursley.ibm.com(9091)  TRANSR  TRIPLE_DES_SHA_US  test
Export-CSV ConvertTo-HTML
How?
 
What can I do with PowerShell? Ad-hoc scripts Production scripts
What can I do with PowerShell? Ad-hoc scripts Production scripts
What can I do with PowerShell? Ad-hoc scripts Production scripts
What can I do with PowerShell? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error ("WMQ Exception: CC=" + $_.Exception.CompletionCode +    "  RC=" + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host "No queue manager connection" } }
Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error ("WMQ Exception: CC=" + $_.Exception.CompletionCode +    "  RC=" + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host "No queue manager connection" } }
Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error ("WMQ Exception: CC=" + $_.Exception.CompletionCode +    "  RC=" + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host "No queue manager connection" } }
Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error ("WMQ Exception: CC=" + $_.Exception.CompletionCode +    "  RC=" + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host "No queue manager connection" } }
Ad-hoc function Get-WMQQueueManager($name, $hostname, $port, $svrconn) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error ("WMQ Exception: CC=" + $_.Exception.CompletionCode +    " RC=" + $_.Exception.ReasonCode) continue } # hashtable to describe the connection to the queue manager $connProperties = New-Object System.Collections.Hashtable if (($hostname -eq $null) -and ($port -eq $null) -and ($svrconn -eq $null)) { # user has not provided any information for a client connection #  so we default to a local bindings connection type  $connProperties.Add([string][IBM.WMQ.MQC]::TRANSPORT_PROPERTY, [string][IBM.WMQ.MQC]::TRANSPORT_MQSERIES_BINDINGS) }
Ad-hoc else { # user has provided some information for a client connection # # a future version of this should provide support for other #  connection types (e.g. managed or XA client) but for #  my initial purposes, bindings and client connections are #  sufficient $connProperties.Add([string][IBM.WMQ.MQC]::TRANSPORT_PROPERTY, [string][IBM.WMQ.MQC]::TRANSPORT_MQSERIES_CLIENT) if ($hostname -ne $null) { $connProperties.Add([string][IBM.WMQ.MQC]::HOST_NAME_PROPERTY, $hostname) }
Ad-hoc if ($svrconn -ne $null) { $connProperties.Add([string][IBM.WMQ.MQC]::CHANNEL_PROPERTY, $svrconn) } else { # use a sensible default #  this wont be to everyone's tastes, but will often be #  right for me, and will save me a lot of typing! $connProperties.Add([string][IBM.WMQ.MQC]::CHANNEL_PROPERTY, "SYSTEM.DEF.SVRCONN") }
Ad-hoc if ($port -ne $null) { $connProperties.Add([string][IBM.WMQ.MQC]::PORT_PROPERTY, $port) } else { # use a sensible default #  this wont be to everyone's tastes, but will often be #  right for me, and will save me a lot of typing! $connProperties.Add([string][IBM.WMQ.MQC]::PORT_PROPERTY, "1414") } } return New-Object IBM.WMQ.MQQueueManager($name, $connProperties) }
Ad-hoc function Get-WMQQueueNames($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error ("WMQ Exception: CC=" + $_.Exception.CompletionCode +    " RC=" + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { # using PCF to access a list of queue names # # this is sort of cheating - this is an undocumented, unsupported # API, and I wrote this using tab-complete to identify what # seems like sensible method names # # please do *not* take this as any sort of IBM recommendation # or endorsement to use PCF in C# # [IBM.WMQ.PCF.PCFMessageAgent]$agent =  New-Object IBM.WMQ.PCF.PCFMessageAgent $agent.Connect($qmgr)
Ad-hoc [IBM.WMQ.PCF.PCFMessage]$request =  New-Object IBM.WMQ.PCF.PCFMessage([IBM.WMQ.MQC]::MQCMD_INQUIRE_Q_NAMES) $request.AddParameter([IBM.WMQ.MQC]::MQCA_Q_NAME,   "*") $request.AddParameter([IBM.WMQ.MQC]::MQIA_Q_TYPE,   [IBM.WMQ.MQC]::MQQT_LOCAL)   [IBM.WMQ.PCF.PCFMessage[]]$responses = $agent.Send($request, $TRUE) [IBM.WMQ.PCF.PCFParameter[]]$pcfParms = $responses[0].GetParameters() $queueNames = $pcfParms[0].GetValue() # we don't want to display temporary queues # (such as that which will have been created by the PCF command!) # so we filter the response array before returning it return $queueNames | Where-Object -FilterScript {$_ -notlike "AMQ.*"} } else { Write-Host "No queue manager" } }
Ad-hoc
http://channel9.msdn.com/ShowPost.aspx?PostID=256835 Production
Production “ How to Create a Windows PowerShell Cmdlet”  walkthrough http://msdn2.microsoft.com/en-us/library/ms714598.aspx
Production “ How to Create a Windows PowerShell Cmdlet”  walkthrough http://msdn2.microsoft.com/en-us/library/ms714598.aspx “ PowerShell Cmdlet guidelines”  http://msdn2.microsoft.com/en-us/library/ms714657.aspx
Production #region GetProcCommand /// <summary> /// This class implements a Get-Proc cmdlet that has no parameters. /// </summary> [Cmdlet(VerbsCommon.Get, &quot;Proc&quot;)] public class GetProcCommand : Cmdlet  { #region Cmdlet Overrides /// <summary> /// For each of the requested process names, retrieve and write /// the associated processes. /// </summary> protected override void ProcessRecord() { // Get the current processes Process[] processes = Process.GetProcesses(); // Write the processes to the pipeline making them available to the // next cmdlet. The second parameter tells PowerShell to enumerate the // array, and send one process at a time to the pipeline WriteObject(processes, true); } #endregion Overrides } #endregion GetProcCommand
Production
Production
Production
What can I do with PowerShell? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
 
Extending function --> scripts and Cmdlets Extending data stores --> providers Extending PowerShell
 
What is Windows PowerShell? How does PowerShell work? How can I hack PowerShell so that  it can be used with my product? Recap
Dale Lane [email_address] IBM Hursley Park Windows PowerShell An introduction to...

More Related Content

What's hot

Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleKnoldus Inc.
 
Clean architectures with fast api pycones
Clean architectures with fast api   pyconesClean architectures with fast api   pycones
Clean architectures with fast api pyconesAlvaro Del Castillo
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To DotnetSAMIR BHOGAYTA
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Edureka!
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
셸 스크립트를 이용한 클라우드 시스템 운영
셸 스크립트를 이용한 클라우드 시스템 운영셸 스크립트를 이용한 클라우드 시스템 운영
셸 스크립트를 이용한 클라우드 시스템 운영Nalee Jang
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To JenkinsKnoldus Inc.
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial Jm Ramos
 

What's hot (20)

Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
PHP Security
PHP SecurityPHP Security
PHP Security
 
Windows server
Windows serverWindows server
Windows server
 
Clean architectures with fast api pycones
Clean architectures with fast api   pyconesClean architectures with fast api   pycones
Clean architectures with fast api pycones
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
셸 스크립트를 이용한 클라우드 시스템 운영
셸 스크립트를 이용한 클라우드 시스템 운영셸 스크립트를 이용한 클라우드 시스템 운영
셸 스크립트를 이용한 클라우드 시스템 운영
 
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Selenium cheat sheet
Selenium cheat sheetSelenium cheat sheet
Selenium cheat sheet
 
Final terraform
Final terraformFinal terraform
Final terraform
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Powershell training material
Powershell training materialPowershell training material
Powershell training material
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
 

Viewers also liked

Introduction To Windows Power Shell
Introduction To Windows Power ShellIntroduction To Windows Power Shell
Introduction To Windows Power ShellMicrosoft TechNet
 
HBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, SalesforceHBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, SalesforceCloudera, Inc.
 
[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用
[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用
[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用台灣資料科學年會
 
Understanding text-structure-powerpoint
Understanding text-structure-powerpointUnderstanding text-structure-powerpoint
Understanding text-structure-powerpointaelowans
 
How To Become... LORD OF THE SLIDES
How To Become... LORD OF THE SLIDESHow To Become... LORD OF THE SLIDES
How To Become... LORD OF THE SLIDESPaul Brown
 
4. heredity and evolution
4. heredity and evolution4. heredity and evolution
4. heredity and evolutionAbhay Goyal
 
The Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing ContentThe Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing ContentNeil Patel
 
Why apache Flink is the 4G of Big Data Analytics Frameworks
Why apache Flink is the 4G of Big Data Analytics FrameworksWhy apache Flink is the 4G of Big Data Analytics Frameworks
Why apache Flink is the 4G of Big Data Analytics FrameworksSlim Baltagi
 
World Class Manufacturing:Plant Start Up and Commissioning Procedure
World  Class Manufacturing:Plant Start Up and Commissioning Procedure World  Class Manufacturing:Plant Start Up and Commissioning Procedure
World Class Manufacturing:Plant Start Up and Commissioning Procedure HIMADRI BANERJI
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShellWill Schroeder
 
Business model canvas sw lisbon14
Business model canvas   sw lisbon14 Business model canvas   sw lisbon14
Business model canvas sw lisbon14 Andre Marquet
 
Decision making between anterior skull base & lateral skull base
Decision making between anterior skull base & lateral skull baseDecision making between anterior skull base & lateral skull base
Decision making between anterior skull base & lateral skull baseMurali Chand Nallamothu
 
Top 10 Global Future Trends 2015 - Roger James Hamilton
Top 10 Global Future Trends 2015 - Roger James HamiltonTop 10 Global Future Trends 2015 - Roger James Hamilton
Top 10 Global Future Trends 2015 - Roger James HamiltonRoger Hamilton
 
Ancient Egypt PowerPoint
Ancient Egypt PowerPointAncient Egypt PowerPoint
Ancient Egypt PowerPointalmiklas
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 

Viewers also liked (20)

Introduction To Windows Power Shell
Introduction To Windows Power ShellIntroduction To Windows Power Shell
Introduction To Windows Power Shell
 
HBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, SalesforceHBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
 
[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用
[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用
[DSC x TAAI 2016] 林守德 / 人工智慧與機器學習在推薦系統上的應用
 
State of Startups 2016
State of Startups 2016State of Startups 2016
State of Startups 2016
 
Understanding text-structure-powerpoint
Understanding text-structure-powerpointUnderstanding text-structure-powerpoint
Understanding text-structure-powerpoint
 
How To Become... LORD OF THE SLIDES
How To Become... LORD OF THE SLIDESHow To Become... LORD OF THE SLIDES
How To Become... LORD OF THE SLIDES
 
Cardiac cycle ppt (2)
Cardiac cycle ppt (2)Cardiac cycle ppt (2)
Cardiac cycle ppt (2)
 
4. heredity and evolution
4. heredity and evolution4. heredity and evolution
4. heredity and evolution
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
LTE Basics
LTE BasicsLTE Basics
LTE Basics
 
The Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing ContentThe Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing Content
 
The beauty of fashion.ppt
The beauty of fashion.pptThe beauty of fashion.ppt
The beauty of fashion.ppt
 
Why apache Flink is the 4G of Big Data Analytics Frameworks
Why apache Flink is the 4G of Big Data Analytics FrameworksWhy apache Flink is the 4G of Big Data Analytics Frameworks
Why apache Flink is the 4G of Big Data Analytics Frameworks
 
World Class Manufacturing:Plant Start Up and Commissioning Procedure
World  Class Manufacturing:Plant Start Up and Commissioning Procedure World  Class Manufacturing:Plant Start Up and Commissioning Procedure
World Class Manufacturing:Plant Start Up and Commissioning Procedure
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShell
 
Business model canvas sw lisbon14
Business model canvas   sw lisbon14 Business model canvas   sw lisbon14
Business model canvas sw lisbon14
 
Decision making between anterior skull base & lateral skull base
Decision making between anterior skull base & lateral skull baseDecision making between anterior skull base & lateral skull base
Decision making between anterior skull base & lateral skull base
 
Top 10 Global Future Trends 2015 - Roger James Hamilton
Top 10 Global Future Trends 2015 - Roger James HamiltonTop 10 Global Future Trends 2015 - Roger James Hamilton
Top 10 Global Future Trends 2015 - Roger James Hamilton
 
Ancient Egypt PowerPoint
Ancient Egypt PowerPointAncient Egypt PowerPoint
Ancient Egypt PowerPoint
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 

Similar to An Introduction to Windows PowerShell

An introduction-to-windows-powershell-1193007253563204-3
An introduction-to-windows-powershell-1193007253563204-3An introduction-to-windows-powershell-1193007253563204-3
An introduction-to-windows-powershell-1193007253563204-3Louis Kolivas
 
Powershell Tech Ed2009
Powershell Tech Ed2009Powershell Tech Ed2009
Powershell Tech Ed2009rsnarayanan
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the CloudWesley Beary
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)Wesley Beary
 
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...Gosuke Miyashita
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)ÇözümPARK
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardSV Ruby on Rails Meetup
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access RunbookTaha Shakeel
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endEzequiel Maraschio
 
WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows
WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows
WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows T.Rob Wyatt
 
Cutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryCutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryWilliam Candillon
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
 
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Big Data Spain
 
Future Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETFuture Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETGianluca Carucci
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebMikel Torres Ugarte
 
Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcachedSkills Matter
 

Similar to An Introduction to Windows PowerShell (20)

An introduction-to-windows-powershell-1193007253563204-3
An introduction-to-windows-powershell-1193007253563204-3An introduction-to-windows-powershell-1193007253563204-3
An introduction-to-windows-powershell-1193007253563204-3
 
Powershell Tech Ed2009
Powershell Tech Ed2009Powershell Tech Ed2009
Powershell Tech Ed2009
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access Runbook
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-end
 
WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows
WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows
WMQ Toolbox: 20 Scripts, One-liners, & Utilities for UNIX & Windows
 
Cutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryCutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQuery
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
 
Data Validation models
Data Validation modelsData Validation models
Data Validation models
 
Future Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETFuture Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NET
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
 
Postman On Steroids
Postman On SteroidsPostman On Steroids
Postman On Steroids
 

More from Dale Lane

Describing Kafka security in AsyncAPI
Describing Kafka security in AsyncAPIDescribing Kafka security in AsyncAPI
Describing Kafka security in AsyncAPIDale Lane
 
Our NASA Space Apps Challenge 2019 entry
Our NASA Space Apps Challenge 2019 entryOur NASA Space Apps Challenge 2019 entry
Our NASA Space Apps Challenge 2019 entryDale Lane
 
Useful Kafka tools
Useful Kafka toolsUseful Kafka tools
Useful Kafka toolsDale Lane
 
An intro to serverless and OpenWhisk for Kafka users
An intro to serverless and OpenWhisk for Kafka usersAn intro to serverless and OpenWhisk for Kafka users
An intro to serverless and OpenWhisk for Kafka usersDale Lane
 
How to increase the social impact you make
How to increase the social impact you makeHow to increase the social impact you make
How to increase the social impact you makeDale Lane
 
Introducing Machine Learning to Kids
Introducing Machine Learning to KidsIntroducing Machine Learning to Kids
Introducing Machine Learning to KidsDale Lane
 
Introducing machine learning to kids
Introducing machine learning to kidsIntroducing machine learning to kids
Introducing machine learning to kidsDale Lane
 
Small Spaces, Big Ideas - our Space Apps Challenge
Small Spaces, Big Ideas - our Space Apps ChallengeSmall Spaces, Big Ideas - our Space Apps Challenge
Small Spaces, Big Ideas - our Space Apps ChallengeDale Lane
 
The skills implications of Cognitive Computing
The skills implications of Cognitive ComputingThe skills implications of Cognitive Computing
The skills implications of Cognitive ComputingDale Lane
 
Conversational Internet - Creating a natural language interface for web pages
Conversational Internet - Creating a natural language interface for web pagesConversational Internet - Creating a natural language interface for web pages
Conversational Internet - Creating a natural language interface for web pagesDale Lane
 
Debugging Web Apps on Real Mobile Devices
Debugging Web Apps on Real Mobile DevicesDebugging Web Apps on Real Mobile Devices
Debugging Web Apps on Real Mobile DevicesDale Lane
 
Pushing, pulling or leaving the door open
Pushing, pulling or leaving the door openPushing, pulling or leaving the door open
Pushing, pulling or leaving the door openDale Lane
 
Push notifications
Push notificationsPush notifications
Push notificationsDale Lane
 
Fire Eagle Guest Pass
Fire Eagle Guest PassFire Eagle Guest Pass
Fire Eagle Guest PassDale Lane
 
Monitoring your electricity usage
Monitoring your electricity usageMonitoring your electricity usage
Monitoring your electricity usageDale Lane
 
An introduction to Windows Mobile development
An introduction to Windows Mobile developmentAn introduction to Windows Mobile development
An introduction to Windows Mobile developmentDale Lane
 
Mowing the lawn
Mowing the lawnMowing the lawn
Mowing the lawnDale Lane
 

More from Dale Lane (20)

Describing Kafka security in AsyncAPI
Describing Kafka security in AsyncAPIDescribing Kafka security in AsyncAPI
Describing Kafka security in AsyncAPI
 
Our NASA Space Apps Challenge 2019 entry
Our NASA Space Apps Challenge 2019 entryOur NASA Space Apps Challenge 2019 entry
Our NASA Space Apps Challenge 2019 entry
 
Useful Kafka tools
Useful Kafka toolsUseful Kafka tools
Useful Kafka tools
 
An intro to serverless and OpenWhisk for Kafka users
An intro to serverless and OpenWhisk for Kafka usersAn intro to serverless and OpenWhisk for Kafka users
An intro to serverless and OpenWhisk for Kafka users
 
How to increase the social impact you make
How to increase the social impact you makeHow to increase the social impact you make
How to increase the social impact you make
 
Introducing Machine Learning to Kids
Introducing Machine Learning to KidsIntroducing Machine Learning to Kids
Introducing Machine Learning to Kids
 
Introducing machine learning to kids
Introducing machine learning to kidsIntroducing machine learning to kids
Introducing machine learning to kids
 
Small Spaces, Big Ideas - our Space Apps Challenge
Small Spaces, Big Ideas - our Space Apps ChallengeSmall Spaces, Big Ideas - our Space Apps Challenge
Small Spaces, Big Ideas - our Space Apps Challenge
 
Owls
OwlsOwls
Owls
 
The skills implications of Cognitive Computing
The skills implications of Cognitive ComputingThe skills implications of Cognitive Computing
The skills implications of Cognitive Computing
 
Conversational Internet - Creating a natural language interface for web pages
Conversational Internet - Creating a natural language interface for web pagesConversational Internet - Creating a natural language interface for web pages
Conversational Internet - Creating a natural language interface for web pages
 
Debugging Web Apps on Real Mobile Devices
Debugging Web Apps on Real Mobile DevicesDebugging Web Apps on Real Mobile Devices
Debugging Web Apps on Real Mobile Devices
 
GaianDB
GaianDBGaianDB
GaianDB
 
Pushing, pulling or leaving the door open
Pushing, pulling or leaving the door openPushing, pulling or leaving the door open
Pushing, pulling or leaving the door open
 
Push notifications
Push notificationsPush notifications
Push notifications
 
Fire Eagle Guest Pass
Fire Eagle Guest PassFire Eagle Guest Pass
Fire Eagle Guest Pass
 
Monitoring your electricity usage
Monitoring your electricity usageMonitoring your electricity usage
Monitoring your electricity usage
 
CurrentCost
CurrentCostCurrentCost
CurrentCost
 
An introduction to Windows Mobile development
An introduction to Windows Mobile developmentAn introduction to Windows Mobile development
An introduction to Windows Mobile development
 
Mowing the lawn
Mowing the lawnMowing the lawn
Mowing the lawn
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

An Introduction to Windows PowerShell

  • 1. Windows PowerShell An introduction to...
  • 2. Dale Lane [email_address] IBM Hursley Park
  • 3. What is Windows PowerShell? How does PowerShell work? How can I 'hack' PowerShell so that it can be used with my product? Agenda
  • 4. What is Windows PowerShell?
  • 5. What is Windows PowerShell for?
  • 6. What is Windows PowerShell for? ADMIN
  • 7. What is Windows PowerShell for? ADMIN Building GUIs on top of PowerShell
  • 8. What is Windows PowerShell for? ADMIN Interactive command shell
  • 9. What is Windows PowerShell for? ADMIN Scripting
  • 10. What is Windows PowerShell for? ADMIN COM Scripting for WMI
  • 11. What is Windows PowerShell for? ADMIN
  • 13.  
  • 14.  
  • 17. a verb a noun Get-Process
  • 19. The verbs Consistent Learnable Readable
  • 20.  
  • 21. Get-Process | Where { $_.Handles -gt 500 } | Sort Handles | Format-Table
  • 22. HELP!
  • 23. HELP! Get-Command Get-Help Get-PSDrive Get-Members
  • 24.  
  • 25. What command do I need?
  • 26.  
  • 27. How does it work?
  • 28. How does it work?
  • 29. How does it work?
  • 30. How does it work?
  • 31. How does it work?
  • 32.  
  • 33.  
  • 34.  
  • 35.  
  • 36.  
  • 37.  
  • 38.  
  • 39. Consistent Get-Process | Where { $_.Handles -gt 500 } | Sort Handles | Format-Table
  • 40.  
  • 41. What data stores are available?
  • 42.  
  • 44.  
  • 46.  
  • 48.  
  • 51.  
  • 53.  
  • 54.  
  • 55. Stopping a process kill -9 `ps -aef | grep 'notepad' | grep -v grep | awk '{print $2}'`
  • 56. Stopping a process kill -9 `ps -aef | grep 'notepad' | grep -v grep | awk '{print $2}'` Why so complicated?
  • 57. Stopping a process Get-Process notepad | Stop-Process
  • 58. Stopping a process Get-Process notepad | Stop-Process Why so much easier?
  • 59.  
  • 60.  
  • 61.  
  • 62.  
  • 63.  
  • 64.  
  • 65.  
  • 66.  
  • 67.  
  • 68. Select Where Sort Compare
  • 69.  
  • 70.  
  • 71.  
  • 72.  
  • 73.  
  • 74.  
  • 75.  
  • 76.  
  • 78.  
  • 79.  
  • 80.  
  • 81.  
  • 83.  
  • 84.  
  • 85.  
  • 86.  
  • 87.  
  • 88.  
  • 90.  
  • 91.  
  • 92.  
  • 93.  
  • 94.  
  • 95.  
  • 96.  
  • 97.  
  • 98.  
  • 99. ([xml](new-object Net.WebClient) .DownloadString ($bbc_news_rss_url)).rss.channel.item | Select title, Desc*, *date -first 8
  • 100.  
  • 101.  
  • 102.  
  • 103. How can I “ hack” PowerShell?
  • 104. Why?
  • 105. WebSphere MQ “ Queue” “ Message” “ Queue Manager”
  • 106.  
  • 107. a verb a noun Get-Process
  • 108. a verb product name object type http://msdn2.microsoft.com/en-us/library/ms714657.aspx Get-ProdObject
  • 109.  
  • 110.  
  • 111. “ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
  • 112. “ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
  • 113. “ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
  • 114. “ Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?”
  • 115.  
  • 118. Where {$_.Name -like “SALES.*” -and $_.CurrentDepth -gt ($_.MaximumDepth - 10)}
  • 119. Select Name, CurrentDepth, MaximumDepth
  • 120.  
  • 121.  
  • 122. ForEach-Object -process {Set-WMQQueue $_ -MaximumDepth ($_.MaximumDepth * 2)}
  • 123. ForEach-Object -process {Set-WMQQueue $_ -MaximumDepth ($_.MaximumDepth * 2)}
  • 124.  
  • 125.  
  • 127.  
  • 128.  
  • 129. Where {$_.CreationDateTime -ge $(Get-Date -month 10 -day 15 -year 2007) -and $_.CreationDateTime -le $(Get-Date -month 10 -day 20 -year 2007)}
  • 130. “ Set the maximum depth for all cluster queues that start with a letter between 'D' and 'K'to 20.”
  • 131. “ Set the maximum depth for all cluster queues that start with a letter between 'D' and 'K'to 20.” Get-WMQQueue * * | Where {$_.Name -like &quot;[D-K]*&quot; -and $_.ClusterName -ne ''} | Set-WMQQueue -MaximumDepth 20
  • 132. “ Set the maximum depth for all cluster queues that start with a letter between 'D' and 'K'to 20.” Get-WMQQueue * * | Where {$_.Name -like &quot;[D-K]*&quot; -and $_.ClusterName -ne ''} | Set-WMQQueue -MAXDEPTH 20
  • 133. “ Get a list of non-system sender channels, showing the name, connection name, transmission queue, SSL Cipher Spec, and the name of the queue manager it is on.”
  • 134. “ Get a list of non-system sender channels, showing the name, connection name, transmission queue, SSL Cipher Spec, and the name of the queue manager it is on.” Get-WMQChannel * * | Where {$_.ChannelType -eq [IBM.WMQ.MQC]::MQCHT_SENDER -and $_.Name -match &quot;^(?!SYSTEM).*&quot;} | Select Name, Conn*Name, Trans*Name, SSLCiph*, @{e={$_.QueueManager.Name};n='Host'} Name ConnectionName TransmissionQueueName SSLCipherSpec Host ---- -------------- --------------------- ------------- ---- SECURE dlane.hursley.ibm.com(9090) TRANS1 NULL_MD5 post SECURE.R dlane.hursley.ibm.com(9091) TRANSR TRIPLE_DES_SHA_US test
  • 136. How?
  • 137.  
  • 138. What can I do with PowerShell? Ad-hoc scripts Production scripts
  • 139. What can I do with PowerShell? Ad-hoc scripts Production scripts
  • 140. What can I do with PowerShell? Ad-hoc scripts Production scripts
  • 141.
  • 142. Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error (&quot;WMQ Exception: CC=&quot; + $_.Exception.CompletionCode + &quot; RC=&quot; + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host &quot;No queue manager connection&quot; } }
  • 143. Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error (&quot;WMQ Exception: CC=&quot; + $_.Exception.CompletionCode + &quot; RC=&quot; + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host &quot;No queue manager connection&quot; } }
  • 144. Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error (&quot;WMQ Exception: CC=&quot; + $_.Exception.CompletionCode + &quot; RC=&quot; + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host &quot;No queue manager connection&quot; } }
  • 145. Ad-hoc function Get-WMQQueue ($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error (&quot;WMQ Exception: CC=&quot; + $_.Exception.CompletionCode + &quot; RC=&quot; + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { $qNames = Get-WMQQueueNames($qmgr) foreach ($queuename in $qNames) { $nextQueue = $qmgr.AccessQueue($queuename.Trim(), [IBM.WMQ.MQC]::MQOO_INQUIRE) Write-Output $nextQueue } } else { Write-Host &quot;No queue manager connection&quot; } }
  • 146. Ad-hoc function Get-WMQQueueManager($name, $hostname, $port, $svrconn) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error (&quot;WMQ Exception: CC=&quot; + $_.Exception.CompletionCode + &quot; RC=&quot; + $_.Exception.ReasonCode) continue } # hashtable to describe the connection to the queue manager $connProperties = New-Object System.Collections.Hashtable if (($hostname -eq $null) -and ($port -eq $null) -and ($svrconn -eq $null)) { # user has not provided any information for a client connection # so we default to a local bindings connection type $connProperties.Add([string][IBM.WMQ.MQC]::TRANSPORT_PROPERTY, [string][IBM.WMQ.MQC]::TRANSPORT_MQSERIES_BINDINGS) }
  • 147. Ad-hoc else { # user has provided some information for a client connection # # a future version of this should provide support for other # connection types (e.g. managed or XA client) but for # my initial purposes, bindings and client connections are # sufficient $connProperties.Add([string][IBM.WMQ.MQC]::TRANSPORT_PROPERTY, [string][IBM.WMQ.MQC]::TRANSPORT_MQSERIES_CLIENT) if ($hostname -ne $null) { $connProperties.Add([string][IBM.WMQ.MQC]::HOST_NAME_PROPERTY, $hostname) }
  • 148. Ad-hoc if ($svrconn -ne $null) { $connProperties.Add([string][IBM.WMQ.MQC]::CHANNEL_PROPERTY, $svrconn) } else { # use a sensible default # this wont be to everyone's tastes, but will often be # right for me, and will save me a lot of typing! $connProperties.Add([string][IBM.WMQ.MQC]::CHANNEL_PROPERTY, &quot;SYSTEM.DEF.SVRCONN&quot;) }
  • 149. Ad-hoc if ($port -ne $null) { $connProperties.Add([string][IBM.WMQ.MQC]::PORT_PROPERTY, $port) } else { # use a sensible default # this wont be to everyone's tastes, but will often be # right for me, and will save me a lot of typing! $connProperties.Add([string][IBM.WMQ.MQC]::PORT_PROPERTY, &quot;1414&quot;) } } return New-Object IBM.WMQ.MQQueueManager($name, $connProperties) }
  • 150. Ad-hoc function Get-WMQQueueNames($qmgr) { # display details of any WMQ errors encountered in this function Trap [IBM.WMQ.MQException] { Write-Error (&quot;WMQ Exception: CC=&quot; + $_.Exception.CompletionCode + &quot; RC=&quot; + $_.Exception.ReasonCode) continue } # if we have a connection to a queue manager... if ($qmgr -ne $null) { # using PCF to access a list of queue names # # this is sort of cheating - this is an undocumented, unsupported # API, and I wrote this using tab-complete to identify what # seems like sensible method names # # please do *not* take this as any sort of IBM recommendation # or endorsement to use PCF in C# # [IBM.WMQ.PCF.PCFMessageAgent]$agent = New-Object IBM.WMQ.PCF.PCFMessageAgent $agent.Connect($qmgr)
  • 151. Ad-hoc [IBM.WMQ.PCF.PCFMessage]$request = New-Object IBM.WMQ.PCF.PCFMessage([IBM.WMQ.MQC]::MQCMD_INQUIRE_Q_NAMES) $request.AddParameter([IBM.WMQ.MQC]::MQCA_Q_NAME, &quot;*&quot;) $request.AddParameter([IBM.WMQ.MQC]::MQIA_Q_TYPE, [IBM.WMQ.MQC]::MQQT_LOCAL) [IBM.WMQ.PCF.PCFMessage[]]$responses = $agent.Send($request, $TRUE) [IBM.WMQ.PCF.PCFParameter[]]$pcfParms = $responses[0].GetParameters() $queueNames = $pcfParms[0].GetValue() # we don't want to display temporary queues # (such as that which will have been created by the PCF command!) # so we filter the response array before returning it return $queueNames | Where-Object -FilterScript {$_ -notlike &quot;AMQ.*&quot;} } else { Write-Host &quot;No queue manager&quot; } }
  • 152. Ad-hoc
  • 154. Production “ How to Create a Windows PowerShell Cmdlet” walkthrough http://msdn2.microsoft.com/en-us/library/ms714598.aspx
  • 155. Production “ How to Create a Windows PowerShell Cmdlet” walkthrough http://msdn2.microsoft.com/en-us/library/ms714598.aspx “ PowerShell Cmdlet guidelines” http://msdn2.microsoft.com/en-us/library/ms714657.aspx
  • 156. Production #region GetProcCommand /// <summary> /// This class implements a Get-Proc cmdlet that has no parameters. /// </summary> [Cmdlet(VerbsCommon.Get, &quot;Proc&quot;)] public class GetProcCommand : Cmdlet { #region Cmdlet Overrides /// <summary> /// For each of the requested process names, retrieve and write /// the associated processes. /// </summary> protected override void ProcessRecord() { // Get the current processes Process[] processes = Process.GetProcesses(); // Write the processes to the pipeline making them available to the // next cmdlet. The second parameter tells PowerShell to enumerate the // array, and send one process at a time to the pipeline WriteObject(processes, true); } #endregion Overrides } #endregion GetProcCommand
  • 160.
  • 161.  
  • 162.  
  • 163. Extending function --> scripts and Cmdlets Extending data stores --> providers Extending PowerShell
  • 164.  
  • 165. What is Windows PowerShell? How does PowerShell work? How can I hack PowerShell so that it can be used with my product? Recap
  • 166. Dale Lane [email_address] IBM Hursley Park Windows PowerShell An introduction to...