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

specify the regex dot `.` and `..` in powershell to find files/directories?

I find powershell in some ways, can do regexes to a limited extent. No doubt it can do more but I can't see why it isn't here. I'm trying to use a regex to specify files/directories. For example, ...
-1
votes
2answers
29 views

Find folders called SS, return size of folder

I am able to find all folders called "SS" (superseded) in a hierarchy and list out the location of each one. I have been using this code to pipe out the list. DIR /AD /B "SS" /S > SS_Folder_List.txt ...
2
votes
2answers
26 views

Best way to search for a string (text) in >10 large CSV files (250mb each)

I am wondering what's the best way or tool to search for a specific text or string in more than 10 large .csv files. Each file is 250mb in size. My idea was to write a powershell script, since I ...
0
votes
3answers
38 views

Getting External IP via PowerShell

I would just like to Get External IP via Powershell Just IP address no header or anything. I try many things such as (Invoke-WebRequest ifconfig.me/ip).Content but it has this extra second line ...
2
votes
2answers
25 views

Powershell Get-Process and Task Manager discrepancy

I'm making a PowerShell script to get the top 10 process that are consuming memory, based on the Get-Process's value Working Set (WS). I'm running the following line and getting the results, looks ...
0
votes
0answers
20 views

How can I explicitly set Microsoft Hosted Network Virtual Adapter to be used to share Internet while creating Hosted Network?

When manually creating a hotspot in Windows: you have to select the Internet providing network adapter, and in sharing tab, select Microsoft Hosted Network Virtual Adapter from Home Networking ...
1
vote
0answers
15 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
1answer
17 views

Can I query AD from a client computer in the domain using Powershell?

I have a DC (windows server 2008 r2) that I want to run some Powershell queries against AD. Powershell ISE is not installed on any of the DCs. Is it possible to install Powershell ISE locally on my ...
0
votes
0answers
6 views

How do I create a mailbox in powershell and determine which mailstore it creates it in? [migrated]

I need to edit a powershell script that creates new users and add a section that creates them a mailbox, problem I am having is that I need it to check the first letter of the username to determine ...
0
votes
1answer
30 views

definitively determine the primary physical LAN port (device0)

Is the device with the lowest DeviceID a reliable way to find the first LAN port on a machine with 2 ports? I have been searching for a way to deterministically get the first LAN port across our ...
0
votes
0answers
22 views

Uninstalling programs MSIEXEC always takes the same time to run

I've created a script that removes all of the SQL bits and pieces left over when you do an appwiz.cpl removal of SQL. Initially some components failed because of 'there is another installation in ...
10
votes
1answer
254 views

What does “C:2\” in a windows path string mean?

I got this pop-up from the Windows firewall. What is "C:2\" in the path? The real path is D:\Steam\SteamApps\common\... I tried cd /d C:2\ in cmd and got "The system cannot find the path ...
0
votes
0answers
49 views

Batch file needed to query a specific location

I am not a coder and would appreciate any assistance. I need a batch file which will query a NAS location and produce an output of the upper level directories (and maybe the second level down). The ...
1
vote
1answer
40 views

running batch file within powershell

I'm running a batch file within PowerShell. It calls up another program to do a bunch of maps which it outputs to a subfolder called "GRD" I then want to rename the files in the GRD folder by adding ...
0
votes
0answers
17 views

Powershell Network Copy Script very slow

We have a main files server for a local office, I placed a ESXI host in one of our data centres, I used the recursive copy function to create a small powershell script, and scheduled this for 9pm. For ...
0
votes
0answers
44 views

How to make my loop omit empty Excel cells while converting to .csv - Powershell

I have some empty cells in my Excel worksheets.How to make a proper statement to make my loop omit them? I tried to do a if(){}else{} loop but it doesnt work properly.I have a powershell v2 so I ...
-1
votes
0answers
46 views

Import specific Excel cells to .csv Powershell

I have such a code for exporting Excel file with two worksheets into two csv files.The problem is that I am currently exporting whole worksheets and I want to export only these 3 columns from my ...
2
votes
0answers
37 views

What is the powershell equivalent for `pwd -P`?

I have made a symlink using cmd /c mklink /D "MyDir" C:\MyDir in my home directory C:\Users\myusername. When I type cd toDir from my homedir and type pwd it returns Path ---- C:\Users\myusername\My ...
1
vote
0answers
13 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 ...
0
votes
0answers
7 views

