NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Get-HTTP Cmdlet

Parameters   Output Objects   Configuration Settings  

The Get-HTTP cmdlet can be used to retrieve documents from the World Wide Web.

Syntax

Get-HTTP [parameters]

Remarks

This cmdlet implements a standard HTTP client as defined in RFCs 1945 and 2616. This cmdlet will retrieve the document specified by URL, and its contents will be stored in an HTTP object. If authentication is required, the parameters User and Password, as well as AuthenticationMode must be set.

The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.


# Get an HTTPS URL
get-http -url https://www.microsoft.com
# Post data to an HTTP web form
get-http -url http://www.nsoftware.com/demos/test/Default.aspx -VariableName name,email -VariableValue psUser, psUser@domain.com

Parameter List


The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.

LogFileThe location of a file to which debug information is written.
AuthenticationModeThe authentication mode to use when presenting login credentials to the server.
CertPasswordThe password to the certificate store.
CertStoreThe name of the certificate store for the client certificate.
CertStoreTypeThe type of certificate store for the client certificate.
CertSubjectThe subject of the certificate used for client authentication.
ConfigSpecifies one or more configuration settings.
CookieNameAn array of cookie names.
CookieValueAn array of cookie values.
CredentialThe PSCredential object to use for user/password authentication.
FirewallHostName or IP address of firewall.
FirewallPasswordA password if authentication is to be used when connecting through the firewall.
FirewallPortThe port of the firewall to which to connect.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
FollowRedirectsDetermines what happens when the server issues a redirect.
ForceForces the cmdlet to accept the default behavior instead of querying the user.
LocalFileThe local file to download to.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
PasswordThe password to use for authentication.
ProxyAutoDetectSpecifies if proxy information is automatically detected.
ProxyPasswordThe password to authenticate with.
ProxyPortThe TCP port of the Proxy .
ProxyServerName or IP address of a proxy server (optional).
ProxyUserThe User value to authenticate with.
SSLAcceptThe encoded public key of the certificate which is to be trusted explicitly.
TimeoutThe maximum time allowed for the operation.
URLThe URL(s) to fetch.
UserThe username to use for authentication.
VariableNameAn array of form variable names.
VariableValueAn array of form variable values.

Output Objects


The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.

HTTPThis object contains the text of the downloaded web page.

Configuration Settings


The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.

AcceptEncodingUsed to tell the server which types of content encodings the client supports.
AllowHTTPCompressionThis property enables HTTP compression for receiving data.
AllowHTTPFallbackWhether HTTP/2 connections are permitted to fallback to HTTP/1.1.
AppendWhether to append data to LocalFile.
AuthorizationThe Authorization string to be sent to the server.
BytesTransferredContains the number of bytes transferred in the response data.
EncodeURLIf set to true the URL will be encoded by the cmdlet.
FollowRedirectsDetermines what happens when the server issues a redirect.
GetOn302RedirectIf set to true the cmdlet will perform a GET on the new location.
HTTPVersionThe version of HTTP used by the cmdlet.
HTTP2HeadersWithoutIndexingHTTP2 headers that should not update the dynamic header table with incremental indexing.
IfModifiedSinceA date determining the maximum age of the desired document.
KeepAliveDetermines whether the HTTP connection is closed after completion of the request.
LogLevelThe level of detail that is logged.
MaxRedirectAttemptsLimits the number of redirects that are followed in a request.
NegotiatedHTTPVersionThe negotiated HTTP version.
OtherHeadersOther headers as determined by the user (optional).
ProxyAuthorizationThe authorization string to be sent to the proxy server.
ProxyAuthSchemeThe authorization scheme to be used for the proxy.
ProxyPasswordA password if authentication is to be used for the proxy.
ProxyPortPort for the proxy server (default 80).
ProxyServerName or IP address of a proxy server (optional).
ProxyUserA user name if authentication is to be used for the proxy.
TransferredDataThe contents of the last response from the server.
TransferredDataLimitThe maximum number of incoming bytes to be stored by the cmdlet.
TransferredHeadersThe full set of headers as received from the server.
UseChunkedEncodingEnables or Disables HTTP chunked encoding for transfers.
ChunkSizeSpecifies the chunk size in bytes when using chunked encoding.
UserAgentInformation about the user agent (browser).
KerberosSPNThe Service Principal Name for the Kerberos Domain Controller.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the cmdlet whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the cmdlet binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
UseIPv6Whether to use IPv6.
TcpNoDelayWhether or not to delay when sending packets.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
UseBackgroundThreadWhether threads created by the cmdlet are background threads.
UseInternalSecurityAPITells the cmdlet whether or not to use the system security libraries or an internal implementation.

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
NetCmdlets 2016 - Version 16.0 [Build 7240]