Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 647 Bytes

File metadata and controls

24 lines (20 loc) · 647 Bytes

Variables: a place to store your stuff

  1. Create a background job that queries the Win32_BIOS information from two computers (use localhost twice if you have only one computer to experiment with).
start-job -ScriptBlock {Get-CimInstance -ClassName Win32_BIOS -ComputerName winserver,localhost}

  1. When the job finishes running, receive the results of the job into a variable.
$job = Receive-Job -Keep -Id 1

  1. Display the contents of that variable.
$job

  1. Export the variable’s contents to a CliXML file.
$job | Export-Clixml -Path C:\dev\biosfromvar.xml