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
<# | |
.DESCRIPTION | |
Move Security Logs to Archive Point | |
.REQUIREMENTS | |
1. Create Shares | |
Invoke-Command -ComputerName dc1,dc3,dc4,dc5,dc2 -ScriptBlock { | |
New-SmbShare Seclog$ -Path E:\Seclog -fullaccess "CONTOSO\Domain Admins"} |
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
$a = 348 | |
"{0:N2}" -f $a # Numeric to 2 decimal places = 348.00 | |
"{0:D8}" -f $a # Decimal 8 places = 00000348 | |
"{0:C2}" -f $a # Currency to two places = €348.00 | |
"{0:P0}" -f $a # Percentage x 100 = 34,800 % | |
"{0:X0}" -f $a # Hex = 15C | |
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
<###################################################################################### | |
.AUTHOR | |
Michael Maher | |
.DATE | |
14/01/16 | |
.NOTE | |
Removes old home drives |
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 | |
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
# 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
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
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].[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
#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) { |
OlderNewer