Windows PowerShell is a command line shell and scripting language for Windows that supersedes the CMD.exe shell and batch language. PowerShell is also an automation engine for Windows that provides functionality similar to Windows Script Host and VBScript.

learn more… | top users | synonyms

1
vote
1answer
2k views

Open a custom remote powershell remotely

I have 2 computers. On the computer A, I have a custom module written in C# for powershell 3.0 and installed via a MSI. I also have a shortcut that open powershell with the module already loaded. I ...
7
votes
2answers
2k views

bash aliases equivalent for powershell?

By default my Windows PowerShell starts in C:\Users\Santosh, my XAMPP installation is in D:\ so the htdocs folder is located at D:\xampp\htdocs. If I have to edit something in htdocs folder then I ...
3
votes
2answers
5k views

Creating a folder named after the current date and time

I'm trying to create a powershell script that creates a new folder with the current date (formatted as yyyy-MM-dd) as a name. Here's what I have so far: PS C:\Users\me\Desktop> powershell.exe -...
0
votes
1answer
616 views

Add formatted text to Word autocorrect via PowerShell

We're using Word 2010 and have a PowerShell script that reads a table in a Word docx file and use it to populate the autocorrect dictionary. It works for the regular entries that don't require ...
0
votes
1answer
481 views

Powershell, Task Scheduler or loop and sleep

I have a job that needs to go off every minute or so, it loads a DLL i have written in C# that retrieves state for an SQL Server Mirror (Primary, Mirror and witness) for a number of databases; it ...
0
votes
0answers
738 views

how to speed up listing printers with powershell

When I use the following Powershell command to list all the printers my laptop has configured, it takes a few minutes for Windows to return the result. I have 3 printers configured, one is a virtual ...
5
votes
4answers
6k views

How can I delete a folder with “illegal” characters?

I plugged my USB flash memory stick into a Mac and it gained some unwanted hidden folders. (See the question Prevent MacOS from making .* and ._* files for prevention.) I'd now like to remove these ...
4
votes
2answers
10k views

Is Git Shell Windows Power Shell?

I have a simple question. What is Git Shell? IS it the same as Windows Power Shell? Because when I run Git Shell on my Windows 7 machine the Windows Power Shell is opened. Thanks for clarification.
4
votes
1answer
1k views

Autorun for PowerShell

I have created some aliases (doskey), saved them to a file and added AutoRun value (pointing that file) for cmd.exe at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor I would like to do ...
1
vote
1answer
263 views

Using PowerShell to replace individual bytes in a document

We're in the process of converting an HTML help system to a SharePoint document library. We have about 3000 individual HTML documents that we're converting to Word. About 20% of the documents include ...
1
vote
1answer
1k views

Windows 8 power-shell “update-help” is failing. Does anyone know how to fix it?

Windows 8 includes PowerShell 3 out of the box, but not the help. To get the help you run PowerShell as administrator and type "update-help". I get this error: > update-help update-help : Failed ...
3
votes
1answer
3k views

How to remove a drive from a storage pool on Windows 8?

I have 3 drives in a Storage Space on Windows 8. I am running a two way mirror. The drives are 2x2TB and 1x1TB. I want to remove the 1TB drive without replacing it. In other words, I only want the ...
5
votes
1answer
1k views

Bash-like, non-rotating filename tab completion with PowerShell

Under Windows, using PowerShell, is it possible to make the filename suggestion (using the Tab key) work like with bash under Linux? Let's assume a directory contains 3 directories: example1, example ...
4
votes
2answers
6k views

A command like Linux `tail` in PowerShell?

How can I replicate the behaviour of Linux's tail in PowerShell? I'm running an application that writes a log file (error.log) and I would like to see the last lines from it as well as keep the ...
66
votes
11answers
52k views

Equivalent of Linux `touch` to create an empty file with PowerShell?

In PowerShell is there an equivalent of touch? For instance in Linux I can create a new empty file by invoking: touch filename On Windows this is pretty awkward -- usually I just open a new ...
5
votes
3answers
3k views

How can I install a new font in PowerShell console?

