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
1answer
80 views

Create and configure a Windows taskbar toolbar via a script

When I right-click a Windows taskbar toolbar, I can toggle some options such as Show Text, Show Title and Lock the Taskbar. I can also reorder the icons on the toolbar and set it's position. How can ...
0
votes
1answer
60 views

Send an email whenever file is deleted from shared folder in windows 7

I am running a software on several computers at my workplace and the software can run different audio and video files stored on a shared folder in a central computer. The software runs on windows 7 ...
0
votes
2answers
56 views

How can I read out internal pdf creation/modified date with Windows PowerShell?

PDF files seem to have a separate set of file properties which contain (among others) a creation date and a modified date (see screenshot here: ...
1
vote
2answers
50 views

Powershell ISE 3.0 Intellisense for other programming languages

I really love using Powershell ISE - something about it makes me want to work with it; everything just fits together well, and it is smooth. Also I love the way intelligent autocomplete is ...
0
votes
1answer
35 views

Can't get powershell to return where results from GCI using ACL

I'm trying to get Powershell to list files in a directory that are older than a certain date and match a certain user. I've got the below script so far which gives me all the files older than a ...
0
votes
1answer
33 views

Shutdown/deallocate VM doesn't work in scheduled task

I created a scheduled task to shuwdown/deallocate itself (it's a VM on Azure) with Powershell. The PowerShell script is: Stop-AzureVM -Name "myvm" -ServiceName "myservice" -Force If the PowerShell ...
0
votes
1answer
58 views

Modify a scheduled task with PowerShell

How can I modify the action step in a scheduled task? We have hundreds of scheduled tasks that point to a particular path and run a PowerShell script. How can we find those tasks and then change the ...
0
votes
1answer
107 views

Is it impossible to run powershell scripts that I wrote locally without admin privileges even if the scripts themselves dont require admin rights?

Im a standard user without admin privileges on my windows 7 box. I wrote a powershell script that doesn't require admin privileges (it downloads data from yahoo finance and saves it as a CSV file): ...
-1
votes
1answer
67 views

Get Directory Size through SFTP

A client has a managed websever; on this server is an e-commerce script and part of the script dumps a backup every week. The backup is stored on the web server (not in the HTTP route). The ISP takes ...
0
votes
1answer
98 views

Audit Windows Server/Desktop Product Key usage

The company I work for has a fairly big domain of Windows Desktops and Servers. We also have standalone servers that are remote to our site but we have direct access to. We need to audit our license ...
0
votes
1answer
51 views

Powershell - Using Config Files for Variables

I need to build a set of scripts in PowerShell for SharePoint Deployments, and I'd like to use the same idea I've been using in BAT files. The idea is having ONE .ps1 to configure "session" ...
1
vote
1answer
70 views

Why dont the chocolatey install instructions work?

So I am trying really hard to follow the instructions given for chocolatey install, but they don't work. From their site, they say "Its so easy to install!", and to "just open a power shell" and ...
1
vote
1answer
75 views

Exchange 2010 - Open Other User Mailbox Permissions Issue

I just started working for this small firm (30 people) a little bit ago, replacing their System Admin. First thing I noticed was Exchange Server 2010 was WAY out of date. Believe it or not they did ...
2
votes
1answer
28 views

PowerShell - Changing the PipelineVariable name

In PowerShell you can change the name of the variable used as the item in an iterative block, such as: dir -recurse *.snippet -OutVariable snippets $snippets | Where-Object -PipelineVariable fn { ...
0
votes
1answer
44 views

Replace files with symlink

This question is intended to be the inverse of Replace Symbolic Links with Files, but for windows. I have started running out of space on my SSD drive, and I found that about 12% of used space is in ...
0
votes
0answers
158 views

Powershell script to add user to active directory and set static IP

I have seen other similar questions but I am looking to fully automate the process and all of the examples I have found up until now are missing pieces that I need. Also, this is the first poweshell ...
3
votes
2answers
188 views

PowerShell ps1 scripts open in Notepad by default, not in PowerShell ISE. Why's that? [closed]

I regularly have to spin up VMs, and then I have to switch the .ps1 and .psm1 file association from Notepad to the PowerShell ISE. Does anyone know why it's not the default editor to begin with? It ...
-1
votes
2answers
51 views

PowerShell - working with multiple decimal points (i.e driver versions)

I'm trying to make a script to update machines that are using old drivers. I can get the devices I want to target like this:Get-WmiObject win32_pnpsigneddriver |where {$_.DeviceID -match ...
1
vote
1answer
53 views

Remote Registry with alternate credentials from the command line

Sometimes, when I'm teleworking from my personal laptop, I run into problems with my SmartCard reader while trying to connect to systems that are configured to enforce SmartCard usage. The usual ...
0
votes
0answers
98 views

Powershell - Test user credentials in AD, with password reset

I can successfully use Powershell to tell if a user authenticates in Active Directory: Function Test-ADAuthentication { param($username,$password) (new-object directoryservices.directoryentry ...
2
votes
1answer
79 views

Powershell LastWriteTime is incorrect

I am running the following script to create directories based on the first 9 characters in the filenames in the directory and then moving te files into these directories based on their filenames. dir ...
0
votes
0answers
53 views

need command line to test duplex status on windows NIC cards

this woud be for windows 7 I tried the following powershell command get-wmiobject Win32_NetworkAdapter | foreach-object { get-wmiobject -namespace root/WMI -class MSNdis_macOptions -filter ...
0
votes
1answer
59 views

Is rm reversible?

On a Windows Server 2012R2 environment, is the PowerShell cmdlet rm undoable? The TechNet manual for Remove-Item states that it deletes an item (multiple types), but no specification about the ...
0
votes
1answer
63 views

Regexp based editing of content in large CSV files [duplicate]

I wanted to remove certain pattern of contents based on a regex from csv file which is very large in size containing 100,000+ records, how is it possible via windows commandline? I also have sed and ...
1
vote
1answer
36 views

ScriptBrowser for Powershell won't run

I'm trying to run ScriptBrowser for Powershell, but it won't run for me when I click on the shortcut (nothing happens). I tried right clicking on the shortcut to see what it is running, but instead of ...
1
vote
0answers
118 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 ...
0
votes
2answers
106 views

Create Loopback and assign local addresses on Windows 8

I'm usually on OSX where I often add additional IP addresses to lo0 interface to simplify ssh tunnelling to various services on different machines to different local addresses: # Tunnel mysql ...
1
vote
3answers
96 views

Detect if powershell is running as administrator

How can I tell in my scripts if Powershell is running with administrator privileges? I need to know because I'm trying to run a program that requires the ability to open protected ports.
0
votes
1answer
115 views

How to Launch an App in an Existing Session

When a scheduled task runs I would like to open a Powershell window on my desktop to tail the log file and watch the progress. Specifically I would like the task to open the window on my desktop and ...
2
votes
3answers
718 views

Find AD users with specific AD attribute NOT null

I'm looking for a script/Powershell command that will list all AD users that have a value not NULL in the teletexterminalidentifier attribute, so they must have a value set. By default this attribute ...
0
votes
1answer
138 views

Windows 2012 Domain Controller NETLOGON error

We have Sonicwall firewall user authentication System active since last two months. We have Windows 2012 Active directory server setup with around 1400 user account created. These accounts were ...
0
votes
1answer
64 views

PowerShell “.count” method causing incorrect processing

I am creating an array in PowerShell that doesn’t always contain data (sometimes it is empty). I need to verify that the array contains data before trying to do anything to the array objects. When I ...
1
vote
1answer
77 views

Appx package does not show in Start screen

Recently, I decided I want to grab some applications that were originally shipping with Windows 8 and sideload them to Windows 8.1. So I just installed Windows 8 in a virtual machine and then grabbed ...
2
votes
1answer
40 views

GIT via OpenSSH in Powershell is fine, so why can't I connect in plain cmd console?

when I run ssh user@servername01 ...under powershell it connects without a problem, however when I run the same command under a standard cmd prompt I am prompted for a password (no password is set ...
0
votes
1answer
39 views

Copy a list of folder to another folder?

Is there anyway so I can copy a list of folders within a text file to another folder in Windows? I have a text like this: 87312 87313 87314 87315 ... I assume it's possible via Powershell.
0
votes
2answers
61 views

move-item or copy-item then remove-item

I have a list of files that I want to move from one folder to another location and retain the folder structure in the new location for example I have the following files 1.txt 2.txt 3.txt located as ...
1
vote
0answers
57 views

Powershell - Elevation Loses Current Directory

One problem leads to another! User help just fixed one issue, which led to another as I continued working on this script. My script runs a check to see if the current user is an Administrator as ...
1
vote
2answers
115 views

PowerShell create VHD

I would like to create a VHD (virtual disk). I know this can be done with diskpart create vdisk file C:\w7.vhd maximum 10 However I am trying to do it with PowerShell. I found the New-VHD Cmdlet, ...
1
vote
1answer
101 views

Is there anyway to see when a Windows firewall rule was created/enabled using PowerShell v2 or CMD?

I have been poking around the interwebs but I cannot seem to find a definitive answer to this question. I am forced to work with PowerShell v2. I know that using the following command will give me a ...
0
votes
2answers
99 views

Powershell - Uninstalling a List of Programs Taking Too Long

I am looking for assistance on making a bit of code more efficient. I currently have a simple Powershell script (part of a larger script) that enumerates items from a text file (namely the string used ...
2
votes
1answer
61 views

Use PowerShell to interpret registry values

Consider the following key, as an example HKEY_CLASSES_ROOT\txtfile\shell\open\command and its (Default) value %SystemRoot%\system32\NOTEPAD.EXE %1 This value determines what will happen when ...
2
votes
2answers
67 views

How can I display utf8 in powershell?

So this really has me knocking my head against the wall. I have some XML: <trans-unit id="4" translate="yes" xml:space="preserve"> <source xml:lang="en-US">Customize Forecast ...
2
votes
1answer
284 views

Get computername by username

I am trying to find a computername that is used by certain user. To do it I get a list of computers by Get-ADComputer and then ask all of them if there is a user I am looking for logged on. This is ...
2
votes
0answers
62 views

Get-ChildItem | tree gives me a wierdly formatted tree

Edit: This is the value of $OutputEncoding: IsSingleByte : True BodyName : iso-8859-1 EncodingName : Western European (Windows) HeaderName : Windows-1252 WebName : ...
0
votes
0answers
92 views

Write a small script to extract ms-exchange audit logs in csv format?

Background I'm using ms-exchange 2013 in my environment, and have a separate siem box which analyze logs produced by different systems (i.e exchange). The logs for exchange are internally stored and ...
0
votes
1answer
510 views

Remove column header from sql query output in powershell

I want to remove column header from sql server query output. I did the search but not found any solution. I have a script. $Database = "temp" $Server = "localhost" $AttachmentPath = "output.csv" # ...
0
votes
1answer
91 views

Error while deploying unity web player application on Parse.com

I have created a game using unity game engine and build it using unity web player.After building i got two files client.html and client.unity3d . Now I am try to deploy these on Parse.com . Initially ...
3
votes
1answer
58 views

Recursive folder rename through command line

I have 500000 plus files in over 3000 directories and need to rename all folders called PHOTOS to Photos. I also need to Rename any Folders call Photos blah blah blah to be called just Photos. It ...
0
votes
1answer
90 views

Windows Explorer Does Not Include Hidden Files' Size When Calculating Folder Size

It seems Windows Explorer does not include the sizes of "hidden" files when calculating the parent folder size, even when I check "Show hidden files, folders, and drives" in the "Folder and Search ...
0
votes
1answer
55 views

How do you export Windows 7 AQS search to file? [duplicate]

My question is identical to this question that has already been asked back in 2011, but that does not have any answers: Export Windows 7 Advanced Search Results to Text File I'm hoping that someone ...