Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Typo in Modules/Log/Get-AppCompatCache.ps1 #184

Open
cduram opened this issue Aug 2, 2018 · 0 comments
Open

Possible Typo in Modules/Log/Get-AppCompatCache.ps1 #184

cduram opened this issue Aug 2, 2018 · 0 comments

Comments

@cduram
Copy link

cduram commented Aug 2, 2018

I was having trouble getting this to run. After switching from -tsv to -csv it began working properly:

C:\Users<user>\Desktop\Kansa-master\Kansa-master\Modules\Log\Get-AppCompatCache - Original.ps1 :
AppCompatCacheParser.exe not found on CSC-DURAM-VM2
At line:1 char:1

  • & '.\Get-AppCompatCache - Original.ps1'
  •  + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get->AppCompatCache - Original.ps1
    

`<#
.SYNOPSIS
Get-AppCompatCache.ps1
When run via Kansa.ps1 with -Pushbin flag, this module will copy
AppCompatCacheParser.exe to the remote system, then run
AppCompatCacheParser.exe --csv $AppCompatCacheParserOutputPath on the remote system,
and return the output data as a powershell object.

AppCompatCacheParser.exe can be downloaded from http://ericzimmerman.github.io/

.NOTES
Kansa.ps1 directives
OUTPUT CSV
BINDEP .\Modules\bin\AppCompatCacheParser.exe
#>

#Setup Variables
$AppCompatCacheParserPath = ($env:SystemRoot + "\AppCompatCacheParser.exe")
$Runtime = ([String] (Get-Date -Format yyyyMMddHHmmss))
$suppress = New-Item -Name "ACCP-$($Runtime)" -ItemType Directory -Path $env:Temp -Force
$AppCompatCacheParserOutputPath = $($env:Temp + "\ACCP-$($Runtime)")

if (Test-Path ($AppCompatCacheParserPath)) {
#Run AppCompatCacheParser.exe
$suppress = & $AppCompatCacheParserPath --csv $AppCompatCacheParserOutputPath
#Output the data.
Import-Csv -Delimiter "`t" "$AppCompatCacheParserOutputPath*.csv"

#Delete the output folder.
$suppress = Remove-Item $AppCompatCacheParserOutputPath -Force -Recurse

} else {
Write-Error "AppCompatCacheParser.exe not found on $env:COMPUTERNAME"
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant