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
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 | |
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
* | |
{ | |
font-family:Calibri,sans-serif; | |
font-size:11pt; | |
} | |
p | |
{ | |
margin:0 0 8pt; | |
} | |
td p |
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 Get-WinEventXPathFilter | |
{ | |
<# | |
.SYNOPSIS | |
This function generates an xpath filter that can be used with the -FilterXPath | |
parameter of Get-WinEvent. It may also be used inside the <Select></Select tags | |
of a Custom View in Event Viewer. | |
.DESCRIPTION | |
This function generates an xpath filter that can be used with the -FilterXPath | |
parameter of Get-WinEvent. It may also be used inside the <Select></Select tags |
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 -module Pester,PoshRSJob,SharpSNMP | |
<# | |
.SYNOPSIS | |
A set of Pester Tests for determining if a device is remotely manageable. | |
#> | |
#region Params | |
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
// 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 <[email protected]> | |
(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 <[email protected]> | |
#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
#requires -version 5.0 | |
<# | |
.SYNOPSIS | |
Finds active computers in AD and collects a list of their group memberships | |
#> | |
param ( | |
#Path to output the resulting Excel Report | |
[String]$Path = "LocalAdminGroupReport-$(get-date -format yyyyhhmmss).xlsx", |
OlderNewer