I want to customize the look of the PowerShell in Windows. When I install new fonts, they work just fine, but I can't find them in PowerShell font selection (only default fonts are there). Is there a ...
6
votes
3answers
350 views

Is there something like the GNU locate command in PowerShell?

Is there an equivalent of the GNU locate command in Windows 7/8? locate can take as input a file name and gives as output all the paths where files named similarly to input are, e.g.: locate file-...
1
vote
3answers
829 views

Embed Powershell prompt in Windows 7 desktop

On Linux (last time I did this was with Compiz on Ubuntu 11), I like to have a transparent console window anchored to the desktop, so I can get to a shell just by clicking out of whatever I'm doing ...
1
vote
2answers
732 views

How *should* I be filtering powershell command output? [closed]

I've started a new job working for a firm that uses a full windows stack. I feel like I've gone backwards in terms of productivity, not because Windows is less powerful, but because I'm just really ...
21
votes
2answers
23k views

How can I mount an ISO via PowerShell/programmatically?

How can I mount and dismount ISO images from PowerShell in Windows 8 without 3rd party programs? This question's original revision got me wondering if it's possible to mount an ISO via PowerShell in ...
1
vote
1answer
2k views

Search and replace registry entry value using powershell

I'm trying to update a set of registry keys, a set of properties need to be updated with a new value based on the old value. I tried using the following: Get-ItemProperty -Path HKCU:\Software\xxxxx\...
3
votes
1answer
310 views

How to Create a PowerShell ISE Tile

I would like to create a PowerShell ISE tile in Windows 8. I emphasise ISE, as when I search for PowerShell ISE, sure enough I can Pin to Start and create a tile, but despite the label 'PowerShell ...
0
votes
0answers
178 views

Powershell and Thinkvantage Access connections

I am looking for a way of letting Powershell control the Thinkvantage Access connections program but I can't find any good starting points/guidelines for how to get started. In the end, I want Access ...
4
votes
1answer
6k views

Installing Powershell 3.0 on Windows 7 - updates were not installed

I am trying to install Powershell 3.0 on my Windows 7 x64 SP1. Update starts, but then it says Some updates were not installed. The following updates were not installed: Update for Windows ...
2
votes
1answer
8k 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 ...
0
votes
1answer
645 views

How is PowerShell different in Windows 8?

I used PowerShell a lot in Windows 7. Will all my scripts still work in Windows 8 and are there any new features?
4
votes
1answer
2k views

What happened to PowerShell ISE? [closed]

Where is PowerShell ISE in Windows 8? In Windows 7, it was right on the Start Menu, but it doesn't appear anywhere in Windows 8.
1
vote
1answer
5k 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 ...
5
votes
3answers
4k views

Possible Windows 8 cmd changes?

For some reason, I have decided to try out Windows 8 on my development machine. So far, so good, until I try to start up Powershell that has some customizations, including pulling the PATH changes out ...
9
votes
3answers
4k views

Can PowerShell be used within the Windows Recovery Environment?

I have tried to access PowerShell from the Command Prompt in Windows Recovery Environment with no success. I am able to run VBScripts there without a problem, and I am now wondering if there is some ...
-1
votes
1answer
6k views

How to get the parent node of a given child node using PowerShell?

I am new to PowerShell. I have to write a script which can return me the first parent(node) value by passing the child node. I have the following XML. When I pass my PowerShell script the value "AAA",...
4
votes
2answers
408 views

How to get the DLL a cmdlet is loaded from?

I'm trying to track down where exactly a cmdlet comes from in Powershell on Windows 8. How do I track this down? I know which Module and such it is, but this doesn't help me to track down the actual ...
1
vote
1answer
184 views

What is the PowerShell equivalent of ksh's `whence -v`?

From a comment at http://www.davidarno.org/2008/04/08/pash-powershell-for-the-rest-of-us/: With the ksh, I could type whence -v cd to determine that cd was a tracked alias of say /bin/cd. In ...
2
votes
2answers
201 views

easy way to automatically retrieve image for desktop background?

I would like to automatically download and replace an image from the NASA website to use as my desktop. in linux i used a cron job to do this, using wget to retrieve the file and a small utility to ...
2
votes
1answer
556 views

