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
| #region Script Header | |
| <# | |
| .SYNOPSIS | |
| Retrieves user login information from remote computers within the last 60 days. | |
| .DESCRIPTION | |
| This script queries remote computers for user login events within the last 60 days. | |
| It retrieves the username, computer name, login time, and session type. | |
| The script is designed for PowerShell Core and utilizes best practices for performance. |
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
| <# | |
| .SYNOPSIS | |
| Creates an Excel workbook with DHCP server information. | |
| .DESCRIPTION | |
| This script retrieves DHCP server summary data and subnet reservation data from the DHCP server and creates an Excel workbook with the information. | |
| .PARAMETER SummaryData | |
| Specifies the DHCP server summary data to be included in the workbook. |
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 Install-ZabbixAgent { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter] | |
| [string]$ComputerName='localhost', | |
| [Parameter(Mandatory=$true)] | |
| [string]$ZabbixUrl | |
| ) | |
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
| using namespace System.Management.Automation | |
| using namespace Microsoft.PowerShell.Commands | |
| function Write-FunctionError { | |
| <# | |
| .SYNOPSIS | |
| Writes an error within the context of the containing CmdletBinding() function. Makes errr displays prettier | |
| #> | |
| param( | |
| [Parameter(Mandatory)][String]$Message, | |
| [ValidateNotNullOrEmpty()][ErrorCategory]$Category = 'WriteError', |
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
| #requires -version 5.1 | |
| <# | |
| this must be run in a Windows Terminal or console session that supports the | |
| emoji icons or use -Force if you know you are. | |
| see https://github.com/chubin/wttr.in for API information | |
| This command writes to the host not the PowerShell pipeline. | |
| #> |
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
| #---------------------------------------------------------------# | |
| # User hidraw Access # | |
| #---------------------------------------------------------------# | |
| KERNEL=="hidraw*", SUBSYSTEM=="hidraw", TAG+="uaccess" | |
| #---------------------------------------------------------------# | |
| # Gigabyte/Aorus RGB Fusion 2 USB # | |
| #---------------------------------------------------------------# | |
| SUBSYSTEMS=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="8297", TAG+="uaccess" |
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
| #requires -version 5.1 | |
| <# | |
| A PowerShell version of the LCR dice game. | |
| Player 1 sits at the top of the player circle. Subsequent players | |
| are positioned clockwise. | |
| This script writes to the host not to the pipeline. |
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
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "copyOnSelect": false, | |
| "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
| // Add custom keybindings to this array. | |
| // To unbind a key combination from your defaults.json, set the command to "unbound". | |
| // To learn more about keybindings, visit https://aka.ms/terminal-keybindings | |
| "keybindings": | |
| [ | |
| // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. |
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
| Get-Command # Retrieves a list of all the commands available to PowerShell | |
| # (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
| Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
| Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
| Get-Help # Get all help topics | |
| Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
| Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
| Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
NewerOlder