This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 Backup-TFSReleaseDefinitions | |
{ | |
param([object]$tfsprojs,$tfsurl = 'mytfsinstance.com', $tfscollection = 'Defaultcollection', $apiversion = '3.0-preview',[string]$Path = 'c:\temp\tfsprojects') | |
$tfsInstance = "http://$($tfsurl):8080/tfs/$tfsCollection" | |
foreach($tfsproj in $tfsprojs.value) | |
{ | |
$tfsProjName = $tfsproj.name | |
$tfsdev = "$tfsInstance/$tfsProjName" | |
$projectIds = Invoke-RestMethod -Method Get -UseDefaultCredentials -uri "$tfsdev/_apis/release/definitions?api-version=$apiversion" -ContentType application/json |
This file contains hidden or 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 CreateProfile | |
{ | |
param([String]$UserSid, [String]$UserName, [system.uint32]$ProfilePath) | |
Add-Type -TypeDefinition ' | |
using System; | |
using System.Runtime.InteropServices; | |
public static class PInvoke { | |
[DllImport("userenv.dll", SetLastError = true, CharSet = CharSet.Auto)] | |
public static extern int CreateProfile( [MarshalAs(UnmanagedType.LPWStr)] String pszUserSid, [MarshalAs(UnmanagedType.LPWStr)] String pszUserName, [Out, MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszProfilePath, uint cchProfilePath); | |
} |
This file contains hidden or 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 | |
Rough PS functions to create new user profiles | |
.DESCRIPTION | |
Call the Create-NewProfile function directly to create a new profile | |
.EXAMPLE | |
Create-NewProfile -Username 'testUser1' -Password 'testUser1' | |
.NOTES | |
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif) |
This file contains hidden or 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 Get-DataDrivenSubscriptionProperties | |
{ | |
param([object] $Subscription, | |
[object]$ssrsproxy) | |
$ssrsobject = [SSRSObject]::New() | |
$sid = $Subscription.SubscriptionID | |
$ddextensionSettings = $ddDataRetrievalPlan = $ddDescription = $ddactive = $ddstatus = $ddeventtype = $ddmatchdata = $ddparameters = $Null | |
$ddOwner = $ssrsproxy.GetDataDrivenSubscriptionProperties($sid,[ref]$ddextensionSettings,[ref]$ddDataRetrievalPlan` | |
,[ref]$ddDescription,[ref]$ddactive,[ref]$ddstatus,[ref]$ddeventtype,[ref]$ddmatchdata,[ref]$ddparameters) |
This file contains hidden or 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
$reportExportPath = 'C:\temp\reports' | |
$reportFiles = Get-ChildItem $reportExportPath -Filter *.xml | |
foreach($file in $reportFiles) | |
{ | |
$reportobject = Import-Clixml -path ($file.fullname) | |
#$extensionsettings = [SSRSProxy.ExtensionSettings]::new() | |
$extensionSettings = New-Object -typename 'SSRSProxy.ExtensionSettings' | |
$extensionSettings.Extension = $reportobject.Subscriptions.properties.extensionSettings.Extension | |
$paramvalues = @() | |
foreach($parameterField in $reportobject.Subscriptions.properties.extensionSettings.ParameterValues) |