Category Archives: Windows Client

Solutions for Windows Operating Systems

snipping tool

Snipping Tool Removed by Microsoft in October 2018 Update 1809

Snipping Tool Overview

The Snipping Tool is being removed by Microsoft in October 2018 Update 1809 and I am not happy! This tool is one of the best tools Microsoft has ever created, so why? Well, they want you to use the Snip and Sketch App from the Microsoft Store. Spoiler: It sucks.

Greenshot the best Snipping Tool Replacement

So what should you use? Greenshot. Its freeware and it just works. Not bulky with a toolbar, but adds a tray icon, which you don’t have to use. You can just press print screen and away you go.

Download it from there website here: http://getgreenshot.org/downloads/

Microsoft Snip and Sketch Replacement

Currently, this is labeled as Screen Sketch, however, this is changing to Snip and Sketch App in the next update. Here is the preview of the upcoming disaster for Microsoft their predictably bad moves on forcing their tragic app store on us. Here is today’s download image of the app prior to the upcoming update that sunsets our beloved Snipping Tool.
Snipping Tool

Conclusion

With Snipping Tool gone, you might as well get used to something new, and Greenshot is a great freeware that has been around for 4 years. In the short week or so that I have been using this, I have grown to love it more than the old Snipping Tool. The features give me more options, but with its polish, I am much more efficient than I ever was.

Leave any Questions and Comments below and I’ll get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

Using IOMeter to determine hard drive performance

Using IOMeter Overview

Using IOMeter will give you a great benchmark on any hard drives and network drives you have. I use this quite often as you can see the effects of new hardware, introducing Link-Aggregation, or troubleshooting drives to determine if they are losing performance.

Steps to Follow

1) Download IOMeter from the Official Site and run setup
IOMeter
2) All Programs -> Iometer -> Iometer

3a) Under ‘Topology’ tab, select the local machine

3b) Delete All workers but 1

3c) Under ‘Disk Targets’ tab select the drive you want to run the IO test on:

3d) Set Maximum Disk Size to 204800 Sectors (one sector is 512 B, so 204800 sectors gives 100MB)

IOMeter
4) Under ‘Access Specifications’ tab, under Global Access Specifications, select Default, and Click Add

Note: Default test is – 67% read, 33% write, 2 KB, 100% Random non/sequential writes, Burst Length 1 I/O. This is fine for this brief guide and the sample results below use this. 

 

IOMeter

 

5a) Under ‘Results Display’ tab, under Update Frequency, set to 10 seconds

 

IOMeter5b) Under ‘Test Setup’ tab, set Run Time to 1 minute ( If bench-marking a SAN or Network drive I recommend doing it for 5 minutes for consistency. )

6) Clone Workers from the first page to the number of cores you have. (Ex. Quad Core = 4 workers)

 

7) The click the green flag to start the test, and choose a location to save the results….

Conclusion

Remember to benchmark often and always do a before and after you make any changes. This is imperative so you can see any performance gains or losses you might incur. There are many times I have been surprised by the results of switching hardware or simply testing older hardware to see how it is holding up. One thing is for certain, I haven’t found a freeware tool that is better than IOMeter in the past 15 years that I’ve been doing IT.

Leave any Questions and Comments below and I’ll get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

Linux Subsystem

Installing Linux Subsystem for Windows 10

Linux Subsystem Overview

The following video goes over installing Linux Subsystem on Windows 10. Most notably it allows you to run Linux terminal commands in Windows 10 without having a virtual machine or dual boot into a Linux operating system.

Enable Linux Subsystem Feature

cd ~
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Note: Perform in PowerShell

PowerShell Installation Method

Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing
Rename-Item -Path ~/Ubuntu.appx -NewName Ubuntu.zip
Expand-Archive ~/Ubuntu.zip ~/Ubuntu cd Ubuntu ./ubuntu.exe

Microsoft Store Installation Method

  • Open the Microsoft Store
  • Browse to Ubuntu-1604 and subsequently click the Install button

In Closing

The Linux Subsystem is a welcomed addition to Windows 10 because most things that come from the Microsoft store are garbage. Above all using this will give you the ability to check out and compile many GitHub projects. It is now one of the first options I enable when I do fresh installs of Windows 10 due to the fact Linux is not practical all the time.

Leave any Questions and Comments below and I’ll get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

Debloat Windows 10

Debloat Windows 10

Debloat Windows 10 Overview

