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
0answers
13 views

Multiple Directory Creation based on domain username and set file sharing script request

I need a script that will do the following. Create multiple directories labeled by domain usernames (I'm thinking pulling the usernames from AD and add the username to each command.). In a shared ...
1
vote
0answers
18 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
2answers
17 views

Get-credential results in “system cannot find the file specified”

I'm trying to write a powershell script that prompts for credentials and opens a webpage as the user. I have start-process -credential (get-credential) -filepath "http://www.microsoft.com" It ...
0
votes
0answers
16 views

Windows Symlink & Copy

I am trying so desperately hard to map a drive to sharepoint online with little success. (I have tried everything possible to get this working.) Closest I have got is being able to make a shortcut to ...
5
votes
3answers
51 views

Why does the PowerShell ISE not isolate script variables to the script scope?

In PowerShell, scoping is supposed to keep objects (variables, aliases, functions, etc) in scripts from affecting the global environment. This appears to work fine at the command line, but not in the ...
0
votes
1answer
24 views

PowerShell will not start

I am getting this message when trying to run PowerShell Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell. I have tried repairing ...
0
votes
0answers
13 views

Powershell generic session and import this session in Exchange remote management session [on hold]

The situation : I am trying to make an application (c#-asp.net) to manipulate user's on an exchange server. The application will be on a different server than the exchange's one. So, to manipulate ...
4
votes
2answers
84 views

How can I delete over 2,000,000 files in a single directory efficiently?

I have over 2,000,000 (that's right, over 2 million) files in 'Temporary Internet Files'. This predicament is the result of a scheduled task that runs a script. After installing Visual Studio, it has ...
0
votes
0answers
13 views

PowerShell script to install software and handle reboots

I'm currently trying to write a PowerShell script and I don't know how to do it the best way. The goal (on 1 computer) : uninstalling a program silently (I have the package and the silent ...
0
votes
1answer
23 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
22 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
16 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
45 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
57 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
31 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
18 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
1answer
19 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
42 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
14 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
23 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
34 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
55 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
164 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
31 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 ...
1
vote
1answer
61 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
45 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
40 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 ...
-1
votes
0answers
39 views

slow computer performance on windows power shell and command prompt

I have a window and I've been using it for 1 year now, starting 6 months ago, I had frequently started to feel laggy in running command prompt/power shell I have installed many software on this ...
0
votes
1answer
44 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
9 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 ...
1
vote
5answers
124 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 ...
0
votes
1answer
33 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
23 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
1answer
108 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
55 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
58 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
44 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
45 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
34 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
31 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
51 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
83 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
51 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
75 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
45 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
62 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
2answers
56 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
24 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
41 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
117 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 ...