4

I want to install visual studio 2013 through powershell dsc on (hyper v) virtual machine but i could not find any proper link to install it via powershell dsc, as i am new in this field and i don't have any experience, can you help me regarding that. I am very thankful for your prompt and positive response.

Thanks and best regards,

Hussain.

hussain
  • 57
  • 3
  • Take a look at [Chocolatey](https://chocolatey.org/packages/VisualStudio2013Ultimate) instead that will silently install visual studio. If you wanted to you could create your own custom resource that does a similar thing to the chocolatey package or even just create a wrapper for the choco install/uninstall VisualStudio2013Ultimate command. – Wayne Ellery Feb 13 '15 at 11:29
  • 1
    The PoshChef project (https://github.com/poshchef) contains a DSC resource that wraps Chocolatey: https://github.com/POSHChef/chocolatey_cookbook/tree/master/files/default/POSHChef/Chocolatey/resources/Turtlesystems_ChocolateyResource – JamesD Feb 24 '15 at 14:18
  • Hello everyone, I am very thankful for your reply, but I want to install visual studio by "powershell dsc" only. Not with any other else. So please give me your valuable suggestions regarding that. thanks and kind regards. – hussain Mar 30 '15 at 10:00
  • Please sent me some important links, I am waiting for your comments and responses thanks. – hussain Mar 30 '15 at 10:12
  • Not having verified this myself, I believe [Prajeesh Prathap](https://blogsprajeesh.blogspot.com/2015/09/silent-installation-of-visual-studio.html) mentions how to achieve this in his blog. – klaus triendl Nov 07 '19 at 19:09

1 Answers1

2

Install the chocolatey DSC provider

Set-PSRepository -Name psgallery -InstallationPolicy Trusted
Install-Module cChoco

Run this DSC configuration to install VS 2013

configuration InstallTools
{
  Import-DscResource -ModuleName cChoco

  cChocoInstaller choco
  {
    InstallDir = 'C:\choco'
  }

    $chocoPackages = @('visualstudio2013ultimate')                          
    foreach($chocoPackage in $chocoPackages)
    {
        cChocoPackageInstaller $chocoPackage
        {
            Name = $chocoPackage
        }
    }

  Environment chocolatelyInstall
  {
    Name = 'chocolatelyInstall'
    value = 'C:\choco\bin'
  } 
}

InstallTools -OutputPath $env:temp\InstallTools
Start-DscConfiguration -Wait -Verbose -Path $env:temp\InstallTools
TravisEz13
  • 2,263
  • 1
  • 20
  • 28