Trying to Debloat Windows 10 is getting ridiculous and as a system admin it is soul crushing to see all that performance go to waste on the botched attempt by Microsoft to do an Appstore and its apps (I’m looking at you Candy Crush). Luckily some admins have worked tirelessly to give us a solution that works considerably well. Lets Start!

  • Right Click Windows Button ->Select Powershell Prompt (Admin) OR Select Command Prompt (Admin)
    • Note: If you don’t have PowerShell and only command prompt open command prompt (admin) and type “powershell
  • Change Execution policy to allow a debloat script to run in Powershell
    Set-ExecutionPolicy Unrestricted
  • Run the script from the following Github Repository. The person running this GitHub has been updating this script for a while and is a godsend. (Source: https://github.com/Sycnex/Windows10Debloater)
    Use Windows10Debloater.ps1from the location above

    • During installation select yes to debloat windows 10, select yes to remove OneDrive, and Yes to reboot after it finishes. Below is the image of performing these tasks.

The code below is the ps1 script and copied from the GitHub above on September 9th, 2018. I recommend you not to use this, but go directly to the GitHub above and download from there. It sees frequent updates and many things could have changed since this copy. 


#This function finds any AppX/AppXProvisioned package and uninstalls it, except for Freshpaint, Windows Calculator, Windows Store, and Windows Photos.
#Also, to note - This does NOT remove essential system services/software/etc such as .NET framework installations, Cortana, Edge, etc.

#no errors throughout
$ErrorActionPreference = 'silentlycontinue'

If (Test-Path "C:\Windows10Debloater") {
Write-Output "C:\Windows10Debloater exists. Skipping."
}
Else {
Write-Output "The folder 'C:\Windows10Debloater' doesn't exist. This folder will be used for storing logs created after the script runs. Creating now."
Start-Sleep 1
New-Item -Path "C:\Windows10Debloater" -ItemType Directory
}

Start-Transcript -OutputDirectory "C:\Windows10Debloater"

Add-Type -AssemblyName PresentationCore,PresentationFramework

Function Start-Debloat {

[CmdletBinding()]

Param()

#Removes AppxPackages
#Credit to /u/GavinEke for a modified version of my whitelist code
[regex]$WhitelistedApps = 'Microsoft.Paint3D|Microsoft.WindowsCalculator|Microsoft.WindowsStore|Microsoft.Windows.Photos|CanonicalGroupLimited.UbuntuonWindows|Microsoft.XboxGameCallableUI|Microsoft.XboxGamingOverlay|Microsoft.Xbox.TCUI|Microsoft.XboxGamingOverlay|Microsoft.XboxIdentityProvider|Microsoft.MicrosoftStickyNotes|Microsoft.MSPaint*'
Get-AppxPackage -AllUsers | Where-Object {$_.Name -NotMatch $WhitelistedApps} | Remove-AppxPackage
Get-AppxPackage | Where-Object {$_.Name -NotMatch $WhitelistedApps} | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -NotMatch $WhitelistedApps} | Remove-AppxProvisionedPackage -Online
}

Function Remove-Keys {

[CmdletBinding()]

Param()

#These are the registry keys that it will delete.

$Keys = @(

#Remove Background Tasks
"HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y"
"HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0"
"HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe"
"HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy"
"HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy"
"HKCR:\Extensions\ContractId\Windows.BackgroundTasks\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy"

#Windows File
"HKCR:\Extensions\ContractId\Windows.File\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0"

#Registry keys to delete if they aren't uninstalled by RemoveAppXPackage/RemoveAppXProvisionedPackage
"HKCR:\Extensions\ContractId\Windows.Launch\PackageId\46928bounde.EclipseManager_2.2.4.51_neutral__a5h4egax66k6y"
"HKCR:\Extensions\ContractId\Windows.Launch\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0"
"HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy"
"HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy"
"HKCR:\Extensions\ContractId\Windows.Launch\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy"

#Scheduled Tasks to delete
"HKCR:\Extensions\ContractId\Windows.PreInstalledConfigTask\PackageId\Microsoft.MicrosoftOfficeHub_17.7909.7600.0_x64__8wekyb3d8bbwe"

#Windows Protocol Keys
"HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0"
"HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.PPIProjection_10.0.15063.0_neutral_neutral_cw5n1h2txyewy"
"HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.15063.0.0_neutral_neutral_cw5n1h2txyewy"
"HKCR:\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.XboxGameCallableUI_1000.16299.15.0_neutral_neutral_cw5n1h2txyewy"

#Windows Share Target
"HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0"
)

#This writes the output of each key it is removing and also removes the keys listed above.
ForEach ($Key in $Keys) {
Write-Output "Removing $Key from registry"
Remove-Item $Key -Recurse
}
}

