-2
votes
0answers
16 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
47 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
vote
1answer
56 views

Remote Registry with alternate credentials from the command line

Sometimes, when I'm teleworking from my personal laptop, I run into problems with my SmartCard reader while trying to connect to systems that are configured to enforce SmartCard usage. The usual ...
1
vote
2answers
110 views

Batch file for starting powershell in a specific directory

I am learning to program in python through the book "Learn python the hard way". Therefore I use powershell to run my programs. Since I had to manually change the directory every-time I started ...
0
votes
2answers
89 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 ...
2
votes
1answer
120 views

Making PowerShell assume the working directory of a called Batch file

I regularly work interactively with a batch script that I can't easily change. One of the features of this script is as a navigation aid - it understands my company/product's code layout conventions ...
3
votes
2answers
466 views

How can I start/stop a Windows Service through a Linux bash script?

I want to create a script that will be kicked off through an SSH server to start/stop a Windows service. The SSH user is part of the Administrator group. However, when I execute the script, I get an ...
2
votes
1answer
124 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
0answers
82 views

send mediaplay command using powershell or vbs or bat

I've got a vbs script that automatically opens the XBox Music app for me (as part of a larger script) that looks like this: Set objShell = WScript.CreateObject("WScript.Shell") objShell.SendKeys ...
2
votes
3answers
207 views

Batch or PowerShell to mount drives on a FQDN

I currently use a batch script to mount my network shares each morning: NET USE * /DELETE /Y NET USE Z: \\<IP>\<SHARE> <AUTHENTICATION> /persistent:no ... Which is fine when I'm ...
1
vote
2answers
5k views

Set-ExecutionPolicy using batch file + powershell script

I'm working on my dotfiles and I'm wanting to create a batch script that will do some initial setup for me when switching to a new computer, like using psget to install modules, etc... I'd also like ...
1
vote
3answers
131 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 ...
-1
votes
1answer
122 views

Replacing a string in all config files across machines with a script [duplicate]

I have the below task and I am wondering what would be the best and quick way to do this. I am thinking scripting rather than a C# app but struggling with scripting in DOS. I wanted to use powershell ...
1
vote
1answer
373 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 ...
1
vote
2answers
322 views

Powershell remote executed script does not start disk2vhd

I made a script to backup VMs on CSVs which works great except that I cannot get disk2vhd.exe to run. The script is run from a server with windows 2008 installed. Since a lot of our VMs use Windows ...
4
votes
3answers
2k views

How to quickly save what is currently shown in cmd.exe to a file

I am asking if there is a quick way/command to save the current standard output from cmd.exe or powershell to a file. For example, I have run a bunch of commands in cmd.exe which generating like ...
8
votes
2answers
6k views

Programatically associate file extensions with application on Windows

I've just recently reinstalled Windows and in setting up my environment I've noticed that all my associations for the various programming languages I edit in Notepad++ have gone (naturally). I am ...
1
vote
1answer
679 views

cmd to powershell transition in batch-script

Is there a way of writing a batch-script that's executed via C:\>cmd.exe a.bat to switch into powershell.exe and run the remaining lines of code? 1. | echo "Hi. I'm cmd.exe." 2. | powershell 3. | ...
2
votes
1answer
903 views

Script to assign and remove arbitrary secondary IPs to an interface

I'm trying to figure out how to write a script that will let me arbitrarily assign and remove a secondary IP address to a system. I'm most comfortable with batch scripting, so I'd rather focus on ...
0
votes
4answers
3k views

How do I do a find-replace on a windows batch file string?

I want to change a variable from some\original\path to some\replaced\path by doing a find-replace and changing the "original" part in the path. set x=some\original\path set y= ???? (y is now ...
3
votes
1answer
5k views

Running msiexec with PowerShell

I'm try to run msiexec in PowerShell but I keep getting an error message. If I run it from cmd then it's all fine. Can someone please let me know how I can run this command in PowerShell? This is ...
2
votes
7answers
13k views

How can I permanently assign drive letters to my USB devices in Windows?

I have several customers with different PCs (Windows XP, Windows Vista and Windows 7). Unlike DOS 6.22, where you can permanently assign drive letter designations (e.g. Drive C: = Hard Disk Bootable ...
1
vote
4answers
4k views

Converting Visio (.vsd) files to pdf automatically

I am trying to create a scheduled task to convert all my .vsd files to pdf so all of our devices can read them (linux, mac, smartphones, etc..) and I would prefer not paying for something that can be ...
3
votes
1answer
369 views

How to stream IPConfig /displaydns

Is there a simple way I can have a powershell / cmd prompt open and stream the dns cache so that it will scroll automatically as things are being cached?
3
votes
1answer
12k views

Change NIC speed/duplex settings in script?

I have a laptop running Windows Server 2003 SP2, with PowerShell installed. Occasionally, this system has to be used in environments where it needs the NIC manually set to 100 Mbps/Full Duplex in ...
1
vote
1answer
780 views

Help with batch file to start Powershell in specific directory & retain settings

I'm running Win7 and have Powershell docked on my taskbar. When I launch it from there, it retains all of my color and font settings from the last time I used it. I have two questions. First, if I ...
0
votes
1answer
183 views

Download folders from dev server to local drive

I am developing a .net web application on a local environment. I have a dev server that the application is installed on. Within the web application on the dev server I have four folders that I dont ...
2
votes
1answer
47 views

Modify Audit object acces policy

I'm trying to automate this step on a local network that's not included in a domain. I've tried using auto-it but had little luck with that. Is there any way of doing this using a batch script or ...
0
votes
1answer
276 views

How to do simple multitasked loop processing over filenames with PowerShell?

I'm batch transcoding some 50 GB of video files on a USB hard disk which is connected to a wlan router. The drive is mapped as a network drive on my Windows 7 laptop. The speed handicap of the wlan ...