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 4 -Module ADFS | |
<# | |
Compiles ADFS StringProcessingAttributeStore from here: | |
https://msdn.microsoft.com/en-us/library/hh599320.aspx?f=255&MSPPError=-2147217396 | |
* Notice: must be run as Admin, will prompt UAC * | |
Steps taken: | |
1. download dependency from nuget |
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
<html> | |
<head> | |
<!-- Note: needs to be run as admin. Use cmd or pshell to bootstrap or compile to exe with vbsedit. --> | |
<title>MIM Sync Perf Counters</title> | |
<HTA:APPLICATION | |
APPLICATIONNAME="MIM Sync Perf Counters" | |
ID="MyHTMLapplication" | |
VERSION="1.0"/> | |
</head> | |
<SCRIPT LANGUAGE="VBScript"> |
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 ($file, $output, $title, [switch]$fragment) | |
function FileToBase64 { | |
[Alias("tb64")] | |
param ([string]$Path) | |
[Convert]::ToBase64String([IO.File]::ReadAllBytes($Path)) | |
} | |
$rnd = Get-Random -Minimum 1 -Maximum 98029839879 |
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 -Modules LithnetRMA | |
Import-Module LithnetRMA | |
Set-ResourceManagementClient -BaseAddress http://mimservice:5725 | |
$default_attr = @("DisplayName","Description","Creator") | |
function GetAttrsByType { | |
<# | |
Resolves list of attributes that should be loaded for a provided type. |
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 4 -Modules FIM\FimPowerShellModule.psm1 | |
<# | |
Queries for Group objects that have the Owner attribute set but who's DisplayedOwner | |
is not in the Owner list. This can occur you have a FIM/MIM Sync Rule that maps | |
managedBy => DisplayedOwner and msExchCoManagedByLink => Owner. Those attributes will | |
flow directly because they match up being single => single, multivalue => multivalue but | |
there is the caveat that the managedBy value never has a reason to exist in the msExchCoManagedByLink | |
value. Setting the FIM Group Owner list by combining the two source attributes doesn't appear to work | |
via declarative rule or rule extension but allowing the properties to Sync directly and then resolving |
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
<# | |
Reads in an RDCMan 2.7 connection file (.rdg) and generates an approximate | |
mRemote 1.75 connections file. I say approximate because it doesn't handle | |
color depth or complete RDGateway configuration. It's not perfect but way | |
better than recreating it by hand in an environment with 100+ servers. | |
Cheers. | |
-Sean McArdle | |
#> |
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 Get-Ma { | |
param ( | |
[string]$Name, | |
[string]$Guid | |
) | |
$search_string = "" | |
if ([String]::IsNullOrEmpty($Name) -and [String]::IsNullOrEmpty($Guid)) { | |
throw "Must pass management agent Name or Guid" | |
} |
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 Show-ObjectGraph { | |
[Alias('sog')] | |
<# | |
.Synopsis | |
Displays structure of an object/collection in a WPF TreeView. | |
.DESCRIPTION | |
Recursively builds out an object graph which is then set to | |
the DataContext of a WPF TreeView. This will display all type and | |
member info for the object or collection elements. This is a blocking | |
operation. |
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 GenProp { | |
param ($type, $name) | |
if ($type -like 'bool' ` | |
-or $type -like 'int' ) { | |
$_default = $null | |
switch ($type) { | |
'bool' { | |
$_default = 'false' | |
} |
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 | |
Ternary operation for PowerShell with terse | |
parameter aliases. Meant to be used from pipeline. | |
.Example | |
gci -Recurse | >> {$_.PSIsContainer} "Directory" "File" | |
.Example | |
1..10 | >> {($_ % 2) -eq 0} "Even" "Odd" | |
.Example | |
# Pass through numbers greater than 0 or print 0 |