Skip to content

Instantly share code, notes, and snippets.

@NathanTheGr8
NathanTheGr8 / Manifest.psm1
Created August 25, 2017 20:02 — forked from Jaykul/Manifest.psm1
Update Module Version ... or anything else
function Update-Manifest {
#.Synopsis
# Update a PowerShell module manifest
#.Description
# By default Update-Manifest increments the ModuleVersion, but it can set any key in the Module Manifest, its PrivateData, or the PSData in PrivateData.
#
# NOTE: This cannot currently create new keys, or uncomment keys.
#.Example
# Update-Manifest .\Configuration.psd1
#
function Copy-ItemWithBITS {
<#
.SYNOPSIS
Copy-Item using the BITS protocol
.DESCRIPTION
Works like the copy-item cmdlet but uses the Background Intelligent Transfer Service (BITS) protocol
.PARAMETER Source
The Path to the file/directory you want to transfer
.PARAMETER Destination
The path to where you want to transfer to
function Select-Nth {
<#
.SYNOPSIS
Seletc the Nth element in an array
.DESCRIPTION
Selects the Nth Element in an array. Like the 3rd, 5th, 98th, etc
.PARAMETER N
The Nth element you want to select
############################
### CDOLLA CDOLLA CDOLLA ###
### CDOLLA CDOLLA CDOLLA ###
### CDOLLA CDOLLA CDOLLA ###
### CDOLLA CDOLLA CDOLLA ###
############################
###
###
function Schedule-SCCMPackageDeployment
{
<#
.SYNOPSIS
.DESCRIPTION
requires \\spivsccm01\packages mounted as p Drive
.PARAMETER App
# Configure Domain to scrape
$Domain = "https://notepad-plus-plus.org"
$AppendToDomain = "/download"
# build URL to scan
$SiteToScan = $Domain + $AppendToDomain
# Scan URL to download file
$url32 = ((Invoke-WebRequest -uri $SiteToScan).links | Where innerHTML -like “*Notepad++ Installer 32-bit*”).href
$url64 = ((Invoke-WebRequest -uri $SiteToScan).links | Where innerHTML -like “*Notepad++ Installer 64-bit*”).href
@NathanTheGr8
NathanTheGr8 / Get-AdobeFlashMsi.ps1
Last active September 23, 2018 01:29 — forked from jasonadsit/Get-AdobeFlashMsi.ps1
Get-AdobeFlashMsi.ps1
#Requires -Version 2
function Get-AdobeFlashMsi {
[CmdletBinding()]
param (
[string]
$Destination = $(Join-Path -Path $env:USERPROFILE -ChildPath 'Downloads' )
@NathanTheGr8
NathanTheGr8 / kb3140245.ps1
Created September 26, 2018 15:10
Enabling TLS 1.1 and 1.2. Taken from https://pastebin.com/yH8ZVzM0
$TLS1dot1 = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client'
$TLS1dot2 = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client'
$MicrosoftWinHttp = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp'
$Wow6432Node = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp'
If (!(test-path $TLS1dot1))
{
New-Item $TLS1dot1 -Force | New-ItemProperty -Name DisabledByDefault -Value 0 -Force
}
else
@NathanTheGr8
NathanTheGr8 / TestWPF.ps1
Created December 31, 2018 22:03
Example Powershell WPF Form
#Load Assembly and Library
Add-Type -AssemblyName PresentationFramework
#XAML form designed using Vistual Studio
#[xml]$Form = Get-Content -Path "$PSScriptRoot\USMTGUI.xaml"
[xml]$Form = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title="Migration Assistant by Nick Rodriguez" Height="550" Width="1000" MinWidth="1000" MinHeight="550">
<Grid>
#Load Assembly and Library
Add-Type -AssemblyName PresentationFramework
#XAML form designed using Vistual Studio
#[xml]$Form = Get-Content -Path "$PSScriptRoot\USMTGUI.xaml"
[xml]$Form = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title="Migration Assistant by Nick Rodriguez" Height="600" Width="1000" MinWidth="1000" MinHeight="600">
<Grid>