PowerShell: Difference between revisions

From VI-Toolkit
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
If you are not running windows 2008/Windows 7 and don't have PowerShell (Posh) installed then go get it from Microsoft's [http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx PowerShell landing page]
If you are not running windows 2008/Windows 7 and don't have PowerShell (Posh) installed then go get it from Microsoft's [http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx PowerShell landing page]
It is nowadays also offered via Windows Update as an optional update.
It is nowadays also offered via Windows Update as an optional update.
Then in order to manage your virtual infrastructure you will need the [[VI Toolkit for windows]].
 
Then in order to manage your virtual infrastructure you will need the [[VI Toolkit for windows]] and then go to the [[PowerCLI]] page.








==== Learning VI-Toolkit Powershell ====
==== Learning Powershell ====


* [[BEGINNERS PAGE | Beginners page]]
* [[BEGINNERS PAGE | Beginners page]]


* [[Virtu-Al: Lesson 1 Time Source]]
* [[Learning Powershell]]
 
* [[Virtu-Al: Lesson 2 Service and Firewall Configuration]]
 
* [[Virtu-Al: Lesson 3 Networking]]
 
* [[Virtu-Al: Lesson 4 Portgroups]]
 
 
* [[Powershell CMDLET list]] (thank you Alan Renouf for the idea and initial work)
 
* [http://communities.vmware.com/docs/DOC-4210 Managing VMware with PowerShell -- Frequently Asked Questions]
 
==== PowerCLI Oneliners ====
[http://www.peetersonline.nl/index.php/about/ Hugo Peeters] started with posting so called oneliners to indicate how powerful the VI-Toolkit on Powershell is. After a while this got picked up by others as sort of a sport to see if you can do it in one line. Below is a collection of links with oneliners from great powershell scripters. These pages now contains links to oneliners from [http://www.peetersonline.nl/index.php/about/ Hugo Peeters], [http://www.virtu-al.net Alan Renouf], [http://get-admin.com get-admin.com] and [http://ict-freak.nl Arne Fokkema]
 
* [[PowerCLI Oneliners: Statistics]]
* [[PowerCLI Oneliners: Events]]
* [[PowerCLI Oneliners: Host Configuration]]
* [[PowerCLI Oneliners: VM Configuration]]
* [[PowerCLI Oneliners: Storage]]
 
 
==== Scripts on other locations ====
 
* [http://virtualfuture.info/2008/07/powershell-remove-connected-iso/ Remove connected iso's]
 
* [http://communities.vmware.com/docs/DOC-6973 HBA Load Balancer]
 
* [http://communities.vmware.com/docs/DOC-6972 Deploy and Redeploy vm's (from templates) from a .csv]
 
* [http://communities.vmware.com/docs/DOC-9610 Resourcepool Reservation Script]
 
* [http://communities.vmware.com/docs/DOC-7090 Add/Remove active directory user accounts who belong to a particular security group on all ESX hosts]
 
* [http://mikedatl.typepad.com/mikedvirtualization/2008/10/quick-migration.html Quick migration]
 
* [[Out-Dataset Cmdlet]]
 
* [[Introduction to scripting vi using perl or powershell]]
 
* [[Manage VMware Server with PowerShell]]
 
* [[Introduction to the vSphere SDK in Java and C#]]
 
* [[PowerCLI: Oneliners]]
===== VM Configuration =====
 
* [[Restart VMware Tools on all Windows VM's]]
 
* [[PowerCLI: Update VMwaretools without a reboot]]
 
* [[PowerCLI: Add configuration details to VMX]]
 
* [[PowerCLI: Get Virtual Machine disk usage]]
 
* [[PowerCLI: Set CPU Identification Mask]]
 
* [[PowerCLI: Force a VM to enter BIOS setup on next boot]]
 
* [[PowerCLI: Set VM Snapshot location]]
 
* [[PowerCLI: Resolving improper memory limits on your virtual machines]]
===== Host Management =====
 
* [[PowerCLI: Report every VM added to vCenter in the last 30 days]]
 
* [[PowerCLI: Get Virtual Machine total size]]
 
* [[PowerCLI: Export and import customization profiles]]
 
* [[PowerCLI: Export Task and eventlogs to file using TaskHistoryCollector]]
 
* [[PowerCLI: Snap reminder]]
 
* [[PowerCLI: Daily Report]]
 
* [[PowerCLI: Get number of vCPU's used in cluster]]
 
==== General powershell ====
 
* [http://blogs.msdn.com/powershell/archive/2006/11/03/erroraction-and-errorvariable.aspx Error handling in Powershell]
 
* [http://blog.sapien.com/index.php/2009/05/12/a-powershell-port-scan/ A powershell port scan]
 
* [[Remote WMI defrag script]]
 
* [http://stackoverflow.com/questions/893295/what-are-some-of-the-most-useful-yet-little-known-features-in-the-powershell-lang useful less known features in powershell]
 
* [http://www.microsoft.com/technet/scriptcenter/default.mspx MS Technet scriptcenter]
 
* [http://www.virtu-al.net/2009/07/10/running-a-powercli-scheduled-task/ Virtu-al: Running a PowerCLI Scheduled task]
 
* [http://blog.geekpoet.net/2008/04/powershell-script-to-report-on-all.html Geekpoet: Report on all scheduled tasks in your domain]
 
* [http://www.peetersonline.nl/index.php/powershell/user-confirmation-in-powershell/ Peetersonline: User Confirmation in Powershell]
 
* [http://autopowershell.com/projects/show/autops Autopowershell scripting host]
 
* [http://dmitrysotnikov.wordpress.com/2009/07/14/powerguiorg-now-with-about_-topics/ twitter @powerGuiOrg]
 
* [http://blogs.msdn.com/powershell/archive/2009/07/22/dynamic-binary-modules.aspx MSDN Powershell blog: Dynamically compile and load an assembly on Remote Host]
 
* [http://blogs.technet.com/heyscriptingguy/archive/2009/07/22/hey-scripting-guy-how-can-i-speed-up-my-windows-powershell-scripts.aspx Technet Blog: How can I speed up my Powershell scripts?]
 
* [http://www.nivot.org/2009/08/19/PowerShell20AConfigurableAndFlexibleScriptLoggerModule.aspx PowerShell 2.0: A Configurable and Flexible Script Logger Module]
 
* [http://www.idera.com/Products/Free-Tools/PowerShell-scripts/ Free SQL Server powershell scripts]
 
* [http://www.astroarch.com/blog/?p=11 Blue Gears: Power Shell-ism's Tales from a Linux Developer]


==== Powershell tools ====
* [[Powershell techniques and tips]]


* [http://www.thevesi.org The Vizioncore Virtualization Ecoshell initiative]
* [[Powershell Tools]]


* [http://www.powergui.org Quest Software PowerGUI]


* [http://www.primaltools.com/freetools/ SAPIEN Primalforms] See also [http://blog.sapien.com/index.php/2008/11/03/getting-started-with-primalforms/ Getting started with Primalforms]


[[Category: Powershell]][[Category: VI-Toolkit]]
[[Category: Powershell]][[Category: VI-Toolkit]]

Latest revision as of 12:29, 31 July 2010

If you are not running windows 2008/Windows 7 and don't have PowerShell (Posh) installed then go get it from Microsoft's PowerShell landing page

It is nowadays also offered via Windows Update as an optional update.

Then in order to manage your virtual infrastructure you will need the VI Toolkit for windows and then go to the PowerCLI page.



Learning Powershell