Is there a way to stop & start the cache programatically without PowerShell Administration tool?

Answered Is there a way to stop & start the cache programatically without PowerShell Administration tool?

  • Thursday, February 05, 2009 6:48 PM
     
     

    We are working on a Proof-of-Concept and know that you can stop and start (basically a restart) the cache using the PowerShell Administration tool. But, we have not found a way to do this programatically? Is there an API so that we can start and stop the cache from .NET code without using the PowerShell Administration tool.

All Replies

  • Monday, February 09, 2009 8:45 PM
     
     
    Hi,

    inspecting the CacheAdminLibrary.dll assembly, It seems that all administration methods (like restartCluster) are exposed by a class called CacheAdmin, but this class is declared as "internal", so it's accessible from the same assembly only or from other assemblies enlisted using InternalVisibleTo Attribute, like AdminPS.dll, wherein you could see all PowerShell cmdlets that use these administrative methods.

    Anyway, beetter to wait for an official reply from Velocity team.

    HTH

    Andrea Colaci
  • Saturday, February 14, 2009 4:00 PM
     
     Answered
     

    Yes, you can use powershell cmdlets from AdminPS.dll in your program. (For more details on Powershell cmdlets in Managed code, refer to http://msdn.microsoft.com/en-us/library/bb332449.aspx).

    Let me know if you face any issues, thanks.


    Thanks, Amit. MSFT.