windows – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Thu, 25 Aug 2022 10:20:15 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Clear the ASP.NET Temporary files in Windows https://tecadmin.net/how-to-clear-the-asp-net-temporary-files-in-windows/ https://tecadmin.net/how-to-clear-the-asp-net-temporary-files-in-windows/#respond Wed, 15 Jun 2022 08:34:14 +0000 https://tecadmin.net/?p=30063 Sometimes you may notice a strange caching behavior by the applications running in IIS. Today I found that my ASP.NET application showed a blank page. It is hosted on Windows Server 2019 in Azure Platform. I tried multiple times to resolve the issue but did not get success. After searching about the issue, I found [...]

The post How to Clear the ASP.NET Temporary files in Windows appeared first on TecAdmin.

]]>
Sometimes you may notice a strange caching behavior by the applications running in IIS. Today I found that my ASP.NET application showed a blank page. It is hosted on Windows Server 2019 in Azure Platform. I tried multiple times to resolve the issue but did not get success.

After searching about the issue, I found a suggestion in Google search to remove all ASP.NET temporary files. Once I removed all the temporary files, the application start working again.

Remove ASP.NET Temp Files in Windows

To clear the temporary files do the following on both the Web Server:

  1. Log in to the server and open IIS.
  2. Stop IIS service. Run “iisreset /stop” in the command prompt to stop the IIS service.
  3. Navigate to the below directories:
    • “C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\”
    • “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\”
  4. Remove all files under both directoires.
  5. Start IIS service. Run “iisreset /start” in the command prompt to stop the IIS service.

Wrap Up

Even you can remove the temporary file without stopping the IIS server. Hope this tutorial helps you to resolve the caching-related issue on your Windows server.

The post How to Clear the ASP.NET Temporary files in Windows appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-clear-the-asp-net-temporary-files-in-windows/feed/ 0
How to Enable / disable Firewall in Windows https://tecadmin.net/enable-disable-windows-firewall/ https://tecadmin.net/enable-disable-windows-firewall/#respond Mon, 16 May 2022 10:19:57 +0000 https://tecadmin.net/?p=29231 A firewall is a security application that prevents unauthorized users and secures your system. By default, the Firewall is installed on Windows systems. It is highly recommended to keep the Windows firewall active. You can allow access to any port or service with a firewall configuration. The latest Windows 8 and 8.1 systems have Windows [...]

The post How to Enable / disable Firewall in Windows appeared first on TecAdmin.

]]>
A firewall is a security application that prevents unauthorized users and secures your system. By default, the Firewall is installed on Windows systems. It is highly recommended to keep the Windows firewall active. You can allow access to any port or service with a firewall configuration.

The latest Windows 8 and 8.1 systems have Windows Firewall and the Windows 10 and above systems use Windows Defender Firewall. This tutorial is created on Windows 8.1, so the screenshots may differ for Windows 10 and above users.

Enable or Disable the Windows Firewall

Use the below steps to enable or disable a firewall on a Windows system.

  1. Search for the Windows firewall in the menu. The screen may differ as per the Windows version.
    How to Open Firewall Settings in Windows
    Open the firewall settings
  2. On this screen you will see the firewall is active or inactive. Under the left sidebar menu click “Turn Windows Firewall on of off”

    How to Enable Firewall in Windows
    Open Turn on/off settings
  3. Now, you can turn on or turn off the firewall for the private or public networks.
    • Private network settings: This will enable/disable firewall for the local area network (LAN).
    • Public network settings: Use this section to turn on/off access for public (Internet) users

    After selecting the appropriate option, click on the OK button.

    Enabling the Windows Firewall
    Enable or Disable Firewall
  4. All done. You can revert changes anytime with same steps

Wrap Up

Again we are advised to keep the firewall active on your system. This tutorial helped you to turn on/off the Windows firewall.

The post How to Enable / disable Firewall in Windows appeared first on TecAdmin.

]]>
https://tecadmin.net/enable-disable-windows-firewall/feed/ 0
How to Check Computer Uptime in Windows https://tecadmin.net/check-computer-uptime-in-windows/ https://tecadmin.net/check-computer-uptime-in-windows/#respond Wed, 04 Aug 2021 09:43:02 +0000 https://tecadmin.net/?p=27024 Computer Uptime refers to how long a system has been up and running without any shutdown or restart. The computer uptime helps us to find the last reboot of any system. This can be helpful in many ways like troubleshooting or scripting etc. In this tutorial, we will discuss three ways to check the uptime [...]

