Tuesday, August 2, 2011
Tuesday, July 27, 2010
How to install the VESI
Wednesday, July 7, 2010
How to install and use PowerShell Management library for Hyper-V R2
http://trycatch.be/blogs/roggenk/archive/2010/02/08/powershell-management-library-for-hyper-v-r2.aspx
http://trycatch.be/blogs/roggenk/archive/2010/05/26/managing-windows-server-2008-r2-using-powershell.aspx
Examples:
# get default VHD path for server ariadne
Get-VHDDefaultPath -server ariadne
# get VM state for all VMs in server ariadne with a formated output
get-VMState -server ariadne | ft -property VMElementName,GuestOS,EnabledState,Name -auto
# Start a VM Session
New-VMConnectSession -vm strgsrv -server ariadne
# Start a VM
Start-VM -vm strgsrv -server ariadne
# Shutdown a VM
Invoke-VMShutdown -vm strgsrv -server ariadne -Force
# Shutdown all VMs in server ariadne
Invoke-VMShutdown (Select-VM -Server ariadne -Multiple) -Force
# Shutdown all VMs in server ariadne
Get-VM -Server ariadne -Running | Invoke-VMShutdown -Force
# List all stopped VMs in server ariadne
get-VM -Server ariadne -Stopped
# Start all VMs in server ariadne
get-VM -Server ariadne -Stopped | Start-VM
# Get a build script for VM strgsrv of server ariadne
Get-VMBuildScript -vm strgsrv -server ariadne
Tuesday, May 11, 2010
Enable and configure Windows PowerShell Remoting using Group Policy
http://blog.crayon.no/blogs/janegil/archive/2010/03/04/enable_2D00_and_2D00_configure_2D00_windows_2D00_powershell_2D00_remoting_2D00_using_2D00_group_2D00_policy.aspx
http://www.computerperformance.co.uk/powershell/powershell_remote.htm
Sunday, April 25, 2010
Windows PowerShell cmdlets
http://www.bing.com/visualsearch?mkt=en-us&g=powershell_cmdlets#
Sunday, November 15, 2009
Script to list installed software on local computer
$a = New-Object -comobject Excel.Application
$a.visible = $True
$b = $a.Workbooks.Add()
$c = $b.Worksheets.Item(1)
$c.Cells.Item(1,1) = "Name"
$c.Cells.Item(1,2) = "Version"
$c.Cells.Item(1,3) = "Publisher"
$c.Cells.Item(1,4) = "InstalledOn"
$c.Cells.Item(1,5) = "HelpLink"
$c.Cells.Item(1,6) = "UninstallString"
$d = $c.UsedRange
$d.Interior.ColorIndex = 19
$d.Font.ColorIndex = 11
$d.Font.Bold = $True
$intRow = 2
$Keys = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
$Items = $keys |foreach-object {Get-ItemProperty $_.PsPath}
foreach ($item in $items)
{
$c.Cells.Item($intRow,1) = $item.Displayname
$c.Cells.Item($intRow,2) = $item.DisplayVersion
$c.Cells.Item($intRow,3) = $item.Publisher
$c.Cells.Item($intRow,4) = $item.InstallDate
$c.Cells.Item($intRow,5) = $item.HelpLink
$c.Cells.Item($intRow,6) = $item.UninstallString
$intRow = $intRow + 1
}
$d.EntireColumn.AutoFit()
or you can try this in one line script
gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |Select DisplayName, DisplayVersion, Publisher, InstallDate, HelpLink, UninstallString |ogv