UPDATE:
Based on Sundaresan's comment below, resolved the issue via create another branch by eliminating the deleted user.
You can try below ways to unlock the file:
To use the lock command, you must have the Lock permission set to
Allow. Having the Unlock other user's changes permission set to Allow
is required to remove a lock held by another user if you do not have
Write permission for that user's workspace
tf lock /lock:none /workspace:workspacename [/recursive][/login:username,[password]] [/collection:TeamProjectCollectionUrl]
UPDATE:
In your case please try below command: (According to the error message,the file is locked in workspace NCWS054 and Suganth, So, you need to unlock in both workspace)
tf lock /lock:none /workspace:NCWS054 $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js /login:Domain\user,password /collection:http://servername:8080/tfs/DefaultCollection
tf undo
The undo command removes any locks on the items. See Undo command
To unlock individual files run the command below in Visual Studio Command Prompt:
tf undo "file_path" /workspace:workspace_name
e.g.:
tf undo $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js /workspace:NCWS054
To unlock the whole folder in one shot:
tf undo $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/* /workspace:NCWS054
here it will unlock all files which is inside ControlPanel folder.
UPDATE:
In your case, if it is a remote workspace, please try below command:
tf undo /collection:http://servername:8080/tfs/DefaultCollection /workspace:NCWS054;workspaceOwner $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js
You can also unlock other users file using TFS Sidekick tools:
It gives you a graphical interface to do all these commands, which makes it much easier to perform these tasks.
You can also reference this thread: How to unlock a file from someone else in Team Foundation Server