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

4
votes
2answers
73 views

How to invoke actions from an executable in PowerShell?

I am using Powershell 2.0 on Windows 7 SP1, but any answers covering versions 1.0-4.0 would be nice. I know that this command opens Paint via PowerShell: & "C:\Windows\system32\mspaint.exe" ...
0
votes
0answers
48 views

Add line to text file after specific line with PowerShell

I have to edit remotely a file called nsclient.ini on hundreds of computers, the file contains some command definitions. For example: [/settings/external scripts/scripts] check_event="C:\Program ...
2
votes
1answer
53 views

how to open internet explorer with powershell in window xp

expect to open a link in internet explorer and refresh it automatically every 5 seconds but it can not open after try powershell with administrator Set-ExecutionPolicy remotesigned powershell ...
1
vote
1answer
42 views

Get first name in an array of key-value pairs in PowerShell

While trying to write some maintenance scripts for our Exchange 2013 deployment, one of the ones I need is a script that will determine which server a database is currently active on, versus which one ...
0
votes
0answers
16 views

Powershell support for VT100 escape sequences [duplicate]

Is there a module which adds support for VT100 in PowerShell? I know these go by many names, some of which are VT100 and ANSI, and they look like ←[0m in the console if you lack support. There's much ...
1
vote
1answer
52 views

powershell foreach loop fails as it increments count by first test

I have been asked to monitor c:\temp on windows servers. I need to know how many folders are there and if they are there greater than 1, 2 and 3 minutes. This reporting works in a basic form but not ...
0
votes
0answers
38 views

WinRM or PowerShell Server?

I would like to be able to remote into my Windows machines with a command line only interface, to PowerShell. It must be secure. It seems like there are two options for doing this. One is the ...
0
votes
1answer
27 views

How to bring vim back to foreground in Powershell

launch vim from powershell hit control+z (you are dropped back to powershell, vim is in background) ??? How do you bring Vim back to foreground? EDIT: I have tried fg
0
votes
1answer
37 views

Powershell is installed but winrm is not found

one of my servers is win 2003 and has powershell 2.0 installed, but I don't see winrm service there and can't thus run "Winrm quickconfig". It says "command not found". As a result, I can't call ...
1
vote
2answers
114 views

Set UAC Level with PowerShell

I'm looking for a way to set the UAC Level with Powershell/Command prompt. I'm aware the 'EnableLUA' value in the registry, but this won't set the level. It's just true or false. Is there a way to ...
-1
votes
1answer
49 views

NullReferenceException error in powershell

I am a newb in power-shell, i have written an script that stops process according to parameters in commandline. the problem is when i run the script in power shell it works but when i try to run it ...
0
votes
1answer
22 views

MS Surface / Windows PC - Wipe Between Users

As a company we have a few devices like MS Surfaces and some netbooks that are used for open access within social spaces. The problem being sometimes these devices are abused and wallpapers changed ...
1
vote
1answer
23 views

Where is the default location of the directory in which PowerShell scripts are ran?

I ran a script in Powershell that was suppose to do some file analysis and create a csv. It looks like it ran, and I didn't encounter any errors. My problem now is that I don't know where the file ...
1
vote
1answer
76 views

Internet Explorer: Set homepage for all users without GPO

I'm looking for a way to set the homepage of Internet Explorer (and possibly other browsers) for all Users through command line/Powershell, or any other method that doesn't use the domain policies ...
0
votes
1answer
9 views

Inspect Exchange items

I would like to inspect mail and calendar items stored in an Exchange mailbox, by id, to see all their properties that are stored for them. Is there a way to do this (in powershell or the like)?
1
vote
1answer
35 views

Powershell script to open a number of files located inside subdirectories

How does one open (say, using notepad.exe) multiple files ending in _dc.txt, each one of which is located in a number of subdirectories of C:\Data\Test? My script below gets stuck on -Recurse, with ...
0
votes
1answer
40 views

Way to list and cat all files that contain string X in powershell

Currently, when I'm looking through a bunch of files for a string in powershell I use the following: PS: C:\> ls -r | Select-String "dummy" | ls -r And that lists all files that have that string ...
0
votes
0answers
17 views

Why am I getting conflicting results when checking Maven version in Windows PowerShell and cmd64 (Environment variables issue)

I'm looking at Maven for the first time, trying to get everything up and running. I've been going through the tutorials here and up until now everything has been going smoothly. I've added all the ...
2
votes
1answer
62 views

Taskill vs. Tskill

I've seen both of these used to end processes. It is to my understanding that tskill is the older taskkill Microsoft Windows XP Documentation while the newer taskkill is capable of closing several ...
0
votes
2answers
46 views

Renaming files with a previous date

I am running a program that creates 50 reports for different clients in pdf format on the first of every month. I need the file name to reflect the previous month and current year in the file name ...
1
vote
2answers
34 views

Return two (or more) properties as a table with a single PowerShell command

I have the following PowerShell command which returns all sorts of properties about disk drives attached to the system: Get-WmiObject -Class Win32_Volume | Where-Object {$_.DeviceID -like "\\?\*"} ...
1
vote
1answer
79 views

Running powershell scripts or functions using unix-like pipeline syntax

I want to run multiple custom processing steps using the pipeline in powershell. In linux I could do something like this: listServers.sh | <some commands to filter servers> | ...
0
votes
1answer
63 views

Microsoft Exchange 2007 Management Console shows as installed but is not

When I mount the ISO for Exchange 2007 SP1, it shows the steps 1, 2 and 3 greyed out. They display the following information: Step 1: Install .NET Framework version 2.0 - Installed Step 2: ...
0
votes
0answers
76 views

How do version differences affect PowerShell commands on remote computers?

Newer PowerShell versions obviously will come with new features and new cmdlets. This is something which is important to take into consideration when writing scripts, or PowerShell walkthroughs, which ...
1
vote
2answers
510 views

Powershell script to list scheduled tasks on remote systems

I want to write a PowerShell script that lists all Scheduled Tasks on remote systems, and includes the user account which will be used to run each task. The local system is running Windows 7, with ...
0
votes
1answer
45 views

Error on “-e” parameter when running makecert command in powershell

I am trying to run the following command in Powershell on a machine running Server 2012: makecert -r -pe -n CN="*.$domainVariable" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr ...
0
votes
4answers
315 views

FTP: Cannot connect using FileZilla on Windows.

I installed FTP Server Services on my IIS 8.5/Windows 7 workstation, and tried to FTP using FileZilla from my laptop (client - Windows 8). I tried to configure the Network Settings using Network ...
0
votes
1answer
27 views

custom object powershell multiple items

I have this code wich work great for only one item if I add a new item it just delete the older one I've tried many way but I can't find how to do this can you help me? Import-Module ...
0
votes
1answer
43 views

What am I doing wrong in my powershell script

Ok here is the thing. I tried to make a PowerShell script to create some folders and to change a couple of strings in a .txt file. But as you can guess it is not working. See my configuration below: ...
0
votes
0answers
35 views

Why does Windows PowerShell font size not reflect reality?

On Windows 7 if I set my PowerShell window to Consolas 14, it looks very different to Microsoft Word 2010 Consolas 14. See picture. Which is right, and why do they look different?
1
vote
1answer
111 views

Using make from Windows PowerShell

Under Linux, sources of projects commonly come with Makefile's. Makefiles contain directives to build these projects using the command make. I am currently forced to use Windows, and so as to be able ...
2
votes
1answer
89 views

batch script to “scan for hardware” in Windows 8.1

There is this issue with Wifi on the Surface Pro 3 that can be easily fixed with a script that does the equivalent of running "Scan for hardware changes" in the Device Manager. This script will be ...
1
vote
1answer
64 views

How to search based on custom attribute?

I have a custom attribute in AD similar to an employee ID. I can use get-aduser and pull the information from this field by filter, but I cannot search a user based on that attribute. The search ...
0
votes
4answers
71 views

How can I get an overview of all users with a specific user right in Windows?

I need to check that only the administrators group (sid: S-1-5-32-544) has the privilege to take ownership of files or folders (SeTakeOwnershipPrivilege). How can I get an overview of all ...
0
votes
0answers
47 views

Scheduled task doesnt work Windows 8

I have this batch that makes a scheduled task calling to a powershell script and i cant make it run in windows 8. It works perfectly on windows 7 but when i use it in windows 8 it keep stuck. My ...
1
vote
3answers
49 views

Accessing files across a network using the SYSTEM account

I'm not sure if I am asking this in the right spot or not, sorry if I am wrong. I would like to know please, SCCM is currently operational in our school, and we use it to install software across our ...
-1
votes
1answer
63 views

What is the differences between MS DOS & Powershell in Windows? [closed]

What makes them differ from each other? I was just experimenting with MS DOS, and then found Powershell. Can't figure out why Microsoft gave them.
0
votes
1answer
314 views

Powershell Script to SFTP New files

I have a script here that SFTP's files from one location to another, the script works fine however I'd like to change the script so that it only copies files that are not already present. Bit of a ...
0
votes
1answer
47 views

How can I mount ActiveDirectory in powershell with X500 format?

when I try to mount Active Directory in powershell, it raises the below error: """The object name has bad syntax new-psprovider""". It can only bypassed if you provide the option -format canon. But ...
2
votes
1answer
52 views

“Help Tree” returns help for Copy-Item

In doing some research on another question, I wanted to check to be sure that tree was not an actual native PowerShell command or alias. Of course, the proper way to do this is with Get-Command. ...
0
votes
1answer
59 views

How to rename all files which end with “.BAK” [duplicate]

I have a windows file system where a hiccup in our backup software renamed hundreds of files. The change looks like this: "ABC.PDF" -> "ABC.PDF.BAK" This happened to some, but not all files in a ...
0
votes
1answer
43 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
39 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
52 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
101 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
278 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
119 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
18 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
75 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
1answer
41 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 ...