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
0
votes
1 answer

What does the @ symbol mean before a file path in Windows command prompt?

I've noticed that powershell.exe started csc.exe with a command line like this: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /noconfig /fullpaths @"C:\Windows\TEMP\pn1kld2d.cmdline" I've read the CSC manual page, but didn't found any…
Alex
  • 186
  • 9
0
votes
2 answers

Permission don't work as expected - PowerShell works, GUI doesn't

I'm a software developer and not really into all those server config things... still I have a problem that really confuses me. I'll try to explain it as good as I can: When I log into a server with a specific account, I don't have the permission to…
0
votes
1 answer

Checking what commands were run on windows?

From time to time a cmd windows popps up (or two of them) for a split second I cannot track what was started. Is there a way to monitor the cmd/powershell window? Sysmon? Or is there a way to force cmd window to not close when command finishes? The…
kol23
  • 109
  • 2
0
votes
1 answer

server core and command prompt

Thought came to mind as I am studying for my 40-711 MCSA test later today, and I'm not near my server lab at home to test. Do CMD commands work in a server core install of MS Server 2012 R2? For example, I'm refreshing up on DNS and the thought…
0
votes
1 answer

How do I explicitly set %PATH% in System Variable or User Variable in command prompt in a persistent manner?

When you open sysdm.cpl -> Advanced -> Environment Variables. you can see that envs are divided into two section: one is User Variables, another is System Variables, they both have a variable PATH in them. Now if you run set inside the cmd prompt,…
0
votes
1 answer

VBS Script passing argument?

Hello everyone I have this script in VBS: On Error Resume Next If WScript.Arguments.Count < 2 Then WScript.Echo "This script requires arguments." WScript.Quit End If Dim sURL, sAuth, sRequestType sUrl =…
Guizado
  • 13
  • 3
0
votes
1 answer

Issues with shared out folder in Windows Server 2012

I am seeing a strange issue on a 2012 Server where I have 90 shared folders, but about 50 of them are showing up with question marks in the path and share name net share. i.e: C:\Windows\System32>net share Share name …
0
votes
2 answers

Need relative paths from a batch script directory listing

I have a simple batch script that recursively looks at all files and folders within the directory and writes out the file inventory to a text file. It currently looks like this: dir /b/s > files.txt The /b means don't give any extra info and /s…
Mark
  • 2,041
  • 6
  • 19
  • 18
0
votes
1 answer

unable to start service in remote and local machine with sc command and net command

I am trying to start the services using the below SC command and service is not coming up. sc start startliq_2090 output: SERVICE_NAME: startliq_2090 TYPE : 10 WIN32_OWN_PROCESS STATE : 2 …
0
votes
0 answers

Cmd - Cleaner way for to retrieve ServiceName and assign to variable

Is there a cleaner way to retrieve and assign the service name to a variable in cmd ? My current attempt: set svc_query="sc queryex type= service state= all | find /i "plusfield" | find /i "service"" for /F "tokens=*" %%i in (' %svc_query% ') do…
0
votes
1 answer

batch file to check cpu and output to txt

I'm trying to write a simple batch file to check the cpu of the computer every 30 seconds and output to txt file with the current time. I want each line to be like: Line1: %time% %cpu% Line2: %time% %cpu% This is what I came up with so far, didn't…
Shlomi
  • 331
  • 2
  • 9
  • 19
0
votes
1 answer

Skipping Command in CMD batch file

I'm using pstools to shutdown local pcs .. with different user & pass psshutdown \\10.0.0.1 -u 1 -p 1 psshutdown \\10.0.0.2 -u 2 -p 2 psshutdown \\10.0.0.3 -u 3 -p 3 problem is : if one of them is down the batch take a lot of time to move to…
D007a
  • 1
  • 1
0
votes
0 answers

how to allow one specific application to access command-prompt?

is there a workaround to allow only one specific application to access command prompt (java application) in a disabled command prompt active directory environment without enabling command prompt for the users or other applications
0
votes
2 answers

cmd files to hta

I have a lot of cmd files i use daily for example to add users to local groups, installing printers, run as admin tasks etc. I like to take the scripts i use most frequently and add them to a tabbed hta file, but i have trouble finding a good guide…
0
votes
2 answers

Is there an easy way to alias PowerShell in cmd?

Whenever I login to my servercore server, the first thing i usually do is this: powershell start-process powershell -verb runas It's a little annoying to always write this whole sentence. can I somehow shorten this? powershell start powershell -v…