Skip to content

Instantly share code, notes, and snippets.

@DamianReeves
Last active June 5, 2018 11:52
Show Gist options
  • Save DamianReeves/da321d28d995d1df2484 to your computer and use it in GitHub Desktop.
Save DamianReeves/da321d28d995d1df2484 to your computer and use it in GitHub Desktop.
DevOps-WebAdministration
<#
.SYNOPSIS
Script to restore nuget packages
.DESCRIPTION
Script to restore nuget packages
.PARAMETER Site
The web site name.
.PARAMETER Name
The web application name.
.PARAMETER Name
The application pool name.
.PARAMETER Name
The physical path.
#>
param(
[string]
$Site = 'Default Site',
[string]
$Name,
[string]
$ApplicationPool,
[string]
$PhysicalPath
)
Import-Module WebAdministration
$WebApp = Get-WebApplication -Name $Name
if( !$WebApp) {
New-WebApplication -Site $Site -Name $Name -ApplicationPool $ApplicationPool -PhysicalPath $PhysicalPath
}
$Name
#$here = Split-Path -Parent $MyInvocation.MyCommand.Path
#$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.",".")
#. "$here\$sut"
Describe "Install-IISWebApplication" {
Context "Exists" {
It "Runs" {
".\Install-IISWebApplication.ps1" -Name "TestFoo" | Should Be "TestFoo"
}
}
}
@margani
Copy link

margani commented Jun 5, 2018

Thank you. How can you create a new website/webapplication but in stopped state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment