Please note that the following PoSH commands won’t work on earlier versions of Windows (e.g. Windows Server 2016 release 1607)
$registryNotepad='REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Notepad'
$dwordMofifyEolPaste='fPasteOriginalEOL'
$dwordMofifyEolWindows='fWindowsOnlyEOL'
$enable=0
$disable=1
Set-ItemProperty -Path $registryNotepad -Name $dwordMofifyEolPaste -Value $enable
Set-ItemProperty -Path $registryNotepad -Name $dwordMofifyEolWindows -Value $enable
# Signout and back in to observe the difference
# Reverse the change
Remove-ItemProperty -Path $registryNotepad -Name $dwordMofifyEolPaste
Remove-ItemProperty -Path $registryNotepad -Name $dwordMofifyEolWindows
Categories: