Last active
June 5, 2018 11:52
-
-
Save DamianReeves/da321d28d995d1df2484 to your computer and use it in GitHub Desktop.
DevOps-WebAdministration
This file contains 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
<# | |
.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 |
This file contains 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
#$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" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you. How can you create a new website/webapplication but in stopped state?