NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Get-NNTP Cmdlet

Parameters   Output Objects   Configuration Settings  

The Get-NNTP cmdlet is used to read articles on Usenet news servers.

Syntax

Get-NNTP [parameters]

Remarks

The Get-NNTP cmdlet implements a standard Usenet news reader as specified in RFC 977. It can be used to browse Usenet news groups and read and articles.

To get a listing of all available news groups on a server, set the Server parameter. The Credential parameter can be used optionally for authentication. This will return a separate Newsgroup object for each newsgroup found on the server.

Setting the Newsgroup parameter will instruct the cmdlet to obtain a listing of the most recent articles in the server, resulting in a separate NNTPArticleHeaders object for each message found. The list can be filtered by setting the Range parameter to the range of articles to retrieve or by setting the List parameter to the number of most recent articles to be listed. If neither is set, all messages in the newsgroup will be listed.

To view the contents of an article, set the View parameter to the article number of the message to retrieve. This will return an NNTPArticle object containing the contents of the message.

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.


# list newsgroups
get-nntp -server msnews.microsoft.com | out-host -paging
# list the last 10 articles on a newsgroup
get-nntp -server msnews.microsoft.com -newsgroup microsoft.public.test -list 10
# retrieve a specific article
get-nntp -server msnews.microsoft.com -newsgroup microsoft.public.test -view 8176721

Connection Handling

This cmdlet supports persistent connections through the Connection parameter. To establish a new NNTP connection, use the Connect-NNTP cmdlet. To close the connection, use the Disconnect-NNTP cmdlet.

Parameter List


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

ConnectionAn already established connection.
LogFileThe location of a file to which debug information is written.
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.
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.
ForceForces the cmdlet to accept the default behavior instead of querying the user.
ListThe most recent articles to include in the NNTP operation.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
NewsgroupThe newsgroup for the cmdlet to operate on.
PasswordThe password to use for authentication.
PortThe TCP port in the remote host to which to connect.
RangeThe range of articles.
ServerThe address of the Server.
SSLDetermines how the cmdlet starts SSL negotiation.
SSLAcceptThe encoded public key of the certificate which is to be trusted explicitly.
TimeoutThe maximum time allowed for the operation.
UserThe username to use for authentication.
ViewThe article number to view.

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.

NewsgroupRepresents a newsgroup in the listing.
NNTPArticleAn object representing an article on the news server.
NNTPArticleHeadersThe message headers for the newsgroup message.

Configuration Settings


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

ArticleInfoLimitInstructs cmdlet to save the amount of articles specified that are returned by the server when a GroupOverview event is fired.
GroupInfoLimitInstructs cmdlet to save the amount of group info objects specified that are returned by the server after a ListGroups call has been made.
MaxHeaderLengthMaximum length for headers to avoid line folding (default 80).
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 TCP 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.
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.
CodePageThe system code page used for Unicode to Multibyte translations.

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