PS Cmdlet Executor No Params Write Action

Microsoft.DistributedCache.PSCmdletExecutorNoParams.WriteAction (WriteActionModuleType)

Generic executor for PowerShell Cmdlets

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityPublic
RunAsMicrosoft.DistributedCache.CacheClusterAdminAccount
InputTypeSystem.BaseData

Member Modules:

ID Module Type TypeId RunAs 
DS WriteAction System.CommandExecuter Default

Source Code:

<WriteActionModuleType ID="Microsoft.DistributedCache.PSCmdletExecutorNoParams.WriteAction" Accessibility="Public" RunAs="MicrosoftApplicationServerLibrary!Microsoft.DistributedCache.CacheClusterAdminAccount" Batching="false">
<Configuration>
<xsd:element minOccurs="1" name="CmdletName" type="xsd:string"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="DS" TypeID="System!System.CommandExecuter">
<ApplicationName>%windir%\system32\windowspowershell\v1.0\powershell.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>-Command ".\Execute-CacheAdminCmdlet.ps1" </CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>Execute-CacheAdminCmdlet.ps1</Name>
<Contents><Script>

$cmdletName = '$Config/CmdletName$'

$Error.Clear()

if ((Get-Command -Module DistributedCacheAdministration) -eq $null)
{
Import-Module DistributedCacheAdministration #Distributed Cache Admin PS module
Use-CacheCluster
}

if ($cmdletName -eq 'Get-CacheAllowedClientAccounts')
{
Get-CacheAllowedClientAccounts
}
elseif ($cmdletName -eq 'Restart-CacheCluster')
{
Restart-CacheCluster
}

</Script></Contents>
<Unicode>1</Unicode>
</File>
</Files>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="DS"/>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>