Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
31 views

Compter Management & Shared Folders

I'm trying to get a list of all "Volume Paths" for all shares on a remote NetApp server through PowerShell. WMI, CIM, WMIC, NET VIEW, NET SHARE, NET USE. I haven't been able to use any of those to get ...
1
vote
0answers
42 views

Autocomplete in CMD.exe from psexec

I am not sure if this is the best place to ask. But I am just wondering if it is possible to have autocomplete in cmd.exe / powershell.exe spawned by psexec.exe? For example: psexec \\127.0.0.1 -u ...
-1
votes
0answers
30 views

How can I escape several quotes in a command

I am trying to run a command and keep getting an error because I cannot escape the characters that I need to. If I run this command in a command console I can run a command on a remote machine in ...
0
votes
0answers
72 views

How to add RAS / EAP Credentials in Windows, in non-interactive, batch mode?

I want to make a fully automatic VPN client that does not require to enter a password through Windows GUI. The server to which VPN will connect is configured as IPSec IKEv2 VPN with EAP-MSCHAPv2 ...
1
vote
1answer
70 views

Creating a new AD LDS instance without the Setup Wizard?

Is the installation of a new unique instance of AD LDS (using either cmd or PowerShell) possible? All resources I can find online just use the Active Directory Lightweight Directory Services Setup ...
-1
votes
0answers
35 views

Create certificate trust list (CTL) from command line (windows server 2016)?

How do i create CTL from command line in windows server 2016? This is usually done with certmgr.exe certmgr /add /ctl but i don't have this file.
0
votes
0answers
125 views

Performance Issues Copying Files Over Network - Command Line/C#

We've been having some issues lately copying files from one Windows server to another (I'll refer to them as Server A and Server B) where the copy speeds are extremely slow when using any copy methods ...
0
votes
0answers
64 views

How to run a script/command at only the “first” boot once on Windows Server 2016?

I've been looking around everywhere but couldn't find anything relevant. I have a pre-configured Windows image that I would like to deploy on a huge number of VMs and I want a specific script to run ...
0
votes
0answers
26 views

Install Apache with ftp access

I have ftp access to a server running windows. Is there a way I can install Apache server and PHP in it through command line ? How I connect to the server is through ftp using my macbook.
0
votes
0answers
167 views

CMD LDAP error Cannot connect to the LDAP server but connect success by c# code

I tried to search and use command line to test connection to LDAP server but it throw error "Cannot connect to the LDAP server" even at my local computer I use visual studio to debug code at my ...
0
votes
0answers
41 views

How I can get folder list in windows and store it in variable using Batch Script?

I am using this: FOR %f in (*) DO @echo %f and I am only getting file names. How to get all folder names?
1
vote
1answer
82 views

Check whether user account has password set

In standalone (non-domain-joined) Windows, is it possible to use PowerShell to check if a given local user account has a password set / a blank password? According to https://gallery.technet....
1
vote
1answer
67 views

How to get infromation about disk location (like in diskmgmt.msc) via Powershell?

could you please help me how to get disk location number which can be found via Disk Management (diskmgmt.msc) for future VMware SCSI Disk devices assosciation via PowerShell or any other native ...
0
votes
1answer
1k views

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 ...
2
votes
1answer
168 views

delete windows certificate from powershell or cmd

I want to delete all my PERSONAL certificates from certmgr.msc from command line , is this possible? I tried some code but it doesnt work I can list my certificates by runing this in powershell dir ...
6
votes
2answers
9k views

call batch file and run using its own path/directory

I have a batch files that calls other batch files like this: e:\foo\master.bat has the content: call e:\bar\run1.bat and e:\bar\run1.bat has the content app1.exe the problem is that when I run ...
-1
votes
2answers
49 views

Is it possible to know who hosts a website using cmd only?

I read similar questions but I didn't find something similar to what I'm asking. Suppose that we want to know who hosts a particular website knowing the domain name using the cmd only. I found many ...
0
votes
1answer
82 views

Command line argument to change security settings for running IE-instance only

