View Google_Chrome_PSADT-Deploy-Application.ps1
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. |
View PSADT-Cheatsheet.ps1
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 |
View gather_ad_sitename.sh
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} |
View ad_computer.rb
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" ) | |
View Deploy-Application.ps1
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. |
View Deploy-Application.ps1
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. |
View get_computers_in_sccm_collection.ps1
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 |
View remove-fb-tracking.user.js
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== |
View google-unmangler.user.js
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 Google Search Unmangler | |
// @namespace ScrewGoogle | |
// @description Unmangle links right click -> copied from Google Searches URLs | |
// tld info here: https://publicsuffix.org/list/public_suffix_list.dat | |
// @include http*://*.google.tld/ | |
// @include http*://*.google.tld/*#* | |
// @include http*://*.google.tld/webhp* | |
// @include http*://*.google.tld/search* |
View add_computers_to_gpo.ps1
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" |
NewerOlder