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
function Format-DisplayList { | |
<# | |
.DESCRIPTION | |
Display an array larger than certain members into nice column(s) for | |
easy readability. Added the ability to either use a number system or dashes | |
to display the list. | |
#> | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, |
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 4.0 | |
#Requires -modules ActiveDirectory | |
function Connect-Exchange { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, | |
HelpMessage="User admin credentials")] | |
[System.Management.Automation.PSCredential]$Credential, | |
[Parameter(Mandatory=$false)] | |
$URI = "https://outlook.office365.com/powershell-liveid/", |
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
$FolderLocation = @("FilePath1", "FilePath2", "FilePath3") | |
$AllFiles = @() | |
$FileList = @() | |
foreach($RootFolder in $FolderLocation) { | |
$AllFiles += Get-ChildItem -Path $RootFolder -File -Recurse | |
} | |
foreach($File in $AllFiles) { | |
$FileHash = Get-FileHash $File.PSPath | Select-Object Hash -ExpandProperty Hash | |
$FileInfo = [PSCustomObject]@{ | |
Folder = $File.DirectoryName |
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 4.0 | |
#Requires -modules ActiveDirectory | |
function Send-AlertsMessage { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$false)] | |
[String]$ToAddress, | |
[Parameter(Mandatory=$false)] | |
[String]$FromAddress = "_SERVICEACCOUNT@BLAH.COM", | |
[Parameter(Mandatory=$false)] |
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
function New-SecurePass{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] | |
[System.Security.SecureString]$SecurePassword, | |
[Parameter(Mandatory=$false)] | |
[string]$FileName = "EncryptedPassword", | |
[Parameter(Mandatory=$false)] | |
[string]$KeyFilePath = ".\", | |
[Parameter(Mandatory=$false)] |
NewerOlder