- Virtualbox installed
- Vagrant installed
- Vagrant sahara plugin installed
- Vagrant box
win2012r2x64
available
- Copy
PrepareMachine.ps1
toVagrantAction.ps1
- Run
vagrant up
case $operatingsystem { | |
'windows': { | |
Package { | |
provider => chocolatey, | |
} | |
} | |
} | |
include chocolatey | |
include chocolatey_server |
$ErrorActionPreference = 'Stop'; | |
$packageArgs = @{ | |
packageName = '[[PackageName]]' | |
unzipLocation = $toolsDir | |
fileType = 'MSI' | |
url = '[[Url]]' | |
url64bit = '[[Url64]]' # 64bit URL here or remove - if installer is both, use $url | |
silentArgs = "/qn /norestart" | |
validExitCodes= @(0, 3010, 1641) |
# This script is geared towards cmd.exe. | |
# If you are using powershell, look for the hints | |
# about alternative commands in comments | |
# Note there is no alternative for refreshenv | |
# Pik also may not work in PowerShell at all. | |
# It certainly doesn't to update paths | |
SET ORIG_PATH=%PATH% | |
#$ORIG_PATH=$env:PATH |
[user] | |
name = Chocolatey | |
email = [email protected] | |
[core] | |
autocrlf = false | |
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor | |
filemode = false | |
excludesfiles = C:/Users/rob/.gitignore | |
symlinks = false | |
[diff] |
def fix_encodings(files) | |
files.each do |file| | |
next if File.directory?(file) | |
[Encoding::UTF_8, Encoding::UTF_16LE, Encoding::UTF_16, Encoding::ISO_8859_1, Encoding::US_ASCII, Encoding::default_external].each do |encoding| | |
contents = File.read(file, :mode =>'rb', :encoding => encoding) | |
next unless contents.valid_encoding? | |
break if contents.valid_encoding? && encoding == Encoding::UTF_8 | |
if contents.valid_encoding? |
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one | |
# stop on all errors | |
$ErrorActionPreference = 'Stop'; | |
# REMOVE ANYTHING BELOW THAT IS NOT NEEDED | |
# Auto Uninstaller should be able to detect and handle registry uninstalls (if it is turned on, it is in preview for 0.9.9). | |
$packageName = '{{PackageName}}' | |
# registry uninstaller key name is the key that is found at HKLM:\Software\Windows\CurrentVersion\Uninstall\ THE NAME |
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one | |
# REMOVE ANYTHING BELOW THAT IS NOT NEEDED | |
$ErrorActionPreference = 'Stop'; # stop on all errors | |
$packageName= '[[PackageName]]' # arbitrary name for the package, used in messages | |
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | |
$url = '[[Url]]' # download url | |
$url64 = '[[Url64]]' # 64bit URL here or remove - if installer is both, use $url | |
$packageArgs = @{ | |
packageName = $packageName |
Other platforms have long enjoyed package management, a concept that was mostly foreign to Windows. There have been a few attempts at it, but the only one that has had a large amount of success is Chocolatey. Chocolatey took a different approach that has allowed it to build on top of an existing Windows ecosystem. Learn about the simplicity and sensible design of Chocolatey, how it has started to serve the role of package management for Windows, and where we are taking it in the future.
Kids love it. Microsoft Approved! Chocolatey does some cool things that will save you time and money for your organization and make you look uber smart for using it. Come learn more!
scheduled_task { 'Notepad_normal': | |
ensure => 'present', | |
enabled => 'true', | |
command => 'C:\Windows\notepad.exe', | |
trigger => { 'every' => '1', 'schedule' => 'daily', 'start_time' => '15:10' }, | |
user => 'system', | |
} | |
scheduled_task { 'Notepad_with_startdate': | |
ensure => 'present', |