Tag: Powershell

  • Powershell background Jobs

    Run about_Jobs  for info Jobs a run as children of the powershell session, so if the session goes, the jobs goes. Get-command -noun job  lists commands relating to running jobs Can either run a scriptblock if quotes in curly brackets, like this… PS C:\> Start-Job {Get-EventLog -List} -name eventJob Id     Name            PSJobTypeName   State         HasMoreData     Location            …

  • Powershell Pipeline

    ForEach-Object  cmdlet  (alias = ForEach) acts on each object coming through the pipeline. ForEach returns a set of objects to the pipeline for further processing This is different to the ForEach enumerator, which is your normal loop (for x in y)… The enumerator doesn’t return objects to the pipeline. 3 parameters, each is a script…

  • Powershell Objects

    Cmdlets output objects, and can consume objects. Objects have properties. Properties can be read-only, or modifiable. Not all properties are shown by default when you view an object Objects have methods, which may have parameters. Cmdlets are often associated with methods, but methods can be invoked manually too. Get-Member lists all properties and methods of an…