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
<# | |
.SYNOPSIS | |
create a Network Location based on a name and a target path | |
.DESCRIPTION | |
create a Network Location based on a name and a target path | |
.PARAMETER <Parameter_Name> | |
<Brief description of parameter input required. Repeat this attribute if required> | |
.INPUTS | |
<Inputs if any, otherwise state None> | |
.OUTPUTS |
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
REM http://stackoverflow.com/questions/4405091/how-avoid-over-populate-path-environment-variable-in-windows | |
@echo off | |
SET shortpath=%PATH% | |
echo "Old PATH documented in C:\_admin\OLDPath.txt" | |
echo %shortpath% | |
echo %shortpath% > C:\_admin\OLDPath.txt | |
echo -- | |
echo "Directories not found, documented in C:\_admin\PATH_folders_not_found.txt" |
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
#http://blogs.msdn.com/b/powershell/archive/2006/12/21/jingle.aspx | |
######################################################################################## | |
function Play([int] $freq, [int] $duration) | |
{ | |
[console]::Beep($freq, $duration); | |
} | |
function GetNoteFreq([string]$note) | |
{ | |
# n is the number of half steps from the fixed note. | |
$note -match '([A-G#]{1,2})(\d+)' | out-null |
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
<# | |
.SYNOPSIS | |
<A brief description of the function or script. This keyword can be used only once in each topic.> | |
.DESCRIPTION | |
<A detailed description of the function or script. This keyword can be used only once in each topic.> | |
.PARAMETER <Parameter-Name> | |
<The description of a parameter. Add a ".PARAMETER" keyword for each parameter in the function or script syntax. | |
Type the parameter name on the same line as the ".PARAMETER" keyword. Type the parameter description on the lines following the ".PARAMETER" keyword. Windows PowerShell interprets all text between the ".PARAMETER" line and the next keyword or the end of the comment block as part of the parameter description. The description can include paragraph breaks. |
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
[Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.PowerPoint") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
[string] $Source = "$(Split-Path $Script:MyInvocation.MyCommand.Path -Parent)\Slide.html" | |
[int] $DefaultTitleHeight = 150 | |
function Add-Textbox { | |
param ( | |
[object] $Slide, | |
[string] $Text, |
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
<# | |
.SYNOPSIS | |
<A brief description of the function or script. This keyword can be used only once in each topic.> | |
.DESCRIPTION | |
<A detailed description of the function or script. This keyword can be used only once in each topic.> | |
.LINK | |
http://www.happysysadm.com/2017/12/powershell-oneliner-to-list-all.html | |
#> | |
((ls 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -rec|? name -match 'v1.1.4322$|v2.0.50727$|v3.0$|v3.5$|v4\\Full$').name -replace 'HKEY_LOCAL_MACHINE','HKLM:'|%{ Get-ItemProperty $_}).Version |
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
<# | |
.SYNOPSIS | |
<A brief description of the function or script. This keyword can be used only once in each topic.> | |
.DESCRIPTION | |
<A detailed description of the function or script. This keyword can be used only once in each topic.> | |
.LINK | |
http://www.happysysadm.com/2017/12/powershell-oneliner-to-list-all.html | |
#> | |
((ls 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -rec|? {$_.name -match 'v1.1.4322$|v2.0.50727$|v3.0$|v3.5$|v4\\Full$'} | select -expand name) -replace 'HKEY_LOCAL_MACHINE','HKLM:') -replace 'HKEY_LOCAL_MACHINE','HKLM:'|%{ Get-ItemProperty $_} | select -expand Version |
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
<# | |
.SYNOPSIS | |
Downloads and installs Citrix Receiver. | |
Intended to run via Intune. | |
#> | |
# If Receiver is already installed, skip download and install | |
If (!(Get-WmiObject -Class Win32_Product | Where-Object Name -Like "Citrix Receiver*")) { | |
# Cirix Receiver download source |
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
$sISO8601 = Get-Date -format s |
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
#Source characters ABCDEGHJKLNPSTUYZ=#+acdeghiknopstuyz23456789 | |
#Arrays | |
$array4word = "able", "case", "come", "fact", "find", "give", "hand", "have", "high", "into", "know", "last", "life", "long", "make", "next", "over", "part", "same", "take", "that", "they", "this", "time", "want", "with", "work", "year" | |
$array5word = "about", "after", "child", "early", "first", "great", "group", "large", "leave", "other", "place", "right", "their", "there", "thing", "think", "woman", "world", "would", "young" | |
$arraySpecial = "#", "+", "=" | |
$arrayUpper = "A", "B", "C", "D", "E", "G", "H", "J", "K", "L", "N", "P", "S", "T", "U", "Y", "Z" | |
$arrayNumber = 2..9 | |
#Random selection from arrays | |
$rand4word_1 = $array4word[(Get-Random -Maximum ($array4word).count)] | |
$randSpecial = $arraySpecial[(Get-Random -Maximum ($arraySpecial).count)] |
OlderNewer