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
# PowerShell 2.0 Compatible Web Call deployed as an SCCM Package | |
$h = get-hotfix | where {$_.HotFixID -eq 'KB3050265'} | |
If ($h){ | |
# Already Installed | |
$uri = "http://webserver/winupdate/wuaccept.asp?installed='$env:COMPUTERNAME','Yes'" | |
(New-Object System.Net.WebClient).DownloadString($uri) | |
Exit | |
} |
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 RunAsAdministrator | |
<###################################################################################### | |
.AUTHOR | |
Michael Maher | |
.DATE | |
08/01/16 | |
.NOTE | |
Expects CSV in format of username, new password, old username |
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 RunAsAdministrator | |
Function Create-WindowsForm(){ | |
<# | |
.DATE | |
11/3/16 | |
.NOTE | |
Send username, new password, old | |
Enables user account, creates home drive |
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
# Michael Maher | |
# 25/9/15 | |
# Sign Script | |
# Usage: signScript.ps1 <path to script> | |
param ( | |
$myScript = $(throw "Please specify a path to the script | |
For Example: .\signScript c:\scripts\archiveSecLog.ps1") | |
) |
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
$csvFile = "C:\temp\CtxGroups2.csv" | |
import-module activeDirectory | |
############################### 1. Get the Citrix Groups ################################ | |
# Run in MWTRADERS Domain | |
Get-ADGroup -Filter * -SearchBase "ou=Retail,ou=Dublin,dc=contoso,dc=com" | Select Name, distinguishedName | Export-Csv $csvFile | |
break | |
################################ 2. Create a Domain Local equivalent on IE ################################ |
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
USE [build] | |
GO | |
/****** Object: StoredProcedure [dbo].[EPOLastLogon2] ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ================================================================ | |
-- Author: Michael Maher | |
-- Create date: 12th June 2014 |
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
# Gets mailboxes that have forwarders in place, the contact they use, the contacts address and if Store and Forward is on | |
$fwds = get-mailbox -ResultSize Unlimited | Where-Object { $_.ForwardingAddress -ne $null } | select Name, Alias, ForwardingAddress | |
foreach ($fwd in $fwds) { | |
$fwd | add-member -membertype noteproperty -name "ContactAddress" -value (get-contact $fwd.ForwardingAddress).WindowsEmailAddress | |
} | |
Write-Output $fwds | Format-Table -Autosize | Out-String -Width 10000 | Out-File -FilePath c:\temp\output.txt |
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 -Modules ConfigurationManager | |
# Needs Configuration Manager Cmdlets from . . . | |
# https://technet.microsoft.com/en-us/library/dn958404%28v=sc.20%29.aspx | |
$list = Invoke-Sqlcmd -Query "SELECT host FROM BUILD.DBO.SCCMBLOCK;" -ServerInstance "MYSQLSVR" | |
$collectionname = 'Blocked Clients' | |
Set-Location IRL: | |
foreach($c in $list.host) { |
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
USE [build] | |
GO | |
/****** Object: StoredProcedure [dbo].[AVRule1] Script Date: 30/03/2016 11:45:37 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ============================================= | |
-- Author: Michael Maher | |
-- Create date: 10 January 2012 |