Tip : Check AppFabric Cache Status Using PowerShell

It’s  a daily job of a System Administrator to check AppFabric Cache status, and it will be very usefull to have a script to do so. Please find following script which will guide you to do so; $hostinfo = Get-CacheHost if($hostinfo.Status -eq [Microsoft.ApplicationServer.Caching.AdminApi.ServiceStatus]::Down)){ # Do whatever you want with a down AppFabric Cache host }else{...
Okumaya devam...

Tip : Is Your PowerShell Session Running With Administrative Privileges?

Sometimes you may need to perform administrative stuff within your script. In such cases, it’s better to check whether your user has such privileges to execute the script. Please find the sample below, which checks user for administrative privilege; $user = [Security.Principal.WindowsIdentity]::GetCurrent() if((New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)){ # Keep executing your script… }else{ # Warn user for...
Okumaya devam...

AppFabric Cache Management cmdlet – v1.1

Please find below, updated version of cmdlet published on my AppFabric Cache management cmdlet post: ################################################################# # AppFabricCacheSetup.ps1 PowerShell Cmdlet # ################################################################# # Prepares your AppFabric Cache Cluster environment for # # development. # ################################################################# # Fatih Boy, April 2010 # # Version 1.1 # ################################################################# Import-Module DistributedCacheAdministration Use-CacheCluster $cacheName= Read-Host "Please enter cache name...
Okumaya devam...