Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferventcoder/11384313 to your computer and use it in GitHub Desktop.
Save ferventcoder/11384313 to your computer and use it in GitHub Desktop.
exec { 'powershell_system32':
command => 'c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command "get-process powershell* | %{ Write-Host $($_.Path)}"',
logoutput => true,
} ->
exec { 'powershell_sysnative':
command => 'c:\windows\sysnative\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command "get-process powershell* | %{ Write-Host $($_.Path)}"',
logoutput => true,
}
#Notice: /Stage[main]/Main/Exec[powershell_system32]/returns: c:\windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
#Notice: /Stage[main]/Main/Exec[powershell_system32]/returns: executed successfully
#Notice: /Stage[main]/Main/Exec[powershell_sysnative]/returns: c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
#Notice: /Stage[main]/Main/Exec[powershell_sysnative]/returns: executed successfully
@ferventcoder
Copy link
Author

Notice: /Stage[main]/Main/Exec[powershell_system32]/returns: c:\windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
Notice: /Stage[main]/Main/Exec[powershell_system32]/returns: executed successfully
Notice: /Stage[main]/Main/Exec[powershell_sysnative]/returns: c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
Notice: /Stage[main]/Main/Exec[powershell_sysnative]/returns: executed successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment