• Facebook
  • Twitter
  • Youtube
  • LinkedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Try NCache
  • Contact Us
Try NCache
Show / Hide Table of Contents

Enable-NCacheSecurity

The Enable-NCacheSecurity PowerShell cmdlet enables server-level security on an NCache node. It validates the provided machine administrator credentials on the target server and verifies the specified Node Admin user or group against the configured LDAP or Active Directory provider. Once security is enabled, only authorized users can perform NCache management operations on the secured node.

Enable-NCacheSecurity -MachineAdminCredential -NodeAdminName `
                      -NodeAdminDN -DomainController [-DomainControllerPort] `
                      [-SecondaryDomainController] [-SecondaryDomainControllerPort] `
                      -Server [-DirectoryBrowsingCredential] `
                      [-TlsCertPath] [-TlsCertPassword] `

Examples

  • This command enables NCache security on the server 20.200.20.11. The machine administrator credentials are used to verify that David Watson has local administrator privileges on the specified server. The user Michael Parker is registered as the Node Admin, which authorizes the user to perform NCache management operations.
$machineAdmin = Get-Credential david_watson 

Enable-NCacheSecurity -Server 20.200.20.11 -MachineAdminCredential $machineAdmin `
                      -NodeAdminName michael_parker `
                      -NodeAdminDN "CN=Michael Parker,OU=engineers,DC=example,DC=com" `
                      -DomainController domain_controller -DomainControllerPort 389
  • This command enables NCache security on the server 20.200.20.11. As David Watson is a local account and cannot query the directory directly, John Smith is supplied via -DirectoryBrowsingCredential to browse the directory and validate Michael Parker's Distinguished Name against the domain controller.
$machineAdmin = Get-Credential david_watson 

$directoryUser = Get-Credential john_smith `

Enable-NCacheSecurity -Server 20.200.20.11 -MachineAdminCredential $machineAdmin `
                      -NodeAdminName michael_parker `
                      -NodeAdminDN "CN=Michael Parker,OU=engineers,DC=example,DC=com" `
                      -DomainController domain_controller -DomainControllerPort 389 `
                      -DirectoryBrowsingCredential $directoryUser

This command enables NCache security on the server with the IP address 20.200.20.11. Before enabling security, the command validates whether Michael Parker has the necessary privileges on the server.

  • This command enables NCache security on the specified server with mutual TLS (mTLS) enabled, using david_watson as the machine administrator and adding michael_parker as a node administrator through the specified domain controller on port 389. It runs from a machine where NCache is not installed and uses C:\certs\client.pem to authenticate the machine running the cmdlet. The -TlsCertPassword parameter decrypts the certificate’s password-protected private key. Omit this parameter if the private key is not encrypted.
$machineAdmin = Get-Credential david_watson

Enable-NCacheSecurity -Server 20.200.20.11 -MachineAdminCredential $machineAdmin `
                      -NodeAdminName michael_parker `
                      -NodeAdminDN "CN=Michael Parker,OU=engineers,DC=example,DC=com" `
                      -DomainController domain_controller -DomainControllerPort 389 `
                      -TlsCertPath "C:\certs\client.pem" -TlsCertPassword "clientKeyPassword"

Properties

Note

The parameters with asterisk (*) on their names are the required parameters and the rest are optional.

Parameter Data Types Description Default Value
-MachineAdminCredential* <pscredential> Specifies the credentials of a user who is a local administrator on the machine where security is being enabled. -
-NodeAdminName* <string> Specifies the username or name of the user or group to be designated as the Node Admin for NCache management operations. -
-NodeAdminDN* <string> Specifies the full Distinguished Name of the Node Admin user or group. For example, CN=ncache-admins,OU=Groups,DC=corp,DC=example,DC=com. -
-DomainController* <string> Specifies the IP address or hostname of the domain controller used to validate the Node Admin identity. -
-DomainControllerPort <int> Specifies the port on which the domain controller is listening. The default port is 389. 389
-SecondaryDomainController <string> Specifies the IP address or hostname of the secondary domain controller used to validate the Node Admin identity. -
-SecondaryDomainControllerPort <int> Specifies the port on which the secondary domain controller is listening. The default port is 389. 389
-Server* <string> Specifies the IP address of the server where security should be enabled. This parameter can accept multiple IP addresses, allowing you to enable security on multiple servers simultaneously. -
-DirectoryBrowsingCredential <pscredential> Specifies the credentials of an account used to browse the directory and validate the Node Admin. This parameter is required only when the machine administrator account cannot query the directory itself. -
-TlsCertPath <string> Path to the client PEM certificate used to authenticate the machine running the NCache PowerShell cmdlet when connecting to an NCache server with mutual TLS (mTLS) enabled. The PEM file must contain the private key, leaf certificate, and any intermediate certificates. You can generate a certificate using New-NCacheTlsCertificate. This parameter is required when running the PowerShell module from a machine where NCache is not installed and the server requires mTLS. On a machine with an NCache server installation, the node's own certificate is used automatically. Relative paths are resolved against the current PowerShell location, and the file must exist. To configure the certificate presented by the server, use -CustomCertificatePath. -
-TlsCertPassword <string> Password used to load the encrypted private key in the PEM file specified by -TlsCertPath. Required only when the private key is password-protected. Not needed for an unencrypted private key. The password is used only to load the client certificate for the current command's connections. It is not saved in the NCache server configuration. -

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
Try NCache
Pricing
NCache Playground

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

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Terms of Use
  •  
  • Privacy Policy
  •  
  • Cookie Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
  • Facebook
  • Twitter
  • Youtube
  • LinkedIn
  • RSS