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 -Version 5.0 | |
Function Show-Port { | |
<# | |
.SYNOPSIS | |
Can run and terminate or refresh at specified interval (1 - 60 seconds) | |
.DESCRIPTION | |
Show open network connections for a given process | |
The active process list are presented dynamically for selection | |
.EXAMPLE | |
Displays the ports in use by the process firefox and refreshes at 5 second intervals |
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
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 |
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].[AVRule3] Script Date: 30/03/2016 11:45:34 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ================================================================ | |
-- Author: Michael Maher | |
-- Create date: 12th January 2012 |
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].[AVRule5] ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ============================================= | |
-- Author: Michael Maher | |
-- Create date: 25 August 2015 |
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
# M.Maher | |
# 3/3/16 | |
# Check out all 'Get-' network cmdlets | |
$commands = Get-Command *net* | | |
where {$_.commandtype -eq 'Function' -or $_.commandtype -eq 'Cmdlet' -and $_.Name -like "Get-*" }| | |
select name | |
foreach ($c in $commands){ | |
$c.Name |
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
# Get through proxy challenge | |
$wc = New-Object System.Net.WebClient | |
$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials | |
$wc.DownloadString('http://microsoft.com') | |
Install-PackageProvider -Name NuGet -Force | |
Get-PackageProvider | |
Find-Package *MVA* -Source psgallery | |
Find-Package *MVA* -Source psgallery | select -Property summary |
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
#Requires -Modules PSFTP | |
Function Connect-Camera | |
{ | |
<# | |
.SYNOPSIS | |
Connects to Security Camera to get video | |
.DESCRIPTION | |
Can wipe videos or download | |