Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Windows DEL command behavior wrt junction points

In my installer script I want to delete known files from known locations on the local PC using the DEL command. The command should purge the file from a certain folder and all subfolders below that. ...
user avatar
0 votes
0 answers
9 views

Assigning FIND command result to variable

FIND /i "SearchTXT" C:\Temp\SearchFile.TXT How can I assign the result of the command to a variable and (echo) print it?
user avatar
0 votes
1 answer
23 views

Having Trouble Identifying TCP Congestion Control Provider option: Default

I am running a Windows 10 (Version 1909) OS and when I am entering the following command in CMD ... netsh interface tcp show global ...I am able to see add-on congestion control provider set to "...
user avatar
0 votes
0 answers
75 views

adduser giving groupadd: failure while writing changes to /etc/group error

I'm trying to add user with following cmd in debian machine. adduser --disabled-login --shell '/bin/pre_cli_script.sh' --gecos GECOS 'aa1' > /dev/null && usermod -G 'kashya' 'aa1' &&...
user avatar
0 votes
0 answers
10 views

Open LDAP Add Authorization Rules

Good evening, I have a question of understanding: The users are already created in Open LDAP. Suppose I add authorization rules to the LDAP server via a script. If I were to run this script again to ...
user avatar
  • 1
0 votes
1 answer
32 views

Erased System Path Variables

I was writing a batch file that was supposed to automatically set up a computer to receive "psexec" remote commads. Unluckly i didn't really pay attention to what i was writing and i wrote ...
user avatar
  • 1
1 vote
2 answers
88 views

cmd pipe -> System cannot find specified path

Using cmd on Windows 10 Pro 21H2, when I try echo Hello | find "Bye" I get The system cannot find the specified path. Same thing if trying echo Hello | C:\Windows\System32\find.exe "...
user avatar
0 votes
1 answer
167 views

CMD - Check if exist firewall rule, and add if not

I need some help to make an script that check if exist a rule, and add if not. It auto add all exe inside a folder where i run it. @echo off cls Echo.--------------------------------------------------...
user avatar
  • 1
1 vote
0 answers
20 views

Is it possible to open a file within a batch file as another user?

im trying to run psql.exe (postgreSQL) with an active code page set to 1252. I want to have a batch file that opens up a command prompt with that code page, then navigates to the psql directory to run ...
user avatar
0 votes
0 answers
113 views

How to close connection when using PSExec on multiple remote computers?

I am using PSExec to run scripts on multiple computers and after a few computers I start getting connection errors (probably because of concurrent connections limit on Windows 10). PSExec command I am ...
user avatar
0 votes
1 answer
30 views

How can I disable the Windows Game DVR from the command line?

I need to disable the Windows Game DVR for a collection of Windows computers that will be running student exam / testing software, so that students can't use the Game DVR hotkeys to record the test ...
user avatar
0 votes
0 answers
197 views

No User exists for 'query user'

I have one weird issue on the virtual machine. When I do 'query user user1' is not showing the active session of the user. It says 'No User exists for user1', though there is active connection. ...
user avatar
  • 101
0 votes
1 answer
63 views

How to reset the "allow pc to be discoverable on this network" prompt?

I have been advised to ask this question here on ServerFault. I've searched StackExchange, StackOverflow, and Google and I'm not finding any insights on how to reset the prompt when first connecting a ...
user avatar
0 votes
0 answers
37 views

Permit all commandos on Tacacs+ Configuration

I have one question regarding TACACS+ Setup. Is there any way I cant permit all commands? Something like: cmd = * { permit .* } Thank you!
user avatar
0 votes
3 answers
468 views

cmd - run a batch file after all other concurrent batch files finish

I have a simple batch file which calls other batch files, it looks like this: start /b run_part1.bat start /b run_part2.bat start /b run_part3.bat start /b run_part4.bat run_last.bat // fires ...
user avatar
  • 169
0 votes
1 answer
111 views

Looking for a way to replace every instance of a non-zero sized file in a directory tree using a batch file

I am trying to figure out a way to have a batch script overwrite every instance of a non-zero byte file inside of a specific directory and its sub-folders. I'm guessing since I'm looking for a non-...
user avatar
  • 23
0 votes
0 answers
58 views

detect rdp ram remotely with FreeRDP without x server (x11)

