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
$groups = “Domain Admins”,”Enterprise Admins” | |
$titles = “Director”,”Chief”,”Executive” | |
$users = Foreach ($title in $titles) { | |
$titlefilter = "*$title*" | |
Get-aduser –filter {title -like $titlefilter} -properties title | |
} | |
$users += Foreach ($group in $groups) { | |
$groupdn = (get-adgroup $group).distinguishedname |
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
<# | |
HOW TO INSTALL | |
Open your Powershell ISE Profile (when in the ISE type psedit $profile) and either paste this content into it and save, or dot source the file wherever you saved it. | |
Use Get-Help about_Scripts for more info on dot sourcing | |
#> | |
#Microsoft O365 Menu Items | |
New-Variable -name O365ISECREDENTIAL -scope Script |
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
$adConnector = (get-addomain).dnsroot | |
$aadConnector = (get-adsyncconnector | where {$_.subtype -match "Windows Azure Active Directory"})[0].name | |
Import-Module adsync | |
$c = Get-ADSyncConnector -Name $adConnector | |
$p = New-Object Microsoft.IdentityManagement.PowerShell.ObjectModel.ConfigurationParameter "Microsoft.Synchronize.ForceFullPasswordSync", String, ConnectorGlobal, $null, $null, $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
// This is a Sharepoint jsLink file that will render the description field (known internally as Body) | |
// in a Task List view as simply the last line in the multiline field. | |
// Useful for showing only the latest activity on a task summary sheet. | |
// Written 2016-02-02 by Justin Grote <justin@grote.name> | |
(function () { | |
// Create object that have the context information about the field that we want to change it's output render | |
var bodyFieldContext = {}; |
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 | |
#Cache Destaging Script | |
#Author: Justin Grote <justin@grote.name> | |
#License: MIT | |
#Synopsis: Move files from one directory to another when a high watermark is reached | |
#This was written to move Plex files from a fast SSD cache to a slower speed cloud storage | |
#on an automatic basis. It uses FIFO logic, the oldest file in the cache is the first to be destaged | |
#This is designed to run as a cron job, recommend run every 5 minutes as the script will ensure only |
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 python3 | |
###DESCRIPTION | |
#This script sends an email alert when a specific SolusVM metric | |
#exceeds its monitor | |
###USAGE | |
#solusvm_monitor.py <metric> <monitor> | |
#Metric: One of hdd, bw, or mem. Default is bw | |
#Monitor: Threshold to alert when exceeded. Default is 80 |
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 | |
Takes an Exchange Extended Message Trace and parses it into usable powershell objects | |
#> | |
[CmdletBinding()] | |
param ( | |
#Path to the extended message trace CSV | |
[Parameter(Mandatory)][String[]]$CSVPath | |
) |
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
#requires -version 3.0 | |
#requires -pssnapin Microsoft.Exchange.Management.PowerShell.E2010 | |
<# | |
.SYNOPSIS | |
Generates a CSV that can be used with the BatchMigration process | |
.DESCRIPTION | |
This script generates a CSV from a list of mailboxes for local migrations. Its primary use is to allow for custom mailbox distribution methods, such as by least-full database or round-robin | |
This is primarily meant for greenfield migrations where all databases are of similar configuration, and not heterogeneous database environments. | |
.NOTES |
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
<# | |
.EXAMPLE | |
Get Enabled Computers from a domain in another environment | |
Get-ADSIEnabledComputer -connectionstring 'LDAP://myserver1.contoso.com/DC=contoso,dc=com' -username "admin" -password "Password@1307" | |
#> | |
#TODO: Convert Username/Password to PSCredential field for security | |
param ( |
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
function Expand-WinEvent { | |
<# | |
.SYNOPSIS | |
Configured EventLogRecords into EventLogExpandedRecords that are easier to parse | |
.DESCRIPTION | |
Convert eventRecords into a more parseable object format, including custom event properties | |
By expanding the Event XML data into individual properties, this makes WinEvents easier to work with and parse | |
OlderNewer