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
if ($env:install_vbox_tools -eq $true) | |
{ | |
Write-Host "Installing Virtualbox Guest Additions" | |
certutil -addstore -f "TrustedPublisher" E:\cert\oracle-vbox.cer | |
Start-Process -FilePath "E:\VBoxWindowsAdditions.exe" -ArgumentList "/S" -Wait | |
} | |
else | |
{ | |
Write-Host "Skipping installation of Virtualbox Guest Additions" | |
} |
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
# Install the Oracle certificate first | |
certutil -addstore -f "TrustedPublisher" E:\cert\oracle-vbox.cer | |
Start-Process -FilePath "E:\VBoxWindowsAdditions.exe" -ArgumentList "/S" -Wait |
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
$sourcePath = 'C:\packer\output-window2012r2-basewin2012r2-base.ovf' | |
Start-Process -FilePath 'packer.exe' -ArgumentList "build -var `"source_path=$($sourcePath)`" .\02-win_updates-wmf5.json" -Wait -NoNewWindow |
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 | |
Allows running processes and capturing output. | |
.DESCRIPTION | |
Allows running processes and capturing output. | |
.EXAMPLE | |
Start-ProcessWithCapture -FilePath 'git' -ArgumentList 'pull' -WorkingDirectory $Path -ErrorAction Stop | |
#> | |
function Start-ProcessWithCapture | |
{ |
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
# Find the failed Disk | |
Get-PhysicalDisk | |
# Shutdown, take the disk out and reboot. Set the missing disk to a variable | |
$missingDisk = Get-PhysicalDisk | Where-Object { $_.OperationalStatus -eq 'Lost Communication' } | |
# Retire the missing disk | |
$missingDisk | Set-PhysicalDisk -Usage Retired | |
# Find the name of your new disk |
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 | |
Short description | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.EXAMPLE | |
Another example of how to use this cmdlet | |
#> |
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
# This will need to be done with an Administrative PowerShell Prompt | |
[Environment]::SetEnvironmentVariable("NODE_TLS_REJECT_UNAUTHORIZED", "0", "Machine") |
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
# Description: | |
# Gets the status of a service on the Hubot server | |
# | |
# Commands: | |
# hubot get service <service name> - Finds the status of a service on the Hubot server | |
# Require the edge module we installed | |
edge = require("edge") | |
# Build the PowerShell that will execute |
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 | |
Gets service status for Hubot Script. | |
.DESCRIPTION | |
Gets service status for Hubot Script. | |
.EXAMPLE | |
Get-ServiceHubot -Name dhcp | |
#> | |
function Get-ServiceHubot | |
{ |
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 the Add-PathVariable function from my PowerShell Profile | |
Add-PathVariable -Path 'C:/opscode/chefdk/embedded/bin' |