VIM and Powershell
I love Powershell, but a feature that seems ‘missing’ or not so well developed seems to be inline editing. Like, you know in Linux, you use nano or emacs or vim. Luckily, there is vim for Windows!
All you need to do is download the executable and move it in you ‘Windows/System32’ folder and you can use it like you are used ti from Linux.
So let’s say you want to to edit your Powershellprofile?
vim $profile
let’s you edit it in the Powershell console.
Really been missing an inline editor!
Sure you can just do this:
explorer $profile
However editing files inline with the power of vim, it’s fantastic!
Coffee…
Disable UAC with Powershell
The User Account Control (UAC) is an important security feature of Windows. Yet setting up a server, clicking a gazillion times on the silly UAC prompt, is VERY frustrating.
Let’s turn it off until we are done, and then turn it back on.
Clear-Host $reg = Get-ItemProperty HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system\ $UAC = $reg.EnableLUA switch ($UAC){ 1 { $disableuac = Read-Host "UAC is enabled, do you want to disable it? [Y/N]" if($disableuac -eq 'Y' -or $disableuac -eq 'y'){ New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 0 -Force $reboot = Read-Host "For this change to take effect you have to reboot. Reboot now? [Y/N]" if($reboot -eq 'Y' -or $reboot -eq 'y'){ restart-computer -Force }else{ Write-Output "Reboot later." }} } 0 {$enableuac = Read-Host "UAC is disabled, do you want to enable it? [Y/N]" if($enbleuac -eq 'Y' -or $enableuac -eq 'y'){ New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 1 -Force $reboot = Read-Host "For this change to take effect you have to reboot. Reboot now? [Y/N]" if($reboot -eq 'Y' -or $reboot -eq 'y'){ restart-computer -Force }else{ Write-Output "Reboot later." }} } default {Write-Output "Oops, something went wrong"} }
[table id=2 /]
CompTIA Cloud+
VCP6-DCV
Some quick news, I passed last week the VCP6 Delta exam, so I am officially VCP6-DCV certified. Hooray.