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

0
votes
0answers
20 views

How to get HDD space information through VMM?

I have Virtual Machine Mangager with list of virtual computers and I need information about their HDD spaces - used and free space on all hard disks. I am exploring cmdlets for VMM, but I can't find ...
0
votes
1answer
46 views

How to use powershell command in cmd pipe?

I want to use powershell's 'replace' in some long cmd.exe pipeline; how can I redirect from cmd to powershell input? The line below doesn't work, gives empty output: c:\>(echo foo && echo ...
1
vote
1answer
77 views

Win7 error: “CLR initialization failed with error 800700c1.”

I installed and used chocolatey in the past on my Windows 7 running in Parallels on Mac OSX. However, recently, whenever I try to use it from the command prompt I get the following error: CLR ...
0
votes
1answer
90 views

Delete AD User and its associated folders using Powershell script

Is it possible to delete an AD User and its associated folders? The folder structure is: D:\Users\Profiles D:\Users\Redirect D:\Users\Data I am trying to use the following script which deletes ...
0
votes
0answers
51 views

ping results are opened in new window when using powershell 4.0

Whenever I ping any IP using PowerShell, a new window pops up which displays the output, see the screenshot below. Please help in restoring to default i.e. ping results shown in the same PowerShell ...
3
votes
0answers
88 views

Is there functionality that CMD has that PowerShell doesn't? [closed]

This is not a question regarding which is better; I am purely interested in use cases where PowerShell cannot perform the same functions that CMD can. The only thing that comes to mind for me is that ...
1
vote
0answers
31 views

Optimize a folder for music/video via powershell

I would like to know the command to set via powershell the option 'optimize this folder for' to 'Music' or whatever on a folder. I didn't find anything approaching in the Attributes list of folder.
-1
votes
2answers
30 views

Powershell Stop-process with spaces in name, non exe extension

In powershell how can I stop a process that has .dat extension and spaces in name In task manager I see process name: "my portable app.dat" Stop-process -processname my portable app (doesn't work) ...
-1
votes
1answer
30 views

Script which disable inheritance

I need help with powershell script. Unfortunately i have never use powershell and now i neet to write script which disable inheritance i group of 1,5k folders. Structure of this folders look like ...
0
votes
0answers
28 views

Setting up SQL Express on Azure VM

I'm trying to set up SQL express on an Azure VM. I already have SSMS 2012 installed but I cannot access .\SQLEXPRESS. This MSDN discussion says: run powershell script "ConfigureSQLExpress.ps1" ...
0
votes
1answer
69 views

Using Get-ChildItem but only look at the 2nd level down

This is probably really simple but I can't seem to find the answer. I'm looking for a way to only look in the second level down of a folder for a file. i.e. C:\Data C:\Data\Level1 ...
1
vote
1answer
98 views

Use PowerShell to Retrieve Volume Label of Locked BitLocker Drive

I have a USB hard drive encrypted with BitLocker: While it's yet unlocked, in PowerShell I want to retrieve the drive's volume label, so I run a command like this: Get-WmiObject -Class ...
0
votes
1answer
101 views

robocopy /mir not duplicating folder structure

I'm using the following script to archive everything prior to Jaunary 1, 2013: foreach ($i in Get-ChildItem "O:\Projects” -Force -Recurse) { if ($i.LastWriteTime -gt ($(Get-Date).AddDays(-649))) ...
0
votes
1answer
21 views

How to make tee not break lines at window width in powershell?

Currently I'm doing the following command to look through all files in a folder for a string, and then tee that line to a file: ls -r [folder] | sls "dummy text" | tee dummy.file These lines of ...
0
votes
0answers
22 views

wmic inside a bat script

I've been searching for a long time for a solution for this, but no success. I have to say I am not very familiar with BAT scripting. Anyway, I am trying to check if a process is running and if so, ...
1
vote
1answer
30 views

Grabing Mailbox Stats : How can I look at multiple OUs?

I have this Powershell code that grabs the mailbox stats from one OrganisationalUnit but how could I grab it from two others without running the code again seperately. How would I create an array of ...
1
vote
0answers
99 views

Adding users from .csv file to AD security groups using powershell [closed]

I have about 300 users that needs to be added in about 40-45 security group, each user can be a member of multiple groups. I have all users with corresponding security groups in a .csv file. Is there ...
2
votes
1answer
70 views

Prevent powershell from changing title of command window

I've got a batch file that sets the title of the command window and then runs various commands. One of them is a powershell script which is launched something like: powershell -file "scipt.ps1" ...
4
votes
2answers
82 views

How to invoke actions from an executable in PowerShell?

I am using Powershell 2.0 on Windows 7 SP1, but any answers covering versions 1.0-4.0 would be nice. I know that this command opens Paint via PowerShell: & "C:\Windows\system32\mspaint.exe" ...
0
votes
0answers
65 views

Add line to text file after specific line with PowerShell

I have to edit remotely a file called nsclient.ini on hundreds of computers, the file contains some command definitions. For example: [/settings/external scripts/scripts] check_event="C:\Program ...
2
votes
1answer
61 views

how to open internet explorer with powershell in window xp

expect to open a link in internet explorer and refresh it automatically every 5 seconds but it can not open after try powershell with administrator Set-ExecutionPolicy remotesigned powershell ...
1
vote
1answer
67 views

Get first name in an array of key-value pairs in PowerShell

While trying to write some maintenance scripts for our Exchange 2013 deployment, one of the ones I need is a script that will determine which server a database is currently active on, versus which one ...
0
votes
0answers
16 views

Powershell support for VT100 escape sequences [duplicate]

Is there a module which adds support for VT100 in PowerShell? I know these go by many names, some of which are VT100 and ANSI, and they look like ←[0m in the console if you lack support. There's much ...
1
vote
1answer
60 views

powershell foreach loop fails as it increments count by first test

I have been asked to monitor c:\temp on windows servers. I need to know how many folders are there and if they are there greater than 1, 2 and 3 minutes. This reporting works in a basic form but not ...
0
votes
0answers
46 views

WinRM or PowerShell Server?

I would like to be able to remote into my Windows machines with a command line only interface, to PowerShell. It must be secure. It seems like there are two options for doing this. One is the ...
0
votes
1answer
27 views

How to bring vim back to foreground in Powershell

launch vim from powershell hit control+z (you are dropped back to powershell, vim is in background) ??? How do you bring Vim back to foreground? EDIT: I have tried fg
0
votes
1answer
42 views

Powershell is installed but winrm is not found

one of my servers is win 2003 and has powershell 2.0 installed, but I don't see winrm service there and can't thus run "Winrm quickconfig". It says "command not found". As a result, I can't call ...
1
vote
2answers
159 views

Set UAC Level with PowerShell

I'm looking for a way to set the UAC Level with Powershell/Command prompt. I'm aware the 'EnableLUA' value in the registry, but this won't set the level. It's just true or false. Is there a way to ...
-1
votes
1answer
57 views

NullReferenceException error in powershell

I am a newb in power-shell, i have written an script that stops process according to parameters in commandline. the problem is when i run the script in power shell it works but when i try to run it ...
0
votes
1answer
22 views

MS Surface / Windows PC - Wipe Between Users

As a company we have a few devices like MS Surfaces and some netbooks that are used for open access within social spaces. The problem being sometimes these devices are abused and wallpapers changed ...
1
vote
1answer
23 views

Where is the default location of the directory in which PowerShell scripts are ran?

I ran a script in Powershell that was suppose to do some file analysis and create a csv. It looks like it ran, and I didn't encounter any errors. My problem now is that I don't know where the file ...
1
vote
1answer
84 views

Internet Explorer: Set homepage for all users without GPO

I'm looking for a way to set the homepage of Internet Explorer (and possibly other browsers) for all Users through command line/Powershell, or any other method that doesn't use the domain policies ...
0
votes
1answer
9 views

Inspect Exchange items

I would like to inspect mail and calendar items stored in an Exchange mailbox, by id, to see all their properties that are stored for them. Is there a way to do this (in powershell or the like)?
1
vote
1answer
42 views

Powershell script to open a number of files located inside subdirectories

How does one open (say, using notepad.exe) multiple files ending in _dc.txt, each one of which is located in a number of subdirectories of C:\Data\Test? My script below gets stuck on -Recurse, with ...
0
votes
1answer
48 views

Way to list and cat all files that contain string X in powershell

Currently, when I'm looking through a bunch of files for a string in powershell I use the following: PS: C:\> ls -r | Select-String "dummy" | ls -r And that lists all files that have that string ...
0
votes
0answers
19 views

Why am I getting conflicting results when checking Maven version in Windows PowerShell and cmd64 (Environment variables issue)

I'm looking at Maven for the first time, trying to get everything up and running. I've been going through the tutorials here and up until now everything has been going smoothly. I've added all the ...
2
votes
1answer
66 views

Taskill vs. Tskill

I've seen both of these used to end processes. It is to my understanding that tskill is the older taskkill Microsoft Windows XP Documentation while the newer taskkill is capable of closing several ...
0
votes
2answers
55 views

Renaming files with a previous date

I am running a program that creates 50 reports for different clients in pdf format on the first of every month. I need the file name to reflect the previous month and current year in the file name ...
1
vote
2answers
35 views

Return two (or more) properties as a table with a single PowerShell command

I have the following PowerShell command which returns all sorts of properties about disk drives attached to the system: Get-WmiObject -Class Win32_Volume | Where-Object {$_.DeviceID -like "\\?\*"} ...
1
vote
1answer
85 views

Running powershell scripts or functions using unix-like pipeline syntax

I want to run multiple custom processing steps using the pipeline in powershell. In linux I could do something like this: listServers.sh | <some commands to filter servers> | ...
0
votes
1answer
75 views

Microsoft Exchange 2007 Management Console shows as installed but is not

When I mount the ISO for Exchange 2007 SP1, it shows the steps 1, 2 and 3 greyed out. They display the following information: Step 1: Install .NET Framework version 2.0 - Installed Step 2: ...
0
votes
0answers
99 views

How do version differences affect PowerShell commands on remote computers?

Newer PowerShell versions obviously will come with new features and new cmdlets. This is something which is important to take into consideration when writing scripts, or PowerShell walkthroughs, which ...
1
vote
2answers
767 views

Powershell script to list scheduled tasks on remote systems

I want to write a PowerShell script that lists all Scheduled Tasks on remote systems, and includes the user account which will be used to run each task. The local system is running Windows 7, with ...
0
votes
1answer
53 views

Error on “-e” parameter when running makecert command in powershell

I am trying to run the following command in Powershell on a machine running Server 2012: makecert -r -pe -n CN="*.$domainVariable" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr ...
0
votes
4answers
435 views

FTP: Cannot connect using FileZilla on Windows.

I installed FTP Server Services on my IIS 8.5/Windows 7 workstation, and tried to FTP using FileZilla from my laptop (client - Windows 8). I tried to configure the Network Settings using Network ...
0
votes
1answer
28 views

custom object powershell multiple items

I have this code wich work great for only one item if I add a new item it just delete the older one I've tried many way but I can't find how to do this can you help me? Import-Module ...
0
votes
1answer
46 views

What am I doing wrong in my powershell script

Ok here is the thing. I tried to make a PowerShell script to create some folders and to change a couple of strings in a .txt file. But as you can guess it is not working. See my configuration below: ...
0
votes
0answers
37 views

Why does Windows PowerShell font size not reflect reality?

On Windows 7 if I set my PowerShell window to Consolas 14, it looks very different to Microsoft Word 2010 Consolas 14. See picture. Which is right, and why do they look different?
1
vote
1answer
137 views

Using make from Windows PowerShell

Under Linux, sources of projects commonly come with Makefile's. Makefiles contain directives to build these projects using the command make. I am currently forced to use Windows, and so as to be able ...
2
votes
1answer
131 views

batch script to “scan for hardware” in Windows 8.1

There is this issue with Wifi on the Surface Pro 3 that can be easily fixed with a script that does the equivalent of running "Scan for hardware changes" in the Device Manager. This script will be ...