Hi, I had a PowerShell script built some years back that creates a website in IIS and SQL database. I am not familiar with PowerShell and after migrating the scripts to a new server from Server 2012 to Server 2019 and from SQL 2008R2 to SQL 2019 Express I am now hitting some issues that I have tried Googling but I can’t seem to find a solution to the below error.
Here is line 73 from C:\inetpub\WCEDemoScripts\AutomaticDeploy.ps1 = Add-PSSnapin SqlServerProviderSnapin100
I am completely lost here if anyone could help point me in teh right direction please. Many thanks.
Error: -
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.
At C:\inetpub\WCEDemoScripts\AutomaticDeploy.ps1:72 char:5
+ Add-PSSnapin SqlServerCmdletSnapin100
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (SqlServerCmdletSnapin100:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.
At C:\inetpub\WCEDemoScripts\AutomaticDeploy.ps1:73 char:5
+ Add-PSSnapin SqlServerProviderSnapin100
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (SqlServerProviderSnapin100:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand