Browse Source

Add additional output to for-loops

close #51
pull/56/head
Alex Hirsch 9 years ago
parent
commit
64511343ea
  1. 1
      scripts/disable-services.ps1
  2. 1
      scripts/disable-windows-defender.ps1
  3. 2
      scripts/experimental_unfuckery.ps1
  4. 2
      scripts/remove-default-apps.ps1

1
scripts/disable-services.ps1

@ -29,5 +29,6 @@ $services = @(
) )
foreach ($service in $services) { foreach ($service in $services) {
echo "Trying to disable $service"
Get-Service -Name $service | Set-Service -StartupType Disabled Get-Service -Name $service | Set-Service -StartupType Disabled
} }

1
scripts/disable-windows-defender.ps1

@ -13,6 +13,7 @@ foreach ($task in $tasks) {
$name = $parts[-1] $name = $parts[-1]
$path = $parts[0..($parts.length-2)] -join '\' $path = $parts[0..($parts.length-2)] -join '\'
echo "Trying to disable scheduled task $name"
Disable-ScheduledTask -TaskName "$name" -TaskPath "$path" Disable-ScheduledTask -TaskName "$name" -TaskPath "$path"
} }

2
scripts/experimental_unfuckery.ps1

@ -27,6 +27,8 @@ $needles = @(
) )
foreach ($needle in $needles) { foreach ($needle in $needles) {
echo "Trying to remove all packages containing $needle"
$pkgs = (ls "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" | $pkgs = (ls "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" |
where Name -Like "*$needle*") where Name -Like "*$needle*")

2
scripts/remove-default-apps.ps1

@ -62,6 +62,8 @@ $apps = @(
) )
foreach ($app in $apps) { foreach ($app in $apps) {
echo "Trying to remove $app"
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage
Get-AppXProvisionedPackage -Online | Get-AppXProvisionedPackage -Online |

Loading…
Cancel
Save