This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using namespace System.Collections.Generic | |
using namespace System.Management.Automation | |
using namespace System.Security.AccessControl | |
using namespace Microsoft.Win32 | |
function Get-InstalledSoftware { | |
[CmdletBinding()] | |
param( | |
[Parameter(ValueFromPipeline)] | |
[ValidateNotNullOrEmpty()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#source of the main script : "https://gist.github.com/indented-automation/32efb05a5fb67ef9eed02bbb8fe90691" | |
#source of the Regex filtering : "https://github.com/gangstanthony/PowerShell/blob/master/Get-InstalledApps.ps1" | |
filter Get-InstalledSoftware { | |
<# | |
.SYNOPSIS | |
Get all installed from the Uninstall keys in the registry. | |
.DESCRIPTION | |
Read a list of installed software from each Uninstall key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Add-Type -Namespace PInvoke -Name NativeMethods -MemberDefinition @' | |
[DllImport("Kernel32.dll")] | |
public static extern bool CloseHandle( | |
IntPtr hObject); | |
[DllImport("Advapi32.dll", SetLastError = true)] | |
public static extern bool ImpersonateLoggedOnUser( |