brianlala / AutoSPInstaller

Automated SharePoint 2010/2013/2016/2019/SE PowerShell-based installation script.
https://autospinstaller.com
MIT License
170 stars 80 forks source link

Visio Cmdlets Not Recognized - SharePoint Snapin Issue #75

Open neil767 opened 3 years ago

neil767 commented 3 years ago

After bringing the Visio Service Instance online, the AutoSPInstallerModule.psm1 script around line 2406 attempts to remove "Microsoft.SharePoint.PowerShell" snap in and subsequently re-add via the Add-SharePointPSSnapin function.

Following this in the script an Invoke expression attempts to use Get-SPVisioServiceApplication. At this point I receive an error stating that the cmdlet is not available.

Once the script completes, if I run Get-SPVisioServiceApplication it states it is not available. If I then run Add-PSSnapin Microsoft.SharePoint.Powershell, Get-SPVisioServiceApplication is then available. If I run the script a second time it completes without issue. Also hard coded the Add-PSSnapin Microsoft.SharePoint.PowerShell command directly before invoke expression to no avail.

Has anyone else experienced this or can offer any advice?