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
7 views

WmiEvent for any usb device

I am following this answer, which contains Register-WmiEvent -Class win32_VolumeChangeEvent -SourceIdentifier volumeChange and $newEvent = Wait-Event -SourceIdentifier volumeChange This works ...
0
votes
0answers
13 views

Get calender entry from public exchange calendar with powershell

We have an MS Exchange 2010 Server named EX01 and a public folder based calender named VenueEvents. I open a remote connection from Powershell to the server using this code: $cred = Get-Credential ...
0
votes
1answer
15 views

Checking WinSCP connection status in PowerShell script

I have a script that get files from one location to another. My script works fine. However I'd like to check first for "connected sessions". With SSH.NET PowerShell module I checked this with: ...
-1
votes
0answers
22 views

Powershell to compress files and send email

Powershell to compress files and send email. I want to 7zip backup file and send as an email. Below i have done till now which will read text files and send as email. Instead i want to send all the ...
-1
votes
1answer
30 views

How to open a firewall port in Windows using Power Shell

I would like to know how to open a firewall port in Windows by using Power Shell.Could anyone write a script for opening a firewall port.I saw a similar post on ...
1
vote
1answer
31 views

Powershell search-string inside a variable (not text file)

I am trying to search for a string called "Hostname" from a variable "$a" which stores the output of "systeminfo" command but ran into issues. I am using "system-info" to gather a bigger set of data. ...
-2
votes
1answer
66 views

Powershell stopped working

I get the following message in my system 7, "powershell stopped working", very often. I tried a system scan and everything is ok. What is causing this message? How do I solve this?
-1
votes
0answers
19 views

View Application Error Logs on Windows 7 [closed]

I am using a program that calls a python library and errors out. However the python library seems to be working fine by itself. Is there any way to see more detailed logs in a powershell log or some ...
0
votes
1answer
47 views

Powershell | DownloadString | External website | Return

I'm a totally powershell newbie, so please be indulgent ;) I'm trying to write a script where a machine check an external website waiting for a the word: "test" to execute a download. The things goes ...
0
votes
1answer
37 views

Change the default Mouse Pointer Colour on boot in windows 8.1

How do I change the default (White to black) Mouse Pointer Colour on boot in windows 8.1
0
votes
3answers
41 views

Cannot change directory with cd in DOS using Win7

I would like to change my Present Working Directory in DOS (I am running Win7 professionnal). When I perform a cd D:\, nothing happens: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 ...
0
votes
2answers
54 views

remote file copy in windows

I am running an automated process on one particular machine, variously a Windows 7 box or a windows Server 2012 box. These boxes are connected to a file server over the network. The network is a ...
0
votes
0answers
24 views

How do I access gzip-compressed data from a PowerShell Invoke-WebRequest command, when the “Accept-Encoding: gzip” header is set?

I'm learning about response compression in IIS and I'm testing my configuration with various tools. It appears that several of these tools either auto-decompress the response, or always send the ...
1
vote
1answer
29 views

Powershell 2.0 Enter-PSSession cannot get New-PSDrive working

I have a remote computer which I can Enter-PSSession successfully. When I execute: New-PSDrive -Name "G" -PSProvider Filesystem -Root '\\fileserver\apps\etc' I get the following error: ...
0
votes
0answers
16 views

Get-childitem via PSSession

can someone explain me this behavior? I create a test folder, lets say c:\tmp\testing\folder1 I disable inheritance on folder testing, and remove all ACL entries. So i get "Access denied" when i ...
0
votes
0answers
18 views

Finding a short cut to "Connect To Network

Is it possible to create a shortcut for Network --> Properties-->Connect to a network in Windows 7? Connect to a network is available in Control Panel\All Control Panel Items\Network and ...
0
votes
0answers
22 views

install cad program (Solvespace) no installer - on Win7-32 ?

Do I run PowerShell msi, exe.,on command line ? any advise where to start would be helpful. I am used to downloading programs with an Win installer. also I am a PC novice.
-2
votes
1answer
59 views

pulling specific columns from various excel sheets and putting them to a new worksheet [closed]

