I have the following script work in windows 10 but not on windows 7:
$LogTime = Get-Date -Format "MM-dd-yyyy_hh-mm-ss"
$Path1= "TEST\TESTLog_$(get-date -f yyyy-MM-dd).txt"
$AffPBS= Get-Process "LLCService.exe" | Select-Object ProcessorAffinity
$AffLC= Get-Process "LCService.exe" | Select-Object ProcessorAffinity
$AffinityLLCFinal = "LLC " + $AffPBS
$AffinityLCFinal = "LC " + $AffLC
$FinalOutput = $LogTime+" " +$AffinityLLCFinal +" " + $AffinityLCFinal
$FinalOutput | Out-File -Append $Path1
I have run the Powershell_ISE as administrator and also set Set-ExecutionPolicy RemoteSigned.
The results I'm getting on Windows 10:
10-09-2017_03-31-10 LLC @{ProcessorAffinity=63} LC @{ProcessorAffinity=63}
THe results I'm getting on Windows 7:
10-09-2017_11-23-26 LLC LC
It seems like the Get-Process isn't working on Windows Embedded Standard. Is there any other way of doing this.