This file contains hidden or 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
param([switch]$Elevated) | |
function Test-Admin { | |
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) | |
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) | |
} | |
if ((Test-Admin) -eq $false) { | |
if ($elevated) | |
{ |
This file contains hidden or 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
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <[email protected]> | |
# Original Version: 1.4, 2016-01-16 | |
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1 | |
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE | |
# This script will reboot your machine when completed. | |
########## | |
# Ask for elevated permissions if required |
This file contains hidden or 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 form will create an account based upon the information provided in the fields. | |
# After clicking "Create" it will prompt for a password in the original powershell window (should still be open in the background. | |
# Once the account is created it will be set to "Smart Card Required" using the upn field followed by "@company" | |
# This can be changed by changing "SmartCardLogonRequired" to $false. Note if you leave it enabled and then uncheck it manually you will have to reset their password | |
# Set up the form ========================================================= == | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") |
This file contains hidden or 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 | |
Creates an HTML monster report for ALL Domain Controllers in the domain. | |
.DESCRIPTION | |
Script - Not fully containted, need to Import ActiveDirectory | |
Script meant to run on an "admin server" with AD tools installed | |
Script is meant to be run from a scheduled task but can be run standalone | |
Script will take a long time (1 - 3 hours) depending on size for domain. |
This file contains hidden or 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
$users = (get-mailbox -resultsize unlimited).UserPrincipalName | |
foreach ($user in $users) | |
{ | |
Get-InboxRule -Mailbox $user | Select-Object MailboxOwnerID,Name,Description,Enabled,RedirectTo, MoveToFolder,ForwardTo | Export-CSV C:\temp\testing.csv -NoTypeInformation -Append | |
} | |
This file contains hidden or 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
#Script to activate the PC using the OEM key embedded in the Bios | |
#Author: Terry Wensel | |
#Last Updated: 6/7/2018 | |
#Uncomment the following part to check for administrator privileges | |
#param([switch]$Elevated) | |
# | |
#Function Test-Admin { | |
# $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) |
This file contains hidden or 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
$app = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe' | |
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | |
$Template = [Windows.UI.Notifications.ToastTemplateType]::ToastImageAndText01 | |
#Gets the Template XML so we can manipulate the values | |
[xml]$ToastTemplate = ([Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent($Template).GetXml()) | |
[xml]$ToastTemplate = @" | |
<toast launch="app-defined-string"> |
This file contains hidden or 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 run the script | |
# | |
# .\Get-MailBoxSizesOU.ps1 | |
# | |
# NOTE: If you do not pass an input file to the script, it will return the sizes of ALL mailboxes in the tenant. Not advisable for tenants with large | |
# user count (< 3,000) | |
# | |
#Supports Modern Authentication and Multi Factor Authenication | |
#Dependenices: Exchange Online Module |