Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

How to Save Virtual Service ACL entries into a file using Powershell





Attempting to create a script with the Kemp PowerShell module that pulls data from a Virtual Service ACL to include the IPs that are being allowed or blocked.


Product: LoadMaster

Version: Any

Platform: Any

Application: Any

Question/Problem Description:

How to save ACL information from a Virtual Service into a file via Powershell?

Steps to Reproduce:  
Error Message:  
Defect Number:  
Enhancement Number:  

The output can be saved in a file as given below,
> Get-VSPacketFilterACL -VSIndex 1 -Type allow -verbose | Out-File ACLExport.txt
So, above command saves the printed output and not the list of IPs in the ACL list.
Note: When providing VSIndex, VirtualService is not required to pass along with index.
The user can fetch the information by saving the output in a variable as given below.
> $data = Get-VSPacketFilterACL -VSIndex 1 -Type allow -verbose
> $data.Data.VsAclConfiguration.Allowlist
addr comment

If it is needed to save allow list IPs in file, this can also be done by executing the following:
> $data.Data.VsAclConfiguration.Allowlist | Out-File AllowList.txt
> cat .\AllowList.txt
addr comment


Was this article helpful?
0 out of 0 found this helpful