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
param ( | |
[Parameter(Mandatory=$true)] | |
[string[]] | |
$ComputerName | |
) | |
#region GET BIOS SETTINGS | |
$filter = @( | |
"Name like '%day'" | |
"Name like 'BIOS Power-On%'" |
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
#Requires -Version 3.0 | |
#Requires -PSEdition Desktop | |
function Get-RecycleBin { | |
<# | |
.SYNOPSIS | |
Lists and deletes items from the Windows Recycle Bin. | |
.DESCRIPTION | |
Lists and optionally deletes items in the Windows Recycle Bin for a specific user. | |
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
#Requires -Version 7.0 | |
function Update-PowerShell { | |
[Alias('ups')] | |
param ( | |
# THE POWERSHELL CHANNEL THAT YOU WANT TO INSTALL | |
[Parameter(Mandatory = $true)] | |
[ValidateSet( | |
'Stable', | |
'Preview' | |
ErrorMessage="Value '{0}' is invalid. Please use one of: '{1}'" |
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
$keyPath = 'path.key' | |
$passPath = 'path.txt' | |
$account = 'username' | |
$key = Get-Content -Path $keyPath | |
$pass = Get-Content -Path $passPath | ConvertTo-SecureString -Key $key | |
# POWERSHELL 5.1, 6 | |
$credentials = New-Object -TypeName System.Management.Automation.PSCredential($account,$pass) | |
$clearPass = $credentials.GetNetworkCredential().Password |
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
$env:UPN = (whoami /upn) | |
$PSDefaultParameterValues = @{ | |
'Connect-ExchangeOnline:UserPrincipalName' = "$env:UPN" | |
} | |
Set-Alias -Name cexo -Value Connect-ExchangeOnline |