Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0...

17
Windows Powershell Windows Server 2012

Transcript of Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0...

Page 1: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Windows Powershell

Windows Server 2012

Page 2: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Índice

• Powershell • Powershell 3.0• Powershell en Windows 8 / 2012

• Ejemplos

Page 3: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

¿ Qué es Powershell ?

PS> dir C:\ | -include *.tmp | remove-item

PS> ./Tarea.ps1

3. Un framework que permite usar el lenguaje desde otros programas (MMC, ASP, EXEs …)[Microsoft.Powershell.Commands]

1. Un Shell interactivo 2. Un lenguaje de scripting

PS> get-process iex* | stop-process

Page 4: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Disponible en ...

• Windows 8, Windows 2012

• Windows 7, Windows 2008, 2008-R2

• Windows XP, Windows 2003, Windows Vista

Page 5: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Ref : Versiones Preinstaladas

XP 2003 Vista 2008 Win7 2008 R2

Sin Powershell

PS 1.0 (update)PS 2.0 (update)

Powershell 1.0

PS 2.0 (update)

Powershell 2.0

PS 3.0 (update)

Powershell 3.0preinstalado

Win8 2012

Page 6: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Powershell : Por qué es importante ?• Permite automatizar tareas• Scripts : Ficheros de texto (*.PS1)• Se ejecutan automáticamente• Pueden programarse (Scheduler)• Sin intervención humana

Sin error humano ! “Drag & Drop & Cry”, olvidos, nervios, errores…

• Comprobados, optimizados• Documentan la tarea a realizar• Y además ya están hechos !

Page 7: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

No reinventar la rueda...

• Muchos scripts ya están hechos y probados

• Nuevo Script Center• http://

www.microsoft.com/technet/scriptcenter/

• www.codeplex.com• www.bing.com

Page 8: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Por qué Powershell?• Porque se emplea en todos los productos

– Exchange, SQL, Cluster, VMM, Hyper-V, SCCM, SCOM, Sharepoint…– Windows 8 / 2012 – Websphere, VMWARE…– Cada vez más en un futuro cercano

• Porque nos hace más productivos y fiables– Será imprescindible tenerlo en el CV…

• Porque es creativo … y divertido !

Page 9: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Ideas básicas

• Simple pero potente• Basado en objetos .NET , no en texto• Pipeline de objetos• Modular • Usando Standards• Compatible con tecnologías anteriores

• (WMI, AD, CMD, VBS, COM, .NET, EXEs)

• Remoto : Cualquier tarea se puede realizar en una colección de máquinas

• Abierto, publicado a terceros• Fácil aprendizaje…

con algunas particularidades

Page 10: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Demos

Windows Powershell

Demo

Page 11: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

http://bit.ly/DescargaWS2012

Page 12: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

http://bit.ly/ws2012ebook

Page 13: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

http://bit.ly/AzureItPro

Page 14: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

http://bit.ly/ITCamps2012

Page 15: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Serie de Webcasts Windows Server 2012

http://bit.ly/Webcasts2012

Page 16: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Sigue a TechNet España

http://www.facebook.com/TechNet.Spain

http://www.twitter.com/TechNet_es

http://linkd.in/TechNetSpain

Page 17: Windows Powershell Windows Server 2012. Índice Powershell Powershell Powershell 3.0 Powershell 3.0 Powershell en Windows 8 / 2012 Powershell en Windows.

Windows Powershell

Windows Server 2012