November 2018
Intermediate to advanced
566 pages
17h 15m
English
Perform the following steps:
Here is the script that will help you accomplish the tasks. Create a new PS1 file and add the following content to it.
The script is available as 10-New-ProcessReport.ps1 within the ch09 directory of the code repository that accompanies the book:
$Processes = @{} Get-Process | ForEach-Object { $Processes[$PSItem.Name] = $PSItem.WS/1MB } $Report = "The computer is currently running $($Processes.Count) processes." if ($Processes.Contains('pwsh')) { $Report += "`n`nPowerShell is also running at the moment." $Processes.Remove('pwsh') } else { $Report += "`n`nPowerShell is not running at ...Read now
Unlock full access