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

Change keyboard repeat rate through powershell

I have an issue with my laptop wherein the repeat rate for the keyboard gets really slow after waking up from hibernation. I can fix this by adjusting the rate down in the control panel, applying the ...
0
votes
0answers
8 views

Add “PowerShell Here” and “Command Window Here” to right click menu for drives, folders, and current directories

I've tried applying and editing the .reg files, for example, here and here But can't seem to get a "PowerShell Here" and "Command Window" here option in all right click menus without holding Shift ...
0
votes
0answers
4 views

Equivalent of wevtutil in powershell?

wevtutil is a command in cmd for displaying Windows logs in different formats. What is the equivalent cmdlet in Powershell?
2
votes
0answers
29 views

Trying to rename large amount of .doc files based off first line or so of text

I was attempting to help a friend, who had a bunch of data recovered, but the meta data was lost. As most of it is articles or recipes, she believes the title or first line or so of text will be good ...
2
votes
1answer
24 views

Run executables in PowerShell without typing the file extension

I've been using PowerShell as my console on my desktop for a while now. I'm still pretty new to it, but I'm comfortable. I just got a laptop that I started using, but PowerShell acts differently ...
0
votes
1answer
8 views

Hyper-V port access lists do not allow traffic past gateway

A situation: The local network of 192.168.0.0/16 is split into many subnets, and routers are in place. A Hyper-V hosted virtual machine is located in a 192.168.X.0/24 subnet. The task was given to ...
0
votes
2answers
40 views

Find folder without certain file in powershell

I have subfolders, and subsubfolders. In the subsubfolders, I want to find all subfolders without a file named PKA.dump. Can this be done in powershell? The subfolders go from Angle1, Angle2, etc up ...
1
vote
1answer
25 views

Powershell listing size of files

I have 3600 files named PKA.dump One of these files is not the right size. They should be above 500bytes, but one is below 500. Is there a way to check all subsubfolders and find the one file named ...
0
votes
0answers
37 views

powershell script extract multiple .gz file

would you please help me in this , I have multiple files .tar.gz and i need to extract them , i am able to extract the File.gz incase i have one file using the below script , please let me know how ...
1
vote
1answer
30 views

getting 9th column of data from multiple files and dumping it all into new file

OK guys, I have 24 subfolders, named Angle1, Angle2, etc up to Angle24, each with a file called output.txt. Note that these folders have subfolders which I want to ignore. Is there a way to loop ...
0
votes
1answer
20 views

Executing command in many subfolders in windows powershell

I am in a folder with 24 subfolders. The subfolders are named Angle1, Angle2, ..., Angle24. In each of these subfolders, I want to perform this command: Get-ChildItem PKA.dump -r | Sort-Object $_ | ...
0
votes
1answer
51 views

Looping through files and collecting data

Ok, I have a problem that I think you guys can help with. I have 24 folders. Labeled Angle1, Angle2, ... , Angle24 Each folder has a file name output.txt In each file named output.txt, I want to ...
0
votes
1answer
15 views

Get-ChildItem recursive that matches regex patterm and rename the item

