How do I find what version of WSUS I have installed on Windows Server 2012?

I'm trying to automate WSUS with powershell, however to do this I need to know what version is installed. How do I find this information?

The server is using Windows Server 2012 R2 Standard. Thanks.


Solution 1:

You can use the following code to get the version of WSUS in PowerShell:

[void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer(“dc1”,$False)
$wsus.Version