Function Protect-Privacy {

[CmdletBinding()]

Param()

#Disables Windows Feedback Experience
Write-Output "Disabling Windows Feedback Experience program"
$Advertising = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo"
If (Test-Path $Advertising) {
Set-ItemProperty $Advertising Enabled -Value 0
}

#Stops Cortana from being used as part of your Windows Search Function
Write-Output "Stopping Cortana from being used as part of your Windows Search Function"
$Search = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
If (Test-Path $Search) {
Set-ItemProperty $Search AllowCortana -Value 0
}

#Disables Web Search in Start Menu
Write-Output "Disabling Bing Search in Start Menu"
$WebSearch = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" BingSearchEnabled -Value 0
If (!(Test-Path $WebSearch)) {
New-Item $WebSearch
}
Set-ItemProperty $WebSearch DisableWebSearch -Value 1

#Stops the Windows Feedback Experience from sending anonymous data
Write-Output "Stopping the Windows Feedback Experience program"
$Period = "HKCU:\Software\Microsoft\Siuf\Rules"
If (!(Test-Path $Period)) {
New-Item $Period
}
Set-ItemProperty $Period PeriodInNanoSeconds -Value 0

#Prevents bloatware applications from returning and removes Start Menu suggestions
Write-Output "Adding Registry key to prevent bloatware apps from returning"
$registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
$registryOEM = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
If (!(Test-Path $registryPath)) {
New-Item $registryPath
}
Set-ItemProperty $registryPath DisableWindowsConsumerFeatures -Value 1

If (!(Test-Path $registryOEM)) {
New-Item $registryOEM
}
Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0
Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0
Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0
Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0

#Preping mixed Reality Portal for removal
Write-Output "Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings"
$Holo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Holographic"
If (Test-Path $Holo) {
Set-ItemProperty $Holo FirstRunSucceeded -Value 0
}

#Disables Wi-fi Sense
Write-Output "Disabling Wi-Fi Sense"
$WifiSense1 = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting"
$WifiSense2 = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots"
$WifiSense3 = "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config"
If (!(Test-Path $WifiSense1)) {
New-Item $WifiSense1
}
Set-ItemProperty $WifiSense1 Value -Value 0
If (!(Test-Path $WifiSense2)) {
New-Item $WifiSense2
}
Set-ItemProperty $WifiSense2 Value -Value 0
Set-ItemProperty $WifiSense3 AutoConnectAllowedOEM -Value 0

#Disables live tiles
Write-Output "Disabling live tiles"
$Live = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications"
If (!(Test-Path $Live)) {
New-Item $Live
}
Set-ItemProperty $Live NoTileApplicationNotification -Value 1

#Turns off Data Collection via the AllowTelemtry key by changing it to 0
Write-Output "Turning off Data Collection"
$DataCollection1 = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
$DataCollection2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection"
$DataCollection3 = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
If (Test-Path $DataCollection1) {
Set-ItemProperty $DataCollection1 AllowTelemetry -Value 0
}
If (Test-Path $DataCollection2) {
Set-ItemProperty $DataCollection2 AllowTelemetry -Value 0
}
If (Test-Path $DataCollection3) {
Set-ItemProperty $DataCollection3 AllowTelemetry -Value 0
}

#Disabling Location Tracking
Write-Output "Disabling Location Tracking"
$SensorState = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}"
$LocationConfig = "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration"
If (!(Test-Path $SensorState)) {
New-Item $SensorState
}
Set-ItemProperty $SensorState SensorPermissionState -Value 0
If (!(Test-Path $LocationConfig)) {
New-Item $LocationConfig
}
Set-ItemProperty $LocationConfig Status -Value 0

#Disables People icon on Taskbar
Write-Output "Disabling People icon on Taskbar"
$People = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People"
If (!(Test-Path $People)) {
New-Item $People
}
Set-ItemProperty $People PeopleBand -Value 0

#Disables scheduled tasks that are considered unnecessary
Write-Output "Disabling scheduled tasks"
Get-ScheduledTask XblGameSaveTaskLogon | Disable-ScheduledTask
Get-ScheduledTask XblGameSaveTask | Disable-ScheduledTask
Get-ScheduledTask Consolidator | Disable-ScheduledTask
Get-ScheduledTask UsbCeip | Disable-ScheduledTask
Get-ScheduledTask DmClient | Disable-ScheduledTask
Get-ScheduledTask DmClientOnScenarioDownload | Disable-ScheduledTask