Powershell - find file names within a string when their names are unknown - only their extension is known “.jpg”?

Using PowerShell, how can I get a list of file names within a string, if I only know the extension? Simplified example: C:\> $e = "CN=Ken Myer world.jpg more text." C:\> $f = $e.IndexOf(".jpg")...
1
vote
1answer
180 views

Powershell 2 freezing on Select-String “.*_.*=-1”

this might seem like stupid Q but I have PS problem: like the title says I try something like: $all = gci D:\work\ $all | Select-String ".*_.*=-1" (im looking for config option that has value -1 ...
1
vote
0answers
35 views

Piping Output asks for parameters

In the CLI itself $foo = (Get-ADGroupMembers -identity"blah_SEC") echo $foo Works. But when I do the same exact thing in a .ps1 file it says the parameters are missing and prompts me to input them....
2
votes
2answers
1k views

Mapped networkdrive on logout

I'm using a script to keep a mapped networkconnection alive, but ofcourse the mapped connection is gone when I logout. The point is now, that I'm running this on Windows Server 2008 R2, where I use ...
1
vote
1answer
573 views

Is there an equivalent to ssh-copy-id with OpenSSH in Powershell?

I'm using PowerShell and have OpenSSH 4.6 installed. I'd like to use ssh-copy-id so I can login using a key without doing through the manual process of copying keys to servers. Is there an equivalent ...
1
vote
0answers
51 views

Using Powershell to migrate folder rights to another server [closed]

I am interested in finding Powershell scripts that can be used\tweaked to migrate folder permissions across servers\environments. Is this a feasible approach? I would like to automate our deployment ...
1
vote
1answer
662 views

CCNET Dashboard not working

I have installed CCNET and I am running some powershellscripts with it. It works fine, but the Dashboard does not show up. As I understood it, it is allready included in the basic installation of ...
2
votes
2answers
2k views

Windows startup Powershell script not closing after Start-Process

I've got a Powershell V2.0 startup script for my work computer (XP Professional 64-bit), as follows: start "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" -ArgumentList "/recycle" ...
2
votes
2answers
1k views

Load explorer from powershell with low privileges

I have a Powershell manteinance script that works this way: kill explorer do things restart explorer This script executes in elevated mode, but I would need to restart explorer without admin ...
4
votes
2answers
2k views

How can I open PowerShell via AutoHotkey?

I'm running AutoHotkey 1.0.48.05 on Windows 7. I'd like CTRL-ALT-P to open PowerShell. This is what I have so far: ^!p:: Run %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe Return ...
4
votes
1answer
3k views

How to set printer permissions using PowerShell / some other script?

I need to update printer's permissions in a script, i.e. do the same as I would manually do this way: Open Devices and Printers applet Double-click the default printer (open its queue) Go to Printer ...
4
votes
5answers
38k views

Cannot cd to a folder

I am trying to cd to the Program Files directory, but I'm getting an error. Here is the screen shot. Here's the command I'm running and the error message: PS C:\> cd C:\Program Files Set-...
0
votes
0answers
21 views

How to write Powershell script using cmdlets for Bitlocker [duplicate]

Possible Duplicate: How to leverage Powershell cmdlets - Bitlocker http://technet.microsoft.com/en-us/library/jj647767.aspx The above link hints at being able to unlock a bitlocked drive ...
2
votes
1answer
3k views

How do I leverage Bitlocker cmdlets?

This article hints at being able to unlock a bitlocked drive using: Unlock-BitLocker -MountPoint -Password However, I know diddly squat about Powershell and how to use the Powershell cmdlets to do ...
3
votes
4answers
16k views

Why does `rd /S` say “directory not empty”?

I'm trying to execute rd /S on a non-empty directory and sometimes, it works fine, sometimes, it reports "The directory is not empty". Why am I getting this error? Is there a reliable way to remove a ...
1
vote
2answers
2k views

How to schedule a URL-based API call in Windows?

I have this DNS dynamic service and I need to find a way to call the API to update my dynamic IP. The URL that needs to be call is just a .php with some GET parameters. Is there a way to do it in ...