As of May 31, 2023, we have updated our Code of Conduct.

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
-1 votes
0 answers
26 views

Remove files and folders older than x days on windows and try to schedule a cron job run to every 5 mins and delete 10 min files

Get-ChildItem –Path "C:\Users\Admin\Desktop\DS160 Form Screenshots" -Recurse | Where-Object {($_.LastWriteTime -lt (Get-Date).AddDays(-1))} | Remove-Item
SHIV's user avatar
  • 1
-1 votes
1 answer
378 views

Add Network Printer using command /Powershell after exporting it from One Machine to Another Windows 10/11

AIM : To export Network Printer from one Windows 10 machine to an output file and using that output file import it to another Windows 10 machine on the same network. Research work: The following ...
Guru's user avatar
  • 1
1 vote
1 answer
176 views

PS Stop-Process fails to stop a subprocess launched from cmd.exe

Preface: I've boiled down a problem I'm having to this simple reproduction, which admittedly looks pretty strange out of context. From powershell (PS), if I use Start-Process to start notepad and ...
cod3monk3y's user avatar
0 votes
2 answers
461 views

Activate and specify logon script without user interaction

I would like to remotely activate a logon script to computers (Win10 and 11) not connected to a domain. I can already remotely deploy software/script/files as admin, for example: I can deploy a logon....
Kintaro's user avatar
0 votes
2 answers
2k views

Generate SHA256 Hash of a STRING from Windows Command Line

While this is simple to do in the *nix world, I can't come up with a solution for generating a SHA256 hash of a string from the Windows command shell (not PowerShell) without installing a 3rd party ...
Michael Oryl's user avatar
0 votes
1 answer
627 views

Renamed executable files Cmd and Utilman and now its not opening

I forgot my windows password So I tried to change "Accessibility" to "Cmd" on Sign-in windows by following these steps: Opened Advanced Startup Menu > Trouble Shoot > ...
Aakash Gujar's user avatar
0 votes
1 answer
52 views

Why cant i kill the task remotly through my .bat Script? [solved]

I want to write a .bat Script, where i want to kill a task remotly from my pc on my windows server 2022. When i try the command "taskkill /u Administrator /p mypassword /s 192.168.178.226 /im ...
Censored4452's user avatar
-1 votes
1 answer
134 views

Local user login on a domain machine, receiving System error 5 occurred Access is denied error

We are trying to use the command prompt net group from a local login on a workstation.. This workstation is on the domain, but I'm logging in as the local user: .\localuser and not the domain\user. ...
MrPeachyPenguin's user avatar
0 votes
1 answer
611 views

check MD5 checksums from md5 file in Windows

Hopefully a simple question, does a simple Windows command line equivalent to md5sum --check [files.md5] exist? Alternatively, something I can script as a batch file. I can generate the hashes file ...
16shells's user avatar
1 vote
0 answers
130 views

Windows test network folder permissions for another account

How to test that an account other than login account has access to a network folder ? Here's an example : I'm logged in as steves but I need to test if joej has access to : \\contoso\dept\finance\...
BaltoStar's user avatar
  • 201
1 vote
1 answer
989 views

How to run cmd.exe using the system account on Windows 11?

I want to run cmd.exe not as administrator, but as the local system account on Windows 11. Apparently it was possible on Windows 10 using psexec. On Windows 11 with psexec v2.40 I get this error from ...
Casady's user avatar
  • 111
1 vote
1 answer
671 views

winget not working unless I do

When I open Powershell, and type winget - this is the response: winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of ...
Thomas DeColita's user avatar
0 votes
0 answers
11 views

Only Update Start In field when updating the scheduled task via command promt/powershell

Is it possible to only update the Start In (Optional) field (in GUI) when updating the task via command prompt. Is there like a flag for /tr to specify the executable file and then the location of the ...
Kim Sunga's user avatar
0 votes
0 answers
33 views

Why does ssh option "-n" suppress stdout if PowerShell or cmd.exe is executed?

I want to execute a powershell command on multiple windows machines. At first the working command: # ssh foo@windows_hostname powershell -command hostname foo@windows_hostname's password: ...
mgutt's user avatar
  • 481
0 votes
0 answers
56 views

How to check elevated priv of normal user?

Hi guys, Is there a way to check all privileges of current user when elevated by using command only? (user does not belong to group administrator) As you can see in the image above, when I open cmd ...
Mont Ala's user avatar
0 votes
1 answer
24 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. ...
Carl Colijn's user avatar
0 votes
1 answer
651 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 "...
DeathS7roke's user avatar
0 votes
0 answers
656 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' &&...
Vinutha's user avatar
0 votes
1 answer
116 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 ...
Xcode's user avatar
  • 1
1 vote
2 answers
335 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 "...
Toni Homedes i Saun's user avatar
0 votes
1 answer
1k 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.--------------------------------------------------...
kapi's user avatar
  • 1
1 vote
0 answers
136 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 ...
Vanillaice's user avatar
0 votes
0 answers
622 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 ...
jacob_w's user avatar
0 votes
1 answer
170 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 ...
Dale Mahalko's user avatar
0 votes
0 answers
1k 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. ...
Ela's user avatar
  • 101
0 votes
1 answer
296 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 ...
k1dfr0std's user avatar
  • 101
0 votes
3 answers
2k 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 ...
Cal's user avatar
  • 189
0 votes
1 answer
300 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-...
wb6vpm's user avatar
  • 23
0 votes
0 answers
136 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 ...
Dark.Attacker's user avatar
3 votes
1 answer
151 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 ...
JessaCrow's user avatar
-2 votes
1 answer
1k 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.
User12's user avatar
  • 89
0 votes
1 answer
1k 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 ...
AveryFreeman's user avatar
0 votes
2 answers
988 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 ...
Ryan Ding's user avatar
0 votes
0 answers
292 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 ...
User12's user avatar
  • 89
0 votes
1 answer
597 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.
User12's user avatar
  • 89
4 votes
2 answers
6k 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 ...
User12's user avatar
  • 89
0 votes
1 answer
246 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....
User12's user avatar
  • 89
0 votes
1 answer
383 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 ...
DemagusMiyan1980's user avatar
0 votes
1 answer
41 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. %~...
NoNo's user avatar
  • 123
1 vote
0 answers
676 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/...
Aleksandar's user avatar
4 votes
1 answer
7k 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 ...
Harsh Rawat's user avatar
0 votes
1 answer
416 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 ...
Remote Support 1 Systrix's user avatar
1 vote
2 answers
1k 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....
Entree's user avatar
  • 1,944
0 votes
1 answer
831 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, ...
Eduardo Velazquez's user avatar
1 vote
0 answers
411 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 ...
Luke's user avatar
  • 557
-1 votes
1 answer
50 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 ...
Stelian's user avatar
2 votes
1 answer
6k 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 ...
Luke Welden's user avatar
0 votes
1 answer
449 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 ...
Carlos S. Na's user avatar
0 votes
1 answer
235 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 ...
LordAro's user avatar
  • 111
2 votes
2 answers
241 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 ...
Amy Rose's user avatar

1
2 3 4 5
8