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
Class PercentProgress | |
{ | |
[DateTime] $Start | |
[DateTime] $Now | |
[DateTime] $End | |
[Float] $Percent | |
[TimeSpan] $Elapsed | |
[TimeSpan] $Remain | |
[TimeSpan] $Total | |
PercentProgress([String]$Start) |
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
# Bennett @ https://stackoverflow.com/questions/21895800/powershell-script-to-install-certificate-into-active-directory-store | |
# Modified/Simplified | |
Function Import-NTDSCertificate | |
{ | |
[ CmdletBinding () ] Param ( | |
[ Parameter ( Mandatory ) ] [ String ] $File , | |
[ Parameter ( Mandatory ) ] [ String ] $Password , | |
#Remove certificate from LocalMachine\Personal certificate store |
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
# Name -> [list cmdlet parameters alias - powershell] | |
# Link -> https://www.youtube.com/watch?v=z79w4cmhius | |
# Updated *slightly*... | |
$CommandName = Read-Host "Type command name" | |
(Get-Command $CommandName).Parameters.Values | Select-Object Name, Aliases |
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
# // ================================================================================================================ | |
# // | This script creates a time object similar to the [System.Diagnostics.Stopwatch] object, but is much simpler. | | |
# // ================================================================================================================ | |
# [Script area] | |
# Overload class definition | |
Class Time | |
{ | |
Hidden [Object] $Start | |
Time() |
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
Class CustomProperty | |
{ | |
[UInt32] $Index | |
Hidden [String] $Path | |
Hidden [Object] $Property | |
[String] $Name | |
[Object] $Value | |
[UInt32] $Exists | |
[Object] $Target | |
[UInt32] $Compliant |
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
# [VMDK] (VMWare/VirtualBox) -> [VHDX] (Hyper-V) | |
# https://gist.github.com/rahilwazir/69a750b70348459875cbf40935af02cb | |
# Microsoft Virtual Machine Converter (Link active as of 2021_0121) | |
# http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi | |
# Import Module | |
Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1" | |
# Pathing |
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
Function Download-WindowsServer2019 | |
{ | |
[CmdLetBinding()]Param( | |
[Parameter(Position=0,Mandatory=$True)][String]$Path) | |
$Current = [Net.ServicePointManager]::SecurityProtocol | |
[Net.ServicePointManager]::SecurityProtocol = 3072 | |
Import-Module BITSTransfer | |
$Image = "17763.379.190312-0539.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso" |
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
Function Gather-Download | |
{ | |
[CmdLetBinding()]Param( | |
[ValidateNotNullOrEmpty()] | |
[Parameter(Position=0,Mandatory)][String]$URL, | |
[Parameter(Position=1)][String]$Path="$Home\Downloads", | |
[Parameter(Position=2)][String]$Info=$URL, | |
[Parameter(Position=3)][Switch]$Hash) | |
Import-Module BitsTransfer |
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
# // __________________________________ | |
# // | Original @ 09/26/2019 14:49:00 | | |
# // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | |
# // __________________________________________________________________________________________________________ | |
# // |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯| | |
# // | Example, you want to have a spacing in the way your stuff is written to the screen. | | |
# // | You can have characters already fully assembled, and then select the distance with the array selector. | | |
# // | You can use this idea in a couple different ways... | | |
# // |________________________________________________________________________________________________________| |
NewerOlder