Skip to content

Instantly share code, notes, and snippets.

@phwelo
Last active February 5, 2018 19:12
Show Gist options
  • Save phwelo/ddfc82f1f80eb11337cd13295d048007 to your computer and use it in GitHub Desktop.
Save phwelo/ddfc82f1f80eb11337cd13295d048007 to your computer and use it in GitHub Desktop.
[Get Chef Runlist] Get a Chef runlist #Chef #Powershell
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