< Back
Grant-CHttpUrlPermission
Post
NAME Grant-CHttpUrlPermission
SYNOPSIS
Grant a principal permission to bind to an HTTP URL.
SYNTAX
Grant-CHttpUrlPermission [-Url] <String> [-Principal] <String> [-Permission] {ListenAndDelegate | Listen |
Delegate | Read} [<CommonParameters>]
DESCRIPTION
The `Grant-CHttpUrlPermission` functions uses the HTTP Server API to grant a user permission to bind to an HTTP
URL.
[The HTTP Server API](https://msdn.microsoft.com/en-us/library/aa364510.aspx)
> enables applications to communicate over HTTP without using Microsoft Internet Information Server (IIS).
Applications can register to receive HTTP requests for particular URLs, receive HTTP requests, and send HTTP
responses.
An application that uses the HTTP Server API must register all URLs it listens (i.e. binds, registers) to. A user
can have three permissions:
* `Listen`, which allows the user to bind to the `$Url` url
* `Delegate`, which allows the user to "reserve (delegate) a subtree of this URL for another user" (whatever that
means)
If the user already has the desired permissions, nothing happens. If the user has any permissions not specified by
the `Permission` parameter, they are removed (i.e. if the user currently has delegate permission, but you don't
pass that permission in, it will be removed).
This command replaces the `netsh http (add|delete) urlacl` command.
`Grant-CHttpUrlPermission` was introduced in Carbon 2.1.0.
PARAMETERS
-Url <String>
The URL.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Principal <String>
The user receiving the permission.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Permission
The permission(s) to grant the user. There are two permissions:
* `Listen`, which allows the user to bind to the `$Url` url
* `Delegate`, which allows the user to "reserve (delegate) a subtree of this URL for another user" (whatever
that means)
* `ListenAndDelegate`, which grants both `Listen` and `Delegate` permissions
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Grant-CHttpUrlPermission -Url 'http://+:4833' -Principal 'FALCON\\HSolo' -Permission
[Carbon.Security.HttpUrlAccessRights]::Listen
Demonstrates how to grant a user permission to listen to (i.e. "bind" or "register") an HTTP URL. In this case
user `FALCON\\HSolo` can listen to `http://+:4833`.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Grant-CHttpUrlPermission -Url 'http://+:4833' -Principal 'FALCON\\HSolo' -Permission
[Carbon.Security.HttpUrlAccessRights]::Delegate
Demonstrates how to grant a user permission to delegate an HTTP URL, but not the ability to bind to that URL. In
this case user `FALCON\\HSolo` can delegate `http://+:4833`, but can't bind to it.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Grant-CHttpUrlPermission -Url 'http://+:4833' -Principal 'FALCON\\HSolo' -Permission
[Carbon.Security.HttpUrlAccessRights]::ListenAndDelegate
Demonstrates how to grant a user permission to listen (i.e "bind" or "register") to *and* delegate an HTTP URL. In
this case user `FALCON\\HSolo` can listen to and delegate `http://+:4833`.
RELATED LINKS
https://msdn.microsoft.com/en-us/library/aa364653.aspx
Get-CHttpUrlAcl
Revoke-CHttpUrlPermission
SYNOPSIS
Grant a principal permission to bind to an HTTP URL.
SYNTAX
Grant-CHttpUrlPermission [-Url] <String> [-Principal] <String> [-Permission] {ListenAndDelegate | Listen |
Delegate | Read} [<CommonParameters>]
DESCRIPTION
The `Grant-CHttpUrlPermission` functions uses the HTTP Server API to grant a user permission to bind to an HTTP
URL.
[The HTTP Server API](https://msdn.microsoft.com/en-us/library/aa364510.aspx)
> enables applications to communicate over HTTP without using Microsoft Internet Information Server (IIS).
Applications can register to receive HTTP requests for particular URLs, receive HTTP requests, and send HTTP
responses.
An application that uses the HTTP Server API must register all URLs it listens (i.e. binds, registers) to. A user
can have three permissions:
* `Listen`, which allows the user to bind to the `$Url` url
* `Delegate`, which allows the user to "reserve (delegate) a subtree of this URL for another user" (whatever that
means)
If the user already has the desired permissions, nothing happens. If the user has any permissions not specified by
the `Permission` parameter, they are removed (i.e. if the user currently has delegate permission, but you don't
pass that permission in, it will be removed).
This command replaces the `netsh http (add|delete) urlacl` command.
`Grant-CHttpUrlPermission` was introduced in Carbon 2.1.0.
PARAMETERS
-Url <String>
The URL.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Principal <String>
The user receiving the permission.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Permission
The permission(s) to grant the user. There are two permissions:
* `Listen`, which allows the user to bind to the `$Url` url
* `Delegate`, which allows the user to "reserve (delegate) a subtree of this URL for another user" (whatever
that means)
* `ListenAndDelegate`, which grants both `Listen` and `Delegate` permissions
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Grant-CHttpUrlPermission -Url 'http://+:4833' -Principal 'FALCON\\HSolo' -Permission
[Carbon.Security.HttpUrlAccessRights]::Listen
Demonstrates how to grant a user permission to listen to (i.e. "bind" or "register") an HTTP URL. In this case
user `FALCON\\HSolo` can listen to `http://+:4833`.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Grant-CHttpUrlPermission -Url 'http://+:4833' -Principal 'FALCON\\HSolo' -Permission
[Carbon.Security.HttpUrlAccessRights]::Delegate
Demonstrates how to grant a user permission to delegate an HTTP URL, but not the ability to bind to that URL. In
this case user `FALCON\\HSolo` can delegate `http://+:4833`, but can't bind to it.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Grant-CHttpUrlPermission -Url 'http://+:4833' -Principal 'FALCON\\HSolo' -Permission
[Carbon.Security.HttpUrlAccessRights]::ListenAndDelegate
Demonstrates how to grant a user permission to listen (i.e "bind" or "register") to *and* delegate an HTTP URL. In
this case user `FALCON\\HSolo` can listen to and delegate `http://+:4833`.
RELATED LINKS
https://msdn.microsoft.com/en-us/library/aa364653.aspx
Get-CHttpUrlAcl
Revoke-CHttpUrlPermission