Files
powershell/Dennis_Scripts/InteractWithAppFabric.ps1
2023-03-09 09:06:25 +01:00

17 lines
807 B
PowerShell

Import-Module 'C:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.Caching.Client.dll'
Import-Module 'C:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.Caching.Core.dll'
Import-Module 'C:\users\Administrator.DENMARK-IFS\Desktop\ROSA.TPSession.Management.Entities.dll'
[microsoft.applicationserver.caching.datacacheserverendpoint[]]$servers = (New-Object microsoft.applicationserver.caching.datacacheserverendpoint('REJK-A-CAC201',22233))
$factoryconfig = New-Object microsoft.applicationserver.caching.datacachefactoryconfiguration
$factoryconfig.Servers = $servers
$factory = new-object microsoft.applicationserver.caching.datacachefactory($factoryconfig)
# Get-Cache | select CacheName
$datacache = $factory.GetCache('REF_Business_Objects')