Last active
February 5, 2018 19:12
-
-
Save phwelo/ddfc82f1f80eb11337cd13295d048007 to your computer and use it in GitHub Desktop.
[Get Chef Runlist] Get a Chef runlist #Chef #Powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[string]$nodename = 'nodename' | |
) | |
$knife_show = knife node show $nodename | |
[string]$result = ($knife_show | select-string -pattern 'Run List:') | |
$runlist = $result.substring(13) | |
return $runlist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment