2

I am trying to run the command "Get-SPWeb" from the SharePoint-Snapin for Powershell.

If I start PS normal (.net Ver.4), this is the error:

"Get-SPWeb: Microsoft SharePoint is not supported with Version 4.0.3.... of the Microsoft .Net Runtime."

Alright, so simply put -Version 2 behind the PS-Shortcut so it starts with Version 2? See what happens:

Error: Import-Module: [...] The Module 'SharePoint' requires a minimum version of '4.0' to execute

If I wouldn´t be mad as hell, I would just laugh about it.

Do you have any idea how to fix this issue?

This is the code by the way (important parts):

Add-PSSnapin Microsoft.SharePoint.PowerShell
$web = Get-SPWeb "http://myaddress.com/myreport"

Edit: Version-Info´s:

The Version-check provides the following:

PSVersion:  2.0
CLRVersion: 2.0. ....
Build: 6.1. ...

And with the normal PS:

PSVersion: 3.0
CLRVersion: 4.0
Build: 6.2

Also, I always start with the x64-version as administrator

Edit2: This is how the errors look:

Trying to run with ver. 2

Trying to run with normal ver.

Best_Where_Gives
  • 481
  • 2
  • 22

0 Answers0