Hi all,
I am trying to execute a power shell script from the Windows application. When power shell scripts gets executed, its showing following error message.
I am using below code to execute my power shell script
Process.Start("PowerShell.exe", "C:\\Applications\\PSscripts\\CreateMemberShipProvider.ps1");
Add-Snapin - No snap-ins have been registered for Windows PowerShell version 2.My power shell scripts is having following commands:
Add-Type -Path 'c:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\ISAPI\Microsoft.SharePoint.Client.dll' Add-Type -Path 'c:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\ISAPI\Microsoft.SharePoint.Client.Runtime.dll' Add-PsSnapin Microsoft.SharePoint.PowerShell New-SPWeb –url http://sp2010dev1:3691/Site6 -name $args[0] -template STS#0 New-SPWeb –url http://sp2010dev1:3691/Site7 -name $args[1] -template STS#0
Any Suggestion ?