Home » Microsoft TechnologiesRSS

How can I create a new Cache Cluster using powershell commands ?

I'm trying to put together an automated installation for AppFabric, doing lots of the configuration using a powershell script.

I can't find a command that I can use to create a new Cache Cluster; Beta 2 had commands that I can use, but the latest version has none.

 

Can anyone suggest an alternative way of creating a new Cache Cluster that can be fully automated ?

 

Thanks!

 

 

2 Answers Found

 

Answer 1

We have a Deployment and Management white paper that should help you with this:

Automated Installation and Configuration (Windows Server AppFabric Caching)

http://msdn.microsoft.com/en-us/library/ff921027.aspx

This link above walks through the PowerShell commands necessary to create the cache cluster, register cache hosts, etc. There is a sample AddCacheHost script here: http://msdn.microsoft.com/en-us/library/ff921024.aspx, and a sample RemoveCacheHost script here: http://msdn.microsoft.com/en-us/library/ff921034.aspx.

Let me know if you have any questions.

Thanks!

Jason Roth

 

Answer 2

Thanks for the assistance. I found those too and my solution is based on that exact "AddCacheHost" script, however, with the latest install of AppFabric (V6.1 I believe), some of the powershell commands are missing.

 

I started Powershell using the link created by the installer, as administrator, and tried to create a new cache cluster using the "New-CacheCluster" and this is what PS responds with:

PS C:\> New-CacheCluster
The term 'New-CacheCluster' is not recognized as the name of a cmdlet, function
, script file, or operable program. Check the spelling of the name, or if a pat
h was included, verify that the path is correct and try again.
At line:1 char:17
+ New-CacheCluster <<<<
    + CategoryInfo          : ObjectNotFound: (New-CacheCluster:String) [], Co
   mmandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\>

 

A list of all the cache related commands available in PS:

PS C:\> Get-Help *cache*

Name                              Category  Synopsis
----                              --------  --------
Clear-CacheLogging                Cmdlet    Disables all logging for the cur...
Export-CacheClusterConfig         Cmdlet    Export cache cluster configurati...
Get-Cache                         Cmdlet    Lists all caches and regions in ...
Get-CacheAllowedClientAccounts    Cmdlet    Get the list of Windows accounts...
Get-CacheClusterHealth            Cmdlet    Returns health statistics for al...
Get-CacheConfig                   Cmdlet    Returns the configuration detail...
Get-CacheHost                     Cmdlet    Lists all cache host services th...
Get-CacheHostConfig               Cmdlet    Returns the configuration detail...
Get-CacheRegion                   Cmdlet    Returns a list of all regions in...
Get-CacheStatistics               Cmdlet    Returns statistics for a Cache o...
Grant-CacheAllowedClientAccount   Cmdlet    Grants a Windows account permiss...
Import-CacheClusterConfig         Cmdlet    Import cache cluster configurati...
Invoke-CacheGC                    Cmdlet    Used to initiate .NET garbage co...
New-Cache                         Cmdlet    Creates a new named cache when t...
Remove-Cache                      Cmdlet    Removes the named cache specifie...
Restart-CacheCluster              Cmdlet    Restarts the Caching Service on ...
Restart-CacheHost                 Cmdlet    Restarts the Caching Service on ...
Revoke-CacheAllowedClientAccount  Cmdlet    Removes a Windows account from t...
Set-CacheClusterSecurity          Cmdlet    Sets the security settings used ...
Set-CacheConfig                   Cmdlet    Updates the configuration settin...
Set-CacheHostConfig               Cmdlet    Updates the configuration settin...
Set-CacheLogging                  Cmdlet    Updates the settings for adminis...
Start-CacheCluster                Cmdlet    Starts the Caching Service on al...
Start-CacheHost                   Cmdlet    Starts the Caching Service on th...
Stop-CacheCluster                 Cmdlet    Stops the Caching Services on al...
Stop-CacheHost                    Cmdlet    Stops the specified cache host s...
Test-CacheConfigAvailability      Cmdlet    Tests the connection with the ca...
Use-CacheCluster                  Cmdlet    Sets the context of your PowerSh...


PS C:\>

 

Any ideas ?

 

EDIT: The Powershell tool shortcut created by the installer didn't include the DistributedCacheConfiguration module, that's why I couldn't see/use the commands. I should get sorted from here onwards. Thanks for your time and assistance.

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter