0
votes
0answers
15 views

Uninstalling programs MSIEXEC always takes the same time to run

I've created a script that removes all of the SQL bits and pieces left over when you do an appwiz.cpl removal of SQL. Initially some components failed because of 'there is another installation in ...
0
votes
0answers
19 views

How can I get all urls of pattern x from a paged list of search results?

I'm using Windows 7 SP1, and I'm willing to use powershell or wget or whatever will work. I downloaded powershell today (ps 4) and I've got some scripts working, but I'm having trouble with this one. ...
0
votes
2answers
53 views

List of MAC addresses for 10 machines

I need to list of MAC addresses for a 10 computers having Windows 7 installed on them. These are named in a series like training1 - training10. There IP addresses are on DHCP mode and update every ...
1
vote
1answer
23 views

Autorunning a series of .cmd files when usb is plugged in [closed]

I'm trying to automate a process to the simplest way possible for non technical lab students. This is my first time doing longer scripts so bear with me. I need the drive to: Check that the user ...
2
votes
1answer
96 views

Powershell LastWriteTime is incorrect

I am running the following script to create directories based on the first 9 characters in the filenames in the directory and then moving te files into these directories based on their filenames. dir ...
1
vote
1answer
43 views

ScriptBrowser for Powershell won't run

I'm trying to run ScriptBrowser for Powershell, but it won't run for me when I click on the shortcut (nothing happens). I tried right clicking on the shortcut to see what it is running, but instead of ...
0
votes
0answers
100 views

Write a small script to extract ms-exchange audit logs in csv format?

Background I'm using ms-exchange 2013 in my environment, and have a separate siem box which analyze logs produced by different systems (i.e exchange). The logs for exchange are internally stored and ...
6
votes
3answers
3k views

Delete all Files from Folder and Sub Folders

I'm wanting to remove all files from a folder structure so I'm left with an empty folder structure. Can this be achieved in either Batch or VBS scripting? I have tried a very basic batch command but ...
0
votes
1answer
74 views

Is there a way to find out if a Windows 7 workstation has updates turned off in the control panel?

I have a domain with a group policy to run updates every night at 3AM. If the computer is turned off, the next time a user logs into the computer, the updates are downloaded. When the users shuts ...
1
vote
1answer
1k views

Calling PowerShell functions in another scripts

I have a script with a number of functions (not just functions but also other code). I would like to create another script that uses one of the functions in the main script. Here is a sample of what ...
1
vote
1answer
38 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
votes
1answer
85 views

Execute command prompt file (.cmd) from within a PowerShell script?

What command do I need to put in a .ps1 file to execute setup.cmd and make it a forced install? I've tried to execute this command in powershell and its working: PS C:\> c:\setup.cmd ...
1
vote
1answer
80 views

Powershell script with multiple msiexec calls [closed]

I am having problem with multiple msiexec calls in my PS Script msiexec /package $msi1 /l*v $logfolder\log1.log /qn msiexec /x $msi2 /l*v $logfolder\log2.log /qn msiexec /i $msi3 /l*v ...
0
votes
0answers
69 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 ...
2
votes
1answer
224 views

Powershell: how to get logged-in users list in active directory?

I need to generate this table: Computer | User | last log in date(never) This one asks for username for each user account and returns only ad server name against which the user was last ...
1
vote
2answers
87 views

How to Add Scripts to Path?

I've stored commonly used powershell scripts at %USERPROFILE%\Bin. I created a USER_BIN environment variable which I added to the user PATH environment variable via Control Panel > System and ...
1
vote
1answer
2k views

How can a PowerShell script be automatically run on startup?

I have a PowerShell script to monitor an image folder. I need it to run automatically on startup. I tried to use MSConfig, but I could not find it in that list. How can I have the script ...
1
vote
0answers
125 views

Trying to make a symbolic link to a Powershell script

I'm trying to create a symbolic link with mklink through a Powershell script to a Powershell script on a remote server. this link should come on the desktop of all users. if(!(test-path -path ...
0
votes
1answer
226 views

Powershell Script to Return Directories Without a Zip File Created/Modified Within the Last 7 Days

I have a series of folders on a server that needs to be regularly checked that they are being backed up correctly. We like to have at least 1 backup in that folder that is no less than 7 days old. The ...
1
vote
1answer
218 views

Run a script with an interactive prompt on login

I am trying to run a script in Windows Server 2012 on login. I used the group policy editor to assign a .ps1 powershell script which runs fine. However it does not get assigned a command prompt. I ...
1
vote
1answer
2k views

executing powershell scripts via command prompt - win7

I'm having trouble running a powershell script automatically. When every I call or Execute the script, I get a security prompt requesting I enter "R" to run. I have already set the execution policy to ...
2
votes
2answers
636 views

Powershell Script to Find & Highlight Specific Files Based on Creation Date

I am trying to write a Powershell Script that checks a certain folder for .zip files. The .zip files contain information from certain backups. These .zip files lie within a folder tree for different ...
-1
votes
1answer
127 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
2answers
739 views

How can I write a script to count files modified within a particular month?

I use a PowerShell command to count ZIP files modified within the past 30-ish days, that goes something like this: (gci "\\servername\sharename\foldername\subfoldername\*.zip" | where ...
1
vote
1answer
737 views

removing special characters from entire directory structure

I would like to know whether it is possible to REMOVE special characters recursively in powershell from all files in an entire directory structure? for example if I have a file called: my ...
2
votes
2answers
504 views

Is it possible to have scripts that trigger whenever an IM is received in Microsoft Lync?

I've just upgraded to Lync 2013, and I'm considering using it instead of Pidgin+SIPE. One of Pidgin's many nice features is Growl integration... and I would miss that. There are no Growl plugins for ...
1
vote
0answers
366 views

Remote commands over SSH with Windows PowerShell - Protection against disconnection

I am planning to connect to remote Linux hosts via SSH and call scripts with Windows PowerShell SSH. As far as I understand, if the SSH connection is lost (timeout or connection reset) whilst the ...
1
vote
1answer
78 views

Counting files per owner

Using PowerShell how can I count the number of files that each owner has modified in the last 45 days? This is how I am able to get counts by extension in the last 45 days: gci -Recurse| where ...
2
votes
1answer
3k views

Remove all characters appearing before a certain string in PowerShell

I have a text file with the following information: 24.;128.32.;128,6;0.128.68.;128,1.;0.76.;;;;;0,1.;0.4.;0,2.;0.5.;0,4.;;;0.76.;128,;;;;;;;;172.30.1.1,172.30.1.228, I need to remove all characters ...
1
vote
1answer
2k views

Can PowerShell scripting move files less than 5 minutes old?

We have a network folder used as a holding area for XML files that were not properly processed. I’ve been asked to design a script that runs every five minutes and checks the folder for any files less ...
2
votes
1answer
118 views

Ping-visible on unlock, ping-muted on screen lock

When I login to / unlock my Windows 7, I need to switch the machine to ping-responsiveness mode. When I pres Win-L key, i.e. lock the machine, I need it to ignore ICMP pings. How would I accomplish ...
0
votes
2answers
865 views

Not able to run powershell script from autosys

I am new to powershell and using 1.0version and am trying to write a powershell script that I can execute using autosys scheduler. When the I run the command in autosys powershell -command "& { ...
-1
votes
2answers
1k views

How do I create a wake up script using PowerShell? [duplicate]

Possible Duplicate: Alarm clock software that can turn the computer on? I need something that can wake someone up in the morning - basically like a cron event in Linux. I think this needs ...
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 ...
5
votes
2answers
5k views

Powershell: Get inital character string from file name and create directory from string, then move files

I have a folder with the following file names: 00150005D201110172338427995.vpf 00150005D201110180005318058.vpf 00150013D201110180014448082.vpf 00150013D201110180022268098.vpf ...
1
vote
1answer
919 views

Running Elevated Logon Script

I have to run a powershell script every time a user logs on. This script needs to be run elevated. Is there a way to do this with out prompting the user. I am currently running the script using on ...
0
votes
2answers
543 views

Automating tasks in Windows 7

I need some help automating some tasks in XP. Most of them are of console nature. Now in Linux this probably wouldn't be too difficult to pull off but I'm not too acquainted with Windows automation ...
0
votes
3answers
833 views

Script to kill multiple process with same session using scripts

How can I kill a process running with in multiple sessions using a bash or powershell script?
1
vote
2answers
882 views

running PowerShell's Invoke-Item with a switch

I'm trying to make a PowerShell script to launch programs after I boot up my machine. I'm taking things out of the registry's "run" area and putting them in the script in the order that I want and ...
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
2answers
1k views

Deactivate Wlan Adapter via Powershell

I want to deactivate and then activate my wlan adapter via powershell. I already queried the Hardware-ID of the device. My script looks like this: $wireless = Get-WmiObject win32_networkadapter | ...
2
votes
1answer
603 views

PowerShell or batch script to delete with exclusions

What's a good way to delete everything below a certain path, supplying a list of exclusions? E.g. C:\ MyFolder MyApp MyConfig MyWorld MyEverything ...
7
votes
7answers
4k views

It is possible to make autocompletion in Powershell work like in bash?

I love Powershell, but coming from a Linux background there is a few things that is really bugging me. Like for example how the default auto completion works. For example: Get-PS expands to ...
1
vote
2answers
4k views

Using Active Directory commands in Powershell

How can I use Active Directory commands in a Powershell script?
2
votes
1answer
646 views

How can I easily place multiple powershell windows on login?

I like to have a 2x2 grid of powershell windows open on my alternate monitor, but I'd prefer not to have to open and resize each one by hand. I can set the window size (through ...
1
vote
2answers
507 views

Windows PowerShell ISE doesn't import PSCX 2.0 module

i am using Powershell 2.0 with the PSCX 2.0 module. When writing PS scripts inside Windows PowerShell ISE no Cmdlets from the PSCX module are availible. For example running "Get-DriveInfo" from ...
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 ...
5
votes
3answers
22k views

Deleting entire lines in a text file based on a partial string match with Windows PowerShell

So I have several large text files I need to sort through, and remove all occurrences of lines which contain a given keyword. So basically, if I have these lines: This is not a test This is a ...
6
votes
4answers
12k views

How to sign a PowerShell script easily?

I'd prefer using the AllSigned execution policy with PowerShell, but self-signing my scripts seems to require several hundreds of megabytes of downloading and installation and the signing process ...
5
votes
5answers
1k views

What benefits could the average geek get out of Powershell?

I would like to know what benefits the average geek could get out of Powershell. So take people who spend all their time in front of their computer, but who aren't necessarily programmers. Gamers, ...