Write-Output "Stopping and disabling WAP Push Service"
#Stop and disable WAP Push Service
Stop-Service "dmwappushservice"
Set-Service "dmwappushservice" -StartupType Disabled

Write-Output "Stopping and disabling Diagnostics Tracking Service"
#Disabling the Diagnostics Tracking Service
Stop-Service "DiagTrack"
Set-Service "DiagTrack" -StartupType Disabled
}

Function DisableCortana {
Write-Host "Disabling Cortana"
$Cortana1 = "HKCU:\SOFTWARE\Microsoft\Personalization\Settings"
$Cortana2 = "HKCU:\SOFTWARE\Microsoft\InputPersonalization"
$Cortana3 = "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore"
If (!(Test-Path $Cortana1)) {
New-Item $Cortana1
}
Set-ItemProperty $Cortana1 AcceptedPrivacyPolicy -Value 0
If (!(Test-Path $Cortana2)) {
New-Item $Cortana2
}
Set-ItemProperty $Cortana2 RestrictImplicitTextCollection -Value 1
Set-ItemProperty $Cortana2 RestrictImplicitInkCollection -Value 1
If (!(Test-Path $Cortana3)) {
New-Item $Cortana3
}
Set-ItemProperty $Cortana3 HarvestContacts -Value 0

}

Function EnableCortana {
Write-Host "Re-enabling Cortana"
$Cortana1 = "HKCU:\SOFTWARE\Microsoft\Personalization\Settings"
$Cortana2 = "HKCU:\SOFTWARE\Microsoft\InputPersonalization"
$Cortana3 = "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore"
If (!(Test-Path $Cortana1)) {
New-Item $Cortana1
}
Set-ItemProperty $Cortana1 AcceptedPrivacyPolicy -Value 1
If (!(Test-Path $Cortana2)) {
New-Item $Cortana2
}
Set-ItemProperty $Cortana2 RestrictImplicitTextCollection -Value 0
Set-ItemProperty $Cortana2 RestrictImplicitInkCollection -Value 0
If (!(Test-Path $Cortana3)) {
New-Item $Cortana3
}
Set-ItemProperty $Cortana3 HarvestContacts -Value 1
}

Function Stop-EdgePDF {

#Stops edge from taking over as the default .PDF viewer
Write-Output "Stopping Edge from taking over as the default .PDF viewer"
$NoPDF = "HKCR:\.pdf"
$NoProgids = "HKCR:\.pdf\OpenWithProgids"
$NoWithList = "HKCR:\.pdf\OpenWithList"
If (!(Get-ItemProperty $NoPDF NoOpenWith)) {
New-ItemProperty $NoPDF NoOpenWith
}
If (!(Get-ItemProperty $NoPDF NoStaticDefaultVerb)) {
New-ItemProperty $NoPDF NoStaticDefaultVerb
}
If (!(Get-ItemProperty $NoProgids NoOpenWith)) {
New-ItemProperty $NoProgids NoOpenWith
}
If (!(Get-ItemProperty $NoProgids NoStaticDefaultVerb)) {
New-ItemProperty $NoProgids NoStaticDefaultVerb
}
If (!(Get-ItemProperty $NoWithList NoOpenWith)) {
New-ItemProperty $NoWithList NoOpenWith
}
If (!(Get-ItemProperty $NoWithList NoStaticDefaultVerb)) {
New-ItemProperty $NoWithList NoStaticDefaultVerb
}

#Appends an underscore '_' to the Registry key for Edge
$Edge = "HKCR:\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723_"
If (Test-Path $Edge) {
Set-Item $Edge AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723_
}
}

