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 Save-KBFile { | |
<# | |
.SYNOPSIS | |
Downloads patches from Microsoft | |
.DESCRIPTION | |
Downloads patches from Microsoft | |
.PARAMETER Name | |
The KB name or number. For example, KB4057119 or 4057119. |
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
## Stop-SCCMOppression.ps1 ## | |
function Stop-SCCMOppression { | |
[CmdletBinding()] | |
param ( | |
[switch] | |
$Enable | |
) | |
begin { | |
Write-Debug "Enter [$($PSCmdlet.MyInvocation.MyCommand.Name)]..." | |
$PSBoundParameters.Keys.ForEach{ |
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 Write-TimeStampOutput { | |
Param( | |
[Parameter()] | |
[String] | |
$InputObject, | |
[Parameter(ParameterSetName = 'LongDateTime', Mandatory)] | |
[switch] | |
$LongDateTime, | |
[Parameter(ParameterSetName = 'ShortDateTime', Mandatory)] | |
[switch] |
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 Get-MouseScrollDirection { | |
[CmdletBinding()] | |
param ( | |
) | |
begin { | |
Write-Debug "Enter [$($PSCmdlet.MyInvocation.MyCommand.Name)]..." | |
$PSBoundParameters.Keys.ForEach{ | |
if ($PSBoundParameters.PSItem -is [string]) { | |
Write-Debug "$_ : $($PSBoundParameters.Item($_))" | |
} else { |
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(ParameterSetName = 'Enable', Mandatory)] | |
[switch] | |
$Enable, | |
[Parameter(ParameterSetName = 'Disable', Mandatory)] | |
[switch] | |
$Disable | |
) | |
function Set-MouseScrollDirection { |
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 Write-Verbose { | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory, ValueFromPipeline, Position = 0)] | |
[string] | |
$Message, | |
[Parameter()] | |
[switch] | |
$TimeStamp | |
) |
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 Get-RepositoryStats { | |
[CmdletBinding()] | |
param ( | |
[string] | |
$WorkDirectory, | |
[switch] | |
$UseGitignore, | |
[switch] | |
$Novels | |
) |
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 Get-FileAttributes { | |
[CmdletBinding()] | |
param ( | |
[string] | |
$FilePath | |
) | |
begin { | |
Write-Debug "Enter [$($PSCmdlet.MyInvocation.MyCommand.Name)]..." | |
$PSBoundParameters.Keys.ForEach{ | |
if ($PSBoundParameters.PSItem -is [string]) { |
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
# @prefix Function Advanced | |
# @description Advanced Function Block | |
function Write-MyFunction { | |
[CmdletBinding()] | |
param ( | |
$$MyVariable1 | |
) | |
begin { | |
Write-Debug "Enter [$($$PSCmdlet.MyInvocation.MyCommand.Name)]..." |
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 ConvertFrom-HashTable { | |
<# | |
.SYNOPSIS | |
This function will convert a hashtable to a [PSCustomObject] | |
.DESCRIPTION | |
This command will convert a hashtable to a [PSCustomObject] | |
.EXAMPLE | |
PS C:\> $HashTable | |
Name Value |
OlderNewer