I have a report that I do and at the moment it is very tedious. I have 6 separate excel reports with different information in them. I create a new report by going into each work sheet one at a time, ...
4
votes
1answer
109 views

Update Driver Software from command prompt

I'm looking for a way to automatically install missing drivers on newly installed machines. All the machines are the same brand and model, so I created a shared folder that hass all the drivers in it. ...
0
votes
0answers
38 views

Powershell Start-Process fails to start when -Credential argument is added

If I run this in powershell, Start-Process "c:\Python27\python.exe" -WorkingDirectory "c:\wd" -ArgumentList "-m SimpleHTTPServer" It can start the python process as expected However when I add ...
0
votes
1answer
45 views

Find highest possible screen resolution from command line

With Powershell, I can request the current screen resolution. this is not what I'm trying to do. I'm trying to find the maximum resolution I can set the screen to (slider all up). Is this even ...
1
vote
1answer
34 views

Returning user password expiry date - Powershell

I'm working on a command to pull users and the date/time that their password will expire. Trying to make it look somewhat decent. I feel like this should work, but it's not working as planned. Can ...
1
vote
0answers
12 views

PowerShell have Tab only fill in partial matches instead of first selection

I'm having trouble adapating to the behaviour of PowerShell tab completion from bash tab completion and wondering if there is a way to change it. In PowerShell when I press tab it expands to the ...
3
votes
1answer
72 views

Restart-Computer and hold script

I'm running a Powershell script that requires a reboot in the middle of the script. After the reboot, the script is executing some commands (that can't be executed before the reboot!). I'm rebooting ...
0
votes
0answers
38 views

PowerShell issues with spaces in directory names

PowerShell has issues with spaces in directory names. I am trying to execute a file in the same directory as the PS1 script like so: .\getGravatarsForGource.pl It works fine when the directory ...
2
votes
1answer
62 views

Windows PowerShell Script to convert a folder of Word Docs to PDF

So I already have the basic code to do this. i.e. convert a folder of word docs to pdf. # Acquire a list of DOCX files in a folder $Files=GET-CHILDITEM ‘C:\Users\Ashley\downloads\articles\*.DOC’ ...
0
votes
0answers
24 views

Open Powershell ISE from Windows 8.1 start button context menu [duplicate]

I really like the ability in Windows 8.1 to right click the Start button and select "Windows Powershell" or "Windows Powershell (Admin)" to open those command windows. I'd absolutely love it if I ...
0
votes
2answers
77 views

How do I open a command prompt as a regular user (not an adminstrator)?

I'm trying to fire up a regular command prompt to test the limitations of certain commands. However, whenever I open the Command Prompt from the start menu, it automatically runs as Administrator. If ...
0
votes
0answers
34 views

GnuWin32 / sed unexpected behavior in Powershell

I am using GnuWin32 tools on Windows Command Line/Powershell. What is see: 11:15 enlil D:\Users\x> Get-ChildItem .gitconfig | sed "s/ */ /g" D i r e c t o r y : D : \ U s e r s \ x M o d ...
1
vote
1answer
33 views

How to make powershell start as administrator when launched via keyboard shortcut?

I've set up a shortcut on my Desktop for Powershell so that I can quickly launch it anywhere/anytime. Is there a way to require it to launch as administrator? Where I'd normally set it to be run ...
1
vote
0answers
51 views

Unable to send files over 1 MB via FTP on Windows

I tried to send multiple files via FTP commands using simple batch script. It works fine when the file size is less than 1 MB but when the file is larger than 1 MB I get the following error log. ...
2
votes
1answer
28 views

Removing AD Group members according to their memberships to certain groups in the same OU

Our AD groups for Websense filtering has been set up with very little flexibility for policy management. There are only two groups for "Permit all" web browsing category. Now I need to create over 20 ...
0
votes
0answers
16 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
34 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
52 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
60 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
46 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
86 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
28 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
27 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
27 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
24 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
66 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
72 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
84 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
20 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
19 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
23 views

Powershell - 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
92 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
52 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" ...