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
break #To prevent accidental execution of all commands | |
# WMI cmdlets: Work against anything, where DCOM RPC dynamic port range is available | |
# CIM cmdlets: Exist in PowerShell v3 and up, can use DCOM or WSMAN. Can have CimSessions. Microsoft going forward. | |
$Creds = Get-Credential | |
Get-WmiObject -Class win32_computersystem | |
Get-WmiObject -Class win32_computersystem -ComputerName server1 -Credential $Creds | |
Get-CimInstance -Class win32_computersystem -ComputerName server1 -Credential $Creds | |
$Session = New-CimSession -ComputerName server1 -Credential $Creds | |
Get-CimInstance -Class win32_computersystem -CimSession $Session | |
Get-CimSession |
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 GitVersionInfo | |
/// <summary> | |
/// A simple wrapper to make the compiled GitVersionTask variables easily accessible. | |
/// | |
/// Here is an example set of values | |
/// { | |
/// "Major":1, | |
/// "Minor":3, | |
/// "Patch":0, | |
/// "PreReleaseTag":"unstable.7", |
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
public static void Start() | |
{ | |
var container = StructuremapMvc.StructureMapDependencyScope.Container; | |
// Create a new dependency resolver to use for this request, and save it so we can | |
// set up a service locator provider | |
// | |
var resolver = new StructureMapWebApiDependencyResolver(container); | |
GlobalConfiguration.Configuration.DependencyResolver = resolver; |
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
public class DefaultRegistry : Registry { | |
#region Constructors and Destructors | |
public DefaultRegistry() { | |
Scan( | |
scan => { | |
scan.TheCallingAssembly(); | |
// Ensure the assembly with our IMediator interface is loaded | |
// |
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
================================================================================================================================================================================================================================================================== | |
PluginType Namespace Lifecycle Description Name | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
Func<TResult> System Transient Open Generic Template for Func<> (Default) |