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
| --- | |
| driver: | |
| name: vagrant | |
| provisioner: | |
| name: chef_zero | |
| platforms: | |
| - name: windows-2012R2 | |
| driver_config: |
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
| function Disable-NicICS { | |
| $cfg = New-Object -ComObject HNetCfg.HNetShare.1 | |
| $all = $cfg.EnumEveryConnection | |
| foreach($conn in $all){ | |
| $shareCfg=$cfg.INetSharingConfigurationForINetConnection($conn) | |
| $props=$cfg.NetConnectionProps($conn) | |
| $props | |
| $shareCfg.DisableSharing() | |
| } | |
| } |
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
| cinst windirstat --allowEmptyChecksums | |
| cinst dotpeek --allowEmptyChecksums |
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
| . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel current -project chefdk -v 0.13.21 |
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
| choco install notepad2 --version 4.2.25.3 |
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 ($PSVersionTable.PSVersion.Major -le 4) | |
| { | |
| invoke-webrequest "https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/Win8.1AndW2K12R2-KB3134758-x64.msu" -outfile c:\wmf5.msu | |
| start-process wusa -ArgumentList "c:\wmf5.msu", "/quiet", "/norestart" -wait | |
| if(test-path c:\wmf5.msu){remove-item c:\wmf5.msu} | |
| } |
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
| # Configure basic system settings | |
| Update-ExecutionPolicy Unrestricted | |
| Set-ExplorerOptions -showFileExtensions | |
| Enable-RemoteDesktop | |
| # Fix library locations | |
| Move-LibraryDirectory "Personal" "$env:UserProfile\OneDrive\Documents" | |
| Move-LibraryDirectory "My Music" "$env:UserProfile\OneDrive\Music" | |
| Move-LibraryDirectory "My Pictures" "$env:UserProfile\OneDrive\Pictures" | |
| Move-LibraryDirectory "My Video" "$env:UserProfile\OneDrive\Videos" |
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 ((Test-Path $env:systemroot) -and (get-item $env:systemroot).PSIsContainer) { | |
| exit 0 | |
| } | |
| exit 1 |
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
| cinst VisualStudio2013Professional -y |
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
| try { | |
| $rebootFile = "$($boxstarter.BaseDir)\reboot-test.txt" | |
| if(!(Test-Path $rebootFile)) { | |
| new-Item $rebootFile -value "hi1" -type file | |
| write-host "rebooting" | |
| return Invoke-Reboot | |
| } | |
| write-host "I am done" | |
| del $rebootFile |