-2
votes
0answers
12 views

Multiple Directory Creation based on domain username and set file sharing script request

I need a script that will do the following. Create multiple directories labeled by domain usernames (I'm thinking pulling the usernames from AD and add the username to each command.). In a shared ...
0
votes
0answers
42 views

How to change the Start In property via CMD for an .lnk

Context: I have folders with presentations being created dynamically except currently an instance of our ppt&macro is being dropped in each folder with the presentation. The presentation will only ...
-1
votes
0answers
39 views

slow computer performance on windows power shell and command prompt

I have a window and I've been using it for 1 year now, starting 6 months ago, I had frequently started to feel laggy in running command prompt/power shell I have installed many software on this ...
0
votes
1answer
44 views

How do I rotate an image clockwise using the Windows command line?

Is there a way to rotate images stored in folders clockwise so they can be changed from Landscape to Portrait using CMD or Powershell? If there isn't a way to do it then please let me know. It might ...
1
vote
5answers
120 views

How can I both pipe and display output in Windows' command line?

I have a process I need to run within a batch file. This process produces some output. I need to both display this output to the screen and send (pipe) it to another program. The bash method uses ...
0
votes
1answer
45 views

Powershell - Using Config Files for Variables

I need to build a set of scripts in PowerShell for SharePoint Deployments, and I'd like to use the same idea I've been using in BAT files. The idea is having ONE .ps1 to configure "session" ...
0
votes
1answer
57 views

Regexp based editing of content in large CSV files [duplicate]

I wanted to remove certain pattern of contents based on a regex from csv file which is very large in size containing 100,000+ records, how is it possible via windows commandline? I also have sed and ...
0
votes
1answer
53 views

How do you export Windows 7 AQS search to file? [duplicate]

My question is identical to this question that has already been asked back in 2011, but that does not have any answers: Export Windows 7 Advanced Search Results to Text File I'm hoping that someone ...
1
vote
1answer
98 views

Need to create a robocopy in Powershell 1.0

My ultimate goal is to mirror a folder and its subdirectories with the restriction of only copying files with the extensions, sln, vcxproj, cs, cpp, hpp, c, and h. There are far too many subfolders ...
0
votes
1answer
47 views

Run script from powershell in the same window

I have installed PHP and PHPUnit in my PC. Both of these files are in same directory and I have added to enviroment variable path. I have also associate .phar extension to run with php.exe ...
0
votes
1answer
1k views

pip is not recognized as an internal or external command

I have installed pip and distribute, and no errors came up. But when I enter pip into the cmd or windows powershell, it gives me an error. However, when I import pip into python, no errors come up. I ...
0
votes
1answer
52 views

(Windows Powershell) How to open a globally defined file with a certain application?

I've added the C:\Windows\System32\Drivers\etc\ directory, which contains the windows hosts-file, to my PATH environment. So if I start the shell at some arbitrary location (C:\ for example) and ...
1
vote
1answer
35 views

Launch Script for Windows7

Hey guys hopefully I can thoroughly explain what I'm trying to do here! LOL I have a dual display Windows 7 PC and what I am trying to do is launch 2 different programs on boot, and I want one to ...
1
vote
2answers
2k views

Using the Windows 8.1 command prompt to view Windows activation key

I am not able to access my control panel, probably due to some corrupt system files. And to request help from Microsoft, I need to give them my Windows 8.1 product key. So is there any way I can ...
1
vote
1answer
70 views

PowerShell ISE doesn't flush stdout

I'm having a little problem when running a console program in PowerShell ISE: when the program writes out a line in portions using flush, PowerShell won't show the line until the program writes a line ...
1
vote
2answers
158 views

why cant we maximize the command prompt but whereas we can run the powershell maximised

According to this answer windows command prompt cant be maximized, but what makes the windows to view maximizing through powershell, what does the difference while maximizing in windows powershell and ...
2
votes
4answers
88 views

In powershell, is there a way to copy to last directory on `pushd`'d stack?

In Windows PowerShell (and CMD and bash) it would be nice to pushd and then copy to the last directory I was in. ex: > pwd Path ---- D:\Some insanely long\path I really\ don/'t want to ...
0
votes
0answers
50 views

Need a PowerShell analog to the following command

I Need to repeat the following shell command on a windows server 2012 that uses powershell. Found that start command was nearly the same but I need it to be powershell like. The command (it runs in ...
0
votes
1answer
105 views

Robocopy: copy files preserving folder structure but adding a subfolder

I need to copy a folder which contains subfolders with files to a shared folder on another machine. During that the script should create a custom sub folder in each destination folder and place files ...
1
vote
1answer
78 views

Grep analog in Powershell

I'm trying to make a port for a project from linux to MS Server. The problem is that there is grep command with special options grep -c string and grep -e which I need to convert. Found that similar ...
0
votes
0answers
60 views

Powershell not exiting when called from Orchestrator

I'm trying to run a powershell script from orchestrator. The script works fine from my interactive prompt but when run from a orchestrator runbook it never exits and the overall runbook appears to be ...
0
votes
1answer
106 views

Replace a variable with its value inside powershell command prompt

In Windows PowerShell, is there a way to "evaluate" a variable so that I have its value pasted into the command prompt? The usage scenario I would like to perform is as follows: let's say I have a ...
0
votes
2answers
87 views

Concrete cases for CMD/BATCH use [closed]

Please excuse my inexpertise. I don't have much experience with the command line. From my searches, the main reason for CMD use(*) is automation. I haven't, though, found concrete cases. Most ...
0
votes
1answer
186 views

Powershell won't start, fails with 'Value cannot be null. Parameter name input'

I have a brand new install of Windows 8.1 with Visual Studio. Running Powershell opens a window that closes immediately. Launching powershell from cmd.exe, I get the following error: Windows ...
2
votes
2answers
79 views

Windows command line to do 'Edit' action?

The start command (in PowerShell an alias for Start-Process, in cmd.exe a shell builtin) does the same as the Windows Explorer context menu 'Open' action: it opens the file using the application which ...
0
votes
2answers
182 views

Powershell: gci filter with compact output

I want to find files recursively, and for that I am using > gci -name -filter *.py -r Option -name gives only the file name, to get one line per item found, as required. But the items that I get ...
4
votes
0answers
250 views

Why doesn't windows command prompt still support ctrl + v? [closed]

This is just one of those things that I started wondering about. Why aren't the copy/paste keyboard shortcuts (that we all love) in command prompt not aligned with the rest of the software ...
0
votes
0answers
35 views

Close openfiles in local pc

We want to close all open connections of a specified directory. But it shouldn't affect to other open connections. We used net files and openfiles commands. These commands works fine for shared ...
0
votes
1answer
807 views

Adding many IP addresses to Windows Firewall using CLI fails partially

I have a PowerShell script which adds IP addresses to Windows Firewall using the "netsh advfirewall" command. (As described in this question: How to append netsh firewall rules, not just replace). ...
0
votes
0answers
503 views

Set Windows Commandline (or PowerShell) to connect to internet via Proxy

I work behind a very strict firewall but I am able to browse (most) of the internet just fine with FireFox and I.E., however there are specific proxy settings to have. Namely, an autoconfig *.pac link ...
2
votes
1answer
114 views

How do I copy a file to a destination with a wildcard?

For example, I would like to copy a shortcut.lnk to all of my individual users in windows xp. Therefore I want to do something like this: echo | f xcopy \\server\networkpath\shortcut.lnk ...
0
votes
2answers
110 views

PATH, resolve location of exe

Consider the following PATH c:\App1\;c:\App2\ App1 directory contains the application Foo.exe App2 directory contains the application Bar.exe Now when I'm in a CMD window I can type either Foo.exe ...
1
vote
2answers
311 views

Measure a process' run time in Windows and Linux

I'm writing a program that performs certain optimizations on an executable file and am looking for a way to measure the time the executable took to run. I've been using a script that measures the ...
-2
votes
1answer
205 views

Any alternatives to cmd.exe or JP Software's Take Command? [closed]

I know of PowerShell and something similar to it, but specifically I want JP Software's Take Command program, however it costs $100 for the full version. Is there any way to obtain Take Command either ...
1
vote
1answer
1k views

Why is my PATH environment variable different from the command prompt?

A bit of important background: my company has a generic login VBS script that makes modifications to the user PATH environment variable upon login and allows me to run software that has dependencies ...
0
votes
1answer
200 views

Bash script: kill instances before re-executing

I've got a batch script I use to jump start my development environment. It looks like this :: Update checkout git pull :: Compile code with Maven call mvn clean install -Pui :: File for a program ...
1
vote
3answers
129 views

Variable Assignment for arguments with a for loop [closed]

Alright, so, I've searched quite a bit on how to do this but I've given up as I simply couldn't find anything. So, I have a code (below); it's main purpose is to get 9 arguments and assign them as a ...
16
votes
2answers
15k views

How do I run multiple commands on one line in Powershell?

In cmd prompt, you can run two commands on one line like so: ipconfig /release & ipconfig /renew When I run this command in PowerShell, I get: Ampersand not allowed. The & operator is ...
3
votes
1answer
2k views

Is it in any way possible to uninstall PowerShell from Vista?

Is it in any way possible to uninstall PowerShell from Windows Vista? There is no Uninstall option under Start/All Programs. It's start menu group is actually located under Accessories which is hard ...
4
votes
2answers
2k views

how to set PowerShell as default instead of cmd.exe

I'm trying to get PS to open up instead of cmd.exe when I do a Shift+left-click and select open command window here I changed the %ComSpec% system variable and even added on in my user variable ...
1
vote
1answer
265 views

Batch create folders?

I'm looking for a way to batch create a folder followed by sub-folders. I'm looking at something like c:\users\user\desktop\sample\1 c:\users\user\desktop\sample\2 etc. Any ideas? I'd prefer ...
4
votes
3answers
135 views

In Powershell, is there a way to save a typed command into history without executing it for later execution?

In Powershell, is there a way, after typing a long or complicated command, to commit that command into the history buffer, but not execute it? For example, you start typing a git commit, within ...
1
vote
1answer
44 views

Given a file, get the location in a separate (identically structured) directory?

Being completely green to Windows shell and cmd scripting, I'm banging my head against this particular problem but coming up with nothing. What I'm aiming to do is add a context menu item to right ...
3
votes
2answers
77 views

How can I pass two commands with all their switches in Windows command prompt or powershell?

I want to pass a netstat -t -b 90 command and tell the prompt to simultaneously or successively perform this command to launch network monitor start netmon /autostart.
1
vote
1answer
351 views

Batch script for archiving

I need to set up an archiving task on Windows 7 using Windows command line and WinRAR (or some other similar program). I want to create a script that does this, but I have no prior experience. I want ...
3
votes
2answers
2k views

How to use UNC path correctly to share a folder on remote computer?

I would like to know if somebody knows the correct syntax for giving a folder a share on remote network machine's folder. Please write a syntax you know for sure that it's working. This operation ...
4
votes
1answer
72 views

Program leaks Black and White onto PowerShell console

Some programs, such as Node Package Manager (npm) and some tasks for grunt change the color of my PowerShell console and leave it that way. Here's a picture: Anyone know why this is happening? How ...
3
votes
1answer
3k views

How start PowerShell from cmd by specific path

I want to start PowerShell (C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe) from windows 7 default command line (cmd) and go to the specific path. I used the command: start ...
1
vote
1answer
284 views

How to trigger the windows task scheduler event when my computer's CPU is overrun over 30 minutes?

my computer's OS is windows 7, I would like to do this: when my computer's CPU is overrun over 30 minutes, it will trigger task scheduler's event which is send a email to my email account. I don't ...
0
votes
1answer
791 views

How to get the GUID of different HDD partitions?

I was trying with BCDEDIT and DISKPART but that tools give me an ID that is not the GUID Note: I am testing in Windows 7