Exclusively for TechExams members for Infosec Boot Camps starting before April 30, 2026
dales wrote: » Hi all, Wondering if I could ask for some advice please. I have a simple script that outputs linux guests date/time (checking for the time drift issue), I've got it to output to a file but its not much use at the moment because I'm not sure how to get it to also echo out the current vm name. Does anyone know if this is possible from within the invoke-vmscript commandlet or even if I pipe it in someway before passing it to the txt file. Script currently looks like this! Invoke-VMScript -VM (Get-VM) -GuestCredential (Get-Credential) -HostCredential (Get-Credential) -ScriptText "date" -ScriptType Bash | out-file list.txt Output currently looks like this! Wed May 19 14:17:18 BST 2010 Wed May 19 14:17:24 BST 2010 Wed May 19 14:17:52 BST 2010 thanks in advance Dale
dales wrote: » Does anyone know if this is possible from within the invoke-vmscript commandlet or even if I pipe it in someway before passing it to the txt file.
Exclusively for TechExam members. Applies to boot camps starting before April 30, 2026.