Quantcast
Channel: Performance Analysis of Logs (PAL) Tool
Viewing all articles
Browse latest Browse all 913

Commented Unassigned: Invoke-Expression : The variable '$OS' cannot be retrieved because it has not been set. [25500]

$
0
0
notebook lenovo idealpad Y470
Windows 8.1

command
.\PAL.ps1 -Log SamplePerfmonLog.blg -ThresholdFile QuickSystemOverview.xml -NumberOfProcessors 1 -TotalMemory 1 -SixyFourBit $False -AllCounterStats $False

error
[Started] Memory Pool Non-Paged Bytes
Counter data for ""...Done
Generating Charts.WARNING: Please post errors or problems with this tool to the PAL web site located at http://www.codeplex.com/PAL with the following error message and a brief description of what you were trying to do. Thank you.
Invoke-Expression : The variable '$OS' cannot be retrieved because it has not been set.
At C:\Program Files\PAL\PAL\PAL.ps1:3401 char:5
+ Invoke-Expression -Command $sCode
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (OS:String) [Invoke-Expression], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined,Microsoft.PowerShell.Commands.InvokeExpressionCommand

PS C:\Program Files\PAL\PAL>
Comments: ** Comment from web user: raymegal **

There are a couple of places in the SystemOverview.xml file that do this:

```
$SixtyFourBit = $OS.substring(0,2)
If ($($SixtyFourBit) -eq $False)
```

So I commented out the set of $SixtyFourBit since I'm passing it in via the command line: -SixtyFourBit $True:

```
# $SixtyFourBit = $OS.substring(0,2)
If ($($SixtyFourBit) -eq $False)
```

However, after looking at QuckSystemOverview.xml it appears that we should be passing in the OS value of the system the logs are from like so:

```
-OS '64-bit Windows Server 2008 R2'
```

But then the code to check the value in SystemOverview.xml wouldn't work. It should be something like:

```
$SixtyFourBit = ($OS.substring(0,2) -eq '64')
If ($($SixtyFourBit) -eq $False)
```


Viewing all articles
Browse latest Browse all 913

Trending Articles