Skip to content

Instantly share code, notes, and snippets.

View jeffpatton1971's full-sized avatar
😄
Writing code 25 hours a day, 8 days a week!

Jeff Patton jeffpatton1971

😄
Writing code 25 hours a day, 8 days a week!
View GitHub Profile
@jeffpatton1971
jeffpatton1971 / Set-ZenossPermissions.ps1
Last active August 29, 2015 14:12
Setup permissions for Zenoss monitoring on Windows
<#
.SYNOPSIS
Setup permissions for Zenoss monitoring on Windows
.DESCRIPTION
This script works under the assumption that you have a GPO or manually added your zenoss user to several groups.
In testing these are the groups that appear to work
Backup Operators
Distributed COM Users
Event Log Readers
Performance Log Users
@jeffpatton1971
jeffpatton1971 / Set-Wallpaper.ps1
Created January 2, 2015 18:32
Set the wallpaper of your computer to a specific image. I copied this code to a gist in case the original URL goes away for some reason. http://powershell.com/cs/blogs/tips/archive/2014/01/10/change-desktop-wallpaper.aspx
function Set-Wallpaper
{
param(
[Parameter(Mandatory=$true)]
$Path,
[ValidateSet('Center', 'Stretch')]
$Style = 'Stretch'
)
@jeffpatton1971
jeffpatton1971 / Get-BingImage.ps1
Last active December 25, 2020 06:40
This script can be used to download Bing background images for use as your wallpaper or to save. It uses a specially crafted URL that I found while searching for a way to download them. It appears that the URL will let you go back 18 days, or the last 8 images. When you set Index to 18 and NumberOfImages to 8 a total of 19 images will be downloa…
<#
.SYNOPSIS
Use this script to download the Bing background image.
.DESCRIPTION
This script can be used to download Bing background images for use
as your wallpaper or to save. It uses a specially crafted URL that I
found while searching for a way to download them.
It appears that the URL will let you go back 18 days, or the last 8
images. When you set Index to 18 and NumberOfImages to 8 a total of
@jeffpatton1971
jeffpatton1971 / WindowsServer2012R2-Core.ps1
Created February 23, 2015 05:34
Windows Server 2012 R2 Core configuration
Configuration Defaults
{
param
(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]$ComputerName
)
Node $ComputerName
{
@jeffpatton1971
jeffpatton1971 / Get-SyncDelay.ps1
Last active August 29, 2015 14:16
This script makes a change to an account and then checks to see how long it takes before that change is replicated on Office365. The script takes advantage of ParameterNames to make it easy to either pass in a credential object or string user/pass variables. I have also added a switch for ExchangeOnline, the original author used the get-mailbox …
<#
.SYNOPSIS
Get the amount of time for an update to Office365
.DESCRIPTION
This script makes a change to an account and then checks to see how long
it takes before that change is replicated on Office365.
.PARAMETER Tenant
This is your tenant name
.PARAMETER Account
This is the test account name
@jeffpatton1971
jeffpatton1971 / New-HelpFile.ps1
Last active September 3, 2020 15:36
This script will build output to the screen a properly formatted XML help file. I based this on one of the installed helpfiles in System32.
<#
.SYNOPSIS
This script will generate a proper XML helpfile
.DESCRIPTION
This script will build output to the screen a properly formatted
XML help file. I based this on one of the installed helpfiles
in System32.
.PARAMETER Commands
You can pass in the output from Get-Command cmdletname or you
can pass in Get-Command -Module moduleName
@jeffpatton1971
jeffpatton1971 / Test-W32tmBPA.ps1
Created March 12, 2015 16:22
This script checks the values of specific registry keys based on recommendations from Vmware for virtualized PDC Emulators.
<#
.SYNOPSIS
Check stored values of w32tm against Vmware recommendations
.DESCRIPTION
This script checks the values of specific registry keys based
on recommendations from Vmware for virtualized PDC Emulators.
For more details please see pages 5 and 6 of this Vmware white
paper (http://www.vmware.com/files/pdf/Virtualizing_Windows_Active_Directory.pdf)
.PARAMETER Type
@jeffpatton1971
jeffpatton1971 / retrosheet_zip_files.TXT
Created March 25, 2015 22:19
A list of retrosheet download urls
http://www.retrosheet.org/events/1952eve.zip
http://www.retrosheet.org/events/1953eve.zip
http://www.retrosheet.org/events/1954eve.zip
http://www.retrosheet.org/events/1955eve.zip
http://www.retrosheet.org/events/1956eve.zip
http://www.retrosheet.org/events/1957eve.zip
http://www.retrosheet.org/events/1958eve.zip
http://www.retrosheet.org/events/1959eve.zip
http://www.retrosheet.org/events/1960eve.zip
http://www.retrosheet.org/events/1961eve.zip
@jeffpatton1971
jeffpatton1971 / Export-FederationConfigurationV2.ps1
Last active October 7, 2023 12:59
This is the Export-FederationConfiguration.ps1 and Import-FederationConfiguration.ps1 files that are found in the C:\Windows\ADFS folder. I have made a few minor changes in each see this thread for details. https://social.technet.microsoft.com/Forums/en-US/02a5594b-00df-4731-ae98-992956bafc19/adfs-unable-to-export-the-adfs-configuration?forum=wi…
<#############################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
############################################################>
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="Medium", DefaultParameterSetName="Default")]
Param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelinebyPropertyName=$true)]
[string] $Path,
[Parameter(Mandatory=$false)]
@jeffpatton1971
jeffpatton1971 / MofMofule.psm1
Last active August 29, 2015 14:19
A pair of cmdlets for working with mof files, this is not complete, currently it only handles a few mof instances 'MSFT_RegistryResource','MSFT_RoleResource','MSFT_ServiceResource','OMI_ConfigurationDocument'
Function Get-MofFile
{
[CmdletBinding()]
Param
(
[string]$Path
)
Begin
{
$MofFile = Get-Content $Path