Function Revert-Changes {

[CmdletBinding()]

Param()

#This function will revert the changes you made when running the Start-Debloat function.

#This line reinstalls all of the bloatware that was removed
Get-AppxPackage -AllUsers | ForEach {Add-AppxPackage -Verbose -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

#Tells Windows to enable your advertising information.
Write-Output "Re-enabling key to show advertisement information"
$Advertising = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo"
If (Test-Path $Advertising) {
Set-ItemProperty $Advertising Enabled -Value 1
}

#Enables Cortana to be used as part of your Windows Search Function
Write-Output "Re-enabling Cortana to be used in your Windows Search"
$Search = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
If (Test-Path $Search) {
Set-ItemProperty $Search AllowCortana -Value 1
}

#Re-enables the Windows Feedback Experience for sending anonymous data
Write-Output "Re-enabling Windows Feedback Experience"
$Period = "HKCU:\Software\Microsoft\Siuf\Rules"
If (!(Test-Path $Period)) {
New-Item $Period
}
Set-ItemProperty $Period PeriodInNanoSeconds -Value 1

#Enables bloatware applications
Write-Output "Adding Registry key to allow bloatware apps to return"
$registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
If (!(Test-Path $registryPath)) {
New-Item $registryPath
}
Set-ItemProperty $registryPath DisableWindowsConsumerFeatures -Value 0

#Changes Mixed Reality Portal Key 'FirstRunSucceeded' to 1
Write-Output "Setting Mixed Reality Portal value to 1"
$Holo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Holographic"
If (Test-Path $Holo) {
Set-ItemProperty $Holo FirstRunSucceeded -Value 1
}

#Re-enables live tiles
Write-Output "Enabling live tiles"
$Live = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications"
If (!(Test-Path $Live)) {
New-Item $Live
}
Set-ItemProperty $Live NoTileApplicationNotification -Value 0

#Re-enables data collection
Write-Output "Re-enabling data collection"
$DataCollection = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
If (!(Test-Path $DataCollection)) {
New-Item $DataCollection
}
Set-ItemProperty $DataCollection AllowTelemetry -Value 1

#Re-enables People Icon on Taskbar
Write-Output "Enabling People icon on Taskbar"
$People = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People"
If (!(Test-Path $People)) {
New-Item $People
}
Set-ItemProperty $People PeopleBand -Value 1

#Re-enables suggestions on start menu
Write-Output "Enabling suggestions on the Start Menu"
$Suggestions = "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
If (!(Test-Path $Suggestions)) {
New-Item $Suggestions
}
Set-ItemProperty $Suggestions SystemPaneSuggestionsEnabled -Value 1

#Re-enables scheduled tasks that were disabled when running the Debloat switch
Write-Output "Enabling scheduled tasks that were disabled"
Get-ScheduledTask XblGameSaveTaskLogon | Enable-ScheduledTask
Get-ScheduledTask XblGameSaveTask | Enable-ScheduledTask
Get-ScheduledTask Consolidator | Enable-ScheduledTask
Get-ScheduledTask UsbCeip | Enable-ScheduledTask
Get-ScheduledTask DmClient | Enable-ScheduledTask
Get-ScheduledTask DmClientOnScenarioDownload | Enable-ScheduledTask

Write-Output "Re-enabling and starting WAP Push Service"
#Enable and start WAP Push Service
Set-Service "dmwappushservice" -StartupType Automatic
Start-Service "dmwappushservice"

Write-Output "Re-enabling and starting the Diagnostics Tracking Service"
#Enabling the Diagnostics Tracking Service
Set-Service "DiagTrack" -StartupType Automatic
Start-Service "DiagTrack"
}

Function Enable-EdgePDF {
Write-Output "Setting Edge back to default"
$NoPDF = "HKCR:\.pdf"
$NoProgids = "HKCR:\.pdf\OpenWithProgids"
$NoWithList = "HKCR:\.pdf\OpenWithList"
#Sets edge back to default
If (Get-ItemProperty $NoPDF NoOpenWith) {
Remove-ItemProperty $NoPDF NoOpenWith
}
If (Get-ItemProperty $NoPDF NoStaticDefaultVerb) {
Remove-ItemProperty $NoPDF NoStaticDefaultVerb
}
If (Get-ItemProperty $NoProgids NoOpenWith) {
Remove-ItemProperty $NoProgids NoOpenWith
}
If (Get-ItemProperty $NoProgids NoStaticDefaultVerb) {
Remove-ItemProperty $NoProgids NoStaticDefaultVerb
}
If (Get-ItemProperty $NoWithList NoOpenWith) {
Remove-ItemProperty $NoWithList NoOpenWith
}
If (Get-ItemProperty $NoWithList NoStaticDefaultVerb) {
Remove-ItemProperty $NoWithList NoStaticDefaultVerb
}

#Removes an underscore '_' from the Registry key for Edge
$Edge2 = "HKCR:\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723_"
If (Test-Path $Edge2) {
Set-Item $Edge2 AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723
}
}

Function FixWhitelistedApps {

[CmdletBinding()]

Param()

If (!(Get-AppxPackage -AllUsers | Select Microsoft.Paint3D, Microsoft.WindowsCalculator, Microsoft.WindowsStore, Microsoft.Windows.Photos)) {

#Credit to abulgatz for these 4 lines of code
Get-AppxPackage -allusers Microsoft.Paint3D | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -allusers Microsoft.WindowsCalculator | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
}
}

Function UninstallOneDrive {

Write-Output "Uninstalling OneDrive"

New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
$onedrive = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe"
$ExplorerReg1 = "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
$ExplorerReg2 = "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
Stop-Process -Name "OneDrive*"
Start-Sleep 2
If (!(Test-Path $onedrive)) {
$onedrive = "$env:SYSTEMROOT\System32\OneDriveSetup.exe"
}
Start-Process $onedrive "/uninstall" -NoNewWindow -Wait
Start-Sleep 2
Write-Output "Stopping explorer"
Start-Sleep 1
.\taskkill.exe /F /IM explorer.exe
Start-Sleep 3
Write-Output "Removing leftover files"
Remove-Item "$env:USERPROFILE\OneDrive" -Force -Recurse
Remove-Item "$env:LOCALAPPDATA\Microsoft\OneDrive" -Force -Recurse
Remove-Item "$env:PROGRAMDATA\Microsoft OneDrive" -Force -Recurse
If (Test-Path "$env:SYSTEMDRIVE\OneDriveTemp") {
Remove-Item "$env:SYSTEMDRIVE\OneDriveTemp" -Force -Recurse
}
Write-Output "Removing OneDrive from windows explorer"
If (!(Test-Path $ExplorerReg1)) {
New-Item $ExplorerReg1
}
Set-ItemProperty $ExplorerReg1 System.IsPinnedToNameSpaceTree -Value 0
If (!(Test-Path $ExplorerReg2)) {
New-Item $ExplorerReg2
}
Set-ItemProperty $ExplorerReg2 System.IsPinnedToNameSpaceTree -Value 0
Write-Output "Restarting Explorer that was shut down before."
Start explorer.exe -NoNewWindow
}

#GUI prompt Debloat/Revert options and GUI variables
$Button = [Windows.MessageBoxButton]::YesNoCancel
$ErrorIco = [Windows.MessageBoxImage]::Error
$Warn = [Windows.MessageBoxImage]::Warning
$Ask = 'The following will allow you to either Debloat Windows 10 or to revert changes made after Debloating Windows 10.
Select "Yes" to Debloat Windows 10
Select "No" to Revert changes made by this script

Select "Cancel" to stop the script.'
$EdgePdf = "Do you want to stop edge from taking over as the default PDF viewer?"
$EdgePdf2 = "Do you want to revert changes that disabled Edge as the default PDF viewer?"
$Reboot = "For some of the changes to properly take effect it is recommended to reboot your machine. Would you like to restart?"
$OneDriveDelete = "Do you want to uninstall One Drive?"

$Prompt1 = [Windows.MessageBox]::Show($Ask,"Debloat or Revert",$Button,$ErrorIco)
Switch ($Prompt1) {
#This will debloat Windows 10
Yes {
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Output "Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
Start-Sleep 1
Write-Output "Uninstalling bloatware, please wait. The first step is to identify and remove them via a blacklist, and then to use the whitelist approach."
Start-Debloat
Write-Output "Bloatware removed."
Start-Sleep 1
Write-Output "Removing specific registry keys."
Remove-Keys
Write-Output "Leftover bloatware registry keys removed."
Start-Sleep 1
Write-Output "Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep 1
FixWhitelistedApps
Start-Sleep 1
Write-Output "Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep 1
DisableCortana
Write-Output "Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep 1
Write-Output "Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Output "Diagnostics Tracking Service disabled"
Start-Sleep 1
Write-Output "Disabling WAP push service"
Start-Sleep 1
DisableWAPPush
Write-Output "WAP push service stopped and disabled"
Start-Sleep 1; = $Debloat

$Prompt2 = [Windows.MessageBox]::Show($EdgePdf,"Edge PDF",$Button,$Warn)
Switch ($Prompt2) {
Yes {
Stop-EdgePDF
Write-Output "Edge will no longer take over as the default PDF viewer."; = $Yes
}
No {
= $No
}
Cancel {
Exit-PSSession
}
}
#Prompt asking to delete OneDrive
$Prompt3 = [Windows.MessageBox]::Show($OneDriveDelete,"Delete OneDrive",$Button,$ErrorIco)
Switch ($Prompt3) {
Yes {
UninstallOneDrive
Write-Output "OneDrive is now removed from the computer."; = $Yes
}
No {
= $No
}
Cancel {
Exit-PSSession
}
}
#Prompt asking if you'd like to reboot your machine
$Prompt4 = [Windows.MessageBox]::Show($Reboot,"Reboot",$Button,$Warn)
Switch ($Prompt4) {
Yes {
Write-Output "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Start-Sleep 1
Stop-Transcript
Write-Output "Initiating reboot."
Start-Sleep 2
Restart-Computer; = $Yes
}
No {
Write-Output "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Start-Sleep 1
Stop-Transcript
Write-Output "Script has finished. Exiting."
Start-Sleep 2
Exit; = $No
}
Cancel {
Exit-PSSession
}
}
}
No {
Write-Output "Reverting changes..."
Write-Output "Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the modification of specific registry keys."
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
Revert-Changes; = $Revert
#Prompt asking to revert edge changes as well
$Prompt5 = [Windows.MessageBox]::Show($EdgePdf2,"Revert Edge",$Button,$ErrorIco)
Switch ($Prompt5) {
Yes {
Enable-EdgePDF
Write-Output "Edge will no longer be disabled from being used as the default Edge PDF viewer."; = $Yes
}
No { = $No
}
Cancel {
Exit-PSSession
}
}
#Prompt asking if you'd like to reboot your machine
$Prompt6 = [Windows.MessageBox]::Show($Reboot,"Reboot",$Button,$Warn)
Switch ($Prompt6) {
Yes {
Write-Output "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Start-Sleep 1
Write-Output "Initiating reboot."
Stop-Transcript
Start-Sleep 2
Restart-Computer; = $Yes
}
No {
Write-Output "Unloading the HKCR drive..."
Remove-PSDrive HKCR
Start-Sleep 1
Write-Output "Script has finished. Exiting."
Stop-Transcript
Start-Sleep 2
Exit; = $No
}
Cancel {
Exit-PSSession
}
}
}
Cancel {
Exit-PSSession
}
}

Leave any Questions and Comments below and I will get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

System Reserved Partition

No System Reserved Partition, Boot device not found, corrupt BCD / MBR

System Reserved Partition Overview

This walkthrough shows you how to create a new System Reserved Partition and boot from an existing windows installation without reinstalling windows.

Recently I had an old server with a FAT32 system reserved partition and a bunch of extra partitions. I have already moved all the data off the server and it was ready for decommissioning. Before, I did this I wanted to go ahead and remove all these old partitions and just leave the C: Drive with the Windows installation then rebuild the System Reserved partition as NTFS as an exercise. Many backup programs have issues doing block level images with FAT32 partitions OR you need to do a physical to virtual setup. For me, I wanted to decommission the hardware but be able to spin up this server in a virtual environment if needed.

DO NOT ATTEMPT THIS IF YOU DON’T HAVE BACKUPS!!!!

Step 1: **Delete old partitions and create new ones**
  • Boot into your partition manager of choice (I used Parted Magic https://partedmagic.com/) – GParted
  • Delete extra partitions including the old FAT32 system partition (These all should be very small between 100 MB and up to 2 GB)
  • Create new NTFS partition with 512 MB of space and label it System Reserved
  • Shutdown
Step 2: **Setup Partitions with the correct drive letters**
  • Launch Windows 10 Install disc / usb
  • Shift+F10 once you see language select to bring up command prompt
  • Launch “DISKPART”
  • select volume with 512MB (ex: select vol 0)
  • assign letter=G: (or any letter that isn’t taken that is NOT C:)
  • exit OR If Windows operating system is NOT on C:
  • select volume with windows installation on it
  • assign letter=C:
  • exit

example output:

diskpart
select disk 0
list vol
select vol 0 <---500 MB Partition
assign letter=G:
select vol 1 <--- Large Partition with Windows Install on it
assign letter=C:
exit

Partitions are done – now time to fix problems with the “type” of partition – By forcing all paritions to be NTFS NT60

bootsect.exe /nt60 all /force
Step 3: Copy Boot Records, Fix MBR, and Rebuild BCD
  • Rebuild new system reserved partition with EFI and regular boot files
    • bcdboot c:\Windows /s <boot letter of System Reserved Partion>: /f ALL
bcdboot c:\Windows /s G: /f ALL
  • Now we can finally rebuild the bcd and master boot record like you see in so many online guides
  • You can verify the system is seeing the windows installation by doing a bootrec /scanos and then be running through the rest of the commands to do the rest of the repairs
bootrec /scanos <---Verify it sees the windows install
bootrec /fixmbr
bootrec /fixboot <----Pick the installation will mirror /scanos
bootrec /rebuildbcd
  • Reboot and you are done!

Leave any Questions and Comments below and I will get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

Spooler subsystem app

Spooler subsystem app high CPU usage on Windows 10

Spooler subsystem app Overview

Perform the following steps to solve the Spooler subsystem app high CPU usage. I recently updated a computer to Windows 10 and found that the spooler service was using a lot of resources.

The Solution

  • Open up command prompt as administrator and type the following

net stop spooler
del /Q /F /S "%systemroot%\System32\Spool\Printers\*.*"
net start spooler

Conclusion

Now check task manager again and verify the Spooler subsystem app is now at 0% usage. Alternatively, you can disable the spooler service in services (Start -> Run -> Type: services.msc) and this will make sure it doesn’t run, however, it also means you can’t print.

Leave any Questions and Comments below and I will get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

runasadmin

Launching a startup program to run as administrator

The following script shows you how to launch a startup program to run as administrator in Windows 10. This fixes many programs that require elevation and you don’t want to launch manually every time.

Almost every online tutorial I came across said to run it as a scheduled task. This is very cumbersome and I hate it. So here is another way to do it in far less time.

Create a Text file in shell:startup and put the following in it.

 Set WshShell = CreateObject("WScript.Shell" ) 
  WshShell.Run chr(34) & "C:\Program Files (x86)\File\Program.exe" & Chr(34), 0 
  Set WshShell = Nothing

Now save the file as ProgramName.vbs

You are done! Reboot and see that program launch.

iis rewrite

The Module DLL C:\WINDOWS\system32\inetsrv\rewrite.dll failed to load in Windows 10 IIS

This article shows you what to do if you get the rewrite.dll failed to load in Windows 10 event viewer.

Checked Event viewer when my website Showed up with
Service Unavailable 503 error
The Event Viewer Error was
The Module DLL C:\WINDOWS\system32\inetsrv\rewrite.dll failed to load
I went into Add/Remove Programs (Start -> Run-> appwiz.cpl) and simply repaired the following program
IIS Url Rewrite Module 2.0

Afterward, restart your WWW Service in services.msc and your website will now be working. If you are unable to repair the IIS rewrite module using Add/Remove Programs, you will need to redownload them from Microsoft.
IIS Url Rewrite Module 2.0 for Windows 10

Site Move from AWS – AMI Linux to IIS on Windows 10 AKA IIS 10

I just moved my site from AWS – Linux to a local Windows-based IIS install. Why you ask? Well my free 12 month micro AWS server is coming up on renewal and I don’t feel like paying for it. If you’re in the tech field, you probably see moving from Linux to IIS on a WordPress platform and immediately cringed.

The database migration from MySQL to MS SQL is actually pretty easy since you just push it through a large query, but I didn’t really want to mess with it, so I stuck with MySQL. With that down setting up IIS is also extremely simple now, which is quite surprising given how unfriendly IIS 6 was. The interface is pretty much the same, so you can do it the way you have always known, but now they have added multiple friendly tools in the form of Microsoft WebMatrix and Web Platform Installer. Using the Web Platform Install you can just select whatever install you want (WordPress for me), and click install. It grabs all the dependencies and installs them for you, and from here I had a fresh WordPress install.

I did a simple import and changed a couple of settings that were reset and was back up and running. Overall a simple migration, and pretty happy with IIS 10 (What happened to IIS 9 we will never know…)

Windows 10

Slim / Reduce Windows 10 Install

UPDATED POST https://www.christitus.com/2018/09/09/debloat-windows-10/ on a newer and improved way to debloat and slim Windows 10.

This following commands slim down and reduce windows 10 footprint. Removing bloatware and cleaning up your system from windows apps. Run Powershell as Administrator and run the following script to Slim down and speed up your Windows 10 Install.

NOTE: Get-AppxPackage -AllUsers line can be skiped if you want to keep Windows Store / Built-In Apps (Calculator / Bing News / Mail / etc.)

Get-AppxPackage -AllUsers | Remove-AppxPackage
Disable-ComputerRestore c:
Get-Childitem “C:WindowsLogsdosvc” | Remove-Item -Verbose
powercfg -h off
Cleanmgr.exe

Please note: The final command runs disk cleanup, this remove old update files and prior versions of windows. This can free up as much as 20 GB of space!