The post How to Check Computer Uptime in Windows appeared first on TecAdmin.

]]>
Computer Uptime refers to how long a system has been up and running without any shutdown or restart. The computer uptime helps us to find the last reboot of any system. This can be helpful in many ways like troubleshooting or scripting etc. In this tutorial, we will discuss three ways to check the uptime of any Windows machine or server.

1. How to Check Windows Uptime with Task Manager

A task manager is a computer program used for checking the process and services running and their details. You can also find details about the resource utilization like Memory and CPU uses at runtime. This is also a quick and preferred way for Windows users to find computer uptime.

  1. Log in to your Windows system.
  2. Right click on task bar and click on Task Manager to launch.
  3. Click “More details”, If the task manager opened in compact view.
  4. Go to Performance tab
  5. In CPU section, you will find computer uptime like below screenshot

Check Computer Uptime in Task Manager

As per the above screenshot, this computer is up from 33 Days and 33 minutes.

2. Check Computer Uptime with Command Prompt

You can also find the Windows uptime with the command-line options. Here we will discuss the two commands that provide the uptime details.

A. Using WMIC Command:

WMIC (Windows Management Interface Command), is a simple command-line utility that provides information about the running system. With the help of this command, we can find the last boot-up time.

wmic path Win32_OperatingSystem get LastBootUpTime

Check Computer Uptime in Command Prompt

B. Using systeminfo Command:

The systeminfo command displays a list of details about your operating system, computer software, and hardware components. You can also check for the value “System Boot Time” to get the computer uptime.

systeminfo | find "System Boot Time"

Check Windows Uptime in Command Prompt

3. How to Check Windows Uptime with PowerShell

Launch a Powershell window and type the below command to find the last reboot time of the current system.

Get-CimInstance -ClassName Win32_OperatingSystem | Select LastBootUpTime

Check Computer Uptime in PowerShell

You can also view the computer uptime in the number of days, hours, and minutes formats. Execute the below command and check the results.

(get-date) - (gcim Win32_OperatingSystem).LastBootUpTime

Check Windows Uptime in PowerShell

You can also store the output of the above commands to a variable. Which can be helpful for scripting purposes. The below command will store all values in the “uptime” variable.

$uptime = (get-date) - (gcim Win32_OperatingSystem).LastBootUpTime

Next, extract the specific values only and print them on the screen.

Write-Output "The Windows Uptime is >> $($uptime.days) Days, $($uptime.Hours) Hours and $($uptime.Minutes) Minutes"
Output:
The Windows Uptime is >> 35 Days, 12 Hours and 46 Minutes

Conclusion

In this tutorial, you have learned various methods for checking Windows uptime. This guide covers the 3 methods like Task manager, command prompt, and PowerShell to get computer uptime.

The post How to Check Computer Uptime in Windows appeared first on TecAdmin.

]]>
https://tecadmin.net/check-computer-uptime-in-windows/feed/ 0
How To Enable Multiple RDP Sessions on Windows Server https://tecadmin.net/how-to-enable-multiple-rdp-sessions-on-windows-server/ https://tecadmin.net/how-to-enable-multiple-rdp-sessions-on-windows-server/#comments Tue, 20 Jul 2021 12:05:34 +0000 https://tecadmin.net/?p=26562 Remote Desktop Protocol (RDP) is a protocol developed by Microsoft, that allows a user to access remote systems graphically. The default Windows servers allow only one remote desktop session at a time. But, in some cases, we are required to enable remote desktops for multiple users to allow access at a time. You can achieve [...]

The post How To Enable Multiple RDP Sessions on Windows Server appeared first on TecAdmin.

]]>
Remote Desktop Protocol (RDP) is a protocol developed by Microsoft, that allows a user to access remote systems graphically. The default Windows servers allow only one remote desktop session at a time. But, in some cases, we are required to enable remote desktops for multiple users to allow access at a time.

You can achieve this by making little changes to the system registry keys. Once the changes are done, multiple users can connect to your system using the RDP client. You can also limit the number of users who can connect at a time.

In this tutorial, we will discuss enabling and disabling multiple remote desktop sessions in Windows servers in 2012, 2012 R2, 2016, 2019 and 2022.

Enable Multiple RDP Sessions

