Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Baseline
- {
- $pathways=@()
- $pathways+= "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Notifications\Data"
- $pathways+= "HKLM:\SYSTEM\ControlSet001\Services\bam\UserSettings"
- $pathways+= "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\SecureTimeLimits"
- $pathways+= "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\SecureTimeLimits\RunTime"
- $pathways+= "HKU:\S-1-5-21-477002440-2142131239-270007453-1001\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist"
- remove-item -Path "C:\Users\Student\Desktop\Good\Gtext.txt" -ErrorAction SilentlyContinue
- foreach ($path in $pathways)
- {
- get-item -path $path -ErrorAction SilentlyContinue | out-file -Append -PSPath "C:\Users\Student\Desktop\Good\Gtext.txt"
- }
- }
- Function BBaseline
- {
- $pathways=@()
- $pathways+= "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Notifications\Data"
- $pathways+= "HKLM:\SYSTEM\ControlSet001\Services\bam\UserSettings"
- $pathways+= "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\SecureTimeLimits"
- $pathways+= "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\SecureTimeLimits\RunTime"
- $pathways+= "HKU:\S-1-5-21-477002440-2142131239-270007453-1001\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist"
- remove-item -Path "C:\Users\Student\Desktop\Good\Btext.txt" -ErrorAction SilentlyContinue
- foreach ($path in $pathways)
- {
- get-item -path $path -ErrorAction SilentlyContinue | out-file -Append -PSPath "C:\Users\Student\Desktop\Good\Btext.txt"
- }
- }
- Function Test101
- {
- remove-item -Path "C:\Users\Student\Desktop\Good\text.txt" -ErrorAction SilentlyContinue
- $fileGood = "C:\Users\Student\Desktop\Good\Gtext.txt"
- $fileBad = "C:\Users\Student\Desktop\Good\Btext.txt"
- Compare-Object(Get-Content $fileGood) (Get-Content $fileBad) | out-file "C:\Users\Student\Desktop\Good\text.txt" #| where {$_.sideindicator -eq "=>"}
- }
- Function Run-it
- {
- Baseline
- BBaseline
- Test101
- }
- #"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Notifications\Data"
- #"HKLM\SYSTEM\ControlSet001\Services\bam\UserSettings"
- #"HKLM\SYSTEM\CurrentControlSet\Services\W32Time\SecureTimeLimits"
- #"HKLM\SYSTEM\CurrentControlSet\Services\W32Time\SecureTimeLimits\RunTime"
- #"HKU\S-1-5-21-477002440-2142131239-270007453-1001\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement