Set-ASAppServiceEndpoint
Set-ASAppServiceEndpoint
Sets a new address for an existing endpoint defined in a configuration file associated with a service.
Syntax
Parameter Set: SiteNameAndVirtualPath
Set-ASAppServiceEndpoint [-SiteName] <String> [-VirtualPath] <String> [[-Address] <String> ] [-Binding] <String> [-Contract] <String> -NewAddress <String> [ <CommonParameters>]
Detailed Description
This cmdlet finds the specified endpoint of a service in a configuration file associated with the service and sets a new address for it. This action works only on a service that is defined in its own configuration file.
Parameters
-Address<String>
The current address of the endpoint to be modified.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-Binding<String>
The binding of the endpoint to be modified.
Aliases |
none |
Required? |
true |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-Contract<String>
The contract of the endpoint to be modified.
Aliases |
none |
Required? |
true |
Position? |
5 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-NewAddress<String>
The new address to be set on the endpoint.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
-ServiceObject<ServiceInfo>
ps_serviceobject
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
-SiteName<String>
The name of a Web site, as defined in the IIS Connections pane, which specifies that the cmdlet will operate at the scope of a service contained within that site. To the SiteName parameter, you must add the VirtualPath parameter that identifies a service contained within the site.
The virtual path must include the name of the application, a forward slash, and the name of the .svc file or .xamlx file for the service. The leading "/" character in the virtual path is optional. If you use the SiteName parameter, do not use the Uri parameter
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-Uri<Uri>
A URI for a service, which specifies that the cmdlet will operate at that scope. If you use the Uri parameter, do not use the SiteName and VirtualPath parameter set.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-VirtualPath<String>
The virtual path for a service, as defined in the IIS Manager Connections pane, which specifies that the cmdlet will operate at the scope of the service. You must add the VirtualPath parameter to the SiteName parameter, using SiteName to identify the site that the service is included in. The leading "/" character in the virtual path is optional.
For a service, the virtual path includes the name of the application, a forward slash, and the name of the .svc file or .xamlx file for the service. If you use the SiteName and VirtualName parameter set, do not use the Uri parameter.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None.
Outputs
The output type is the type of the objects that the cmdlet emits.
- None.
Examples
Example 1
This command changes the address of the endpoint from “” to “basic” in the configuration file associated with the service.
Set-ServiceEndpoint –uri https://localhost/SampleApp/Service.svc –address "" –binding basicHttpBinding –contract IService –newAddress basic