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

3
votes
0answers
116 views

What are AMT sessions used for?

I'm familiar with Powershell sessions (ie Enter-PSSession) and what they can be used for. I'm attempting to remotely manage power through vPro, so I've been messing around with the IntelvPro module ...
2
votes
0answers
27 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
0answers
841 views

Pin a tile (App or shortcut) to a specified position on Startscreen (Windows 8 / Powershell)

The title is nearly the whole question. I am searching a solution to pin an installed app or desktop application to the windows 8 startscreen. I am in an enterprise environment and the purpose is to ...
2
votes
0answers
484 views

PowerShell stops executing commands/programs

Sometimes my PowerShell stops executing programs and I have yet to find out why. In this state, when I enter the name of an EXE file, the PowerShell immediately returns to a command prompt without ...
1
vote
0answers
41 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
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?
1
vote
0answers
25 views

In >= Windows 8, how might I return all MSMQ Journal entries for named Queue in powershell?

As introduced in MSMQ Cmdlets (https://technet.microsoft.com/en-us/library/hh405007(v=vs.85).aspx), we now have the ability to query our queue. If I run PS C:\Get-MsmqQueue Then I get a full list ...
1
vote
0answers
41 views

Issues Adding Data to an XML Document w/PowerShell

Trying to add an element to an existing XML file using PowerShell. I have looked at several examples and my 'add' script works but, it is misplacing the element. Sample of XML I am using: ...
1
vote
0answers
75 views

How to install a network printer on powershell?

I've been trying to install a network printer using Powershell on Windows 7 so that I can automate the setup of our development machines using Puppet. I found a couple of instructions around but none ...
1
vote
0answers
107 views

Excel VBA that calls Powershell ActiveDirectory cmdlet, but Module won't load?

I have a powershell script I use to dump user and computer lists to csv files; it works great and I don't want to touch it much. It uses the ActiveDirectory cmdlet, and the Get-ADComputer and ...
1
vote
0answers
106 views

Windows Activation Powershell Script

I'm looking for a method to automate activation Windows 7 machines through PowerShell. We get approximately 50 computers a month and it's slowly increasing, so manual activation is no longer possible ...
1
vote
0answers
101 views

Set-AzureStorageAccount - GeoReplicationEnabled parameter will be deprecated in a future release

I get the following warning in powershell for this command: Set-AzureStorageAccount -StorageAccountName $storageAccount -GeoReplicationEnabled $false WARNING: GeoReplicationEnabled parameter ...
1
vote
0answers
242 views

How do I gain access to my C: drive after completely locking it down?

I know the title might seem completely ridiculous but please read this before being biased. Okay, so I got myself into a real squeeze. I installed Windows 10 technical preview for Enterprise on a ...
1
vote
0answers
84 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. ...
1
vote
0answers
41 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
vote
0answers
20 views

“Autoscroll” Pdfs one by one from a “play-list”/directory

Is there a way to achieve this: open multiple .pdf from a "playlist"/given directory one by one in the same window, with auto-scrolling enabled? (Explanation: 1st pdf opens- autoscrolls to the end- ...
1
vote
0answers
28 views

How can I get Emacs to run correctly in a Windows console with codepage 65001 (UTF-8)?

When my codepage is set to 65001 (UTF-8) in a Powershell terminal, emacs -nw displays garbage. When the codepage is set to 437, emacs -nw works. I would like to be able to run emacs -nw (much quicker ...
1
vote
0answers
74 views

Automation of control panel > Wireless Network settings(802.11 modes) through Powershell or any other automated procedures

I want to automate the "Control Panel\Network and Internet\Manage Wireless Networks" page in Windows through Powershell or any other automated procedures, to change my wireless adapter's mode to all ...
1
vote
0answers
352 views

Get-Command missing in Powershell after installing Version 4

Something must have gone wrong by installing dot net framework 4.5 and Powershell 4.0 I tried repair install of framework 4.5 and even deinstallation and reinstallation, but it doesn't help. PS ...
1
vote
0answers
38 views

How to create many directories with access control by using powershell 2.0

I am trying to learn the win2008 r2 In the win2008 r2, i create many student users . So i need to create the independent directory for storage file (Read ,write,execute). In dc C:\place\ i create ...
1
vote
0answers
124 views

Read the COM1 output of a Hyper-V guest system

I have a guest O/S that writes debug output to the COM1 UART. This port is virtualized by the Hyper-V host. The Hyper-V Server allows only a redirection to a "named pipe". I want to read what the ...
1
vote
0answers
1k views

How to copy file names matching a pattern in powershell

I am new to powershell. I need to copy the whole folder structure from source to destination with filenames matching a pattern. I am doing the following. But it just copies the content in the root ...
1
vote
0answers
358 views

Can't create a COM object in a powershell script running as a scheduled task

I have a powershell script I'm trying to run as a scheduled task. Its purpose is to perform a nightly export from an Access database, then upload the exported flat files to an SFTP destination. The ...
1
vote
0answers
356 views

Why does FFmpeg append blank black video to the end of my MP4 files when compressed from MOV?

I have several large MOV files that I want to compress to MP4. Unfortunately, when I use FFmpeg, it appends lots of black (blank) video at the end. (The destination file is longer than the source ...
1
vote
0answers
89 views

How to pipe a group of files through a .exe using powershell?

I am currently using a .exe named "vbadecompiler.exe" to process a group o ".xlsm" files. Those are to many to process manually therefore Powershell seems like the answer. My current attempt is the ...
1
vote
0answers
200 views

Trying to make a symbolic link to a Powershell script

I'm trying to create a symbolic link with mklink through a Powershell script to a Powershell script on a remote server. this link should come on the desktop of all users. if(!(test-path -path ...
1
vote
0answers
526 views

Can not create process with elevated permissions from LocalSystem account

I am running a build server on windows server 2008 (team city). The builds are run by the Team city agent that runs as a windows service under LocalService account. One of the builds need to copy a ...
1
vote
0answers
210 views

Extend partition windows powershell

I want to create a Windows Powershell script to extend my partition through WMI (remotely), IP Address of my host id 10.10.10.10 $pass = convertto-securestring "abc123#" -asplaintext -force $mycred ...
1
vote
0answers
428 views

copy|move sparse files on NTFS with Windows

How can I copy or move a sparse file from one NTFS volume to another NTFS volume while maintaining the sparseness using the native tools included with Windows? If there is no way to do this with the ...
1
vote
0answers
702 views

Install Windows Store App package (*.appx) for all users

I know there are several posts where users want to install Windows Store Apps for all users. Answers were to use DISM. In my case I can not use DISM because all clients are already deployed. If a ...
1
vote
0answers
718 views

Set Windows Commandline (or PowerShell) to connect to internet via Proxy

I work behind a very strict firewall but I am able to browse (most) of the internet just fine with FireFox and I.E., however there are specific proxy settings to have. Namely, an autoconfig *.pac link ...
1
vote
0answers
679 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 ...
1
vote
0answers
179 views

From within a bash, bat, or powershell script is it possible to get the last IM message sent to you within Lync?

I use Outlook and Lync 2013. I have msys bash installed, and I have a script that runs a while(1) loop that sends Growl notifications whenever an IM is sent (it reads the ugly Lync log files). I'd ...
1
vote
0answers
178 views

How do you correct the path separators in git when using powershell

I'm using the github powershell addon to run git on windows. Everything seems to work fine except for when I'm adding submodules. In this case, the powershell addon is adding in paths with \\ as ...
1
vote
0answers
458 views

Remote commands over SSH with Windows PowerShell - Protection against disconnection

I am planning to connect to remote Linux hosts via SSH and call scripts with Windows PowerShell SSH. As far as I understand, if the SSH connection is lost (timeout or connection reset) whilst the ...
1
vote
0answers
356 views

Windows PowerShell doesn’t use my SSH keys

I have a Git repository hosted on Bitbucket. I can connect to this using Git Bash terminal, which uses my public key defined in my H: drive (network drive), but if I try the same from Windows ...
1
vote
0answers
29 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 ...
1
vote
0answers
375 views

Test-Connection slow response

This is probably pretty simple but I ddont understand why test-connection has this behavior If I use the command: test-connection -computername 192.168.1.1 There is about a 3 second delay between ...
1
vote
0answers
955 views

PowerShell script to Associate applications in Windows 8 (possibly employing ftype / assoc)

In Windows XP / Vista / 7, it was simple to re-associate items away from the defaults in bulk by using ftype and assoc as below. This was an important time-saver in system setup to make sure that all ...
1
vote
0answers
325 views

How do I add fileversion to an object containing a number of filenames?

I have loooked for an answer to this question, but cannot find out how to add into an object creating a data-set pair of file name and version, and the related original wsp or cab filename. I have a ...
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 ...
0
votes
0answers
13 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
0answers
55 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 ...
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. ...
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> ...
0
votes
0answers
18 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 ...
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
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 ...