Set CMTrace Font

Might be a bit of a long shot but I was wondering if anyone knew of, or could speculate on a way to change the default font of CMTrace. It seems to use some Sans-Serif font. I'd like to change it to ...
0
votes
1answer
54 views

Download indivual PST from Office365 Exchange?

I am migrating my company’s email from Office365 to GoogleApps. While GoogleApps has an online migration service for email, it doesn’t for Calendar and Contacts. I know that I can go to each ...
0
votes
0answers
22 views

How can I get all urls of pattern x from a paged list of search results?

I'm using Windows 7 SP1, and I'm willing to use powershell or wget or whatever will work. I downloaded powershell today (ps 4) and I've got some scripts working, but I'm having trouble with this one. ...
0
votes
2answers
24 views

Viewing all accessible drives in PowerShell

I noticed that cd \ navigates to the root of my drive. But there are other drives that I can access on my computer. Is there a command in PowerShell that lists all of the drives that I can connect ...
0
votes
2answers
33 views

Powershell script to list folders in all shares

Stupid question but not sure if this is possible. I have a file server hosting 8 separate shares. I was looking for a script to pull a list of the folder names (No subfolders) for all of the shares. ...
0
votes
1answer
38 views

Can't run start-process command

I'm trying to run a command found in this answer. The command is start /w %SystemRoot%\system32\pkgmgr.exe /ip /m:Windows6.1-KB2506143-x86.cab Trouble is, it doesn't work for me. Indeed, it ...
0
votes
1answer
21 views

Why does this script prompt me for an InputObject?

I have a script that is supposed to list all the installed programs on a machine. I want it to export it to a file for me. I keep getting the error: Supply Values for the following parameters: ...
2
votes
0answers
82 views

Troubles running Azure powershell

I'm trying to install Azure Powershell, following the instructions on this page. The installation seems to run fine and proceeds without errors. However, once it's finished, I can't manage to find ...
1
vote
1answer
43 views

Windows Power Plan automation

I like to keep my Asus ROG G750JZ(laptop) on all the time and I have already automated sleeping at 01:00 in the morning, auto wake-up on opening the lid. However since I am not using the laptop all ...
1
vote
1answer
38 views

Can't install PowerShell 4.0

I'm trying to install PowerShell 4.0 on a Windows 2008R2 server Installed Windows6.1-KB2819745-x64-MultiPkg.msu with no errors or warning But when I run up PowerShell and check the $host.version, ...
0
votes
1answer
43 views

Using PowerShell to Close Firewall Port

I'm doing some end to end testing of an application and I need to be able to close then open a port in Windows Firewall using PowerShell commands. I've found a script that adds a firewall rule to open ...
0
votes
1answer
33 views

How to install a mmc certificate on Windows?

I am not familiar with Windows very much, and I have trouble installing a MMC certificate. I am following this description to use MMC to create a certificate, but I cannot complete the step labeled ' ...
-2
votes
1answer
116 views

How to connect to a remote Windows computer using Enter-PSSession on PowerShell?

I am trying to connect to a remote windows computer using Enter-PSSession using PowerShell. As a Linux user, I am not very familiar with the inner working of Windows. When just using the command I ...
1
vote
1answer
32 views

How does one start the Powershell ISE with no file open?

When I launch powershell_ise.exe, it defaults to having an open file "Untitled.ps1". Is there a mechanism to ask ISE to launch showing only the prompt? That is, at the moment when I launch Powershell ...
1
vote
1answer
41 views

Listing Mapped Drives and Username Powershell Script

It's been a little while since I've touched PowerShell so struggling to get this working as I expect. $computerlist = Get-Content H:\MappedDrive\ListOfMachines.txt ForEach ($computer in ...
1
vote
1answer
79 views

Is it possible to install PowerShell 3 on a Windows Server 2003 or 2003 R2?

On a Windows Server 2003 rig (which already has .NET 4 but no 4.5 on it) that is to be expired before the end of the year, I'd like to run a few PowerShell 3 scripts on a scheduled base as the scripts ...
1
vote
0answers
32 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
36 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
33 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
89 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
36 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 ...
4
votes
2answers
108 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
47 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
33 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
39 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
29 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
54 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
79 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
44 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
27 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
49 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 ...