How to install RSWebParts.cab on SQL Server 2014 and Sharepoint 2016 - sharepoint-2016

I am trying to install RSWebParts.cab to use Report Viewer on SharePoint 2016 but I got error like this:
Install-SPWebPartPack : Failed to extract the cab file in the solution.
At line:1 char:1
+ Install-SPWebPartPack -LiteralPath "C:\Program Files (x86)\Microsoft ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Share...tallWebPartPack:SPCmdletInstallWebPartPack) [Install-SPW
ebPartPack], SPException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletInstallWebPartPack
The path that i used to install:
Install-SPWebPartPack -LiteralPath "C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Reporting Services\SharePoint\RSWebParts.cab" -GlobalInstall

As per below link: SSRS 2014 is not supported in SP2016.
https://learn.microsoft.com/en-us/sql/reporting-services/install-windows/supported-combinations-of-sharepoint-and-reporting-services-server

Related

"Unable to load one or more of the requested types" Exception occurred when installing npgsql

all.
I installed npgsql on Windows Server 2022 by the following step.
PS > Install-Package -Name Npgsql -Source https://www.nuget.org/api/v2 -SkipDependencies
PS > Add-Type -Path "C:\Program Files\PackageManagement\NuGet\Packages\Npgsql.6.0.5\lib\net6.0\Npgsql.dll"
However, I got the following error.
Add-Type : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more
information.
At line:1 char:1
+ Add-Type -Path "C:\Program Files\PackageManagement\NuGet\Packages\Npg ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], ReflectionTypeLoadException
+ FullyQualifiedErrorId : System.Reflection.ReflectionTypeLoadException,Microsoft.PowerShell.Commands.AddTypeComma
nd
Would you tell me the solution?

Uninstall VSTO plugin using batch file

I've to uninstall a vsto plugin. I'm using this command in powershell :
"C:\Program Files\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" \Uninstall file:///C:/Users/username/source/repos/OutlookAddIn3/OutlookAddIn3/publish/OutlookAddIn3.vsto
This statement I copied from UninstallString in registry of this Add-in. But this gives following error in powershell :
At line:1 char:78
+ ... iles\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" \Uninstall "file:/ ...
+ ~~~~~~~~~~
Unexpected token '\Uninstall' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
Can someone tell the correct way of using this command?
Edit 1:
The cause of error was using \uninstall instead of /uninstall and as per the suggestion given by #Abraham Zinala, I added & before the command to make it run in PowerShell.
& "C:\Program Files\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" /uninstall file:///C:/Users/username/source/repos/OutlookAddIn3/OutlookAddIn3/publish/OutlookAddIn3.vsto /silent
To make it work in using Batch file, just have to remove & previous command. The working command in batch file is :
"C:\Program Files\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" /uninstall file:///C:/Users/username/source/repos/OutlookAddIn3/OutlookAddIn3/publish/OutlookAddIn3.vsto /silent

Powershell invoking DTUTIL error

I'm currently in the process of building a deployment process in octopus deploy and as part of that I want to use DTUTIL to create folders and load SSIS packages to our server.
This text "C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\dtutil.exe" /SourceServer [servername] /FC SQL;\;[foldername], with appropriate server and folder names, which works in DOS.
Here is the rub, if I use the same code in Powershell I get an error:
$Command ="`"C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\dtutil.exe`" /SourceServer MYSERVER /FC SQL;\;Folder1";
invoke-Expression $Command;
invoke-expression : At line:1 char:73
+ ... Files (x86)\Microsoft SQL Server\130\DTS\Binn\dtutil.exe" /SourceSe ...
+ ~
You must provide a value expression following the '/' operator.
At line:1 char:73
+ ... \Microsoft SQL Server\130\DTS\Binn\dtutil.exe" /SourceServer MYSERVER ...
+ ~~~~~~~~~~~~
Unexpected token 'SourceServer' in expression or statement.
At line:1 char:1
+ invoke-expression $Command
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
+ FullyQualifiedErrorId : ExpectedValueExpression,Microsoft.PowerShell.Commands.InvokeExpressionCommand
Has anyone got any idea how to remedy this?
Anthony
You can execute the EXE using the & operator:
& "C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\dtutil.exe" /SourceServer MYSERVER /FC SQL;\;Folder1
Also, the above Invoke-Expression command failed in the same way when I ran it in PowerShell directly, this doesn't appear to be an issue with running the PowerShell within Octopus.

Install MS Access DAO Primary Interop Assembly for Use with PowerShell Script

I am trying to automate Microsoft Access 2016 with PowerShell, but I appear to be missing an Office Primary Interop Assembly called Microsoft.Office.Interop.Access.Dao. I've tried a few approaches in PowerShell, and these are the errors that I get:
PS > $app.Application.OpenCurrentDatabase()
The following exception occurred while retrieving member "Application": "Could not load file or assembly 'Microsoft.Office.Interop.Access.Dao, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified."
At line:1 char:1
+ $app.Application.OpenCurrentDatabase()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember
PS > Add-Type -Assembly "Microsoft.Office.Interop.Access.Dao"
Add-Type : Could not load file or assembly 'Microsoft.Office.Interop.Access.Dao, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Add-Type -Assembly "Microsoft.Office.Interop.Access.Dao"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.AddTypeCommand
Please note the difference in version (15.0.0.0 vs 12.0.0.0).
The only version of Office that I have installed on this machine is Office 2016 via Office 365 download. I have run gacutil /l from a Visual Studio Command Prompt, and I see that the other Office PIAs, version 15.0.0.0, are installed.
According to the NuGet Web site, I could download the assembly via NuGet Package Manager Console, if I were working on a Visual Studio Solution, but I cannot install the assembly with PowerShell:
PS > Install-Package Microsoft.Office.Interop.Access.Dao
Install-Package : No match was found for the specified search criteria and package name 'Microsoft.Office.Interop.Access.Dao'. Try Get-PackageSource to see all available registered package sources.
At line:1 char:1
+ Install-Package Microsoft.Office.Interop.Access.Dao
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
My questions are:
How can I install Microsoft.Office.Interop.Access.Dao to the GAC
so I can reference it in PowerShell scripts?
If nuget.org is listed as a PackageSource in PowerShell, why can't I use the Install-Package command to install this assembly?
Why did this assembly not get installed with Office 2016/365?
The accepted answer will provide at least a solution to my first question - How can I install Microsoft.Office.Interop.Access.Dao to the GAC so I can reference it in PowerShell scripts?

Windows Azure PowerShell cmdlet Error - File skipped because it was already present

Running the following Windows Azure PowerShell cmdlet for Windows Azure: Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1' generates the error below. I ran PowerShell with elevated priveleges and Get-ExecutionPolicy returns RemoteSigned.
Here is the error:
Import-Module : The following error occurred while loading the extended type data file:
Microsoft.PowerShell, C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Manag
ement.Websites.Types.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Manag
ement.SqlDatabase.Types.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
At line:1 char:14
+ Import-Module <<<< 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1'
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand
The script does not complete after this error.
After half a day of being stuck on this, I just decided to continue with the steps, and it worked flawlessly. So I guess it was simply a warning, but did not effect the rest of the process. I have not had any issues as a result.