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

powershell - positional error if move files/folders from a text list

I try to move my folders and files from a text list but i have this error, i use windows server 2012 Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All rights reserved. PS ...
1
vote
1answer
64 views

Open Powershell in ConEmu from context window

I would like to open Powershell inside ConEmu from Windows Explorer's context menu so that it contains the same directory as Windows Explorer. I know about the "Integration" settings, but I cannot ...
1
vote
1answer
46 views

Configure WinRM to Use HTTPS makecert.exe Name Syntax

I am trying to enable the remote execution of powershell scripts on a remote server over https using this example. What I do not understand is what value to give for the hostname when generating the ...
0
votes
2answers
63 views

List of MAC addresses for 10 machines

I need to list of MAC addresses for a 10 computers having Windows 7 installed on them. These are named in a series like training1 - training10. There IP addresses are on DHCP mode and update every ...
0
votes
2answers
480 views

Powershell run programs with arguements as different users

I am trying to create a Simple (or so i thought) at startup Script for my Work Machine. For this i need to mainly open IE Firefox as logged in user Firefox as Admin user Outlook as main profile I'm ...
0
votes
0answers
74 views

App Path incorrectly set as REG_SZ

I have Windows 7 Ultimate Service Pack 1 with PowerShell 4.0. Under this key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\PowerShell.exe I found these values (Default) ...
-1
votes
1answer
67 views

Deleting entire line based off of string in powershell…and keeping the line below?

I'm having some issues with powershell. What I am trying to accomplish is this: file.txt = string1 a string2 b I am using the command: Get-Content C:file.txt | Where-Object {$_ -match ...
0
votes
3answers
290 views

How do I install the PowerShell Community Extensions (PSCX)

I'm on Windows 8.1, and fairly new to Windows-side development. I've had PSCX suggested to me, but for the life of me, I can't figure out how to install PSCX 3.1 on Windows 8.1 and make the cmdlets ...
0
votes
0answers
66 views

How to change the Start In property via CMD for an .lnk

Context: I have folders with presentations being created dynamically except currently an instance of our ppt&macro is being dropped in each folder with the presentation. The presentation will only ...
0
votes
0answers
36 views

Setting up WINRM for remote powershell scripts over https

I have set up powershell and winrm to run remotely over http but we have a new server provider and they want this set up over http. Do I have to create an IIS site and set, complete with certificates ...
0
votes
1answer
51 views

Download Excel_data.xls compare with excel_local.xlsx and import

I am trying to write a PowerShell script that will download some Excel data from a webpage, then compare the data to my local file and import the data if there is a duplicate I would like it to add a ...
1
vote
1answer
161 views

Given a list of KB numbers for Windows Updates, how can I find out what's in the updates?

I have this issue with a program I work on, where the program behaves differently on my development machine v. the QA environment. I suspect the difference between the environments lies in which ...
0
votes
0answers
712 views

Powershell Split Large Text File to Individual Files

I am working on a Powershell script that will allow a user to define a large text file, have the script run, then save a portion of that large file to individual files with a unique file name which ...
2
votes
3answers
1k views

Which Powershell Function could check whether a certain port is in LISTENING state on localhost?

Introduction Aim: to check whether a port is in LISTENING state on localhost by using a PowerShell function The following command: New-Object Net.Sockets.TcpClient.Connect("127.0.0.1",10389) ...
0
votes
1answer
546 views

How to check whether a specific service exists using Powershell?

Introduction According to this documentation it is possible to check which services have been stopped on Windows by executing the following command: Get-Service | Where-Object {$_.status -eq ...
2
votes
1answer
1k views

Set (Many) Programs' Window Size/Position

I'm looking for a solution similar to this, but for Windows 7 (64-bit), and not just for the terminal. This is also definitely not a duplicate of this question. The Problem Some programs remember ...
0
votes
1answer
143 views

how to batch change date created to date modified

I have many video files ending with extensions mov, avi, mp4, and mts. I need to change their "date created" to their "date modified value" I tried using the following powerhsell script: ...
0
votes
1answer
86 views

What is the equivalent of rm -rf in Powershell?

As we all know, on a *nix system, rm -rf some_directory removes some_directory and all files beneath it recursively, without asking for confirmation. What is the equivalent of this command in ...
0
votes
1answer
204 views

How do I rotate an image clockwise using the Windows command line?

Is there a way to rotate images stored in folders clockwise so they can be changed from Landscape to Portrait using CMD or Powershell? If there isn't a way to do it then please let me know. It might ...
0
votes
1answer
16 views

Powershell - acquire the system proxy

How do I acquire the Windows system proxy using Powershell? I know about this $webproxy = (get-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').ProxyServer Is ...
4
votes
6answers
830 views

How can I both pipe and display output in Windows' command line?

I have a process I need to run within a batch file. This process produces some output. I need to both display this output to the screen and send (pipe) it to another program. The bash method uses ...
1
vote
1answer
224 views

Stuck in Powershell sqlserver

I'm a bit of a powershell newbie. So I've created a script that uses the Restore-SqlDatabase commandlet. However, after I run it, it leaves Powershell in a different state. PS D:\theFolder\> ...
1
vote
1answer
26 views

Autorunning a series of .cmd files when usb is plugged in [closed]

I'm trying to automate a process to the simplest way possible for non technical lab students. This is my first time doing longer scripts so bear with me. I need the drive to: Check that the user ...
0
votes
2answers
902 views

How to calculate the StartTime / UntilTime parameter using Get-Printer in Powershell?

I have an printer setup using the GUI and set the printer availabilty from 18:40 until 3:00 As well i got the PS command "Get-Printer Printer1 | format-list" The result of the command puts out: ...
0
votes
1answer
412 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
84 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 ...
1
vote
2answers
229 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
125 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
77 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
131 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
208 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
932 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
270 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
337 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
67 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
92 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
335 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
68 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
73 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
705 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
2k 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
1answer
84 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
243 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
407 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
169 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 ...
2
votes
1answer
203 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
96 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
101 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
58 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
308 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 ...