Command: chmod +x
Sometimes is necessary change the owner of the file to can execute it, for this task:
Command: chown user:group
by GoN | Published: February 23, 2018 | Last Updated:
Gonsystem: Windows - Linux - Servers - Redes - Cisco - Comunicaciones - Monitorización - Seguridad - Seguridad
get-service | ConvertTo-Html -Property Name,Status | foreach {
if ($_ -like "*<td>Running</td>*") {$_ -replace "<tr>", "<tr bgcolor=green>"}
else {$_ -replace "<tr>", "<tr bgcolor=red>"}} > c:get-service.html
The result:Get-Service BITS | %{ if ( $_.Status -eq "Stopped" ) {Start-Service BITS}}