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

2
votes
2answers
29 views

How can I identify files in my Windows file system where the modified date is X more recent than the created date?

I'm hoping this can be handled with some PowerShell tricks. I have a directory on my work machine (Windows XP) containing tons of PDFs, some of which I've annotated and resaved. I'd like to be able ...
0
votes
0answers
15 views

How to repair powershell installation on windows 7

When I try to run powershell.exe from C:\Windows\System32\WindowsPowerShell\v1.0 I get the error: 'The volume for a file has been externally altered so that the opened file is no longer valid.' I ...
2
votes
0answers
16 views

How to customize the default CursorSize in Powershell

I set he default CursorSize in $PROFILE file like: [Console]::CursorSize = 10 or $HOST.UI.RawUI.CursorSize = 10 But the cursorSize will reset after using another console in powershell, for ...
2
votes
0answers
19 views

Task Scheduler - how to run powershell script with multiple parameters?

I am using powershell.exe as the Program and "-Command "& C:\Windows\logon.ps1; exit $LASTEXITCODE"; ExecutionPolicy RemoteSigned" as the Parameter, but it doesn't seems to be working. Some ...
2
votes
2answers
33 views

How to disconnect a network drive using powershell

I would like to disconnect a network drive (Y:) with powershell. That drive letter is assigned / mapped to a network location. Is there a simple way to do that? I believe "net use XXX /delete" would ...
0
votes
1answer
28 views

PowerShell touch all files newer than

I have found the following question on ServerFault: Windows recursive touch command Which partially answers my question with this answer: Windows recursive touch command However, I would like to ...
0
votes
2answers
56 views

How to rename some files according to their timestamp

suppose I have 10 files generated by the system every day under D:\Temp. The names are RANDOMLY when generated. Assume I need to rename the oldest one to be 'aaa', the second oldest one to be ...
0
votes
1answer
61 views

Office 2013 Click to Run - Primary Interop Assemblies

Given that the Office 2013 click-to-run installer allows no customisation of the installation, whatsoever, how can I install, or where can I find an installer for the Primary Interop Assemblies/.NET ...
1
vote
1answer
45 views

Change directory to previous directory in Powershell

I am a Linux guy, but am trying to be open-minded and learn some Powershell. I miss the ability to cd - back to a previous directory, like in *nix shells. Is there a similar command in ...
1
vote
2answers
45 views

How can I use powershell to list all files I uploaded to server?

At work there's a network and everyone has a username and password that they use to log in. How can I search for my files on this network? I could list all the files like this: cd ...
0
votes
3answers
47 views

powershell create zip from log files

How can I move log files to zip archives with System.IO.Compression.FileSystem in PowerShell? I have more folders with log files per application: app1logfolder |-app1_20130507.log ...
2
votes
2answers
55 views

How to use UNC path correctly to share a folder on remote computer?

I would like to know if somebody knows the correct syntax for giving a folder a share on remote network machine's folder. Please write a syntax you know for sure that it's working. This operation ...
1
vote
0answers
17 views

Powershell script to update XML file content

Please help me create a Powershell script that will go through an XML file and update content. In the example below, I want to use the script to pull out and change the file path in the ...
3
votes
0answers
33 views

Program leaks Black and White onto PowerShell console

Some programs, such as Node Package Manager (npm) and some tasks for grunt change the color of my PowerShell console and leave it that way. Here's a picture: Anyone know why this is happening? How ...
0
votes
1answer
57 views

Set Physical Path Credentials in IIS7 Using Powershell

I have a number of applications under a Default Web Site in IIS7. A number of the applications have to have their Physical Path Credentials set to a specific user rather than using application user. ...
0
votes
0answers
27 views

Finding not corrupt files using hashes with minimum hard disk use [closed]

Today I have one really interesting problem for all SuperUsers. After hard disk crash 80% files are recovered with folders. But still, some files (all different type) that software is saying is 100% ...
1
vote
0answers
47 views

