Forum Discussion
Powershell One line Commands
Coud someone help me with the following. I tried searching though the commands and couldn't figure it out. Can patrik or someone else Byw these powershell snapins are awesome. Me and my whole team have been working through the web gui which took forever to get things done and im hoping with powershell we can start automating.
What would be the command to force off line (not just disable) all members within a pool (lets assume pool name fab_pool)
What would be the command to enable all members within a pool (lets assume pool name fab_pool)
The command to force off line one member from a pool (assuming member - fabmember pool name fab_pool)
Command force offline a node so that it it will be offline for all pool its a member off.
Thanks
5 Replies
- chrismatt83_115
Nimbostratus
Not a novice. Need some help. I tried going through those and im not even sure how to run them.
- JRahm
Admin
gotcha. Yeah, powershell needs a little help to get things moving. To start, you need to change the Set-ExecutionPolicy value to unrestricted unless you sign the scripts in-house. Next, to run one of the powershell scripts, you call it with a .\ScriptName.ps1, or fully qualify it with "C:\my scripts\ScriptName.ps1"
Hi Chris!
Try this one:
http://climbi.com/b/1qYEwa
Could do with some additional parameter checks but I need to sleep now. :)
/Patrik
Note that all pool names, partitions etc are case sensitive. Also, server is specified by the name, not the ip.
Examples:
Enable Myserver in the pool Test-Pool under partition Common Toogle-Pool-Member -Pool Test-Pool -Partition Common -Members @("Myserver:80") -State Enable Disable all members in the pool Test-Pool under partition Common Toogle-Pool-Member -Pool Test-Pool -Partition Common -All -State Disable Disable MyServer-01 and Myserver-02 in pool testpool under partition MyPartition Toogle-Pool-Member -Pool testpool -Partition MyPartition -Members @("MyServer-01:80", "Myserver-02:80") -State Enable
/Patrik
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com