This project is read-only.
1

Closed

Latest version has bugs

description

I'm getting an error when trying to install the latest version as a task scheduler using the -install switch with the following message
Write-Verbose : A positional parameter cannot be found that accepts argument
'Found'.
At C:\Scripts\SPBestWarmUp.ps1:73 char:2
  • Write-Verbose -Message ""Found $appPools.Count Application Pool""
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidArgument: (:) [Write-Verbose], ParameterB
      indingException
    • FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell
      .Commands.WriteVerboseCommand
To solve the issue,
Change
Write-Verbose -Message "Found $$appPools.Count Application Pool"

To
Write-Verbose -Message "Found $($appPools.Count) Application Pool"

I can't check in code so raising this issue to you
Closed Feb 2, 2016 at 5:17 PM by Samurai_ka

comments

Samurai_ka wrote Jan 9, 2016 at 1:05 PM

The line had double quotes
Write-Verbose -Message ""Found $appPools.Count Application Pool""
and is now changed to
Write-Verbose -Message "Found $appPools.Count Application Pool"

Should do now.

techiet wrote Jan 11, 2016 at 8:25 PM

Thank you for posting this as I ran into the same issue.

The line had double quotes
Write-Verbose -Message ""Found $appPools.Count Application Pool""
and is now changed to
Write-Verbose -Message "Found $appPools.Count Application Pool"

Should do now.

wrote Feb 2, 2016 at 5:17 PM