Skip to content

Instantly share code, notes, and snippets.

View jacksoneyton's full-sized avatar

Jackson Eyton jacksoneyton

  • South Dakota
View GitHub Profile
@jacksoneyton
jacksoneyton / Get-GpoWinUpdateSettings.ps1
Created August 8, 2016 18:32
Gets windows update settings as listed in GPO policies.
#reqiures -Modules GroupPolicy
foreach ($gpo in (Get-GPO -All)) {
$xml = [Xml](Get-GPOReport -Guid $gpo.Id -ReportType Xml)
if (($xml.GPO.SelectNodes("//*[local-name() = 'Name']")."#text" | Where-Object { $_ -eq "Configure Automatic Updates" }).Count -gt 0) {
Write-Output -InputObject "The following GPO is configuring Windows Update Settings: '$($xml.GPO.Name)'."
}
}
@jacksoneyton
jacksoneyton / CW-EmailConnectorMonitor.ps1
Created August 8, 2016 21:11
ConnectWise EmailRobot mailbox monitor
##This script will check the $email mailbox to make sure there are no emails older than 10 min.
## If there are messages more than 10 min old it will restart the connectwise email connector
## Requires Exchange Web Services Managed API 1.2
$email = "[email protected]"
# Credentials
$username = 'User'
$password ='Password'
$domain = 'Domain'
@jacksoneyton
jacksoneyton / MSOLUserLicenseAssignment.ps1
Last active September 16, 2016 21:30
MSOL User License Assignment Tool
<#
These steps are required once on your computer, not every time you connect. However, you'll likely need to install newer versions of the software periodically.
Install the 64-bit version of the Microsoft Online Services Sign-in Assistant: Microsoft Online Services Sign-in Assistant for IT Professionals RTW.
URL: http://go.microsoft.com/fwlink/p/?LinkId=286152
Install the 64-bit version of the Windows Azure Active Directory Module for Windows PowerShell: Windows Azure Active Directory Module for Windows PowerShell (64-bit version).
URL: http://go.microsoft.com/fwlink/p/?linkid=236297
#>
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
Import-Module MSOnline
@jacksoneyton
jacksoneyton / UpdateSkypeUserWithNewEmail.ps1
Created October 12, 2016 23:11
Update Skype User with New Email Address *Remove the "-whatif" tags to let the actions actually perform.
Import-Module MSOnline
Write-host "Please enter your Microsoft Office365 Administrative credentials:" -ForegroundColor Cyan
Connect-MsolService -Credential (Get-Credential)
$username = Read-Host "Please enter the users domain username"
$oldemail = Read-Host "please enter the users OLD email address"
$msoluser = get-msoluser -UserPrincipalName $oldemail
$user = get-aduser -identity $username -Properties mail,proxyAddresses
$samaccountname = $user.SamAccountName
$email = $user.mail
$userProxyAddresses = $user.proxyAddresses
@jacksoneyton
jacksoneyton / Enable-SkypeLicenseAndSetUserProperties.ps1
Created October 13, 2016 22:07
Enables skype for business online license and sets the necessary AD user object attributes.
<#
These steps are required once on your computer, not every time you connect. However, you'll likely need to install newer versions of the software periodically.
Install the 64-bit version of the Microsoft Online Services Sign-in Assistant: Microsoft Online Services Sign-in Assistant for IT Professionals RTW.
URL: http://go.microsoft.com/fwlink/p/?LinkId=286152
Install the 64-bit version of the Windows Azure Active Directory Module for Windows PowerShell: Windows Azure Active Directory Module for Windows PowerShell (64-bit version).
URL: http://go.microsoft.com/fwlink/p/?linkid=236297
#>
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
Import-Module MSOnline
@jacksoneyton
jacksoneyton / ARRC_Chartec_GroupManagement.ps1
Created November 11, 2016 00:37
ARRC AD Group and User Management
#Import Necessary modules
Import-Module ActiveDirectory
Import-Module PSSQLite
#Set Database information
$Database = "E:\ARRC\ADChangeHistory.sqlite"
$dbBackup = "E:\ARRC\ADChangeHistory.bak"
$tableslistquery = "SELECT * FROM sqlite_master WHERE type='table'"
$LogActionQuery = "INSERT INTO GROUPHISTORY (GroupName, Username, Action, Date) VALUES (@groupname, @username, @action, @date)"
$DisabledUsersLogQuery = "INSERT INTO ADUSERHISTORY (OriginalOU, DestinationOU, UserName, DateMoved) VALUES (@OriginalOU, @DestinationOU, @UserName, @date)"
{
"profiles": {
"OptiFine": {
"name": "OptiFine",
"lastVersionId": "1.10.2-OptiFine_HD_U_D2",
"javaArgs": "-Xmx8G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn512M"
},
"actiontekjackson": {
"name": "actiontekjackson",
"lastVersionId": "1.10.2-OptiFine_HD_U_D2",
@jacksoneyton
jacksoneyton / PremiumMemberRuleAutomatedUpdater.ps1
Created February 15, 2017 23:20
PremiumMemberRuleAutomatedUpdater
#Update Premium Members Rule
#test exchange connectivity and connect to EMS
if((get-command -listimported).Name -notcontains "Get-Mailbox")
{
. ($env:exchangeinstallpath + 'bin\RemoteExchange.ps1')
Connect-ExchangeServer -auto -ClientApplication:ManagementShell
}
function Invoke-SQL {
param(
@jacksoneyton
jacksoneyton / New-WPFMessageBox
Created June 10, 2020 01:50 — forked from SMSAgentSoftware/New-WPFMessageBox
PowerShell function to display a customizable WPF message box / window
Function New-WPFMessageBox {
# For examples for use, see my blog:
# https://smsagent.wordpress.com/2017/08/24/a-customisable-wpf-messagebox-for-powershell/
# CHANGES
# 2017-09-11 - Added some required assemblies in the dynamic parameters to avoid errors when run from the PS console host.
# Define Parameters
[CmdletBinding()]