Add-Type

Add-Type keyword lets us use the .NET framework to compile C# code containing Win32 API declarations and then call them.

triangle-exclamation

Example code:

The GetUserNamearrow-up-right function retrieves the name of the user associated with the current thread.

Last updated