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 | |
# Ensures that certain dependencies are available in the current environment. | |
# | |
#.DESCRIPTION | |
# Test-Requirement will throw an exception if the requirement is not met, or | |
# it will write a verbose message if the requirement succeeds. It is not | |
# intended to be used in a conditional statement, rather it is intended to be | |
# used at the top of your function as a declarative statement in a scope that | |
# will be aborted if an exception is thrown. |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
/// <summary> | |
/// Provides methods for checking method arguments for validity and throwing localizable exceptions for invalid | |
/// arguments or argument combinations. |
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
@{ | |
# MODULE | |
Description = 'LINQ for PowerShell' | |
ModuleVersion = '3.0' | |
GUID = '03BDA80F-0831-406E-B6AE-59E32D73F190' | |
# AUTHOR | |
Author = 'Josh Einstein' | |
CompanyName = 'Einstein Technologies' |
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
using System; | |
using System.Collections; | |
public static class CollectionHelper { | |
public static bool SetsEqual(IEnumerable set1, IEnumerable set2) { | |
var h1 = new Hashtable(); | |
foreach ( var item in set1 ) { | |
h1[item] = 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
namespace Einstein.PowerShell | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics.Contracts; | |
using System.Globalization; | |
using System.Linq; |
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
$ErrorActionPreference = 'Stop' | |
try { | |
$LyncPolicyKey = 'HKLM:\Software\Policies\Microsoft\Communicator' | |
if (!(Test-Path $LyncPolicyKey)) { | |
New-Item $LyncPolicyKey | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Diagnostics.Contracts; | |
using System.Globalization; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Xml.Serialization; |
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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
namespace SCoreShell | |
{ | |
/// <summary> | |
/// This application's sole purpose in life is to sit in for the default "shell" on a |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Einstein.Dynamic | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
namespace Einstein | |
{ | |
OlderNewer