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).

learn more… | top users | synonyms (2)

1
vote
1answer
35 views

Killing a single service when multiple services are under same pid using taskkill

I am trying to kill wuauserv on a windows server 2008 R2, however it has the same PID as other services which I don't want to kill. I assume running taskkill /f /pid [PID] would kill them all, how do ...
0
votes
1answer
33 views

How can I access comand line like cmd.exe on my dedicated linux server? [on hold]

I have installed the ffmpeg by composer in my local server(windows7) and everything is working good now the site is live on internet (server CENTOS 6.7 x86_64 kvm) and I need to install it to the ...
0
votes
0answers
45 views

How to export SQLCMD output to Excel

I am using SQLCMD command in powershell to run SQL scripts. When i pipe the output to TXT ,the formatting is all messed up. i want to export the results to excel file. how can i do that. My command ...
0
votes
1answer
7 views

Leading zeros in lss compare in cmd.exe causes unexpected result

if 8 lss 1 echo Less [Nothing displayed] if 08 lss 1 echo Less Less Why?
0
votes
1answer
33 views

how to easily reconnect to “unavailable” network shares

Every once in a while, I run cmd as my admin user. I set up a shortcut for convenience sake... C:\Windows\System32\runas.exe /u:admin.user@domain cmd At some point, I've wanted to run scripts that ...
1
vote
1answer
39 views

How do we set the Java environment variable in cmd.exe?

I need to set the Java environment variable in cmd.exe. I tried this: set java = System.out.println(System.getProperty("java.home")); path=java;%path% I am aware that this does not change anything, ...
0
votes
1answer
178 views

Mount NFS Share Windows Server 2012

I'm trying to mount an NFS share setup on my Synology Server to my Windows Server 2012 server. Here's what I've tried: net use Z: \[ip address][share folder] /user:xxxxx [password]' mount ...
-1
votes
1answer
89 views

Can't access (ping, tracert..) from cmd but works from putty

I am not able to ping or tracert to a remote machine from windows command line, but I am able to ping/tracert and access same machine when using putty on same windows machine. What can I do to access ...
0
votes
1answer
47 views

FTP Server 2008 (This webpage is not available)

