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
<# | |
.Synopsis | |
Sets folders specified retention flag to custom flag in Exchange online | |
.DESCRIPTION | |
This script is based from the following sources. | |
https://blogs.msdn.microsoft.com/akashb/2011/08/10/stamping-retention-policy-tag-using-ews-managed-api-1-1-from-powershellexchange-2010/ | |
http://blogs.perficient.com/microsoft/2016/03/office-365-script-to-recreate-managed-folders-functionality/ | |
This script search for and sets all folders found for the retention flag specified. See this blog post for more information: | |
.PARAMETER TargetMailboxes |
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
param | |
( | |
[String] | |
[Parameter(Mandatory)] | |
$SourceFolder, | |
[String] | |
$Destination , | |
[string] | |
$AdminUserName, | |
[string] |
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 | |
using namespace System.IO | |
using namespace System.IO.Compression | |
param( | |
[Parameter(Mandatory=$true)][string]$sourceZip, | |
[Parameter(Mandatory=$true)][string]$destPath | |
) | |
add-type -assemblyname 'System.IO.Compression' | |
add-type -assemblyname 'System.IO.Compression.FileSystem' |
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 Update-PAzureAlertEmail | |
{ | |
<# | |
.SYNOPSIS | |
This function either adds or removes an email from Alerts in azure | |
.DESCRIPTION | |
This function will remove the enclosed email from all the alerts in an azure subscription. | |
If ADD is specified it will add the email to the all the alerts in an azure subscription. | |
When this function is called it will return an object of the items that were added or removed. | |
.EXAMPLE |
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
#------------------------------------------------------------------------ | |
# Source File Information (DO NOT MODIFY) | |
# Source ID: 9ad32074-7adb-4822-a049-93600f966aa9 | |
# Source File: ..\Documents\SAPIEN\Projects\Gui-SSRS-Deploy\Gui-SSRS-Deploy.psproj | |
#------------------------------------------------------------------------ | |
#region Project Recovery Data (DO NOT MODIFY) | |
<#RecoveryData: | |
CAIAAB+LCAAAAAAABACNkV1rgzAUhu8L/Q/ifepHxU6IuVhdyy72QS27Had6HBkxkUTH/PeLU4dl | |
MHb5JO95XnJCT1ioD9R9Bi2w9cpx6LNW71i032DxBbXhSrJgE1BvhunuwAXeZyyBchv6u4jsoLyQ | |
6CYMCfhRQpJt7PtVEscACfWm8DQ6tZz7BplPvSXOciVKW+d4yzYzwYTOCSvUKAt8hBpT13VuOy7K |
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
# SQLReporting.psm1 Version 0.9 | |
# Written by Trond Hindenes | |
#http://hindenes.com/powershell/SQLReporting.psm1 | |
#Import-Module Pester | |
#http://stackoverflow.com/questions/9178685/change-datasource-of-ssrs-report-with-powershell | |
<# | |
.SYNOPSIS | |
Gets SSRS instances on ComputerName | |
.DESCRIPTION |
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 webadministration | |
#Requires -RunAsAdministrator | |
#Requires -version 3.0 | |
<# | |
.SYNOPSIS | |
Provides a means to get the current backup location for iis changes | |
.DESCRIPTION | |
Changes made to the IIS instance are recorded in a history config file. This function provides the means to retreive where it is on the machine | |
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
#http://www.iis.net/learn/extensions/configuring-application-request-routing-(arr)/achieving-high-availability-and-scalability-arr-and-nlb | |
# This script is used in octopus to deploy ARR to host targetted for it. | |
# | |
function stop-WAS | |
{ | |
$i = 0 | |
$service = get-service WAS -ErrorAction SilentlyContinue | |
if($service) | |
{ |
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
#http://sqlblog.com/blogs/allen_white/archive/2008/01/09/create-agent-jobs-to-run-powershell-scripts.aspx | |
#https://msdn.microsoft.com/en-us/library/ms162162.aspx | |
#Requires -Version 3.0 | |
function Get-SqlJobs | |
{ | |
param([string]$sqlServer, [string]$sqlinstance = $null) | |
$s = New-SqlServerConnection -sqlServer $sqlServer -sqlinstance $sqlinstance | |
$jobs = $s.JobServer.Jobs | |
$jobs | |
} |
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 Test-FileOpen | |
{ | |
<# | |
.SYNOPSIS | |
Tests to see if a file is locked | |
.DESCRIPTION | |
Returns true if the file can be opened. False if the file is open already. | |
.PARAMETER path to file |