Follow the below steps to enable multiple remote desktop sessions on a Windows system.

  1. Log in to the Windows system.
  2. Open the start screen (press the Windows key) and type “Edit group policy” or “gpedit.msc”, and launch it.
  3. Navigate to Computer Configuration >> Administrative Templates >> Windows Components >> Remote Desktop Services >> Remote Desktop Session Host >> Connections.
  4. Double click on “Set Restrict Remote Desktop Services user to a single Remote Desktop Services session and set this to Disabled.
  5. Next, double click on “Limit number of connections” and set the RD Maximum Connections allowed to 999999. But, just use 2 sessions that is free with Windows license but to allow more than 2 session required CAL license.

Below is the screenshots of changes being made:

Open Group Policy Editor on Windows

Edit disable restrict remote desktop users

Disable restrict remote desktop users

Edit limit RDP connections  settings

Set maximum allows connection for RDP

Disable Multiple RDP Sessions

To disbale the multiple remote desktop sessions, follow below instructions:

  1. Log in to the Windows system.
  2. Open the start screen (press the Windows key) and type “Edit group policy” or “gpedit.msc”, and launch it.
  3. Navigate to Computer Configuration >> Administrative Templates >> Windows Components >> Remote Desktop Services >> Remote Desktop Session Host >> Connections.
  4. Double click on “Set Restrict Remote Desktop Services user to a single Remote Desktop Services session and set this to “Enabled.

Wrap Up

This tutorial helped you to enable for disable multiple remote desktop sessions on a single Windows system. That is useful for the teams working on the same remote systems.

The post How To Enable Multiple RDP Sessions on Windows Server appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-enable-multiple-rdp-sessions-on-windows-server/feed/ 7
How To Change User Password in Windows Server 2019 https://tecadmin.net/how-to-change-user-password-in-windows-server-2019/ https://tecadmin.net/how-to-change-user-password-in-windows-server-2019/#respond Tue, 01 Jun 2021 09:59:42 +0000 https://tecadmin.net/?p=26394 Changing password at a regular interval is a good practice for all system administrators. In this production environment, change the password at least every 3 months and for other environments do it every 6 to 12 months. In this tutorial, we will explain the steps to change a user’s password in Windows Server 2019. Prerequisites [...]

The post How To Change User Password in Windows Server 2019 appeared first on TecAdmin.

]]>
Changing password at a regular interval is a good practice for all system administrators. In this production environment, change the password at least every 3 months and for other environments do it every 6 to 12 months. In this tutorial, we will explain the steps to change a user’s password in Windows Server 2019.

Prerequisites

Log in as an Administrator account to your Windows Server 2019 system.

Change User Password in Windows Server 2019

Let’s follow the below steps to change a user’s password in Windows Server 2019.

  1. Search for the system Control Panel and launch it.

    Open Control Panel in Windows Server 2019

  2. Under the User accounts click “Change account type” link:
    Open Accounts in Windows Server 2019

  3. You will see a list of all user accounts. Select the user account, you need to change the password.

    Select Account to Change password in Windows Server 2019

  4. Make sure the correct account is selected. Now click on the “Change the password” link.

    Change users password in Windows Server 2019

  5. Enter your current user password, then provide a new password to set for the user. Make sure you have noted this password in a safe place. Now click on the “Change password” button.

    Set a new password for user in Windows Server 2019

Conclusion

Congratulations, You have successfully changed the password of a user in Windows Server 2019.

The post How To Change User Password in Windows Server 2019 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-change-user-password-in-windows-server-2019/feed/ 0
Which Process is Listening on a Port in Windows https://tecadmin.net/which-process-is-listening-on-a-port-in-windows/ https://tecadmin.net/which-process-is-listening-on-a-port-in-windows/#comments Wed, 28 Oct 2020 15:27:07 +0000 https://tecadmin.net/?p=23367 How do I find, which process is listening on a specific port on the Windows operating system? This article will help you to find the process name listening on a specific port on a Windows system. Sometimes you may have faced issues like “port in use” during application installation. You can choose one of the [...]

The post Which Process is Listening on a Port in Windows appeared first on TecAdmin.

]]>
How do I find, which process is listening on a specific port on the Windows operating system?

This article will help you to find the process name listening on a specific port on a Windows system. Sometimes you may have faced issues like “port in use” during application installation.

You can choose one of the below given 2 methods. The first method uses netstat to find the PID of the process listening on a specific port, then use tasklist to find the process name by the PID.

