Category Archives: Tips & Tricks
Using OpenSSH and SSH on Windows
Secure Shell software allowing connections between clients and servers for remote administration.
Related Powershell Commands:
Check the installation status
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
Start the service
Start-Service sshd
Change the service startup behaviour
Set-Service -Name sshd -StartupType 'Automatic'
Add/Install the service
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Useful Commands to show the logged in user account etc:
tasklist /s <pcname> /fi "imagename eq explorer.exe" /v
wmic /node: <pcname> computersystem get username
wmic /node: <pcname> computersystem get manufacturer, model, username
Or locally:
wmic computersystem get manufacturer, model, username
Change the Network Hostname (Requires Admin account)
Using CMD
wmic computersystem where name="%COMPUTERNAME%" rename "NewName"
Use Powershell and CMD to switch between sessions on either command line
Using Powershell
Rename-Computer "NewName" -Restart
Windows cURL on the command line
Command line and scripting tool for transferring data with URLs see the website Curl.se
curl -L -A "Mozilla" http://website.com
This follows re-directs and uses a dummy header to anticipate 406 Not Acceptable errors then returns the page content, you can use a full header string to represent other browsers
This YouTube video is presented by the cURL creator
Clearing & formatting a drive from the command line using Diskpart
Run diskpart from the Commmand prompt – Run CMD from the Start Menu or Run dialogue box using WinKey + R to get to the command prompt
Then use the commands below in sequence within the diskpart interface
list disk
select disk [#] (adding the reference number from the list command above)
clean (permanent delete content)
create partition primary
format fs=ntfs
assign (gives a drive letter – unspecified)
exit to leave diskpart
Managing Windows Device Drivers with Powershell
Exporting the third party device drivers from your running windows installation.
Export-WindowsDriver -online -Destination D:\path\folder
Exporting the third party device drivers from a windows image
Export-WindowsDriver -Path E:\ -Destination D:\path\folder
Add all device drivers from folder tree to a windows image
Add-WindowsDriver -Path "E:\offline" -Driver "D:\drivers" -Recurse
Add an unsigned device driver to a windows image
Add-WindowsDriver -Path "E:\offline" -Driver "D:\driver.inf" -ForceUnsigned
Microsoft Outlook failing to open
There’s a repair option available from the control panel programs & features dialogue or the Apps panel from settings in later versions of Windows.
Install Windows 11 without a Microsoft Account
Command used: ‘OOBE\BYPASSNRO‘
Open YouTube and Skip to main instructions: https://youtu.be/qUO6_hHnBAg?t=121
Checking Windows License Activation Status
To verify the license type on your Windows PC use the following command from the command line.
slmgr.vbs /dli
This will indicate the product edition and distribution type VOLUME for a company bulk licence OEM for a manufacturers or RETAIL if user purchased. Click for further information on the command
Windows Update Problem 20H2 on HP legacy machines
During the course of 2021 as several machines updated to Windows 10 Version 202H2 both 32 bit and 64 bit they demonstrated catastrophic failures that mimicked other problems. These included Windows displaying a BSOD. Message ‘BAD SYSTEM CONFIG INFO’ refering to log files at ‘c:\windows\system32\logfiles\srt\SrtTrail.txt’. Other messages would be typical of those displayed when hard drives are really failing. After running automatic repair and disk checking – they would then repeat the process. The machines would re-boot repeatedly. Attempts to use the self-repair options or Windows boot drives would lead to User accounts disappearing from the options and failure to find Restore points (if available). One machine would lock on the dark start-up screen many times, then would successfully boot and run for days as long as it wasn’t powered down. Another machine was running normally then Outlook 2019 ‘disappeared’ before the machine started cycling through the other symptoms.
Machines affected included: HP dc7900, HP dc8200.
The resolution to all this, so far, was Windows 21H1 either by fresh installation or using the Windows update assistant if the machine was capable of running it.