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

WinPEAS.ps1 changes only -- Minor fixes, Removed Get-CimInstance Win32_product for ("Known Bad"), Remove PSCustomObject for cmdlet PSObject #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Average-Bear
Copy link

@Average-Bear Average-Bear commented Oct 29, 2024

  • Minor spelling fixes.

  • Minor readability fixes.

  • Minor syntax/parameter fixes for -ErrorAction in a few commands.

  • Removal of some 'unneeded' semicolon terminators.

  • Swapped [PSCustomObject]

    • Environments that utilize [ Constrained Language Mode ] will usually not allow loading of .NET like this. Easy workaround using New-Object -TypeName PSObject
    • Utilized [Ordered] to force consistent outputs -- can return out of order specified without it.
  • Removed Get-CimInstance Win32_Product command due to known bad issues.
    "Very slow. Doesn't always return a complete list of installed applications. And MOST IMPORTANTLY it kicks off a consistency check on all of the applications and begins to silently repair them." -- Doctor Scripto 2011

    • Added function Get-InstalledApplications as a replacement.
      • Queries registry keys for x86 and x64 applications
    • KB974524
      • Potential Windows Application Event Log IDs triggered for repair:
        • Event ID: 1035
          • Description: Windows Installer reconfigured the product. Product Name: . Product Version: . Product Language: . Reconfiguration success or error status: 0.
        • Event ID: 7035/7036
          • Description: The Windows Installer service entered the running state.
            Not guaranteed to break things but, not suggested in PROD

@Average-Bear Average-Bear changed the title Minor fixes, Removed Get-CimInstance Win32_product for ("Known Bad"), Remove PSCustomObject for cmdlet PSObject WinPEAS.ps1 changes only -- Minor fixes, Removed Get-CimInstance Win32_product for ("Known Bad"), Remove PSCustomObject for cmdlet PSObject Oct 29, 2024
@carlospolop
Copy link
Collaborator

@RandolphConley do you approve these changes?

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

Successfully merging this pull request may close these issues.

2 participants