Last active
March 17, 2019 17:37
-
-
Save mwrock/e578e22000396173fa76 to your computer and use it in GitHub Desktop.
Philly Powershell Demos
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
| Update-ExecutionPolicy Unrestricted | |
| Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
| Enable-RemoteDesktop | |
| cinst console2 | |
| cinst sublimetext3 | |
| $sublimeDir = "$env:programfiles\Sublime Text 3" | |
| Get-ChildItem $env:programdata\Chocolatey\lib\console* | % {$consoleDir = $_} | |
| Install-ChocolateyPinnedTaskBarItem "$consoleDir\tools\console2\console.exe" | |
| Install-ChocolateyPinnedTaskBarItem "$sublimeDir\sublime_text.exe" | |
| Install-ChocolateyFileAssociation ".txt" "$sublimeDir\sublime_text.exe" |
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
| Import-Module c:\dev\boxstarter\Boxstarter.Chocolatey\Boxstarter.Chocolatey.psd1 -Force | |
| sub C:\dev\demo\repo\wrocklight | |
| Set-BoxStarterConfig -LocalRepo c:\dev\demo\repo | |
| New-BoxstarterPackage -Name wrocklight -description 'light weight install' -path 'C:\Users\Matt\AppData\Roaming\Sublime Text 3' | |
| Copy-Item $env:appdata\console\console.xml C:\dev\demo\repo\wrocklight | |
| Invoke-BoxStarterBuild -name wrocklight | |
| $c = Get-Credential win81\matt | |
| Enable-BoxstarterVM -Provider hyperv -VMName win8.1 -Credential $c -CheckpointName TestBase -Verbose | Install-BoxstarterPackage -PackageName wrocklight -Force -Verbose |
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 { | |
| Update-ExecutionPolicy Unrestricted | |
| Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
| Enable-RemoteDesktop | |
| cinst console2 | |
| cinst sublimetext3 | |
| $sublimeDir = "$env:programfiles\Sublime Text 3" | |
| $sublimeUserDir = "$env:appdata\Sublime Text 3" | |
| Get-ChildItem $env:programdata\Chocolatey\lib\console* | % {$consoleDir = $_} | |
| Install-ChocolateyPinnedTaskBarItem "$consoleDir\tools\console2\console.exe" | |
| Install-ChocolateyPinnedTaskBarItem "$sublimeDir\sublime_text.exe" | |
| Install-ChocolateyFileAssociation ".txt" "$sublimeDir\sublime_text.exe" | |
| mkdir $sublimeUserDir -Force | |
| mkdir $env:appdata\console -Force | |
| copy-item (Join-Path "$(Get-PackageRoot($MyInvocation))\sublime text 3" '*') -Force -Recurse $sublimeUserDir | |
| copy-item (Join-Path "$(Get-PackageRoot($MyInvocation))" 'console.xml') -Force $env:appdata\console\console.xml | |
| Write-ChocolateySuccess 'wrocklight' | |
| } catch { | |
| Write-ChocolateyFailure 'wrocklight' $($_.Exception.Message) | |
| throw | |
| } |
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
| Import-Module c:\dev\boxstarter\Boxstarter.TestRunner\Boxstarter.TestRunner.psd1 -Force | |
| Set-BoxstarterDeployOptions -DeploymentTargetCredentials $c -DeploymentTargetNames win8.1 -DeploymentVMProvider hyperv -RestoreCheckpoint testready -DefaultNugetFeed http://www.myget.org/F/boxstarter/api/v2 -DefaultFeedAPIKey | |
| Test-BoxstarterPackage | Select-BoxstarterResultsToPublish | Publish-BoxstarterPackage | |
| cd c:\dev\chocolatey-packages | |
| Set-BoxStarterConfig -LocalRepo . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment