Posts

Showing posts with the label MS Office

Get-OfficeVersion

PowerShell function that gets the currently installed office version and returns either the year, the office folder, the registry location, or the number. Updated 4/25/18 to support 64 bit office. Bitness is now a returnable Value Type. Function Get-OfficeVersion { #Allowing Cmdlet Bindings [CmdletBinding(SupportsShouldProcess=$true)] param(   [Parameter(Position=0,Mandatory=$true)]   [Alias("Value","VT")]   [ValidateSet("Office Year", "Office Folder", "Registry Location","Registry Number","Bitness")]   [string]$ValueTypeReturn,     [Parameter(Position=1,Mandatory=$false)]   [Alias("Computer","CN")]   [string]$ComputerName = $env:COMPUTERNAME ) Write-Verbose "Testing connection to $ComputerName" if(Test-Connection -Quiet $ComputerName -Count 1){ Write-Verbose "Connection Successful to $ComputerName" Write-Verbose "Detecting software for $ComputerName...