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 | |
This script performs the installation or uninstallation of an application(s). | |
.DESCRIPTION | |
The script is provided as a template to perform an install or uninstall of an application(s). | |
The script either performs an "Install" deployment type or an "Uninstall" deployment type. | |
The install deployment type is broken down into 3 main sections/phases: Pre-Install, Install, and Post-Install. | |
The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application. | |
.PARAMETER DeploymentType | |
The type of deployment to perform. Default is: Install. |
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
## Commonly used PSADT env variables | |
$envCommonDesktop # C:\Users\Public\Desktop | |
$envCommonStartMenuPrograms # C:\ProgramData\Microsoft\Windows\Start Menu\Programs | |
$envProgramFiles # C:\Program Files | |
$envProgramFilesX86 # C:\Program Files (x86) | |
$envProgramData # c:\ProgramData | |
$envUserDesktop # c:\Users\{user currently logged in}\Desktop | |
$envUserStartMenuPrograms # c:\Users\{user currently logged in}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs | |
$envSystemDrive # c: | |
$envWinDir # c:\windows |
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
#!/bin/bash | |
[ $EUID -ne 0 ] && { echo "$0 must be run as root"; exit 1; } | |
AD_Forest=$(dscl localhost -list "/Active Directory") | |
AD_SiteName=$(/usr/libexec/PlistBuddy -c "print ActiveDirectory:sitename" "/Library/Preferences/OpenDirectory/DynamicData/Active Directory/${AD_Forest}.plist") | |
echo ${AD_SiteName} |
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
#!/usr/bin/env ruby | |
ComputerName = `scutil --get ComputerName`.strip | |
ADGroupAttribute = 'dsAttrTypeNative:memberOf' | |
GroupAttributeSeparator = /\s*(?=CN=)/ | |
PlistGroupKey = 'directory_groups' | |
ManagedInstallDir=`defaults read /Library/Preferences/ManagedInstalls ManagedInstallDir`.strip | |
PlistLocation = File.join( "#{ManagedInstallDir}", "Conditionalitems" ) | |
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 | |
This script performs the installation or uninstallation of an application(s). | |
.DESCRIPTION | |
The script is provided as a template to perform an install or uninstall of an application(s). | |
The script either performs an "Install" deployment type or an "Uninstall" deployment type. | |
The install deployment type is broken down into 3 main sections/phases: Pre-Install, Install, and Post-Install. | |
The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application. | |
.PARAMETER DeploymentType | |
The type of deployment to perform. Default is: Install. |
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
$SiteServer = 'SERVER NAME | |
$SiteCode = 'SITE CODE' | |
$CollectionName = 'NAME OF COLLECTION' | |
$cred = Get-credential | |
#Retrieve SCCM collection by name | |
$Collection = get-wmiobject -ComputerName $siteServer -NameSpace "ROOT\SMS\site_$SiteCode" -Class SMS_Collection -Credential $cred | where {$_.Name -eq "$CollectionName"} | |
#Retrieve members of collection | |
$SMSMemebers = Get-WmiObject -ComputerName $SiteServer -Credential $cred -Namespace "ROOT\SMS\site_$SiteCode" -Query "SELECT * FROM SMS_FullCollectionMembership WHERE CollectionID='$($Collection.CollectionID)' order by name" | select 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
// ==UserScript== | |
// @name Remove Facebook's external link tracking | |
// @description Removes redirection from external FB links | |
// @namespace https://gist.github.com/k-barton | |
// @include https://*.facebook.com* | |
// @include http://*.facebook.com* | |
// @version 0.1.0 | |
// @grant none | |
// ==/UserScript== |
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
#To add: | |
# - Powershell Min version | |
# - Ad tools detection? | |
# - Instructions how to undo/remove computer/computers | |
# - Ability to run interactively, instead of copy/pasta | |
#Variables | |
$Domain = "example.domain" | |
$GPO_Name = "example GPO object" | |
$Computers_To_Add = "Example_PC1","Example_PC2","Example_PC3" |
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
#!/bin/bash | |
# Find packages that have touched the default profile. | |
# Edit this to your org string for your packages. | |
# All your packages have a consistent org string, I hope! | |
# I'd suggest you pipe this script into more, or output to a text file for readability. | |
# EDIT ME |