1

OWA 2013 server is already installed and office files are working as expected but I am unable to run "Get-officeWebAppsfarm" in OWA server. I had excuted "Get-SPWopiBinding" in sharepoint server to check if am at the right OWA server. I don't want to rebuild/reinstall OWA now.

PS C:> Import-Module -Name OfficeWebApps Import-Module : The specified module 'OfficeWebApps' was not loaded because no valid module file was found in any module directory.

Get-OfficeWebAppsfarm : The term 'Get-OfficeWebAppsfarm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

2
  • are login with an account which is local admin on the server? start the shell as Run as Admin...\
    – Waqas Sarwar MVP
    Oct 10 '17 at 14:30
  • Yes I am part of the administrator Group in that OWA server and had run the Windows PowerShell in admin mode but still no luck
    – SPBeginner
    Oct 10 '17 at 19:09
4

I ran into the same issue today while patching an OWA 2013 server. The last patch, and many before that, ran without issues. Another OWA 2013 server that was on the same patch level also didn't experience this issue - seems kind of random so far.

The fix was to add the OWA admin module to the PowerShell module path on this OWA server:

$p=$Env:PSModulePath
$p+=";C:\Program Files\Microsoft Office Web Apps\AdminModule"
[Environment]::SetEnvironmentVariable("PSModulePath",$p)

There are two ways to make changes to environment variables stick without rebooting the server:

  1. Put the above snippet at the top of the script you're trying to execute, or
  2. Close and re-open the PowerShell window containing the script that you're trying to execute, after running the above script. CMD and Powershell will load the current environment variables when they are started. The same is true for the PowerShell ISE.
1

Have you installed Windows Powershell for Office Web Apps Server?

https://technet.microsoft.com/en-gb/library/ee890080.aspx

From your error, it looks like you don't have the cmdlets installed.

2
  • Yes the cmdlets are not identified... and Windows PowerShell already exists in the OWA server and also I see some windows security updates, and updates fro OWA for KB3118360 and KB880558 recently..... so any impact with this?
    – SPBeginner
    Oct 10 '17 at 19:11
  • Also I executed Get-Command in the OWA server which listed out most of the commands but Get-OfficewebAppsFarm was not part of that commandlets.... The required files exist at paths C:\Program Files\Microsoft Office Web Apps C:\ProgramData\Microsoft\OfficeWebApps. My requirement is to increase the size of the excel workbook from default value 10 mb to 20 mb or more. As Get-OfficeWebAppsFarm is not recognized I am unable to proceed further.
    – SPBeginner
    Oct 10 '17 at 19:26
0

To run Get-SPWOPIBinding make sure you are using the SharePoint management shell from a SharePoint server.

Following the guide for setting up a office web app servers for SharePoint 2013 https://technet.microsoft.com/en-us/library/ff431687.aspx you can also use Get-SPWopiZone to help identify you current setup.

1
  • Get-SPWOPIBinding was executed in SP WFE server which gave the result with the correct OWA server name.
    – SPBeginner
    Oct 10 '17 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.