Show Computer Name in the Taskbar

3.5
(2)

Display computer name right in the taskbar

Helpdesk and support administrators have to know on which computer the employee is currently working on. Windows does not display the Computer name on desktop, it’s need for a trip to the system settings, or you have to typing commands in the prompt.

Add computer names in taskbar

An easy way to display computer names in the taskbar is to create a new toolbar, but before that a folder must be created, which is created by run the following command in a command prompt opened with Win+Rcmd.

mkdir %APPDATA%\%COMPUTERNAME%

Now click the right mouse button in the taskbar and choose Toolbars here select New toolbar…

Computer Name in the Taskbar

In the address field enter %APPDATA% as the path and select the folder with the computer name in Choose a folder window, now click the Select Folder button.

Now the computer name appears already in the taskbar. If the taskbar is not fixed, fix taskbar with right-click. The toolbar with the computer name can now be brought to the desired position.

Status information in netlogon script

In addition, status information about the authenticated user can be displayed with computer name in the taskbar. Insert the following lines into a batch file and call them in the netlogon script.

@echo off
IF NOT EXIST %APPDATA%\%COMPUTERNAME%\ (
mkdir %APPDATA%\%COMPUTERNAME%
) ELSE (
echo Directory %COMPUTERNAME% exist
)
PowerShell -ExecutionPolicy Unrestricted -Command "Get-NetIPAddress | Select-Object InterfaceIndex,InterfaceAlias,IPAddress | Sort-Object -Property InterfaceIndex | Out-File -FilePath $env:APPDATA\$env:COMPUTERNAME\$env:USERNAME.txt"
PowerShell -ExecutionPolicy Unrestricted -Command "Get-PSDrive | Where {$_.Free -gt 0} | Out-File -Append -FilePath $env:APPDATA\$env:COMPUTERNAME\$env:USERNAME.txt"
wmic useraccount where (name='%username%' and domain='%userdomain%') get domain,name,sid >> %APPDATA%\%COMPUTERNAME%\%USERNAME%.txt

$env:APPDATA\$env:COMPUTERNAME

A PowerShell Script Set-StatusToolbar.ps1 creates the directory and file identical to the batch above.

$DirToCreate="$env:APPDATA\$env:COMPUTERNAME"
if (!(Test-Path $DirToCreate -PathType Container)) {
New-Item -ItemType Directory -Force -Path $DirToCreate
}
$ifcfg=(Get-NetIPAddress | Select-Object InterfaceIndex,InterfaceAlias,IPAddress | Sort-Object -Property InterfaceIndex);
$drive=(Get-PSDrive | Where {$_.Free -gt 0});
$usrid=([wmi] "win32_userAccount.Domain='$env:UserDomain',Name='$env:UserName'");
$ifcfg | Out-File -FilePath $env:APPDATA\$env:COMPUTERNAME\$env:USERNAME.txt
$drive | Out-File -Append -FilePath $env:APPDATA\$env:COMPUTERNAME\$env:USERNAME.txt
$usrid | Out-File -Append -FilePath $env:APPDATA\$env:COMPUTERNAME\$env:USERNAME.txt

Run the PowerShell script .\Set-StatusToolbar.ps1

This post shows how helpdesk and support administrators can quickly see at a glance which is the computer name that the user is currently working on. Windows does not intend to display the computer name on the desktop or taskbar. You must first go to System settings or type commands in command prompt to find out what the computer is called. With this easy solution, the computer name can be known instantly without any clicks.

Wie hilfreich war dieser Beitrag?

Klicke auf die Sterne um zu bewerten!

Durchschnittliche Bewertung 3.5 / 5. Anzahl Bewertungen: 2

Bisher keine Bewertungen! Sei der Erste, der diesen Beitrag bewertet.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert