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
powershell -NonInteractive -Command "& { Import-Module .\psake.psm1; Invoke-Psake .\psake-build.ps1 %*; exit !($psake.build_success); }" |
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
Properties { | |
$baseDir = Resolve-Path . | |
$project = Split-Path $baseDir -Leaf | |
$artifactDir = "$baseDir\Build\Packages" | |
$version = "1.0.1" | |
} | |
Task Default -Depends Build | |
Task Clean { | |
if (Test-Path "$baseDir\build") { |
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 | |
Recursively updates the version of AssemblyInfo.cs files | |
.Parameter baseDir | |
The root directory from which to recursively search for AssemblyInfo files | |
Defaults to the directory of the script. | |
.Link | |
https://gist.github.com/z0c | |
#> |
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 | |
Recursively updates the version of AssemblyInfo.cs files | |
.Parameter baseDir | |
The root directory from which to recursively search for AssemblyInfo files | |
Defaults to the directory of the script. | |
.Link | |
https://gist.github.com/z0c | |
#> |
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 | |
Installs all required components for Vuture Vx development on a vanilla environment | |
.Link | |
https://gist.github.com/z0c/f3541a9d083c8caf0b04 | |
#> | |
# DEPRECATED: Moving to Chef | |
# Broken due to changes in chocolatey 0.9.9 | |
# Custom package sources not implemented in current version of chocolatey |
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 | |
Iterates through enabled IIS 6 websites and lists their bindings and A records. | |
Useful in preparation to decommission Windows 2003 web servers. | |
#> | |
$output = @() | |
$sites = Get-WmiObject -Class IIsWebServerSetting -Namespace "root\microsoftiisv2" -filter "ServerAutoStart=True" | |
foreach ($site in $sites) { | |
foreach ($binding in $site.ServerBindings) { |
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 | |
Disables SSL v3 protocol on IIS for POODLE vulnerability | |
.LINK | |
https://www.digicert.com/ssl-support/iis-disabling-ssl-v3.htm | |
#> | |
function Create-SubKey { | |
param( | |
[parameter(position=0)]$path, |
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 | |
Disables SSL v2 protocol on IIS | |
#> | |
function Create-SubKey { | |
param( | |
[parameter(position=0)]$path, | |
[parameter(position=1)]$key, | |
[parameter(position=2)]$subKey |
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 Get-TreeLength { | |
<# | |
.SYNOPSIS | |
Calculates the total size used by child folders of the specified location | |
.PARAMETER path | |
The root path | |
.PARAMETER depth | |
How many levels deep in the folder structure to go. | |
Defaults to 0, displays sizes of all subfolders of path | |
The higher the depth value is the slower it will be to fetch the inital |
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
# REMARK: By default UNC to local junctions are disabled | |
# To find out run 'fsutil behavior query SymlinkEvaluation' | |
# To enable run 'fsutil behavior set SymlinkEvaluation R2L:1' | |
$source = 'd:\folder-a' | |
$target = 'd:\folder-b' | |
Robocopy $source $target /MIR /R:12 /W:5 | |
Invoke-Expression "cmd.exe /c attrib +r $source\\*.* /s" |
OlderNewer