Tuesday 28 April 2015

How to list installed application in Windows 2012 core mode

You can use PowerShell to list all the installed applications on Windows 2012 core mode.

Get-WmiObject Win32_Product | ft -Auto

Monday 27 April 2015

VSS fixup script

If Windows backup is failing due to VSS issues, you can try this script to re-register all the VSS DLLs. This should be a last resort after all other avenues have been investigated.

net stop "File Replication Service"
net stop "DHCP Server"
net stop "DFS Replication"
net stop "Background Intelligent Transfer Service"
net stop "System Event Notification Service"
net stop "Background Intelligent Transfer Service"
net stop "COM+ Event System"
net stop "Microsoft Software Shadow Copy Provider"
net stop "Volume Shadow Copy"

cd /d %windir%\system32

net stop vss
net stop swprv
regsvr32 /s ole32.dll
regsvr32 /s oleaut32.dll
regsvr32 /s vss_ps.dll
vssvc /register
regsvr32 /s /i swprv.dll
regsvr32 /s /i eventcls.dll
regsvr32 /s es.dll
regsvr32 /s stdprov.dll
regsvr32 /s vssui.dll
regsvr32 /s msxml.dll
regsvr32 /s msxml4.dll
regsvr32 /s msxml3.dll

net start "COM+ Event System"
net start "System Event Notification Service"
net start "Microsoft Software Shadow Copy Provider"
net start "Volume Shadow Copy"
net start "File Replication Service"
net start "DHCP Server"
net start "DFS Replication"
net start "Background Intelligent Transfer Service"

Friday 24 April 2015

Finding volume GUIDs from powershell

This peice of PowerShell will find all the volume GUIDs, their name and free space.

Get-WmiObject -class Win32_Volume -computername localhost | where-object {$_.name -like "\\?\*"} | select-object label, name, @{ Label = "Capacity(GB)" ; Expression = { "{0:N2}" -f ($_.capacity/1024/1024/1024) } },@{ Label = "Freespace(GB)" ; Expression = { "{0:N2}" -f ($_.freespace/1024/1024/1024) } } | ft -auto