Tag: Powershell

Get all vm’s on a hyper-v server and output to text file

This two line PowerShell script will get all vm’s on a hyper-v server and output to text file. Change path and name of vmrunning.txt to suit your needs.

Works on Server 2012 with powershell 3

[sourcecode language=”powershell” padlinenumbers=”true”]
Get-VM | Where-Object {$_.State -eq ‘Running’} | out-file -filepath C:VMrunning.txt

2013/01/28 | By | Reply More

Powershell 3 combo installer

These combo installers will update PowerShell to Version 3 on either Windows 7 x86 or Windows 7 x64 / Server 2008 R2

The installer runs silently and installs both the dotNetFx40_Full_x86_x64.exe  and either the Windows6.1-KB2506143-x86.msu or Windows6.1-KB2506143-x64.msu files. When the script  completes a pop-up prompting for a reboot will be displayed.

1-28-2013 2-17-52 AM

After re-booting and launching powershell type get-host to display the version number.

1-28-2013 2-25-39 AM

Download Button5

2013/01/28 | By | Reply More

Windows Explorer MRU (most recently used) search clear powershell script

This one line powershell script will clear the Windows Explorer MRU (most recently used) search list.

The downloaded zip file also includes both the ps1 script and a compiled exe (executable) version of the script for those who want to run it without launching powershell or if you want to place the exe in your windows start-up folder to clear the search entries each time you start windows.  It works on Vista, Windows 7 or windows 8 and server 2008 or 2012. Getting to your startup folder in Windows 8 or Server 2012 requires browsing to the  location below

C:\Users\<User Profile folder name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Download Button5

2012/11/19 | By | Reply More