Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Last active August 29, 2015 14:00
Embed
What would you like to do?
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