Stop-Process -Name “notepad” Stop-Process -Id 3952 -Confirm –PassThru calc $p = Get-Process -Name “calc” Stop-Process -InputObject $p Get-Process | Where-Object {$_.HasExited} Get-Process -Name “lsass” | Stop-Process
Category: Root
Dec 08
Power Shell: Process
Dec 08
Some Web Administration Tasks
systemctl start httpdsystemctl start mariadbsystemctl restart httpdsystemctl restart mariadb systemctl enable httpdsystemctl enable mariadb
Dec 08
Monitor Process in Linux
Monitor Process in Linux •ps •pstree •top Who Monitors Processes? •Admins •Developers as needed Tasks •start, stop, restart, status, kill
Dec 08
How to execute Power Shell Scripts
•powershell.exe -noprofile -executionpolicy bypass -file .\hello.ps1 •Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force; •Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force; •set-executionpolicy remotesigned • •
Dec 08
Power Shell: Archive/Un Archive
•powershell Compress-Archive –LiteralPath lab8 –DestinationPath lab8.zip •powershell Expand-Archive –LiteralPath lab8.zip –DestinationPath “C:\mypath” -Force
Dec 08
Linux: Regular Expression: grep
Signed Integers egrep ‘^[+-]?[0-9]+$’ data.txt Floating Point Numbers egrep ‘^[+-]?[0-9]+[.]?[0-9]*$’ data.txt Canadian Postal Code egrep -q ‘^[A-Z][0-9][A-Z] *[0-9][A-Z][0-9]$’ info.txt



