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 Grant-LogOnAsService{ | |
param( | |
[string[]] $users | |
) | |
#Get list of currently used SIDs | |
secedit /export /cfg tempexport.inf | |
$curSIDs = Select-String .\tempexport.inf -Pattern "SeServiceLogonRight" | |
$Sids = $curSIDs.line |
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
# | |
# cSQLServerInstall: DSC resource to install Sql Server Enterprise version. | |
# | |
# | |
# The Get-TargetResource cmdlet. | |
# | |
function Get-TargetResource | |
{ |
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
# 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 | |
) |
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
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 |
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
<# | |
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 |
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
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" |
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 | |
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 |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description" : "Template for the creation of an AutoScaling group with Domain Join", | |
"Metadata": { | |
"AWS::CloudFormation::Interface": { | |
"ParameterGroups": [ | |
{ | |
"Label": { |
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
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{ |
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 | |
This script is intended to tag the volumes of an existing instance and create a snapshot for those volumes. | |
.DESCRIPTION | |
The script takes an instance ID and optional region parameter. It will find the instance in the region submitted or the | |
current default region and find all volumes attached to the instance. Then it will tag those volumes, and create a snapshot. | |
The snapshot will include the volume tags, as well as a date and name tag of its own. | |
.PARAMETER instanceID | |
Required, string, the instanceID of the instance with volumes to have snapshots taken. | |
.PARAMETER region |
OlderNewer