Method 1. Using Default Command Prompt

Use the following command to find out the process id (PID) listening on port 80. You can change this port to search for another port.

netstat -aon | findstr ":80" | findstr "LISTENING" 
Output:
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 TCP [::]:80 [::]:0 LISTENING 4

The last column of the output shows the PID of the processes. The above output shows the PID is 4 for the process listening on port 80.

Use this process id with the task list command to find the process name.

tasklist /fi "pid eq 4" 

You will see the process name in the results.

Which Process is Listening on a Port in Windows
Finding the process listening on specific port in Windows

Method 2. Using Get-Process in PowerShell

The second method uses the PowerShell command to find out the process running on a specific port on Windows.

Launch the PowerShell terminal and execute the following command to find the process name running on port 80. You can change the port number to check for other ports.

Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess 

You will see the process name in the results.

How to Check Process Name by Port in PowerShell
Checking the process name running on specific port

Conclusion

In this tutorial, you have learned two methods to find process name listening on a specific port on a Windows system.

The post Which Process is Listening on a Port in Windows appeared first on TecAdmin.

]]>
https://tecadmin.net/which-process-is-listening-on-a-port-in-windows/feed/ 1
How to Install Node.js on Windows 10 https://tecadmin.net/install-nodejs-on-windows-10/ https://tecadmin.net/install-nodejs-on-windows-10/#respond Thu, 17 Sep 2020 17:06:43 +0000 https://tecadmin.net/?p=22706 Node.js is an open-source JavaScript runtime environment. It allows to run JavaScript outside a web browser. This tutorial will help you to install Node.js on your Windows system. Installing Node on Windows Following are the steps to install Node on Windows system. Download Node.js Installer You can downlod the Node Windows installer from its official [...]

The post How to Install Node.js on Windows 10 appeared first on TecAdmin.

]]>
Node.js is an open-source JavaScript runtime environment. It allows to run JavaScript outside a web browser. This tutorial will help you to install Node.js on your Windows system.

Installing Node on Windows

Following are the steps to install Node on Windows system.

  1. Download Node.js Installer

    You can downlod the Node Windows installer from its official download page. Download the installer as per your system architecture.

    Download Node.js for Windows

  2. Run Installer

    Once the installed downloaded, double click on installer file to begin the installation process. Click Next to continue installer.

    Install Node on Windows

    Next, accept the terms of license agreement and click next to continue installation.

    Installing nodejs windows

    Complete the rest of the steps of the installation wizard.

    The installer will automatically configure the required environment variables for the node binary to your system..

Test Node Version

The above installer do all the required steps to run node on command line interface. You can check the installed node and npm version via command line.

Open a terminal and type the following commands:

node -v
npm -v

Find Node version on Winodws

Conclusion

In this tutorial, you have learned to install node on a Windows system.

The post How to Install Node.js on Windows 10 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-nodejs-on-windows-10/feed/ 0
Automatically Log off Disconnected User Sessions on Windows https://tecadmin.net/windows-logoff-disconnected-sessions/ https://tecadmin.net/windows-logoff-disconnected-sessions/#comments Sun, 15 Dec 2019 10:00:15 +0000 https://tecadmin.net/?p=20001 Many times users connect to remote Windows systems, do work, and close the remote session without properly logging off the account. In that case, multiple applications, which are still running with that login session use system resources. Sometimes it causes a slow response of our servers and creates pain for us. So this will be [...]

The post Automatically Log off Disconnected User Sessions on Windows appeared first on TecAdmin.

]]>
Many times users connect to remote Windows systems, do work, and close the remote session without properly logging off the account. In that case, multiple applications, which are still running with that login session use system resources. Sometimes it causes a slow response of our servers and creates pain for us. So this will be good to auto log off disconnected sessions from the Windows system.

This tutorial will help you to log all the disconnected remote sessions on the Windows system. This tutorial has been tested with Windows Server 2019.

Setup Auto Log Off Disconnected Sessions

We are making changes in the Local group policy of systems. So be careful with the changes.

First of all, open the ‘Group Policy Editor‘ on your server. Start run window by pressing “Win + R” and type gpedit.msc on run window.

Automatically Log off Disconnected User Sessions on Windows

The local group policy editor will be opened on your system. Then navigate to the following location as the below-given instructions:

  Local Computer Policy 
   =>  Computer Configuration 
     =>  Administrative Templates 
	=>  Windows Components 
          =>  Remote Desktop Services 
            =>  Remote Desktop Session Host 
              =>  Session Time Limits

