PowerShell/demos/SystemD
bergmeister ffd39b2853 PSScriptAnalyzer fixes by category (#4261)
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select')
- Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison.
- A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison
- Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null'
2017-07-21 21:03:49 -07:00
..
SystemD Add DSC demo. Bugfix Apache and SystemD demo. (#1814) 2016-08-17 12:07:12 -07:00
journalctl-demo.ps1 PSScriptAnalyzer fixes by category (#4261) 2017-07-21 21:03:49 -07:00
readme.md Add DSC demo. Bugfix Apache and SystemD demo. (#1814) 2016-08-17 12:07:12 -07:00

SystemD: journalctl demo

This demo shows use of a PowerShell script module to wrap a native tool (journalctl) so that the output is structured for filtering and presentation control. journalctl is expressed as a cmdlet: Get-SystemDJournal, and the JSON output of journalctl is converted to a PowerShell object.

Prerequisites

  • Requires a SystemD-based operating system (Red Hat or CentOS 7, Ubuntu 16.04)
  • Install PowerShell

Note: Accessing the SystemD journal requires privileges. The user must have authorization to elevate with sudo. You will be prompted for a sudo password when running the demo.