Skip to content

Instantly share code, notes, and snippets.

View ned1313's full-sized avatar

Ned Bellavance ned1313

View GitHub Profile
@ned1313
ned1313 / cSqlServerInstall
Last active August 29, 2015 13:56
cSqlServerInstall
#
# cSQLServerInstall: DSC resource to install Sql Server Enterprise version.
#
#
# The Get-TargetResource cmdlet.
#
function Get-TargetResource
{
@ned1313
ned1313 / Get-VMStatistics.ps1
Created May 28, 2014 19:42
Horizon View PCoIP Performance Data Collection
# Horizon View VM Data Collection Script
param(
#Log file location (uses current directory by default)
[string] $logfilelocation=".\",
#CSV file location (uses current directory by default)
[string] $csvfilelocation=".\",
#PoolID (leave blank for all pools)
[string] $poolID
)
param($DomainController = [String]::Empty)
function Main
{
#Script Logic flow
#1. Pull User Info from cloud.csv file in the current directory
#2. Lookup AD Info (DN, mail, proxyAddresses, and legacyExchangeDN) using the SMTP address from the CSV file
#3. Save existing proxyAddresses
#4. Add existing legacyExchangeDN's to proxyAddresses
#5. Delete Mailbox
@ned1313
ned1313 / Create-NanoServerVM.ps1
Created May 15, 2015 14:35
Script to create a Nano Server VHD from Windows Server Technical Preview 2
<#
Create-NanoServerVM.ps1
Script by Ned Bellavance
This script is intended to take the Nano Server WIM file and transform it to a usable VHD with
the correct drivers for running as a Hyper-V guest. The necessary files for the Nano Server
come from the Server Technical Preview ISO. This should be mounted on the E: drive, otherwise
change the E: to wherever the ISO is mounted. This script should be run as an Administrator.
The script also assumes an internet connection to pull down the Convert-WindowsImage.ps1 script
from the script gallery. The VHD created from the process is intended to be run as a Version 1
@ned1313
ned1313 / Vagrantfile
Created October 20, 2015 20:26
Vagrant for Photon and Docker Compose for WordPress
Vagrant.configure(2) do |config|
config.vm.box = "vmware/photon"
config.vm.provider "vmware_desktop" do |v|
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["cpuid.coresPerSocket"] = "1"
end
config.vm.hostname = "dockerhost-prime"
<#
.SYNOPSIS
This script is intended to apply various policy settings to OneDrive for Business SharePoint sites.
.DESCRIPTION
The settings and policies include both user configurable and adminstrative options. Different policies can be
applied depending on the parameter set invoked.
.PARAMETER ApplyPreservationPolicy
Optional, switch parameter. When included, all OneDrive for Business sites will be checked to
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description" : "Template for the creation of an AutoScaling group with Domain Join",
"Metadata": {
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
{
"Label": {
param(
[string] $ServerPrefix,
[pscredential] $credentials,
[string] $DCIpAddress
)
Write-Output "ServerPrefix: $ServerPrefix"
$names = Invoke-Command -ComputerName $DCIpAddress -ScriptBlock {param($searchString) Get-ADComputer -Filter * | Where{$_.Name -like "$($searchString)*"} | select Name} -Credential $credentials -ArgumentList $ServerPrefix
Write-Output "Names found: $names"
if($names -eq $null){$hostname = $ServerPrefix + "-01"}
else{
@ned1313
ned1313 / installAgent.sh
Last active August 30, 2018 19:34
Install the CodeDeploy agent on an EC2 instance with RHEL of Amazon Linux
#!/bin/bash
yum update -y
yum install ruby wget -y
cd /home/ec2-user
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
chmod +x ./install
./install auto
@ned1313
ned1313 / DownloadASDK.ps1
Last active January 10, 2019 15:44
Helper Scripts for setting up the Azure Stack Development Kit
<#
This script is meant to make downloading the latest ASDK a simple affair. The files that
make up the ASDK are an executable and several bin files. This script will grab the
latest version of the ASDK from the web and then assemble the bin files into the final VHDX.
Make sure you have 40GB of free space on your C drive, or change the destination!
This does not include the process of installing the ASDK. That's a whole separate thing.
#>
#Set up the path and source URI