PowerShell module for the F5 LTM REST API
I'm just getting started using this. I am trying use get-virtualserver, on something I manually set up, into a hash table; modify hash table; then splat into new-virtualserver. Does anyone else already have something like this working?
$vs1=get-virtualserver -f5sess -name 'test1' $vs1.destination='Common/192.168.0.10:443' $vs1.fullpath='/Common/test1-443' $vs1.name='test1-443'
new-virtualserver -f5Session $f5sess @vip1
Thanks for the help. I'll keep trying an post it if I get it to work.
EDIT Got it to work, but built my hashtable manually. see hash values below. mostly used the $vip1.add("IPProtocol","tcp") to build PS C:\Windows> $vip1
Name Value
IPProtocol tcp
FallbackPersistence source_addr
Kind tm:ltm:virtual:virtualstate
SourceAddressTranslationType automap
PersistenceProfiles hash
DestinationIP 192.168.0.30
name vip1.dev1-80
ProfileNames http-XF
Partition Common
DefaultPool dev1-80
DestinationPort 80
New-VirtualServer -F5Session $f5Sess @compasswcf
I can now copy hash tables and reassign values to build another virtual server with mostly the same settings. This was all new to me, so maybe it will help someone else get going a little faster then it took me.
David B