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

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

383 questions
2
votes
2 answers

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 which foo.exe. It's probably very simple but…
2
votes
0 answers

Check microphone level and change accordingly via script

I am trying to check what the existing volume on client workstations is and set to x (let's say x = 16.5). I figured out how to set the volume via cli which is using nircmd. To be specific: nircmd.exe setsysvolume 16 microphone Now, there is really…
user3421341
  • 33
  • 1
  • 1
  • 8
2
votes
1 answer

Windows 2008 R2 Task Schduler is raising the following error “0x41301”

I have a console application which uses some SharePoint dll libraries, to execute a background jobs. now I can manually run the console application without any problem. but when I schedule its execution using windows 2008 R2 Task Scheduler, I got…
2
votes
2 answers

How to check if a specific list of user accounts are disabled in AD, using powershell v2.0 or CMD / VBS

1) I have a txt list with sAMAaccountNames 2) I need to query each account name and verify whether it is disabled 3) if the account is disabled, delete it from AD I'll just delete them manually if there isn't another way, but first I need to check…
DSKyo
  • 153
  • 3
  • 6
  • 15
2
votes
2 answers

Lookup ip geolocation via command line

I've been trying to piece together a quick and dirty script to return the geolocation of a bunch of IP addresses. I'm using freegeoip.net and couldn't find a quick wget equivalent for cmd line so using a powershell script for that, calling it from…
2
votes
3 answers

Trigger a scheduled task "At task creation/modification" schtasks

I am creating a schedules task to run just before it's created and deleted after it runs. I am using the tool, schtasks to create the scheduled task, but i havent found the parameter to run the task "At task creation/modification" schtasks /create…
kimo pryvt
  • 431
  • 5
  • 12
  • 24
2
votes
4 answers

How to run an elevated command prompt from the command prompt?

I have remotely connected to a Windows 7 computer via psexec and am running a remote command prompt on the Windows 7 computer. The command I am trying to execute requires that it be run in an elevated command prompt for it to work. How do I get to…
Chris Magnuson
  • 3,771
  • 10
  • 42
  • 46
2
votes
2 answers

Windows command line tool for disk IO monitoring

I am looking at extracting disk IO statistics on Windows 2003 upon occurrence of some events, e.g. a long full GC occurring that is waiting a long time for CPU resource. I have read that Process Explorer allows you to do that, but it is a GUI based…
2
votes
1 answer

Search strings in text files and show in output the string, preceding one and next one (cmd.exe)

I have a lot of big text files. And I'm searching (within cmd.exe) for a list of values in them as following: findstr /i /n /g:strings.txt 1\*.* >results.txt where strings.txt is the file with all the values I'm looking for and 1 is a folder where…
2
votes
1 answer

MS-DOS attrib +s 'path not found'

I have to put some specific icons on folders and I had success doing that over all folders except the one that have some special characters. I'm using windows7. How it is done? creating a .ini file within the folder; running a command-line…
2
votes
0 answers

How do I add an iscsi target to a windows initiator through stock cmd?

I have many Windows Servers that need to run headless but I need to add many iscsi targets to each of the Windows hosts. I already have the iscsi target setup and have access to IP address of where to query targets as well as the IQN's of the…
Rusty Weber
  • 472
  • 8
  • 21
2
votes
1 answer

Killing a single service when multiple services are under same pid using taskkill

I am trying to kill wuauserv on a windows server 2008 R2, however it has the same PID as other services which I don't want to kill. I assume running taskkill /f /pid [PID] would kill them all, how do I target just the wuauserv service?
2
votes
1 answer

How can I input password to manage-bde -pw option via windows powershell

I am trying to encrypt Data volume (for example E:) with the following command: manage-bde -protectors -add E: -pw When I execute the above command, it will ask for the password, so I entered it. It is successfully encrypting my data volume. Now, I…
2
votes
3 answers

cmd.exe, nested for loop, the variable cannot be use in option like skip=

I have many archive folder which stores the backup files. each folder increases daily. I need to delete all files except for recent N copies in each of them, N was defined by a variable from the parent loop. %%a is a number from parent loop, then…
valpa
  • 319
  • 9
  • 15
2
votes
2 answers

Provide Administrator credentials within script

I am writing a script that runs from a user account. The script needs to execute another script as the Administrator account. Tried AutoIt's RunAs - didn't work. Tried PsExec - the same. Tried CMD's RunAs - needs manual typing of password. What…
Omar
  • 21
  • 3