I'm attempting to use the PowerShell ISE on a Win 2012 Standard Server.
I followed the steps here (http://sharepointpromag.com/blog/powershell-and-sharepoint-step-1-loading-dlls-and-snap-ins) to add the SharePoint Snapin which worked on my DEV box but in my TEST environment I'm having some strange behavior.
This lists all of the assemblies without any issue.
[AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object { Split-Path $_.Location -Leaf } | Sort
I load Microsoft.SharePoint.PowerShell with this assembly and verify it with the command above. However, I have to explicitly load each DLL. If I use "Microsoft.SharePoint" as the value it does not load the PowerShell assembly.
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.PowerShell")
This does not display any values, SharePoint or otherwise which if found the strangest part.
Get-PSSnapin
This fails which makes sense, since there are not Snapins listed about.
Add-PSSnapin Microsoft.SharePoint.PowerShell
On another note, I'm able to execute the SharePoint Powershell console without an issue.
Question:
How can I add the SharePoint Snapin in the PowerShell ISE?
How can I debug why no PSSnapins appear to be registered?