I am trying to get child item recursively that have " (1)" and I want to remove this part. Here is where I got so far but it throws an error. Please help. Get-ChildItem -recurse | Where{$_.Name ...
0
votes
1answer
13 views

powershell filter to remove .pdf extension in the name of a file

I am trying to use powershell to get all child elements in a folder the code I am using is Get-ChildItem -Recurse -path C:\clntfiles this code gives output like Mode LastWriteTime ...
-4
votes
0answers
23 views

Any way to delete this folder I lack permissions to without using a live linux? [duplicate]

So, ages ago I installed this DVD burner called "DVD Maker." I immediately deleted it and forgot about it until my hard drive filled up. So I'm looking for things to delete and there's the DVD Maker ...
0
votes
1answer
25 views

Setting registry permissions with Powershell

I have a registry key that I need to take ownership of and then set a permission set on. I'm able to take ownership, but when setting the permission, it only applies to the very top level of the ...
0
votes
0answers
59 views

.NET Framework 4.5.2 on Windows 7 w SP1 not showing on Window Features List

I've successfully installed .NET Framework 4.5.2 on a Windows 7 w SP1 laptop, in preparation for upgrading to Office 2013 Professional. Installation of Office 2013 still saying I need Internet ...
1
vote
2answers
50 views

Need to rename many very long file names with variable

My company gets a list of files every day that we need to process and the file names are almost impossible for our system to deal with. Is there a way to rename these files? I am new to any type of ...
0
votes
1answer
24 views

Enabling Active Directory Module for PowerShell via command line

As a final step in my Win7 MDT task sequence, I would like to move each computer from the staging OU to the regular OU (so GPO's can be pushed). My deployment techs have proven less than reliable on ...
0
votes
0answers
17 views

How can I input password to manage-bde -pw option via windows powershell

I am trying to encrypt Data volume (for example E:) with the following command: manage-bde -protectors -add E: -pw When I execute the above command, it will ask for the password, so I entered it. ...
1
vote
1answer
43 views

Different results between “PowerShell ISE” and “Run with PowerShell”

I have two simple one line "scripts". They check how old are certain files in a certain folders. One displays the output to the screen and the other writes the output to a text file on the desktop. ...
0
votes
0answers
11 views

Powershell - Set-alias doesn't accept paramters - python

Following this tutorial i want to set an alias for python autopep8. the syntax described is. Set-Alias gs Get-Service <enter> So o copy that format i have done. PS C:\Users\sayth> ...
1
vote
1answer
22 views

How to create a script that launches a random video file from the folder

So, this is a weird problem. But basically, my nephew likes watching cartoons on my computer sometimes. And that worked well. OVer time, his cartoon folder grew up. Here's the problem: he wants to ...
1
vote
1answer
48 views

How to silently install the Microsoft Monitoring Agent

I am trying to install an .exe application (Win32 Cabinet Self-Extractor) silently from command line using this PowerShell command: Start-Process -FilePath "C:\Temp\MMASetup-i386.exe" -ArgumentList ...
1
vote
3answers
57 views

How to combine two separate powershell commands

I have several hundred folders that all contain a sub-folder named "Bid Documents". I need to change the ACL permissions on every instance of those "Bid Documents" folders. Is there a way to ...
1
vote
1answer
45 views

Windows-8 how do I write a script to change the resolution?

I have a yoga 2 pro that comes with a high resolution display (2k I believe). This sometimes causes issues with programs not scaling properly which for the most part I can ignore. However I also ...
2
votes
1answer
31 views

Determine the Size of a Network Folder

I want a PowerShell script to get the size of a network folder (\\pmintl.net\rbsdata\SPA_BB01) approximately 100TB in size with lots of subfolders. I've tried various scripts without any luck (below ...
0
votes
1answer
19 views

Scripting Shell Settings

I really hate manually setting up cmd and powershell cmd shell properties like window height/width, font, coloring, enabling Quick Edit. Doe anyone know if there a script I can run to set things up ...
0
votes
1answer
23 views

Get Notified of Errors in Windows Event Log

I wrote a powershell script to make a database dump that I plan on having run nightly with Windows Task Scheduler. It outputs to a log file so I can make sure everything is working, but I want to be ...
1
vote
1answer
31 views

Copy Command with “%” in path name

I am trying to write a bat file to copy some files into a new directory (which exists). Here is my command: copy ".\050-9800-JJJ-DSC-BAW-MEE-00019-01*.pdf" "T:\201201.00 TCO - Tengiz, ...
0
votes
4answers
42 views

Powershell parse object / string

Learning powershell, trying to find out how to parse the first value from this resultset: IPAddresses ----------- {10.60.50.40, fe80::5ddf:a8f4:e29c:b66} Normally I would just look it up, however, ...
5
votes
1answer
175 views

Powershell: A variable within a variable; Variableception

So the easiest way to explain my problem is for me to show you this simplified version of what I'm trying to do: PS C:\> $a = 'hello' PS C:\> $a hello PS C:\> $b = '$a world!' PS C:\> $b ...
0
votes
1answer
38 views

Generate an error log from Powershell

I created a script to assist in mass editing permissions inside an extensive folder structure, based off a list inside a CSV file. The script works as expected, but for several of the folders, I know ...
0
votes
2answers
24 views

“Migration Assistant” for windows?

I'd like to migrate system settings and installation installed software all personal data users from an old windows 8.1 box to a new one. Basically replicate the awesome Mac OS migration ...
3
votes
1answer
52 views

Administrator denied access to folder, impossible to see/change owner

I have a folder which was generated by MSBuild, app.publish. Often, my build script fails to delete it, complaining that it does not have the necessary permissions. Today I tested this outside of the ...
0
votes
0answers
19 views

Set font in the clipboard by powershell

My first question here :) I searched a lot and could not find the answer to my problem. I know how to pipe my output to the clipboard. What I want to achieve is to set the contents of the clipboard ...
1
vote
0answers
43 views

Properly extracting from an array

I have a CSV with one column, numbers formatted as 111-0000, that I'm reading in to process one at a time. I'm trying to import the column of information from the CSV, but I'm having trouble figuring ...
1
vote
1answer
67 views

Making Batch to run Windows PowerShell, then have it run some text

I am newer to making batch files. I am trying to run a command that will open windows PowerShell in a specific directory, and then once there to run a command. So far I have the following. ...
0
votes
1answer
64 views

PowerShell Excel search replace issue with loop

What I'm doing here is to search excel sheet for a value, if value matches it will be replaced by first value in a given text file: example: search for value text find the first instance replace ...
0
votes
1answer
23 views

Using -replace on pipes in powershell

I want to test out a replace before I use it, so I'm trying to write a quick online command to see what the output is. However, I'm not sure what the syntax is. What I want to do is something like ...
-1
votes
1answer
23 views

Modified and creation time for file in powershell

I would like to get the modified and creation time for file in powershell. This commandd: forfiles /m *.* /c "cmd /c echo @file @ftime" gives the modified time. What is the attribute name for for ...
0
votes
0answers
23 views

Backrefence syntax in powershell's sed

How do I back reference a capture group in powershell's sed? I can't seem to find the syntax for it. IE I expect echo "hello" | sed "s|(h)ello|world\1|" to output worldh, but instead I get the ...
0
votes
1answer
52 views

PowerShell script to decrypt file

Can some one help me with this command to decrypt files using powershell? echo YOURpassPHRASE | gpg --keyring "C:\directory\filepath" --secret-keyring "C:\directory\filepath" --batch --yes ...
0
votes
1answer
19 views

Simple addition in CSV using powershell 2.0

Given a csv-file of the following form: example.csv 1,2,3,4 5,6,7,8 ... What is a powershell script I can use to add the first two elements together and update the same input file, like this: ...
0
votes
0answers
45 views

Schedule task to run monthly with powershell

I'm trying to create a scheduled task with powershell, the task is supposed to run the 10th every month, but I can't figure out how to use New-ScheduledTaskTrigger with a monthly interval. $t4Name = ...
0
votes
0answers
33 views

How to append output from sqlcmd argument to txt file?

I am 100% new to batch files, so bear with me. sqlcmd -U %username% -P %pw% -S ServerName -d TableName -i "%%G" >> output.txt This doesn't work. It works fine without the >>. The error ...
0
votes
0answers
13 views

posh-git not reading my profile

I'm using posh-git (part of Github for Windows). I want to set a custom prompt as in this question. However, posh-git is not reading my profile file. I have tried: Running PowerShell as ...
1
vote
0answers
29 views

Powershell tee command locks file

Is it possible to run powershell tee command so that it doesn't lock the file, allowing to view it?
0
votes
1answer
32 views

Unable to delete .swp file

I'm using Vim on Windows 7 Enterprise. Vim sometimes creates an .swp file. After closing Vim, this file sticks around. I would like to delete it. However, I receive the following error: ri : Cannot ...
1
vote
2answers
43 views

Bulk Folder Renaming Powershell Script

The script below is used for Bulk Folder Renaming. However I wanted to make this as a Generic Script so users can give input and use it accordingly. This script has 3 inputs a) Enter the Source ...