Launch PowerShell as Admin
NCache requires importing the NCache PowerShell module (ncacheps) to run NCache cmdlets. You can launch the PowerShell with pre-imported ncacheps or import the module manually by launching the standard PowerShell.
NCache PowerShell Management
Go to the Start menu on the Taskbar and type NCache PowerShell Management.
Click on the search result. This will open an instance of PowerShell with ncacheps imported, and display a list of all NCache PowerShell cmdlets.
You can now proceed to manage NCache with PowerShell. Refer to the NCache PowerShell Reference for full coverage of NCache cmdlets.
Standard PowerShell
You must launch a new/fresh instance of the Windows PowerShell so the %NCHOME%
environment variable setup by NCache installation is visible. The PowerShell cmdlets make use of this environment variable.
Go to the Start menu on the Taskbar and type Windows PowerShell.
Right-click on the Windows PowerShell result and select Run as Administrator. This launches PowerShell with Administrator privileges.
Verify that environment variable
$Env:NCHOME
is pointing to the NCache installation directory.
PS C:\WINDOWS\system32> $Env:NCHOME
C:\Program Files\NCache
Import NCache PowerShell Module
You may be unable to run the NCache PowerShell cmdlets if the environment variable
PSModulePath
has not been refreshed after the installation. Import the NCache PowerShell module (ncacheps.dll) found in the location %NCHOME%\bin\tools\ncacheps.Execute the following command on Windows PowerShell to import the module:
Import-Module 'C:\Program Files\NCache\bin\tools\ncacheps\ncacheps.dll'
To verify if the environment variable
PSModulePath
has been refreshed successfully, run the following command using Command Prompt (Run as Administrator).On running this command, the path for ncacheps gets displayed. If the output displays
%NCHOME%\bin\tools
, it means that the environment variables are refreshed.
echo %PSModulePath%
You can now proceed to manage the NCache with PowerShell. Refer to the NCache PowerShell Reference for full coverage of NCache cmdlets.
See Also
NCache PowerShell Reference
Configure Firewall
Create a Cache
Simulate Cache Usage
Monitor Caches in PerfMon