Just curious to know: How to Enable ->Access data sources across domain<- in IE, using CMD only and NOT by changing the registry or group-policy. I know that the following command works for the ...
1
vote
1answer
99 views

Windows PATH Variable with a Drive-letterless path

At work, we have a setup where our product's source code is mounted to a drive letter, and if you want to have different builds, you have different drives. The build tools are reached by adding ...
0
votes
1answer
43 views

Add a user to a domain group and set the user privileges to certain folder Win10

I have a user in my workplace domain, I want to add him to a specific domain group then assign him some privileges on a specific folder. I wonder how this can be done using command line or a more ...
0
votes
1answer
106 views

What does the @ symbol mean before a file path in Windows command prompt?

I've noticed that powershell.exe started csc.exe with a command line like this: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /noconfig /fullpaths @"C:\Windows\TEMP\pn1kld2d.cmdline" I'...
0
votes
2answers
40 views

Permission don't work as expected - PowerShell works, GUI doesn't

I'm a software developer and not really into all those server config things... still I have a problem that really confuses me. I'll try to explain it as good as I can: When I log into a server with a ...
0
votes
0answers
96 views

how to delay LAN using batch script or cmd

I want to delay local area connetion (like clumsy tool) using batch script or command prompt. Basically I want to make network delay for my test purpose. I have no idea from where to start and how.
0
votes
1answer
69 views

Checking what commands were run on windows? [closed]

From time to time a cmd windows popps up (or two of them) for a split second I cannot track what was started. Is there a way to monitor the cmd/powershell window? Sysmon? Or is there a way to force ...
0
votes
0answers
24 views

enabling only the images I need by cmd prompt

I have completely automated my DISM requirements for our needs. It will grab a fresh boot and install wim, get the drivers folder for a parameter prompted model number, mount inject unmount. I also ...
0
votes
1answer
157 views

server core and command prompt

Thought came to mind as I am studying for my 40-711 MCSA test later today, and I'm not near my server lab at home to test. Do CMD commands work in a server core install of MS Server 2012 R2? For ...
0
votes
1answer
332 views

How do I explicitly set %PATH% in System Variable or User Variable in command prompt in a persistent manner?

When you open sysdm.cpl -> Advanced -> Environment Variables. you can see that envs are divided into two section: one is User Variables, another is System Variables, they both have a variable PATH in ...
1
vote
2answers
783 views

How do I get the PID of a conhost process associated with the batch file and cmd process that created it?

Say I have several conhost processes that happen to be running already. Now I run a batch file, which starts a cmd process which, in turn, causes another conhost process to open up. From within the ...
2
votes
1answer
48 views

Disabling a CMD command for a User

Let's say there are two accounts on Windows, Admin and User. Im running a program which shutdowns system in some ammount of time (using shutdown /s /t). Is there any way to disable shutdown -a for a ...
1
vote
2answers
4k views

How can I join a Windows Server 2016 Datacenter Core to a domain?

I want to join a Windows Server 2016 Datacenter Core (Command-Only) to a domain (Which is also using Windows Server 2016 Datacenter). Domain name: rsft.net Username (Both servers): Administrator ...
0
votes
1answer
33 views

VBS Script passing argument?

Hello everyone I have this script in VBS: On Error Resume Next If WScript.Arguments.Count < 2 Then WScript.Echo "This script requires arguments." WScript.Quit End If Dim sURL, ...
0
votes
1answer
19 views

Issues with shared out folder in Windows Server 2012

I am seeing a strange issue on a 2012 Server where I have 90 shared folders, but about 50 of them are showing up with question marks in the path and share name net share. i.e: C:\Windows\System32>...
1
vote
1answer
629 views

Add, remove, and test for the existence of a registry value * at the Command Prompt?

I am trying to check and update the network zone mapping in the registry from the Command Prompt. I need to check for the value named *. For example, under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\...
3
votes
1answer
158 views

Windows Command net user output

The command net user administrator, one of the output is the following: Last logon 5/27/2017 2:31:17 PM The system administrators have their own IDs when required to log on to this server. One ...
0
votes
1answer
8k views

