powershell BoxStarter VS2015
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell BoxStarter VS2015相关的知识,希望对你有一定的参考价值。
$myfeed = "https://myget.org/F/riezebosch"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install DotNet4.5.1 -y
choco install KB2919442 -y
choco install KB2919355 -y
$env:visualStudio:setupFolder = "K:\VS2015"
choco install VisualStudio2015Enterprise -ia "/InstallSelectableItems WebTools;TypeScript;GitForWindows;SQL;PowershellTools" -y --version "2015.03.02"
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" -ErrorAction SilentlyContinue
choco install vcredist2015 -y
choco install dotnetcore-vs -params "/layout K:\VS2015DotNetCore\" -ia "SKIP_VSU_CHECK=1" -y -pre --source $myfeed
choco install dotnetcore-runtime -y
choco install visualstudiocode -y
#Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft VS Code\Code.exe" -ErrorAction SilentlyContinue
$wu | Start-Service
choco install DotNet3.5 -y
choco install powershell -y --ignore-checksums
$wu | Stop-Service
$wu | Set-Service -StartupType Disabled
choco install vcredist2013 -y
$env:sqlserver:isolocation = "C:\VPC_Images"
choco install sql-server -y
choco install sql-server-management-studio -y
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" -ErrorAction SilentlyContinue
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y --ignore-checksums
#Enable Web Services
choco install IIS-WebServerRole -source WindowsFeatures -y
choco install IIS-ISAPIFilter -source WindowsFeatures -y
choco install IIS-ISAPIExtensions -source WindowsFeatures -y
#Enable ASP.NET on win 2012/8
choco install IIS-NetFxExtensibility45 -source WindowsFeatures -y
choco install NetFx4Extended-ASPNET45 -source WindowsFeatures -y
choco install IIS-ASPNet45 -source WindowsFeatures -y
choco install WCF-Services45 -source WindowsFeatures -y
#Enable WCF in IIS
choco install WCF-HTTP-Activation -source WindowsFeatures -y
choco install WCF-NonHTTP-Activation -source WindowsFeatures -y
choco install WCF-HTTP-Activation45 -source WindowsFeatures -y
choco install WCF-TCP-Activation45 -source WindowsFeatures -y
choco install WCF-Pipe-Activation45 -source WindowsFeatures -y
choco install WCF-MSMQ-Activation45 -source WindowsFeatures -y
choco install WCF-TCP-PortSharing45 -source WindowsFeatures -y
choco install WCF-HTTP-Activation45 -source WindowsFeatures -y
choco install skillpipereader -y
choco install MsSqlServerSchoolSampleDatabase -y --source $myfeed
choco install ILSpy -y
$ilspy = gci -Path "$env:ChocolateyInstall\lib\ILSpy*\tools\ILSpy.exe" | select -ExpandProperty FullName
Install-ChocolateyPinnedTaskBarItem $ilspy -ErrorAction SilentlyContinue
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
# Set the last used template on the New Project dialog in VS to the C# node
New-Item -Path HKCU:\Software\Microsoft\VisualStudio\14.0 -Name NewProjectDialog -ea SilentlyContinue
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\14.0\NewProjectDialog -Name LastUsedTemplateNameProject -Value "Console Application"
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\14.0\NewProjectDialog -Name LastUsedTemplateNodeProject -Value "Templates\Visual C#"
Set-WindowsExplorerOptions -EnableShowFileExtensions
if ($env:COMPUTERNAME -match "docent.") {
# Set the display to turn off after 1 hour
powercfg -x monitor-timeout-ac 60
}
$wu = Get-Service -Name wuauserv
$wu | Stop-Service
$wu | Set-Service -StartupType Disabled
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
choco install nodejs -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
npm install -g npm
npm install -g typescript
choco install visualstudiocode -y
choco install googlechrome -y
choco install firefox -y
choco install 7zip -y
choco install sumatrapdf.install -y
Set-WindowsExplorerOptions -EnableShowFileExtensions
if ($env:COMPUTERNAME -match "docent.") {
# Set the display to turn off after 1 hour
powercfg -x monitor-timeout-ac 60
}
#Enable Web Services
choco install IIS-WebServerRole -source WindowsFeatures -y
choco install IIS-ISAPIFilter -source WindowsFeatures -y
choco install IIS-ISAPIExtensions -source WindowsFeatures -y
#Enable ASP.NET on win 2012/8
choco install IIS-NetFxExtensibility45 -source WindowsFeatures -y
choco install NetFx4Extended-ASPNET45 -source WindowsFeatures -y
choco install IIS-ASPNet45 -source WindowsFeatures -y
choco install WCF-Services45 -source WindowsFeatures -y
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
if (!(Test-Path -Path C:\git\condev.git)) {
New-Item -Path C:\git -ItemType directory -ea SilentlyContinue
& git init C:\git\condev.git --bare
}
choco install jre8 -y -params "/exclude:32"
choco install teamcity -y
Get-Service -Name teamcity | Start-Service
if (!(Get-NetFirewallRule -DisplayName TeamCity)) {
New-NetFirewallRule -DisplayName TeamCity -Direction Inbound -Action Allow -Protocol "TCP" -LocalPort 8111
}
$url = "http://localhost:8111"
$url | clip
Write-Host "Configure TeamCity on $url (it's on the clipboard already)"
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
choco install teamcityagent -y -params "serverurl=$url"
choco install octopusdeploy -y
choco install octopusdeploy.tentacle -y
choco install sql-server-express -y
& SQLCMD -S '.\SQLEXPRESS' -Q "CREATE DATABASE Octopus"
choco install IIS-NetFxExtensibility45 -source WindowsFeatures -y
choco install NetFx4Extended-ASPNET45 -source WindowsFeatures -y
choco install IIS-ASPNet45 -source WindowsFeatures -y
choco install git.install -y
setx PATH "$env:Path;$env:ProgramFiles\git\cmd"
choco install poshgit -y
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
choco install poshgit -y
choco install git-credential-manager-for-windows -y
choco install sourcetree -y
choco install kdiff3 -y
choco install notepadplusplus.install -y
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y
Set-WindowsExplorerOptions -EnableShowFileExtensions
if ($env:COMPUTERNAME -match "docent.") {
# Set the display to turn off after 1 hour
powercfg -x monitor-timeout-ac 60
}
Disable-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V -Online -NoRestart
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y
choco install git -y
setx PATH "$env:Path;$env:ProgramFiles\git\cmd"
choco install R.Project -y
choco install R.Studio -y
choco install jdk8 -y
choco install scala.install -y -ignoreDependencies
choco install imagemagick.app -y
Install-ChocolateyZipPackage "spark-notebook" "https://s3.eu-central-1.amazonaws.com/spark-notebook/zip/spark-notebook-0.6.2-scala-2.10.4-spark-1.6.0-hadoop-2.2.0.zip?max-keys=100000" "C:\spark"
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles)\RStudio\bin\rstudio.exe" -ErrorAction SilentlyContinue
Set-WindowsExplorerOptions -EnableShowFileExtensions
if ($env:COMPUTERNAME -match "docent.") {
# Set the display to turn off after 1 hour
powercfg -x monitor-timeout-ac 60
}
$myfeed = "https://myget.org/F/riezebosch"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install KB2919442 -y
choco install KB2919355 -y
$wu | Start-Service
choco install DotNet3.5 -y
choco install powershell -y --ignore-checksums
$wu | Stop-Service
$wu | Set-Service -StartupType Disabled
choco install visualstudio2017-offline -ia "--add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb" -y
choco install visualstudiocode -y
choco install vcredist2013 -y
choco install sql-server-express -y
choco install sql-server-management-studio -y
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y --ignore-checksums
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe" -ErrorAction SilentlyContinue
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft VS Code\Code.exe" -ErrorAction SilentlyContinue
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" -ErrorAction SilentlyContinue
choco install winpcap
choco install wireshark
choco install fiddler4
choco install python --version 2.7.11
choco install nodejs
choco install zap
choco install docker-toolbox -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
& docker-machine create --driver hyperv --hyperv-virtual-switch 'External Network' Default
& "C:\Program Files\Docker Toolbox\docker-machine.exe" env | Invoke-Expression
& docker run -p 8080:8080 -t -d --name webgoat webgoat/webgoat-7.1
$ip = & docker-machine ip
$shell = New-Object -ComObject WScript.Shell
$shortcut = $shell.CreateShortcut("$Home\Desktop\WebGoat.url")
$shortcut.TargetPath = "http://$($ip):8080/WebGoat"
$shortcut.Save()
# Schedule automatic shutdown
Write-Host "Creating a scheduled task for automatic shutdown."
Write-Host "This task will run only once."
$taskname = "boxstarter_ready"
Get-ScheduledTask -TaskName $taskname -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false
Register-ScheduledTask -TaskName $taskname -Trigger (New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1)) -Action (New-ScheduledTaskAction -Execute "shutdown" -Argument "/s /t 0")
$myfeed = "https://myget.org/F/riezebosch"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install DotNet4.5.1 -y
if (Test-PendingReboot) { Invoke-Reboot }
choco install KB2919442 -y
choco install KB2919355 -y
$env:visualStudio:setupFolder = "K:\VS2015"
choco install VisualStudio2015Enterprise -ia "/InstallSelectableItems WebTools;TypeScript;GitForWindows;SQL;PowershellTools" -y
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" -ErrorAction SilentlyContinue
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y
choco install ILSpy -y
$ilspy = gci -Path "$env:ChocolateyInstall\lib\ILSpy*\tools\ILSpy.exe" | select -ExpandProperty FullName
Install-ChocolateyPinnedTaskBarItem $ilspy -ErrorAction SilentlyContinue
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
# Set the last used template on the New Project dialog in VS to the C# node
New-Item -Path HKCU:\Software\Microsoft\VisualStudio\14.0 -Name NewProjectDialog -ea SilentlyContinue
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\14.0\NewProjectDialog -Name LastUsedTemplateNameProject -Value "Console Application"
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\14.0\NewProjectDialog -Name LastUsedTemplateNodeProject -Value "Templates\Visual C#"
Install-ChocolateyVsixPackage SpecFlow https://visualstudiogallery.msdn.microsoft.com/c74211e7-cb6e-4dfa-855d-df0ad4a37dd6/file/160542/7/TechTalk.SpecFlow.Vs2015Integration.v2015.1.2.vsix
choco install firefox -y
Set-WindowsExplorerOptions -EnableShowFileExtensions
if ($env:COMPUTERNAME -match "docent.") {
# Set the display to turn off after 1 hour
powercfg -x monitor-timeout-ac 60
}
$myfeed = "https://myget.org/F/riezebosch"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install KB2919442 -y
choco install KB2919355 -y
$wu | Start-Service
choco install DotNet3.5 -y
choco install powershell -y --ignore-checksums
$wu | Stop-Service
$wu | Set-Service -StartupType Disabled
choco install visualstudio2017-offline -ia "--add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Azure --includeRecommended" -y
choco install visualstudiocode -y
choco install vcredist2013 -y
choco install sql-server-express -y
choco install sql-server-management-studio -y
choco install MsSqlServerSchoolSampleDatabase -y --source $myfeed
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y --ignore-checksums
choco install ILSpy -y
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe" -ErrorAction SilentlyContinue
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft VS Code\Code.exe" -ErrorAction SilentlyContinue
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" -ErrorAction SilentlyContinue
$ilspy = gci -Path "$env:ChocolateyInstall\lib\ILSpy*\tools\ILSpy.exe" | select -ExpandProperty FullName
Install-ChocolateyPinnedTaskBarItem $ilspy -ErrorAction SilentlyContinue
choco install DotNet4.5.1 -y
if (Test-PendingReboot) { Invoke-Reboot }
choco install KB2919442 -y
choco install KB2919355 -y
$env:visualStudio:setupFolder = "K:\VS2015"
choco install VisualStudio2015Enterprise -ia "/InstallSelectableItems CrossPlatformMobileDevelopment_Group"
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" -ErrorAction SilentlyContinue
choco install googlechrome -y
choco install 7zip -y
choco install sumatrapdf.install -y
choco install git -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
# Set the last used template on the New Project dialog in VS to the C# node
New-Item -Path HKCU:\Software\Microsoft\VisualStudio\14.0 -Name NewProjectDialog -ea SilentlyContinue
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\14.0\NewProjectDialog -Name LastUsedTemplateNameProject -Value "Console Application"
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\14.0\NewProjectDialog -Name LastUsedTemplateNodeProject -Value "Templates\Visual C#"
Set-WindowsExplorerOptions -EnableShowFileExtensions
if ($env:COMPUTERNAME -match "docent.") {
# Set the display to turn off after 1 hour
powercfg -x monitor-timeout-ac 60
}
以上是关于powershell BoxStarter VS2015的主要内容,如果未能解决你的问题,请参考以下文章
powershell Boxstarter Windows 10配置
powershell 用于新Windows框的Boxstarter命令。