This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" | |
Write-Output "<packages>" | |
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" } | |
Write-Output "</packages>" |
This file contains hidden or 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
<# | |
MODULE OF: | |
..One-Hundred-and-One one-liners of powershell.. | |
Author: Chris Dek. | |
Usage: From the powershell cmdlet run the command: | |
Import-Module .\Hundred-OneLines.psm1 | |
..wait for a while to load. |
This file contains hidden or 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
# See if choco.exe is available. If not, stop execution | |
$chocoCmd = Get-Command -Name 'choco' -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Select-Object -ExpandProperty Source | |
if ($chocoCmd -eq $null) { break } | |
# Settings for the scheduled task | |
$taskAction = New-ScheduledTaskAction –Execute $chocoCmd -Argument 'upgrade all -y' | |
$taskTrigger = New-ScheduledTaskTrigger -AtStartup | |
$taskUserPrincipal = New-ScheduledTaskPrincipal -UserId 'SYSTEM' | |
$taskSettings = New-ScheduledTaskSettingsSet -Compatibility Win8 |
This file contains hidden or 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
# Inspiration from https://twitter.com/mrhvid/status/929717169130176512 @mrhvid @Lee_Holmes | |
function ResolveIp($IpAddress) { | |
try { | |
(Resolve-DnsName $IpAddress -QuickTimeout -ErrorAction SilentlyContinue).NameHost | |
} catch { | |
$null | |
} | |
} |
This file contains hidden or 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
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
choco install 7zip /y | |
choco install adobereader /y | |
choco install anaconda3 /y | |
choco install azure-cli /y | |
choco install docker-for-windows /y | |
choco install firefox /y | |
choco install garmin-express /y | |
choco install git /y |
This file contains hidden or 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
#Prep | |
Update-ExecutionPolicy Unrestricted | |
Disable-UAC | |
#Win Config | |
Set-TaskbarOptions -Size Small -Lock -Dock Top | |
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Disable-InternetExplorerESC |
This file contains hidden or 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 5.0 | |
Function ConvertTo-Markdown { | |
<# | |
.Synopsis | |
Convert pipeline output to a markdown document. | |
.Description | |
This command is designed to accept pipelined output and create a markdown document. The pipeline output will formatted as a text block. You can optionally define a title, content to appear before the output and content to appear after the output. | |
The command does not create a text file. You need to pipe results from this command to a cmdlet like Out-File or Set-Content. See examples. | |
.Parameter Title |
OlderNewer