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
1answer
48 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 ...
0
votes
1answer
30 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. %~...
1
vote
0answers
14 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/...
0
votes
0answers
48 views

Windows SCHTASKS /DU Indefinitely syntax in CMD?

My task from CMD is: schtasks /create /tn "Task" /tr '"C:\Task.bat"' /sc ONCE /sd 25/03/2021 /st 20:57 /ri 1 /rl highest Which syntax should I use for the Indefinitely option? /DU ...
0
votes
1answer
64 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 ...
0
votes
1answer
31 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 ...
0
votes
0answers
11 views

How to script out an install with flags?

I've downloaded an installer file in .msi format. I'm wanting to figure a way out to script the installer so that I can run it through one our automation tools and have it install and configure the ...
0
votes
2answers
57 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....
0
votes
1answer
37 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, ...
0
votes
0answers
15 views

How can I create a shortcut using bat for a bat file and add an icon to it?

I just want to add the bat file to my desktop but using cmd code. set SHRT_LOCA=%userprofile%\Desktop\QT_cleaner.ink set SHRT_DEST=F:\qt\QT_cleaner echo IconFile=F:\qt\qt_logo_256px>> %SHRT_LOCA%...
0
votes
0answers
9 views

cwrsync hide “[sender] hiding … because of pattern …” from output

I'm setting up a backup with cwRsync from Windows to a RSync Server Linux. I redirected stdout to a logfile. All seems works, but my logfile is full of crap. I set up some extension as excluded (like *...
1
vote
0answers
24 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 ...
-1
votes
1answer
28 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 ...
2
votes
1answer
1k 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 ...
0
votes
1answer
207 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 ...
0
votes
0answers
32 views

How to view services and registry keys permissions using cmd

Using CMD how to view the permissions of services sc query and registry keys reg query
0
votes
1answer
27 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 ...
2
votes
2answers
35 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 ...
0
votes
2answers
518 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 ...
3
votes
3answers
135 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. ...
0
votes
2answers
349 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 +--------+-------+----------------+---------------------------+ ...
2
votes
1answer
288 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? (...
0
votes
0answers
18 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 ...
0
votes
2answers
1k 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 ...
-1
votes
1answer
794 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 ...
0
votes
3answers
563 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 ...
1
vote
1answer
268 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 -...
0
votes
0answers
46 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?...
0
votes
1answer
104 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 ...
1
vote
1answer
370 views

how to stop, start and delete a windows service in cmd with a reference to the service name

how to stop/start a windows service in cmd with just a fragment of the service name. Example: NET STOP *part_of_name_of_service* NET START *part_of_name_of_service* For example. mysql has many ...
1
vote
1answer
54 views

language-neutral recursive takeown

In .bat files for Windows's cmd.exe, recursively taking ownership of a folder's content goes takeown /f foldername /r /d Y >nul: 2>&1 Problem is, it works only if in the current locale the ...
0
votes
2answers
273 views

CMD file just flashes by when running as administrator

When running a simple batch file (.cmd) as administrator (Rightclick --> Run as administrator), it just flashes by in the taskbar and nothing more is happening. Running the file by just ...
0
votes
0answers
40 views

Run cmd command as admin through the pipe

I find myself in a bit of a weird situation and I'm hoping someone would be able to advise for me. I have a tool, RMM datto, which allows myself to run commands to all machines on the domain. I'm ...
0
votes
1answer
1k views

Task Scheduler failed … Error Value 2147942402

I tried to schedule a task by schtasks /create /tn Test /sc minute /mo 1 /tr "del /f \"%UserProfile%\path\file\"" ...however the Scheduler always ends up with the following type of error: Task ...
0
votes
1answer
35 views

How to discover if Microsoft Project 2016 is installed on a remote machine

I've been trying to find a way to learn if Microsoft Project 2016 is installed on a remote machine. The main problem I'm running into is that Microsoft has, at some point in the past, concealed or ...
1
vote
1answer
617 views

On Windows command line, how can I tell if a program is still running or is frozen?

I am running sqlcmd to import/execute a 2 GB SQL file that was created using SSMS's Generate Scripts command. It starts with typical output but the screen is quickly filled with... ... (1 rows ...
1
vote
0answers
530 views

Set Proxy automatic configuration script from command prompt

I'm running into a problem where I'm running a script to clear the automatic configuration settings found below,and it does clear the windows when you check through the UI. However, it doesn't seem ...
0
votes
1answer
843 views

Windows Server “Core” Reopen CMD Window In Nested RDC

This question is very like this other: Open a new cmd console on Windows 2012 Server core after closing the last one? With one key difference that is not addressed in the other and which I have not ...
2
votes
0answers
507 views

Strange character inside dates in “net user” command output

When running the net user username /domain command in cmd, all the dates (Password last set, Password expires, Password changeable and Last logon) have a strange character before the individual dates ...
0
votes
1answer
37 views

Re-Posting this - Terminal Server - Group Policy prevent command line [2] [duplicate]

The actual post was here but it was an old thread and I couldn't find an answer online or with the infrastructure guys from my company as most of them already left. I have a Windows 2008 Terminal ...
1
vote
0answers
41 views

Redirect Console Output ,Terminal (macOS, CentOS) / Cmd (Windows) to Remote Syslog or Server Logs

I have One workstation running multiple instances of Java applications by Console/Terminal for Testing, and I develop an application for Listening Logs, TCP like (http://esus.com/using-java-util-...
2
votes
2answers
2k views

Change Registry Key Permissions Access Control List using only Command Prompt

I am trying to change the Access Control permissions on a specific registry key i'm generating using a batch file. I try using regini.exe to pull the configuration from a .ini file and run into ...
1
vote
2answers
2k views

Finding Host Name / Computer Name over IP

I'm trying to find out how to lookup the HostName of a computer over IP using Command Prompt, however I don't need the registered DNS name. I'm attempting to do an IP/DNS Database Cleanup so finding ...
0
votes
1answer
374 views

How to get login username using task scheduler?

I have search similar article but don't have the correct answer. I have a schedule task using gpo which using %USERNAME% to get the current logged username but it returns the username which the task ...
1
vote
0answers
138 views

How to Check for the Java Process Running on All Network Computers?

Due to Oracle's shenanigans, our organization has decided to remove JRE from all computers under our maintenance contract. They've also decided to not replace it with OpenJDK JRE, so I've been tasked ...
0
votes
0answers
30 views

scheduled task not running

i have a problem, created a scheduled task, to run a bat file. it's programmed to run with administrator credential, works in other tasks. the file is a normal bat file. the code inside the file is ...
1
vote
0answers
152 views

Do I need to have identical user account on different domains to run a net use command via batch script?

I have a Task Scheduler task that runs a batch file which copies a file from server1 to server2 on a different domain. Note:The scheduled task is running on Domain_A using user accounts created to ...
5
votes
1answer
4k views

NET USE command doesn't authenticate when credentials are passed as parameters

I'm trying to connect to a remote WebDAV server by mapping it as a drive using NET USE command. NET USE * <domain> /user:<username> <password> Executing this command gives the ...
1
vote
1answer
1k views

Pinging computers on the network (request timed out vs. cannot find host)?

I am working in an IT office where I have to do remote file transfers and software upgrades over the network. So before I start working on a computer, I ping the computer name (e.g., AB395729) in ...
0
votes
1answer
1k views

how to have gpresult on remote comupter outputted as xml or html?

I'm on a Windows 2016 server and I'm trying to get the RSOP from a Windows 2008 remote computer using the command GPRESULT. However when I use the command: gpresult /S 10.0.52.234 /U Administrator /P ...

1
2 3 4 5
7