spjeff / spbestwarmup

Tired of waiting for SharePoint pages to load? Want something easy to support? That works on all versions? This warmup script is for you!
2 stars 0 forks source link

SP 2010+Server 2008 R2+Powershell 4.0 Issue #10

Closed CrazyDornie closed 7 years ago

CrazyDornie commented 7 years ago

Hi, i've upgraded Powershell to v4 as mentioned in #3 and #6 and getting:

[OK]Installed to Task Scheduler Total W3WP = 264 MBSystem.PlatformNotSupportedException: Microsoft SharePoint wird mit der Version 4.0.30319.17929 der Laufzeitversion von Microsoft .NET nicht unterstützt. bei Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm() bei Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined) bei Microsoft.SharePoint.PowerShell.SPCmdlet.BeginProcessing()

I do not find the expression: #requires -version 3.0

What can i do?

Edit: Same error with Powershell v5

spjeff commented 7 years ago

Hi. What version of SharePoint and Windows O/S are you running?

I wonder if starting with "PowerShell.exe -Version 3" would help. https://msdn.microsoft.com/en-us/powershell/scripting/core-powershell/console/powershell.exe-command-line-help

CrazyDornie commented 7 years ago

Hi. "PowerShell.exe -Version 3" seems not to work. SharePoint Build is: 14.0.7015.1000 Windows Version: Windows Server 2008 R2 SP1 Build 7601

Edit: I've updated the System (was not maintained for a longer period) but problem still exists.

spjeff commented 7 years ago

Issue resolved with recent commit to read IIS and Drives with Get-WMIObject. Marking closed.

https://github.com/spjeff/spbestwarmup/commit/123aae91c6c8c488c1ce5c55006880c5190c7cbc#diff-316afa53af12494556ef094f27de1d72