Skip to content

Instantly share code, notes, and snippets.

$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add(
"Connect to Exchange",
{
$s = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri http://your_server_fqdn_name/PowerShell/ `
-Authentication Kerberos
Import-PSSession $s
},
"Control+Alt+G"
# OWA Signature import by Andrea Gallazzi www.andreagallazzi.com
#var old is text to remove
$old = 'src=".+?_file/image001.gif"'
#var $new = the text you want to replace
$new = 'src="http://www.mypublicwebsite.com/image001.gif"'
#change the Get-ChildItem to a folder or your choice
Get-ChildItem C:\Signatures\*.htm | Where {$_ -IS [IO.FileInfo]} |
###########################################################################”
# AUTHOR: Jan Egil Ring
# Modifications by Darren Kattan
#
# COMMENT: Script to create an Outlook signature based on user information from Active Directory.
# Adjust the variables in the “Custom variables”-section
# Create an Outlook-signature from Microsoft Word (logo, fonts etc) and copy this signature to \\domain\NETLOGON\sig_files\$CompanyName\$CompanyName.docx
# This script supports the following keywords:
# DisplayName
# Title
@andreagx
andreagx / gist:8580244
Created January 23, 2014 15:17
WSUS_Cleaner.ps1
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$cleanupScope = new-object Microsoft.UpdateServices.Administration.CleanupScope;
$cleanupScope.DeclineSupersededUpdates = $true
$cleanupScope.DeclineExpiredUpdates = $true
$cleanupScope.CleanupObsoleteUpdates = $true
$cleanupScope.CompressUpdates = $true
#$cleanupScope.CleanupObsoleteComputers = $true
$cleanupScope.CleanupUnneededContentFiles = $true
$cleanupManager = $wsus.GetCleanupManager();
@andreagx
andreagx / WSB_report.ps1
Last active January 3, 2016 19:19
The script send by email a report with Windows Server Backup activity and the target status.If backup fail or target space is under 10% the row in the table becomes with a red background.Location: C:\Users\Public\BackupLog.htm.Schedule script i.e. 2 hours before backup start time.
<#
andreagx.blogspot.com
The script send by email a report with Windows Server Backup activity and the target status
If backup fail or target space is under 10% the row in the table becomes with a red background
Location: C:\Users\Public\BackupLog.htm
Schedule script i.e. 2 hours before backup start time
http://andreagx.blogspot.it/2014/01/windows-server-backup-inviare-un-report.html
#>