Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Some tweaks to Individual Scripts #325

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$adlist= Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Brandonbr1/ad-list-hosts/main/host'
$adfile = "$env:windir\System32\drivers\etc\hosts"
$adlist= Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Brandonbr1/ad-list-hosts/main/host' # Repo: https://github.com/Brandonbr1/ad-list-hosts/
$adfile = "$env:windir\System32\drivers\etc\hosts"
$adlist | Add-Content -PassThru $adfile
13 changes: 13 additions & 0 deletions Individual Scripts/Powershell Scripts/robocopy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Gets CPU Logical Processor Count
$CPUs = (wmic cpu get NumberOfLogicalProcessors | Select-String -NotMatch NumberOfLogicalProcessors)
$num = 0
foreach($line in $CPUs){
if($num -eq 1){
$CPUs = $line
}
$num++
}

$S = Read-Host -Prompt 'Input Source Directory'
$D = Read-Host -Prompt 'Input Destination Directory'
robocopy $S $D /e /w:5 /r:2 /COPY:DATSOU /DCOPY:DAT /MT:$CPUs
Binary file not shown.
5 changes: 0 additions & 5 deletions Individual Scripts/robocopy.ps1

This file was deleted.