Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Cannot install Web-Server on Azure VM

$
0
0

I'm trying to create a VM and install Web-Server role using powershell with this command

"Install Web Server"
	Invoke-Command -ComputerName $vmInfo.vip -Port $vmInfo.port -Credential $localCredential -UseSSL -SessionOption $psSessionOptions -ScriptBlock {
        Import-Module ServerManager
        $info = Get-WindowsFeature | Where-Object {$_.Name -match “Web-Server”} | Select-Object -Property Installed
        if ($info.Installed -eq $false) {
		        Install-WindowsFeature -name Web-Server -IncludeAllSubFeature -IncludeManagementTools 
            }
	}



I always get the following error.

The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f0906
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
    Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Commands.AddWindowsF
   eatureCommand
    + PSComputerName        : 138.91.75.143

But if I connect to the machine and manually install the Web-Server it has no problems.  What am I missing? 


Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>