Questions tagged [windows-command-prompt]

Refers to the default CLI that ships with all versions of Windows, often shortened to just "command prompt" or cmd (after the file name of the executable).

Refers to the default CLI that ships with all versions of Windows, often shortened to just "command prompt" or cmd (after the file name of the executable).

383 questions
6
votes
3 answers

How to Run multiple command remotely using PSEXEC?

I am try to use multiple command with psexec tools but i am only remotely entered in that computer but it won't be perform another command psexec -i \\192.168.30.135 -u username -p password cmd & del abc.exe by using this command line parameter i…
Giriraj
  • 61
  • 1
  • 1
  • 3
6
votes
6 answers

How do I monitor who's logged in?

We in our department are implementing a new admin policy: everyone in a department which we support will receive admin access to their computers. We need to know (while we are performing this "pilot program" policy on this department) who logged in,…
6
votes
3 answers

Win7 command processor (CMD.EXE) really slow

Does it seem to anyone else that the Windows 7 command processor (CMD.EXE) is really slow starting up? I ran this test from a command line (ntimer is a timing utility from the Windows server resource kit and you can just leave it out if you don't…
Scott Bussinger
  • 1,801
  • 4
  • 24
  • 27
6
votes
1 answer

What happens when you type Exit in the CMD window on Server Core in an RDP session

I'm getting used to Server Core and I know at some point I am going to type "Exit" in the command window while connected through a remote desktop session. I know that if this is done while connected to the local console, you can press Ctl-Alt-Del to…
Richard West
  • 2,978
  • 12
  • 44
  • 49
6
votes
1 answer

Looking to add the "Log On as a service" right to an account via the command line

I am looking to make a user from the command line with minimal rights to run a service. cmd.exe or powershell.exe are both options, but cmd.exe is preferable. So far I got this: net user /add testUser227e5910-d1ac-11df-bd3b-0800200c9a66 net…
Justin Dearing
  • 1,037
  • 12
  • 33
5
votes
3 answers

Copy windows shared file from cmd

Is there a downloading tool that supports Windows Shared files and works from command line? Standard copy is getting hanged with no action on my side. Tried wget but seems it doesn't 'eat' the link.
Bogdan Gusiev
  • 593
  • 2
  • 6
  • 9
5
votes
2 answers

Using "sc" command to control services with whitespace in name

I need to stop service on remote machine. The problem is that service name contains whitespaces, and I get a message, that such service does not exist. sc \\machine stop "service name" How can I fix it? Thanks
Timofei Davydik
  • 153
  • 1
  • 1
  • 5
5
votes
2 answers

Difference between UnxUtils and GNU CoreUtils

I am a Windows user who wants programs like grep and sed along with other utilities like ls, cut etc in my command prompt. I came across 2 packages which would accomplish this UnxUtils GNU Coreutils I would like to know what is the difference…
5
votes
3 answers

Windows Server 2008 - Calling FTP from .CMD - Pass a parameter to an FTP file?

I am calling the following from a .cmd file: ftp -d -s:D:\backup\web-daily.txt The web-daily.txt file is an ftp input file with similar contents to this: open put d:\backup\web-daily.7z web-daily.7z quit I need to be…
5
votes
2 answers

How to enable ANSI escape codes in Windows cmd?

What is the simplest way to enable ANSI escape codes (eg. colored output) in Windows cmd?
Jakub Arnold
  • 1,744
  • 10
  • 26
  • 33
4
votes
1 answer

Get PowerShell command output as a variable in bat (cmd) script

I'm trying to get FQDN of a host in some .cmd file. We have disjointed AD domain so "@echo %COMPUTERNAME%.%USERDNSDOMAIN%" does not work. I mean it works, but returns wrong value. The solution I ended up with is powershell.exe -noninteractive…
Papa Smurf
  • 89
  • 1
  • 3
  • 9
4
votes
0 answers

Palo Alto Globalprotect - connect via cmd

Scenario: Windows box having the Palo Alto Globalprotect vpn client installed. Is it possible to use commandline or powershell to connect the vpn client to a remote host? I know this is possible with other vpn clients but can't find any…
4
votes
1 answer

net files vs openfiles IDs

I was doing a PowerShell script for a quicker way of closing locked files on a big Windows Server 2008 R2 file server (more than 2500 files opened at this moment, and the peak hour was like 3-4 hours ago), and I'd to choose between net files or…
curropar
  • 631
  • 3
  • 18
4
votes
1 answer

Redirect command line into its own output?

Windows CMD shell - any easy way of redirecting the command itself into the output? If I do net localgroup administrators > %computername%-admins.txt, I'd like the output file to contain the net statement as well. No powershell available to me;…
mfinni
  • 36,144
  • 4
  • 53
  • 86
4
votes
3 answers

How to diagnose RDP with commandline?

I have a server with 1and1 and they have given up trying to restore RDP access (not trying at all) and told me to re-image the server. As this is a production machine, I'd like to avoid this since it would involve a slow FTP restoration, and I'm not…
FlavorScape
  • 791
  • 4
  • 10
  • 20