New-IISSite
Letzte Aktualisierung: August 2015
New-IISSite
Creates an IIS Web site.
Syntax
Parameter Set: Default
New-IISSite -BindingInformation <String> -Name <String> -PhysicalPath <String> [-Force] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-Passthru] [ <CommonParameters>]
Detaillierte Beschreibung
The New-IISSite cmdlet is used to create an Internet Information Services (IIS) website with the given physical site as the root and binding information to listen on a specific IP:Port:Hostname binding.
Parameter
-BindingInformation<String>
Specifies the binding information string to use for the new site. The binding information of the form IP:Port:hostname such as 192.168.0.1:80:www.contoso.com and one or more of the fields can be left blank, which is equivalent to using a wildcard character such as *:443:. In this representation * indicates all IP addresses and all hostnames is indicated by leaving the corresponding field blank.
Aliase |
none |
Erforderlich? |
true |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
true(ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-Force
Erzwingt die Ausführung des Befehls, ohne den Benutzer zur Bestätigung aufzufordern.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-InformationAction<ActionPreference>
Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:
-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend
Aliase |
infa |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-InformationVariable<String>
Specifies a variable in which to store an information event message.
Aliase |
iv |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Name<String>
Specifies the name of the IIS website.
Aliase |
none |
Erforderlich? |
true |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
true(ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-Passthru
Gibt ein Objekt an, das das Element darstellt, mit dem Sie arbeiten. Dieses Cmdlet generiert standardmäßig keine Ausgabe.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-PhysicalPath<String>
Specifies the physical path to the new IIS website.
Aliase |
none |
Erforderlich? |
true |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
true(ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.
- String
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
- Microsoft.Web.Administration.Site
Beispiele
Example 1: Add a new IIS web site
This command creates a new website named TestSite.
PS C:\> New-IISSite -Name "TestSite" -BindingInformation "*:8080:" –PhysicalPath "$env:systemdrive\inetpub\testsite"
Example 2: Add a new website and set application pool of the site default application to a custom name
This command creates a website named TestSite with default application assigned to the TestSiteAppPool application pool.
PS C:\> Start-IISCommitDelay
PS C:\> $TestSite = New-IISSite -Name TestSite -BindingInformation "*:8080:" –PhysicalPath "$env:systemdrive\inetpub\testsite" -Passthru
PS C:\> $TestSite.Applications[“/”].ApplicationPoolName = “TestSiteAppPool”
PS C:\> Stop-IISCommitDelay