Im having trouble getting access to my FTP server on a web browser. On the local server i am able to (ftp://192.168.50.11) and login using user name and password using the browser. On a different ...
22
votes
3answers
2k views

Given a PID on Windows - how do I find the command line instruction that executed it?

On a database, I can get a list of all the currently running processes, and the sql command that kicked them off. I'd like to do a similar thing on a windows box. I can get the list of processes, ...
0
votes
2answers
43 views

Print text file with folder file names [closed]

So i have been tasked with getting folder and file names for a portable hard drive. Currently I'm not sure how to go about doing this I know the standard command prompt way to go about it, but let's ...
1
vote
1answer
24 views

From command prompt store a “!” from a file name in a varible

I have a set of files in a folder with names like test! - 01.avi. I want to make a new folder for each file with the same name and then move the file into that folder. I have everything but how to ...
0
votes
0answers
17 views

How to assign user name for “net view” command

When mapping a network drive, I use command net use z: \\servername\sharedfolder /user:myname It always succeeds. But when using net view, I sometimes get Access Denied error. I think it is due to ...
2
votes
1answer
214 views

How can I input password to manage-bde -pw option via windows powershell

I am trying to encrypt Data volume (for example E:) with the following command: manage-bde -protectors -add E: -pw When I execute the above command, it will ask for the password, so I entered it. ...
0
votes
2answers
40 views

how to identify a command prompt window?

Enviroment: windows 7 Currently i have machine on which we launch 2 batch files on system start up. These batch files internally run multiple programs by running on separate command prompt windows. ...
4
votes
2answers
331 views

How can we insert multiple keys into a registry folder without using 3rd party tools?

To insert multiple keys into a registry folder (e.g. Computer\HKEY_CLASSES_ROOT\....\....), I basically have to manually right click → New → Key for each key. This can get annoying and ...
0
votes
1answer
32 views

How can I select replace file automaticaly in cmd?

How can I select replace file automaticaly in the command prompt? I am trying to run the following command: schtasks /create /tn "Restart Ingenico" /tr "C:\IT_Dept\RestartShift4.bat" /sc daily /st ...
-1
votes
1answer
41 views

Search for file names containing space

I have a batch file that helps me in install multiple pieces of software from a shared folder. It's working well with software whose names don't contain spaces, but I need it to work with software ...
0
votes
2answers
223 views

Windows: change own password of standard user by using commandline

I want to change the password of the current logged in Windows user (no Active Directory) in a scriptable way. The users have the right to change their own passwords and already can change the ...
1
vote
1answer
83 views

Windows findstr with AND condition?

Is it possible, in one line, without a batch file to use findstr and only return a 0 %errorlevel% if all of the strings are found? I am doing a gem list, which lists out a bunch of gems. I then want ...
-6
votes
1answer
115 views

BAT file that prompts for the computer name that will executed on it [closed]

I need to create a .bat script that will be executed on single/multiple machines I need first to create a bat that prompts for the computer name that the command will be executed on it I prefer not ...
3
votes
1answer
164 views

How to get a list of RUs, SPs and other updates installed for Exchange from a command line or PowerShell?

Is there a way to get a list of updates, rollups, service packs installed for the MS Exchange Server from a command line, PowerShell or Exchange Management Shell? I already tried Get-Hotfix, ...
6
votes
2answers
733 views

Determine if C drive has 2 GB of free disk space

I am trying to determine if a target pc has atleast 2 GB of free space. Here is what I have so far: @echo off for /f "usebackq delims== tokens=2" %%x in (`wmic logicaldisk where "DeviceID='C:'" get ...
0
votes
2answers
151 views

Assign DNS settings on client via elevated script in GPO

i have installed windows 2012 as a member server in my existing windows 2008 DC. now i want to assign secondary DNS on my windows 7/8 client PCs. I do not have DHCP in my environment. I tried to find ...
1
vote
3answers
160 views

cmd.exe, nested for loop, the variable cannot be use in option like skip=

I have many archive folder which stores the backup files. each folder increases daily. I need to delete all files except for recent N copies in each of them, N was defined by a variable from the ...
2
votes
1answer
74 views

NET USE - How to get list of all shares (elevated, non-elevated)

The command: NET USE Will display open connections by any process of current user. But, if command prompt (cmd.exe, or any shell) is non-elevated, it would display only connections opened by ...
2
votes
1answer
123 views

Provide Administrator credentials within script

I am writing a script that runs from a user account. The script needs to execute another script as the Administrator account. Tried AutoIt's RunAs - didn't work. Tried PsExec - the same. Tried ...
2
votes
1answer
649 views

dsadd run from batch file fails with “The specified account already exists” when there is no existing account with the same dn

I am programmatically creating thousands of test users from a txt file containing First Name, Last Name, Username, and Password using the following command (saved as a batch file, run in cmd, modified ...
1
vote
1answer
78 views

How can I know where and how a security group is triggering a logon script for some users?

The organization I work for has implemented application access and scripts via Security Groups. This is, if a person needs to access some applications or have a script run when he logs on, we add ...
2
votes
1answer
265 views

How to remove directories using wildcards by reading a file using batch?

Batch file for /f "delims=" %%f in (7profiledeletelist.txt) do rd /s /q "%%f" PAUSE exit 7profiledeletelist.txt C:\Users\1* C:\Users\2* C:\Users\3* C:\Users\4* C:\Users\5* C:\Users\6* C:\Users\7* ...
0
votes
2answers
274 views

How to run batch file without a window in ONE file

I know how to run batch files without a window thanks to this question here: Run a .bat file in a scheduled task without a window. The first answer is the one I am using. It states that to run a ...
0
votes
3answers
61 views

Add a command into an existent remote console application

I manage to open a console application in a remote computer by using PSTools using PsExec.exe. C:\PsExec.exe -i 2 -s -d \128.168.500.500 -u username -p password "D:\myApp.exe" That will open a ...
0
votes
2answers
77 views

Quit remote process and start it later

I have a console application running remotely in multiple computers. I was wondering if there's any way to quit from it remotely and then start it again. I saw the use of taskkill to quit the ...
1
vote
0answers
28 views

When changing the Win display lang, will builtin CLI tools params / stdout|stderr messages also change?

I need to write a CMD script (other shells are not allowed / available) that will execute on multiple servers with different display languages. When looking at an Windows built in tool, such as ...
0
votes
0answers
121 views

Windows 7 CMD tracert gives totally different final IP to online traceroute

So, i'm pretty damn rusty with this stuff, and been up all night for client emergency, so excuse me if i'm typing gibberish and didn't find related search results./ I'm suddenly taking over a clients ...
0
votes
1answer
95 views

cmd /c behaves differently on server 2012

Tried writing a batch file to shutdown my 2012 server, but ran into a weird issue. For example on 2008 a batch file like the following runs as expected: cmd /c shutdown -s -t 0 On server 2012 when ...
1
vote
0answers
41 views

SED returning error 2 when launched by Wpkg

Case I am deploying a software product using Wpkg over Windows workstations. I need to disable product's faulty automatic update and the best solution in this case is to modify one configuration file ...
0
votes
1answer
149 views

cmd: create dhcp superscope

On Windows Server 2008 (R1, 32-Bit) I've got that far to create a superscope on the command line via cmd, not PowerShell (yay!) through netsh dhcp server \\SERVER scope IP.ADD.RE.SS set superscope ...
2
votes
1answer
298 views

set unlimited lease duration throuth CMD

On Windows Server 2008 (R2, 32-Bit, I found the following way to set the lease duration for, say, 3600 Seconds (1 Hour). netsh dhcp server scope 10.0.0.0 set optionvalue 51 DWORD 3600 [→ source] ...
-2
votes
3answers
120 views

How to Restore Win Drive Permissions [closed]

I've been playing with my C: drive permissions and I have managed to mess them up. Now when I log in nothing appears and I can't launch anything. I tried safe mode and the same thing happens with ...
0
votes
2answers
7k views

How to run multiple commands with psexec? [duplicate]

I need to run a command to uninstall forefront on some of our workstations and am having a bit of trouble formatting the command. Here's what needs to happen (in multiple commands) xcopy ...
0
votes
1answer
217 views

ping TOS values

Windows Server® 2008 offers ping -v TOS Type Of Service (IPv4-only) Trying to figure out what they mean I came that far that this has to do with IPv4's "Type of Service" Field – ...
1
vote
1answer
155 views

can't delete Resource Records through CMD in Windows Sever 2008

Final Update Problem erased in the least acceptable way: After re-installing the DNS-Server lead to even more problems, I re-installed the whole Operating System and - up to now - everything works ...
0
votes
1answer
214 views

cmd - delete IP from rule (Windows Server 2008)

I'm banning IPs using the Windows Firewall with these commands in cmd (actually in C# but using the cmd): pushd advfirewall firewall set rule name="BlockedIPs" new remoteip="1.2.3.4" action=block ...
-3
votes
3answers
3k views

How to check if internet IP address is currently taken? [closed]

Usually I check with ping {ip.address} and that kind of confirms someone has the ip, but when when I ping my Amazon server the message is Request timed out. However I know it's there and I can ...
1
vote
1answer
97 views

For in batch has weird behavior while reading folders

Im trying to do a simple batch (it is not the whole thing, but that's the part that is making everything fail) @echo off for /f "tokens=*" %%G in ('dir /s /b /a:d "e:\tmp\*"') do ( echo %%G ...
4
votes
2answers
10k views

How to run x64 bit version of registry from cmd.exe located under c:\windows\sysWow64

I have a 32 bit application which has to add a value to x64 bit portion of the registry. I want to do it through utilization of regedit.exe -s fileWithKeys.reg, However when I try to span regedit ...
0
votes
2answers
5k views

Properly escaping a path with spaces in CMD shell

I have the following path: "d:\workspace\Server trunk - CI\make\make & publish.bat" However, when I try to execute this from a cmd shell, I get the error: 'd:\workspace\Server' is not ...
-2
votes
2answers
260 views

Show Protected OS files using cmd.exe [closed]

I'm trying to deploy shortcuts from xcopy using a batch script to c:\users\all users\desktop But this is a hidden folder with Hide Protected operating System files tick box under Folder options. I ...
-1
votes
2answers
130 views

Desktop backups maintenance on a network share

I have configured Windows Backup and Restore function on Windows 7 Professional desktops to make daily backup on a network share placed on a Windows Server 2012. (BTW It's a pity that this utility ...