Most these days are including some sort of Powershell module for their software, why? becuase it opens up for automation !
As I mentioned in one of my previous posts I’ve started playing around with PernixData in our lab enviroment and I was reading around on the different KB articles when I saw that “Hey! Pernix has a PowerShell module installed on the management server”
So getting it up and running, the easiest way to take a look around on the different cmdlets is by using ISE on the management server.
Or if you can to do e remote call to it using SMA or Orchestrator you can import the module by adding the path to C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PrnxCli\PrnxCli.dll
Or else its just import-module PrnxCLI
So what can we do ? We can pretty much do anything (I haven’t completly found out how to create a cluster yet, since the cmdlet seems to want some sort of GUID which I am not able to grasp yet) but still I can define resources and add a VM to be accelerated and so on.
So what kind of cmdlets can I use. First of I need to connec to the managemnet server, using a account which has rights to the managment server.
Connect-PrnxServer –Password password –UserName username -NameOrIPAddress localhost
Next I can assign resources to my cluster called pernix (from a particular host) I can also use multiple variables here –host 1,2,3 and so on.
Add-PrnxRAMToFVPCluster -FVPCluster pernix -Host esxi30 -SizeGB 12
Next I assign a virtual machine to the Cluster (Name indicated name of the virtual machine) then the amount of write back peers (If I choose writeback)
Add-PrnxVirtualMachineToFVPCluster -FVPCluster pernix -Name felles-sf -NumWBPeers 1 –WriteBack
Now I can see the acceleration policy being assigned to the virtual machine. Do a format list will give a bit more information about the policy.
Get-PrnxAccelerationPolicy -Name felles-sf | format-list
Now I can also do more showing a stats directly from Powershell, this will list out the stats for the virtual machine the last 5 samples in a grid-view
Get-PrnxObjectStats -ObjectIdentifier felles-sf -NumberOfSamples 5 | Out-GridView
Works like a charm!