Detect mounting of a virtual (TrueCrypt) volume in windows PowerShell script

I am using the following powershell script to detect when a particular volume is mounted so I can run a script that will move files from my machine to the device (I don't know much about powershell ...
0
votes
1answer
18 views

PowerShell icon missing from taskbar

Windows Server 2008 R2 SP1 I installed PowerShell 3 by installing Window Management Framework 3.0 (Windows6.1-KB2506143-x64.msu) Somehow the PowerShell icon has gone missing from the taskbar. ...
1
vote
2answers
61 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
0answers
30 views

How to enable CredSSP

I am trying to use the -Authentication CredSSP switch when entering with PowerShell (2.0) in order to remotely launch a Script that can write to files or set up new PSDrives. I get an error when I ...
0
votes
1answer
33 views

Reducing Exchange Mailbox Sizes to Less Than Their Current Size?

What will happen if I set all mailbox size limits back to exchange defaults on a network if a user's mailbox is greater than the default amount. I don't personally want to try this, but do I have to ...
-2
votes
0answers
45 views

How to force windows XP to stay more time on welcome screen during logon?

Does anybody know how I can force Windows XP to wait longer than normal on the welcome screen during login process until my application initialization end up?
0
votes
0answers
32 views

Sublime Text Build System for Heroku

I made a build system for Heroku Foreman on Sublime Text 2 (windows 8) { "cmd": ["foreman.bat", "start"], "working_dir": "$project_path" } When I run this in shell, I can just break, and ...
1
vote
1answer
47 views

ffmpeg drawtext initialization error

I'm trying to convert an image sequence to a video file with some text overlay(eventually frame counter). The command I am using ffmpeg -r 24 -y -i mambo_%05d.png -i ..\3DW_Mambo.wav \ -vf ...
0
votes
1answer
33 views

Powershell get a value from 'query user' and not the headers etc

Task, get the ID from the query user command, I'm trying to get the ID value from the the command 'query user', Example:PS> query user USERNAME SESSIONNAME ID STATE IDLE ...
2
votes
1answer
64 views

How start PowerShell from cmd by specific path

I want to start PowerShell (C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe) from windows 7 default command line (cmd) and go to the specific path. I used the command: start ...
1
vote
0answers
75 views

PowerShell Remoting using CredSSP is broken

I recently had PowerShell working perfectly with CredSSP, but now every time I try to establish a remoting session using CredSSP, I'm getting the following error: Enter-PSSession : Connecting to ...
1
vote
1answer
32 views

ExecutionPolicy changed automatically

I set execution policy in the powershell console set-ExecutionPolicy bypass get-ExecutionPolicy bypass ==> return bypass and then wait couple minutes, check the policy level again ...
1
vote
1answer
76 views

How to trigger the windows task scheduler event when my computer's CPU is overrun over 30 minutes?

my computer's OS is windows 7, I would like to do this: when my computer's CPU is overrun over 30 minutes, it will trigger task scheduler's event which is send a email to my email account. I don't ...
3
votes
0answers
105 views

Running Script on Shutdown using Windows 8

Good morning Is there any way to execute a Batch- or PowerShell-Script on shutdown using Windows 8 without disabling FastBoot? I know you can add a script using "gpedit.msc", but i found that ...
1
vote
1answer
39 views

Powershell pinned shortcut customisation

When right-clicking on the pinned Powershell item on my taskbar, it pop up with tasks. such as run as administrator. Is there a way to add run as accounts to this, looking to add the domain ...
2
votes
1answer
57 views

A decent remote shell from UNIX to Windows?

Scenario I'm on Linux and develop on a Windows 7 box virtualized via VirtualBox. My usual way of developing consists in editing source files from Linux via nautilus/SMB (smb://192.168.1.4/...) then ...
1
vote
2answers
72 views

Customizing Powershell to be like Github for Windows shell

I use Github for Windows and usually I use the "Open a Shell" here command which launches powershell with some custom settings. It makes powershell display extra information when I'm inside a Git repo ...
0
votes
0answers
33 views

Share tiles and secondary tiles between user accounts in Windows 8

Our Windows 8 Metro application secondary tiles that we need to share between several user profiles on a single PC (tablet). I was wondering if it is possible to copy secondary tiles (as opposed to ...
0
votes
1answer
25 views

Powershell : set_InnerText function not appearing for XML

$xml contains a xml document $e = $xml.CreateElement("Pass2") $e.set_InnerText ("p2") --> This command errors out $e.SetAttribute("Pass2","p221") --> This works, but is not what I need ...
0
votes
1answer
112 views

Why can't Excel open a file when run from task scheduler?

I wrote a powershell script that opens an excel workbook and runs a macro. When I run that script from PS console, or even from command line using powershell.exe script.ps1, it jus works. When I set ...
1
vote
3answers
379 views

Check whether Windows Updates are being installed

I have a powershell script that’s used by the IT support department for remotely installing software on workstations. The script supports the installation of multiple products (one after another)and ...
0
votes
1answer
52 views

Powershell very slow to open/respond

I am having an issue running powershell 3.0 on windows 7 64-bit. It takes a very long time to open/start when run it. It is also quite sluggish in response to just about anything. I believe this ...
0
votes
1answer
55 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 ...
0
votes
1answer
37 views

How to get the GUID of different HDD partitions?

I was trying with BCDEDIT and DISKPART but that tools give me an ID that is not the GUID Note: I am testing in Windows 7
2
votes
1answer
55 views

How to disable iritating beeping sound in powershell

sometimes I run grep (aka select-string) that has string that occurs too ofter, then powershell goes crazy, sometimes I manage to kill it with ctrl-c, but even then i have to endure irritating beeping ...
3
votes
2answers
86 views

Is there a way to supress any interactive prompts in a PowerShell script?

When writing PowerShell scripts, I noticed when certain cmdlets encounter problems they bring up an interactive prompt, Remove-Item on a non-empty directory being an example. This is deadly when ...
1
vote
2answers
79 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 ...
1
vote
0answers
86 views

Import a CSV File in a database w/ powershell jobs

I am trying to import a CSV file into a database with PowerShell but so far I have no luck. This is my code (based on this source): Start-job -Name 'ImportingData' ` -InitializationScript ...
2
votes
0answers
80 views

Windows8 Metro Applications, change PackageUserInformation from Staged to Installed?

Curious problem I'm running into. We have a series of Samsung ATIV Smart PC 700T's that come pre-installed with Windows 8 core. Unfortunately we need these on the domain so we're upgrading them to ...
0
votes
2answers
117 views

Login a Windows 7 user on a remote computer on so I can Remote Desktop

I need a way to always make a Windows 7 Pro machine, which will not normally be connected to a keyboard or monitor, ready for Remote Desktop Connection (That is get past the windows user login ...
3
votes
1answer
155 views

Execute Powershell commands remotely

I have a linux server with winexe package installed. It's the same as PSExec, and everything works okay when running simple commands, but when I run it with this command below I get a parsing error! ...
0
votes
2answers
56 views

Restoring the Windows Github Powershell shortcut

I have Github for Windows installed (Win7 x64). It also came with a handy shortcut that allowed launching a Git-optimized Powershell instance (which also displayed information such as the git file ...
2
votes
0answers
201 views

Import-CSV with powershell using a variable path

I am trying to import a CSV file with powershell in a database, with the path defined in a variable. But it doesn't seem to work. $path = "C:\Users\Admin\Desktop\TestFolder\file.txt" Import-CSV ...
1
vote
1answer
132 views

Setting user environment variables is very slow

I'm using the GitHub for Windows application. Lately I've noticed that starting a PowerShell console from within the GitHub application takes ages. After some digging I've found that the slow command ...

1 2 3 4 5 10