This file contains hidden or 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
| function Use-Env { | |
| <# | |
| .SYNOPSIS | |
| Loads environment variables from a .env file into the PowerShell session. | |
| .DESCRIPTION | |
| This function reads a .env file in the current directory and sets environment variables in the Power | |
| session. It supports comments and blank lines. | |
| .EXAMPLE | |
| Use-Env | |
| Loads environment variables from the .env file in the current directory. |
This file contains hidden or 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
| function Get-ConsoleHandle { | |
| Add-Type -TypeDefinition @" | |
| using System; | |
| using System.Windows.Forms; | |
| public class Win32Window : IWin32Window | |
| { | |
| private IntPtr _hWnd; | |
| public Win32Window(IntPtr handle) |
This file contains hidden or 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
| function ssh-copy-id { | |
| param ( | |
| # Username to use for the SSH connection | |
| [Parameter(Mandatory = $true, | |
| Position = 0, | |
| ValueFromPipeline = $true, | |
| HelpMessage = "Username to use for the SSH connection", | |
| ValueFromPipelineByPropertyName = $true)] | |
| [string] | |
| $Username, |