Windows remote session timeout limit

You will find a list of options on the right side. Then Double click on “Set time limit for disconnected sessions” to open it.

Logout the Disconnected User Sessions in Windows

By default, it is set to the ‘Not configured’. Change this to ‘Enabled’. Now you will see the option “End a disconnected session” on the lower-left side. Set this value to the desired time. I have set this to 1 hour, so any disconnected user is logged off after 1 hour.

Conclusion

In this tutorial, you have learned to configure your Windows system to auto log out disconnected remote sessions.

The post Automatically Log off Disconnected User Sessions on Windows appeared first on TecAdmin.

]]>
https://tecadmin.net/windows-logoff-disconnected-sessions/feed/ 9
How to Install Windows Service via Command Line https://tecadmin.net/install-windows-service-via-command-line/ https://tecadmin.net/install-windows-service-via-command-line/#respond Sat, 07 Sep 2019 07:09:16 +0000 https://tecadmin.net/?p=19713 The .net framework provides and command-line installer utility for installing services on the Windows system. You can use installutil.exe to install the Windows service via the command line. For .net 4 framework it’s available under C:\Windows\Microsoft.NET\Framework\v4.0.30319 directory. How to Install Windows Service First of all, navigate to the .net framework directory and then run installutil.exe [...]

The post How to Install Windows Service via Command Line appeared first on TecAdmin.

]]>
The .net framework provides and command-line installer utility for installing services on the Windows system. You can use installutil.exe to install the Windows service via the command line. For .net 4 framework it’s available under C:\Windows\Microsoft.NET\Framework\v4.0.30319 directory.

How to Install Windows Service

First of all, navigate to the .net framework directory and then run installutil.exe followed by the Windows server exe file path.

cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319\" 
installutil.exe 
 C:\Users\Rahul\WindowsService\bin\Debug\WindowsService.exe" 

This will install service on your system. In case it prompts for the authentication, Input the username, and password of your Windows system. Remember the user name must start with “.\” followed by username as shown in the below screen.

See the onscreen messages and check if the command successfully completed.

How to Uninstall Windows Service

To Uninstall the Windows service using “-u” option with the same command as installation. The command to uninstall the service looks like the below:

cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319\" 
installutil.exe -u "C:\Users\Rahul\WindowsService\bin\Debug\WindowsService.exe" 

Conclusion

This tutorial helped you to install the service on the Windows system using the command prompt. Also provides you instructions to delete existing services. Next, you may like to read about managing Windows service via command line.

The post How to Install Windows Service via Command Line appeared first on TecAdmin.

]]>
https://tecadmin.net/install-windows-service-via-command-line/feed/ 0
How to Set Up Auto-Login for Windows 8/8.1 https://tecadmin.net/auto-login-windows-8/ https://tecadmin.net/auto-login-windows-8/#respond Sun, 30 Jun 2019 07:59:57 +0000 https://tecadmin.net/?p=19159 The login screen provides additional security for your system from unauthorized access. We do not recommend this until specifically required. This tutorial helps you to set up Windows 8/8.1 log automatically on system startup, even if the user account is password protected. Configure Auto-Login for Windows Here are the steps to enable auto login for [...]

The post How to Set Up Auto-Login for Windows 8/8.1 appeared first on TecAdmin.

]]>
The login screen provides additional security for your system from unauthorized access. We do not recommend this until specifically required. This tutorial helps you to set up Windows 8/8.1 log automatically on system startup, even if the user account is password protected.

Configure Auto-Login for Windows

Here are the steps to enable auto login for Windows 8 and 8.1.

Step 1 – Launch run window (WINDOW + R) and type netplwiz and press Enter key. This will open the user accounts window.

windows 8 autologin

Step 2 – You will see the list of account. Select the account you want to enable auto-login and then uncheck the box before “Users must enter a username and password to use this computer” and click OK. See the below screenshot:

autologin windows 8

Step 3 – Now this will prompt the username and password of the account you’d like to automatically log in. Click OK to apply changes.

signin windows 8 automatically on start

Reboot your Window 8/8.1 system and test if the account is automatically logged in after the reboot.

All done.

The post How to Set Up Auto-Login for Windows 8/8.1 appeared first on TecAdmin.

]]>
https://tecadmin.net/auto-login-windows-8/feed/ 0