Run a batch file from network shared folder depending on MS outlook bit version

Hello I'm trying to figure out on how to Run a file from network, basically it's located from \10.18.xx.xx\installers\install.bat, so yeah It's gonna prompt a username and password when I locate it ...
0
votes
2answers
532 views

Windows: Find out which process spawned another process

I have a situation with processes a bit like below. We have 2 executables, foo.exe and bar.exe. bar.exe is always launched by foo.exe. I want to know how to find out which bar.exe has been spawned by ...
0
votes
1answer
254 views

unable to start service in remote and local machine with sc command and net command

I am trying to start the services using the below SC command and service is not coming up. sc start startliq_2090 output: SERVICE_NAME: startliq_2090 TYPE : 10 ...
-1
votes
2answers
298 views

Starting CMD or Powershell in current folder from windows explorer

I know that you can start cmd or powershell from windows explorer; when you type "cmd" or "powershell" in current path of the explorer window. But what when you have folders that are named "CMD" or "...
0
votes
0answers
61 views

Cmd - Cleaner way for to retrieve ServiceName and assign to variable

Is there a cleaner way to retrieve and assign the service name to a variable in cmd ? My current attempt: set svc_query="sc queryex type= service state= all | find /i "plusfield" | find /i "service"...
0
votes
1answer
889 views

batch file to check cpu and output to txt

I'm trying to write a simple batch file to check the cpu of the computer every 30 seconds and output to txt file with the current time. I want each line to be like: Line1: %time% %cpu% Line2: %time% %...
0
votes
1answer
379 views

Skipping Command in CMD batch file

I'm using pstools to shutdown local pcs .. with different user & pass psshutdown \\10.0.0.1 -u 1 -p 1 psshutdown \\10.0.0.2 -u 2 -p 2 psshutdown \\10.0.0.3 -u 3 -p 3 problem is : if one of ...
1
vote
1answer
102 views

Ways to extract files information for large data

I am trying to recursively extract some file information in my file server. I was able to run the commands below at my own laptop. When I run them on my file server, which is going thru 4TB of data, ...
0
votes
0answers
36 views

how to allow one specific application to access command-prompt?

is there a workaround to allow only one specific application to access command prompt (java application) in a disabled command prompt active directory environment without enabling command prompt for ...
1
vote
0answers
30 views

Sending Message To User From Remote Computers

I have 4 networks. 10.22.227.0\24, 10.28.43.0\24, 10.0.3.0\24, 10.0.6.0\24. In total there is some where around 250 users. What i would like to be able to do is send the user a message from my ...
1
vote
1answer
814 views

Windows 2012 Command prompt not accepting a few commands

I have recently installed Windows 2012. Unable to use common commands previously used e.g. "ipconfig" "hostname" etc. Have tried both Run as Administrator and non admin.
1
vote
2answers
487 views

How to find a file in cmd and then piping the output in findstr

I have a simple question regarding how to finding a file in cmd and then piping the output to findstr to nail down a specific file. For example, dir change /s /p | findstr "error" Can this be ...
0
votes
2answers
452 views

Is there an easy way to alias PowerShell in cmd?

Whenever I login to my servercore server, the first thing i usually do is this: powershell start-process powershell -verb runas It's a little annoying to always write this whole sentence. can I ...
0
votes
0answers
90 views

Remove com port using devcon for loop

I started learning command line yesterday. My supervisor asked me to delete extra com ports. I was trying to delete com port using command line. Right now I am using devcon.exe that is a part of ...
0
votes
1answer
136 views

How to run PUTTY and skip dialog?

I have a web application that contains a command to start an EXE Process.Start("MyApp.exe") This app will then run putty.exe and will SendKeys to emulate keystrokes to the application. The app ...
0
votes
3answers
1k views

Can I run remote PowerShell/Cmd command with RDP credential, without Remote PS enabled?

I am in a "funny" situation where I have RDP credentials of about 200 servers, but none of them have Remote Powershell enabled. I need a simple task: restart them all. But all I have is RDP (...