• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

New-NCacheTlsCertificate

The New-NCacheTlsCertificate PowerShell cmdlet generates the client certificate required when NCache clients connect to servers configured with mutual TLS. The cmdlet generates the private key locally on the machine where it is run, creates a Certificate Signing Request (CSR), and sends only the CSR for signing. The resulting client certificate is written as a PEM file containing the private key, leaf certificate, and any Intermediate certificates in that order.

The -Server parameter is required, regardless of whether you run the cmdlet on an NCache server, an NCache client, or a machine without an NCache installation. Use -Server to specify the registered NCache server from which the cmdlet reads the account email associated with the NCache license. If node security is enabled on that server, provide -Credentials. After generating the client certificate, configure tlsCertPath in the client application's ncache section to use the generated PEM file and then enable mutual TLS on the target servers with Enable-NCacheTLS -UseMutualTls.

Important

The generated PEM file contains an unencrypted private key. Keep the file permissions restricted to the account that runs the client application and do not copy the file to systems that do not require it. On Linux, the cmdlet restricts the file to its owner (chmod 600); on Windows, follow the icacls command suggested by the cmdlet output.

New-NCacheTlsCertificate [-Path] <string> -Server <string> [-Force] `
                         [-TlsCertPath <string>] [-TlsCertPassword <string>] `
                         [-Credentials <pscredential>] [-NoLogo]

Examples

  • This command requests a signed client certificate using the account registered on server 20.200.20.11 and writes the resulting PEM file to C:\ncache-certs\client.pem.
New-NCacheTlsCertificate -Server "20.200.20.11" -Path "C:\ncache-certs\client.pem"
  • This command writes the client certificate to /etc/ncache/client-certs/client.pem. Because a directory path is provided, the cmdlet appends client.pem. The -Force switch allows an existing file at that location to be replaced.
New-NCacheTlsCertificate -Server "20.200.20.11" -Path "/etc/ncache/client-certs/" -Force
  • This command requests a client certificate from a server where NCache node security is enabled. Get-Credential prompts for the credentials required to read the server's license and account information.
New-NCacheTlsCertificate -Server "20.200.20.11" -Path "client.pem" -Credentials (Get-Credential)
  • This command issues a client PEM from a machine without an NCache server installation when the target server already requires mTLS. The -TlsCertPath PEM is used to authenticate the cmdlet; it is not the new certificate written to -Path.
New-NCacheTlsCertificate -Server "20.200.20.11" -Path "C:\ncache-certs\client.pem" `
                         -TlsCertPath "C:\certs\existing-client.pem" `
                         -TlsCertPassword "clientKeyPassword"

Properties

Note

The parameters with an asterisk (*) are required, while the remaining parameters are optional.

Parameters Data Types Description Default Value
-Path* <String> Specifies where to write the generated client certificate as a PEM file. The file contains the private key, leaf certificate, and any Intermediate certificates in that order. If a directory or a path without a file extension is specified, the cmdlet appends client.pem. The cmdlet does not overwrite an existing file unless -Force is also specified. -
-Server* <String> Specifies the IP address or hostname of the registered NCache server from which the cmdlet reads the account email associated with the NCache license. The server does not need to have TLS enabled before this cmdlet is run. -
-Force <SwitchParameter> Overwrites an existing file at the resolved -Path. Without this switch, the cmdlet does not replace an existing client certificate file. False
-TlsCertPath <String> Existing client PEM certificate used to authenticate this PowerShell command to a server requiring mTLS when running from a machine without an NCache server installation. -
-TlsCertPassword <String> Password to decrypt the private key in -TlsCertPath, if encrypted. It is used only for the current command and is not stored on the NCache server. -
-Credentials <pscredential> Specifies the credentials required to read the license and account information from -Server when NCache node security is enabled on that server. -
-NoLogo <SwitchParameter> Suppresses display of the NCache logo banner. False

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top