SlideShare une entreprise Scribd logo
1  sur  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...

Contenu connexe

Tendances

Time-Based Blind SQL Injection
Time-Based Blind SQL InjectionTime-Based Blind SQL Injection
Time-Based Blind SQL Injectionmatt_presson
 
Nestjs MasterClass Slides
Nestjs MasterClass SlidesNestjs MasterClass Slides
Nestjs MasterClass SlidesNir Kaufman
 
dot net technology
dot net technologydot net technology
dot net technologyImran Khan
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentationdimuthu22
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricksbcoca
 
Linux System Monitoring basic commands
Linux System Monitoring basic commandsLinux System Monitoring basic commands
Linux System Monitoring basic commandsMohammad Rafiee
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewShahed Chowdhuri
 
Python (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network AutomationPython (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network AutomationRick Sherman
 

Tendances (20)

Spring Security 3
Spring Security 3Spring Security 3
Spring Security 3
 
Time-Based Blind SQL Injection
Time-Based Blind SQL InjectionTime-Based Blind SQL Injection
Time-Based Blind SQL Injection
 
Nestjs MasterClass Slides
Nestjs MasterClass SlidesNestjs MasterClass Slides
Nestjs MasterClass Slides
 
dot net technology
dot net technologydot net technology
dot net technology
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Input Validation
Input ValidationInput Validation
Input Validation
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricks
 
Linux System Monitoring basic commands
Linux System Monitoring basic commandsLinux System Monitoring basic commands
Linux System Monitoring basic commands
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
Powershell training material
Powershell training materialPowershell training material
Powershell training material
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Python (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network AutomationPython (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network Automation
 
MYSQL - PHP Database Connectivity
MYSQL - PHP Database ConnectivityMYSQL - PHP Database Connectivity
MYSQL - PHP Database Connectivity
 
NestJS
NestJSNestJS
NestJS
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

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...