i've installed freerdp on my ubuntu vps i got it from digital ocean after few problems regarding the x server problem and freerdp can't work without x server i able to configure it to check the ...
user avatar
3 votes
1 answer
68 views

echo %time% duplicate outputs

I have a command that adds the timestamp at the beginning and the end (echo %time% & #other command# & echo %time%). However, the %time% will be the same, regardless of how long the command ...
user avatar
0 votes
0 answers
47 views

Using WEVTUtil to export logon failures

I'm using WEVTUtil query-events Security but cannot figure out how to limit the output to just logon failures
user avatar
-2 votes
1 answer
318 views

How to make a change in iis apppool using appcmd.exe

I want to edit the parts marked in the photo using appcmd.exe or another comman-line method.
user avatar
  • 69
0 votes
1 answer
276 views

Active Directory + NFS: Why is domain user's uidNumber, gidNumber not shown by `id` command in Windows?

I am connecting NFS v3 shares (ZFS datasets) from a Solaris file server owned by domain users to Windows computers, but the concept should apply to basically any POSIX-style server. I'm hoping to ...
user avatar
0 votes
2 answers
253 views

Static ARP Entries aren't being added

So I'm trying to create a static ARP Entry with the ip and MAC Address of my router. I'm currently using admin command prompt and the command arp -s [ip] [mac address], but it isn't working. Every ...
user avatar
0 votes
0 answers
92 views

how can find list of the sites connecting to the app pool using appcmd.exe

I can see a list of site and list of app pool separately. but how can I find wich site using from the app pool. e.g: we have an app pool with name: app1 i want to send command to find how sites ...
user avatar
  • 69
0 votes
1 answer
185 views

how to get current physicalPath site using appcmd.exe

we want get current physicalPath of the site using appcmd.exe. how to identify physicalPath of site via site name or app pool name.
user avatar
  • 69
3 votes
2 answers
2k views

How can I get the list of app pool using appcmd.exe

we using the below command to get the list of the site added in is: %systemroot%\system32\inetsrv\AppCmd.exe list sites but the above command can not take a list of app pools related to the site. I ...
user avatar
  • 69
0 votes
1 answer
77 views

how can create a directory, in add site command using appcmd.exe?

When I am using the appcmd.exe for creating a website, I need a physical Path address in the command. How can I create directory when I am running this address: %systemroot%\system32\inetsrv\AppCmd....
user avatar
  • 69
0 votes
1 answer
83 views

I need to rename a file and insert a date

I'm trying to set a daily process to locate a file, rename it and insert the previous date in the file name. I want the file to be named "Filename_MMddyyyy.csv" with MMddyyyy being the ...
user avatar
0 votes
1 answer
36 views

Script without put ran as administrator leaves no file [closed]

I am trying to run this script as administrator. When I run it without admin rights the log file is save in C:\Windows\System32. I put echo %~dp0 in the script and it echos to the current directory. %~...
user avatar
  • 123
1 vote
0 answers
141 views

Open url with parameters with cmd

I changed default program for .docx and set to myopenwith.bat So when I clicked to any docx, it will open with myopenwith.bat myopenwith.bat has this code: start firefox https://www.dropbox.com/search/...
user avatar
2 votes
1 answer
3k views

Running windows container's command prompt in admin mode

I am running Windows Nanoserver in a container.The nanoserver contains only the command prompt and lacks powershell. I want to execute certain commands inside the container in the command prompt which ...
user avatar
0 votes
1 answer
205 views

Windows batch file to start and stop service for different users

I am having an Admin account that wanted to run a batch file that will start and stop a few services for different users.(Wanted to perform from the same server) For example, what I wanted to do is ...
user avatar
1 vote
2 answers
595 views

Check if Second Level Address Translation (SLAT) is installed

There are different instructions online to show that you have Second Level Address Translation (SLAT) enabled as a dependency to install WSL 2 and Docker. The simplest way is to run "systeminfo....
user avatar
  • 1,864
0 votes
1 answer
330 views

Delete all .bak files from folder with CMD

I want automate the delete files with .bak extension in my backup folder I have a little CMD who ZIP all my BD .back and after this i want delete this bak but not ZIP file I use this but dont work, ...
user avatar
1 vote
0 answers
187 views

using start /wait for a headless process in a batch file - any way to show the process is running?

So I have a large batch file, and in the middle it hits a start /wait command to run a silent install of an MSI. I'd like to have some animation or something to indicate that the batch file is in fact ...
user avatar
  • 567
-1 votes
1 answer
36 views

Mapping D disk using cmd command

I tried to map disk D with the next command in Command Prompt "net use Y: \ComputerName\D$" and I get errors. Can you help me with the correct syntax? But if I want to map a folder let's say ...
user avatar
2 votes
1 answer
4k views

Event ID 1000 Application Error cmd.exe kernelbase.dll

I've come across a re-occuring error in the event logs of my Windows 2012 R2 Hyper-V server. The error event is shown below. Error 16/12/2020 15:47:31 Application Error 1000 (100) Faulting ...
user avatar
0 votes
1 answer
324 views

Fast File Copy script in Windows

I have a process that is run every month or so. Such process identifies a set of files and constructs a proper source and destination path from several fields of different tables in DB to then copy ...
user avatar
0 votes
1 answer
91 views

ICACLS escape asterisk character

Let's say I have managed to create a file named '*' (via MSYS or whatever) Is there a way to properly escape this such that I can call ICACLS and only list that single file? icacls * lists everything ...
user avatar
  • 111
2 votes
2 answers
49 views

Delete all files within a directory within a specific subfolder

I have seen and tried a few solutions online but these don't seem to be working. I don't need a recursive function. Basically I have a directory with numerous subfolders which all have subfolders of ...
user avatar
0 votes
2 answers
1k views

"net user XXX /expires:never" does not work in Active Directory mode

I'm trying to make a user's password never expire, so I executed the following command in the domain controller: net user admin /expires:never And it succeed. But months later, the password still ...
user avatar
  • 707
3 votes
3 answers
897 views

How to get all processes under a session of a particular process that is using a port in Windows cmd

I want to list and kill all processes belonging to a session of a particular process that is using a port. This should happen through a windows batch command that would accept a port number as input. ...
user avatar
0 votes
2 answers
1k views

Powershell / Command prompt cannot switch to mapped drive when running as another use

in my powershell prompt, logged into a Windows 10 PC as Domain\UserA i can run the net use command to see my shared drives net use lists +--------+-------+----------------+---------------------------+ ...
user avatar
2 votes
1 answer
425 views

Create a domain GPO with cmd only [closed]

I have a domain controller running Server 2003 and the goal is to create a GPO for the domain without using a GUI program (no gpedit, gpmsc, etc.). How can I achieve this goal by using cmd only? (...
user avatar
0 votes
0 answers
24 views

Create user - map network drive CMD

I have a pipeline which I want to do automatically (probably with a bat file) without the need to do all steps manually on my windows 10 machine. Pipeline steps: Create a normal user account e.g ...
user avatar
  • 103
0 votes
3 answers
3k views

Windows Server DHCP server reservation list

In Windows Server acting as a DHCP server, how can I get a list of the DHCP reservations from the CMD? I need to know the MAC address and the IP address reserved to that MAC address inside the DHCP ...
user avatar
  • 125
-1 votes
1 answer
2k views

Windows 10 - Shell commands for CTRL+Alt+Del not working

We have an icon with a target path of "explorer.exe shell:::{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" which pulls up Windows Security window in order for users to select change password from ...
user avatar
  • 169
0 votes
3 answers
1k views

I'm getting Permission Denied when redirecting output from CMD to a text file using the logitech_dfu tool

I've gotten this output using this command you see here from the Logitech instructions, and using the ">" operator before the file names in said command. It errors, and does not place anything in the ...
user avatar
2 votes
1 answer
653 views

How can I get a list of active directory group members that are not disabled (without using PowerShell?)

I'm trying to get a list of users that are members of an Active Directory group that are not disabled. The best I've been able to find so far is: dsquery group -name "Group name" | dsget group -...
user avatar
  • 71
0 votes
0 answers
101 views

Makefile CMD long path limit

When when I have long paths in my project (250+ characters), when I trigger my makefile it can't find the include files. Is there a way to fix this instead of renaming folders to decrease path length?...
user avatar
0 votes
1 answer
170 views

How to run command tail -f error_log|fgrep '[rewrite:' in Windows Server

I'm currently performing website redirection from non-www to www+https, but unfortunately, my redirection does not work and I've tried to create rewrite log but it ends up my website down. After ...
user avatar
  • 37

1
2 3 4 5
8