PowerShell library that includes all the P\Invoke assemblies from Microsoft. P\Invoke is method for calling native functions in .NET. The P\Invoke assemblies are generated based on the latest version of the Windows API.
Install the module from the PowerShell Gallery.
Install-Module Pinvoke
Call native functions directly in PowerShell.
[PInvoke.Kernel32Dll]::LoadLibrary('myDll.dll')
- Get-Window
- Remove-Window
$Process = Start-Process Notepad -PassThru
Get-Window -Hwnd $Process.MainWindowHandle | Remove-Window