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).
387
questions
-3
votes
2
answers
71
views
Why can't I cd to my file in cmd? [closed]
I'm typing cd ~ C:\Desktop\gitPractice
And I get this return:
bash: cd: too many arguments
What do I need to fix here in order to be able to change directory?
0
votes
1
answer
85
views
Windows hello for business: remove certificate from virtual smartcard
I've managed to add a certificate to windows hello for signin to RDP.
See: https://learn.microsoft.com/en-us/windows/security/identity-protection/hello-for-business/rdp-sign-in?tabs=intune
However ...
0
votes
1
answer
110
views
ssh from CL using keyfile from Windows client to Linux server
This sort of thing drives me crazy - hopefully obvious solution(s). Have keys on Win 10 laptop, and on one of my Linux servers. If I use puTTY, where I can explicitly browse to the keyfile on the ...
1
vote
1
answer
292
views
Managing Orphaned .avhdx Files in Hyper-V with PowerShell
I'm managing a Hyper-V environment and looking to clean up my hard drive to free up space. Specifically, I want to delete orphaned .avhdx files and possibly move some to external storage. I prefer ...
0
votes
0
answers
77
views
Trying to import a specific portion of the local security policy template for account lockout
I am trying to implement a solution to modify the local security policy on client machines using SECEDIT and a provided inf file, however /IMPORT requires the /db parameter to be listed but I cannot ...
0
votes
0
answers
64
views
Add context menu for file passing multiple parameters to target
I would like to use an AI subtitles sync program (Alass). This is very simple in Linux/bash but I was trying for a way to achieve this using Windows and the context menu. So here my requirement:
make ...
0
votes
1
answer
264
views
Start exe as current logged in user
i am creating exe shortcut on Windows startup folder while installing application. It was automatically starts on Windows start and restart.
I want check on every 5 mins whether the exe running or not....
0
votes
1
answer
472
views
Can we use RoboCopy to synchronize data?
I have a project where we are moving from on-premise file share to AWS FSx.
I need your suggestion on data synchronization. I decided to use the RoboCopy tool to copy the data. We need to also copy ...
0
votes
1
answer
41
views
SFC Couldn't Perform Requested Operation -- Options?
I had a user come to me with her company issued Dell laptop. After the "Dell" splash screen is done, Windows does not boot. It's just a blank, black screen. After rebooting several times via ...
0
votes
1
answer
353
views
How can I determine which network adapter a device is using for packet emission when attempting to reach a specific IP address using ping?
I have been trying to reach a particular IP and I have not been able to check on which Network Adapter it is using for publishing. Is there any way to check on a particular device to verify whether it ...
-1
votes
1
answer
2k
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 ...
2
votes
1
answer
599
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 ...
0
votes
2
answers
2k
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....
0
votes
2
answers
7k
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 ...
0
votes
1
answer
2k
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 > ...
0
votes
1
answer
99
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 ...
-1
votes
1
answer
293
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.
...
0
votes
1
answer
1k
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 ...
1
vote
0
answers
694
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\...
1
vote
1
answer
2k
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 ...
1
vote
2
answers
1k
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 ...
0
votes
1
answer
28
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. ...
0
votes
1
answer
1k
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 "...
0
votes
1
answer
403
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 ...
1
vote
2
answers
620
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 "...
0
votes
1
answer
2k
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.--------------------------------------------------...
1
vote
0
answers
155
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 ...
0
votes
0
answers
947
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 ...
0
votes
1
answer
279
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 ...
0
votes
0
answers
2k
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. ...
0
votes
1
answer
517
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 ...
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 ...
0
votes
1
answer
370
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-...
0
votes
0
answers
181
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 ...
3
votes
1
answer
252
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 ...
-2
votes
1
answer
2k
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.
0
votes
1
answer
2k
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 ...
0
votes
2
answers
2k
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 ...
0
votes
0
answers
491
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 ...
0
votes
1
answer
881
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.
4
votes
2
answers
11k
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 ...
0
votes
1
answer
342
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....
0
votes
1
answer
961
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
1
answer
68
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
0
answers
912
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/...
5
votes
1
answer
10k
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
1
answer
557
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 ...
1
vote
2
answers
2k
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
1
answer
1k
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, ...
1
vote
0
answers
500
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 ...