Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Run RunWait Shellexecute PowerShell Command Cmdlet get-date get-help get-member .Net
pwrshl_cmd = 'get-date' tmpfile = FileCreateTemp( 'Tmp' ); Create temporary outputfile RunWait( 'powershell', '-command ': pwrshl_cmd:' |out-file ':tmpfile ) data = FileGet( tmpfile ) Pause( pwrshl_cmd, data ) FileDelete(tmpfile) ; Delete temporary outputfile Exit
pwrshl_cmd = 'get-help' tmpfile = FileCreateTemp( 'Tmp' ); Create temporary outputfile RunWait( 'powershell', '-command ': pwrshl_cmd:' |out-file ':tmpfile ) data = FileGet( tmpfile ) Pause( pwrshl_cmd, data ) FileDelete(tmpfile) ; Delete temporary outputfile Exit
Enumerate members of an object ;Winbatch 2012A - Enumerate .NET Assembly Object via Powershell ; ;Simple demonstration to pull the Properties, Methods, Events from the .Net Windows Form object ;//////////////////////////////////////////////////////////////////////////////////////////////////////// pwrshl_cmd = `Get-Member -InputObject [System.Windows.Forms.Form"]` tmpfile = FileCreateTemp( 'Tmp' ); Create temporary outputfile RunWait( 'powershell', '-command ': pwrshl_cmd:' |out-file ':tmpfile ) data = FileGet( tmpfile ) Pause( pwrshl_cmd, data ) FileDelete(tmpfile) ; Delete temporary outputfile Exit
Article ID: W17947
Filename: Run PowerShell Command.txt
File Created: 2012:05:14:08:57:36
Last Updated: 2012:05:14:08:57:36