[SOLVED] CMD does not support UNC paths as current directories

If you try to cd to a network drive from the Windows CMD, you will get the following error:

CMD does not support UNC paths as current directories

Instead of cd command in CMD you can use a pushd command, that creates a drive mapping to the network share and then changes into a path relative to the share it creates.

In PowerShell you should be able to cd to a network drive without any errors as it natively supports UNC paths and the cd command.

In this small note i am showing how to cd to a network drive from the Windows CMD and fix the error: “CMD does not support UNC paths as current directories“. (more…)

PowerShell: Clear History of Previous Commands

This is not obvious, but the Clear-History command in PowerShell won’t clear the history of the previous commands.

The Clear-History clears only the commands entered during the current session, that could be displayed by the Get-History command.

To clear the history in PowerShell, it needs to delete the file in which the previous commands are stored.

In this note i am showing how to locate the history file and how to clear the history of the PowerShell commands. (more…)

Windows: PowerShell – Download File From URL

Windows PowerShell can be used for downloading files via HTTP and HTTPS protocols.

In PowerShell, as an alternative to the Linux curl and wget commands, there is an Invoke-WebRequest command, that can be used for downloading files from URLs.

In this note i am showing how to download a file from URL using the Invoke-WebRequest command in PowerShell, how to fix slow download speed and how to pass HTTP headers (e.g. API key) (more…)

Windows: Safe Mode – Start from Boot|Reboot & CMD

Safe Mode in Windows is a special diagnostic mode that allows to use Windows with basic drivers and can help to troubleshoot various problems.

Windows can be started in Safe Mode in different ways, depending on the OS version (Windows 10, 8, 7, XP) and the hardware vendor (Lenovo, DELL, HP, Asus, Acer).

In this note i am showing how to boot Windows 10, 8, 7, XP in Safe Mode from startup (cold boot) and how to restart it and boot it in Safe Mode from a login screen or directly from Windows.

I am also showing how to configure Windows to boot in Safe Mode from the command-line interface (CMD). (more…)

Windows: Start Service – CMD & PowerShell

The services in Windows can be started using the Service Manager tool.

To start the Service Manager GUI, press ⊞ Win keybutton to open the start menu, type in services to search for the Service Manager and press Enter to launch it.

The services can also be started using the command-line prompt (CMD) or the PowerShell.

In this note i am showing how to start, stop or check the status of a service in Windows using the command-line prompt (CMD) or the PowerShell. (more…)

Windows: List Services – CMD & PowerShell

The services in Windows can be listed using the Service Manager tool.

To start the Service Manager GUI, press ⊞ Win keybutton to open the “Start” menu, type in services to search for the Service Manager and press Enter to launch it.

The services can also be listed using the command-line prompt (CMD) or the PowerShell.

In this note i am showing how to list the services and how to search for a specific service in Windows using the command-line prompt (CMD) or the PowerShell. (more…)

Git – Verbose Mode: Debug Fatal Errors

Sometimes it may be complex to debug Git errors, like “fatal: repository not found” or “fatal: authentication failed” with the default level of verbosity in Git.

To debug different network, security, performance and many other issues in Git it is very helpful to know how to increase verbosity.

In this note i am showing how to debug Git issues from the command line by increasing verbosity of Git commands in Linux, MacOS and Windows. (more…)

Windows: TaskKill – Kill Process by PID, Name, Port – CMD

Sometimes when an application in Windows hangs, freezes and stops responding the only way to terminate it is to kill from the command-line.

The taskkill command in Windows serves for terminating tasks by name or by process id (PID).

In this note i am showing how to find and kill a process by its name or by PID and how to identify a process by the listening port.

I am also showing how to troubleshoot “The process could not be terminated” and “Access denied” errors. (more…)