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

run powershell command from cmd

how i can run this command from cmd : powershell.exe "(get-process | ? {$_.Description -eq "Sysinter Process Explorer"}) | select processname | out-file $env:APPDATA\example.txt" i still get ...
1
vote
1answer
22 views

Something in Windows 10 is re-dating all of my archived *.eml files

Background info Between 2003 & 2013 I had the habit of saving important emails out of my email account to my local hard drive as *.eml files. (I no longer do this, relying on the vast backup ...
0
votes
2answers
36 views

Powershell - filenames that match two (or more) patterns

To find files in a directory that have both "foo" and "bar" in the filename, we can use: Get-ChildItem | Where-Object {$_.Name -like "foo" -and $_.Name -like "bar"} Is there a more elegant way to ...
5
votes
4answers
52k views

How I can upgrade PowerShell on Windows Server 2008 R2?

I am using Windows PowerShell 1.0 in Windows Server 2008 R2. I have tried PowerShell 3.0 in Windows 8 and it looks good to me. Now the question is: How I can upgrade PowerShell on the Windows Server ...
3
votes
2answers
3k views

How do you install .net4 on a Server 2008 r2 machine through psremoting in powershell?

I need to write a script that installs .net 4 remotely using powershell to a group of Server 2008 R2 machines. I based my script off of ...
0
votes
1answer
25 views

How to equivalent to ps -ef in Windows 10

I have looked online, and have not found anything that would accomplish what I want to do. I am looking for a command with output equivalent to "ps -ef" of Linux so I can find out the process id ...
1
vote
1answer
60 views

Run a Windows application without displaying its GUI

Is there a way to run a Windows application without displaying its GUI window? I have a 3rd party Windows application which does not have any command line parameter or switch to suppress its GUI. I ...
0
votes
1answer
11 views

Clear Application Event Log by Source

I've seen various sources suggesting something like this to clear all event logs: wevtutil el | Foreach-Object {Write-Host "Clearing $_"; wevtutil cl "$_"} But what I would like to do is remove ...
0
votes
0answers
27 views

Close process gracefully that has no window

So, I have a script that starts some auto-hotkey scripts while also starting up a game. I want those scripts to close again when the game ends. Currently I'm doing this with the kill command. This ...
0
votes
0answers
16 views

Uncheck IPv6 Checkbox (Unbind) for a Specific Network Adapter on Windows 7 with PowerShell

To preface this, I'd just like to say I have spent a great many days considering the great evils of this request. Nevertheless, I must press on. Unfortunately, on Windows 7, the NetAdapter module is ...
0
votes
0answers
35 views

Powershell : this command sticks my script, freezes

I am trying to get a list of available updates using $UpdateSession = New-Object -ComObject 'Microsoft.Update.Session' Write-Host "[1]" $UpdateSession.ClientApplicationID = 'MSDN PowerShell Sample' ...
0
votes
1answer
1k views

Remove cached credentials for MS Onedrive using a script

I have a need to be able to remove onedrive cached credentials from local machines from the windows credential manager using a script The reason - When a user is prompted to change their O365 password ...
0
votes
0answers
33 views

Windows 10 search is broken

Since I ever started using windows, my go to method to open pretty much anything is to press the windows key and type whatever I am trying to find/open. However, since last week my windows search just ...
0
votes
1answer
53 views

kill process by its own description

I need help for killing putty.exe by searching process for it's description even if the user change the name and the class name ( win title ) for the putty.exe if process description on process list ...
-1
votes
0answers
17 views

Get the last Microsoft published update, within a script [duplicate]

I have a Powershell script that I use to monitor several machines. Among elements checked, I have the installed Windows OS and the last update installed using : $listeMAJ = Get-HotFix -ComputerName ...
1
vote
1answer
32 views

How to install every printer (with wildcard) from PrintServer

is there a quick and easy way to install every printer from a print server over a console like PowerShell? Add-Printer from PowerShell does not support Wildcards. I tried it with Get-Printer and ...
1
vote
1answer
30 views

How to know from what microsoft package/update a .dll file comes from?

There are plenty of specific missing X.dll requests here. I would like to know how to get where does a .dll file should come from, especially a microsoft .dll. I have a missing assembly error on my ...
2
votes
1answer
4k 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 ...
59
votes
6answers
62k views

PowerShell equivalent of curl

Is there an equivalent of curl in PowerShell? Does it have some similar built-in capability or is there a 3rd party cmdlet?
1
vote
1answer
104 views

Find and delete duplicate root certificates

We are in a disconnected domain and have just implemented updated root certificates via group policy. I have found now though, that there are a number of duplicated root certificates in the users ...
2
votes
1answer
6k views

Get Network Printers From A Remote Computer

I am using this to attempt to get a list of printers on a remote computer: Get-WmiObject win32_printer -ComputerName "$oldPcName" The problem is I only get local printers, not those printers from ...
0
votes
1answer
47 views

Script to get a list of users allowed to connect computer

I would like to inventory the users and groups that are allowed to connect to a computer (interactively or remotely). The computer can be either in a workgroup or in an active directory but primarily ...
0
votes
1answer
41 views

Move file recursively to parent folder [duplicate]

I'm on windows 10, I need a batch script or a powershell script to solve this problem. I have downloaded the flash tv series, the structure looks like this flash tv series folder episode 1 ...
-1
votes
1answer
73 views

Why Powershell is so slow?

I tried to make a simple thing with PowerShell, find files which take most space on the drive. I used ls + sort and....it took forever for me. Sometimes I use far manager and compared with ...
1
vote
3answers
34 views

Can I run PowerShell script of version 4.0 on windows server with powershell script version 2.0

Can I run PowerShell script of version 4.0 on windows server with powershell script version 2.0? I have developed script using PowerShell version 4.0 on local server. Now I want to test this script on ...
18
votes
4answers
49k views

netstat with process name?

Using netstat -a -o -n I can get the list of ports and PID then I need to go to task manager and add the PID and see who is it. (pretty frustrating) I was wonder if there is a CMD command which ...
0
votes
1answer
37 views

Is there a way to uninstall a SPECIFIC provisioned app for all user accounts in Windows 10 using PowerShell?

So I looked up on the web and found PowerShell commands to uninstall: All Windows Store apps using PowerShell for all users A specific app using PowerShell for current user All apps for current user ...
2
votes
1answer
3k views

Running 'Start-Process' Remotely: How to Display Standard Output?

I have a PowerShell script for installing software on remote computers. To date I have been successfully using the following code: $prog = "ping" $arg = "localhost" $computername = "MACHINE01" ...
2
votes
4answers
1k views

Running Windows Powershell Scripts simply opens it in the editor

I have a Windows powershell script that works fine in the interactive editor. The script is a simple one line sql cmd: sqlcmd -S servername -d dbname -E -W -w 999 -s "," -Q "SELECT select ...
1
vote
0answers
40 views

“AuthorizationManager check failed” in PowerShell, fixed after restarting WMI

About once a day, PowerShell scripts will stop working on my computer with an error that looks like this. AuthorizationManager check failed. At line:1 char:3 + . .\matt.ps1 + ~~~~~~~~~~ + ...
0
votes
1answer
43 views

Windows 10 Bing Metro UI apps no longer open (e.g. News, Weather, Sport)

I recently did an upgrade to the latest Windows 10 insider preview (to test out the Ubuntu Bash on Windows). After testing I rolled back to a previous stable version (then disabled the insider ...
3
votes
3answers
3k views

Run powershell through winexe/psexec

I'm trying to connect to a Windows 2012 server from Ubuntu. winexe --user <USER> --password <SERVER> //SERVER cmd.exe works just fine. However, winexe --user <USER> --password ...
6
votes
3answers
14k views

Get HP Product Number via Powershell

I have put together a robust HP Warrant Lookup PowerShell script. However, I cannot figure out how to get a HP system's product number in an automated process. So... How can I get HP product number ...
2
votes
2answers
3k views

Proxy configuration in powershell

I'm trying to install chocolatey on an windows behind a proxy: @powershell -ExecutionPolicy unrestricted In power shell I'm executing $wc=new-object net.webclient; $wc.Proxy=new-object ...
1
vote
2answers
8k views

How to reset TCP/IP on Windows 8.1?

The following netsh command is not working on Windows 8.1. netsh int ipv4 reset It give “Access Denied” error and it is a VERY known issue, many people complaining about it all ove online forums. ...
0
votes
2answers
648 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: ...
0
votes
1answer
3k 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 ...
0
votes
1answer
20 views

Is it possible to get the Process ID of an Executable started in a PowerShell script using he 'Call' (`&`) operator?

Here is my issue. I run a command line application within a PowerShell script using the Call Operator (i.e. the & symbol), such that it is: & $PathToExe /switch:"lots of args" ...
1
vote
2answers
10k views

Call PowerShell script from Excel macro

I'm trying to call a PowerShell script from a macro in Excel. I have seen a number of examples along the lines of: retval = Shell("powershell ""C:\MyTest.ps1""", 1) When I try to use this, ...
9
votes
2answers
25k views

Where is the known_hosts file for OpenSSH for Windows?

One of the servers I frequently log into via SSH has changed it's IP address. So, now I'm getting man in the middle attack warnings when I try to use SSH via Windows Powershell and OpenSSH for ...
64
votes
12answers
49k views

Equivalent of Linux `touch` to create an empty file with PowerShell?

In PowerShell is there an equivalent of touch? For instance in Linux I can create a new empty file by invoking: touch filename On Windows this is pretty awkward -- usually I just open a new ...
1
vote
0answers
36 views

Find AD users with blank Password

Is there any way to find out users on my domain with blank password using powershell? We already have a policy set for this but with too many admin teams managing different parts of domain just want ...
1
vote
0answers
33 views

Any way to do Linux-style sort --merge in Windows PowerShell?

In PowerShell, if I have two files that are already sorted and want to merge them into one big sorted file, it seems wasteful and inefficient to do gc file1, file2 | sort-object > newfile, ...
1
vote
0answers
26 views

Java runs in batch but not Powershell

I have a batch file that runs a jar with a few parameters, works fine: @echo off java -cp bulkconfig.020.0005.jar com.hospira.bulkconfig.LoadConfig %* I would like to add some more cababilities ...
2
votes
1answer
203 views

Trying to rename large amount of .doc files based off first line or so of text

I was attempting to help a friend, who had a bunch of data recovered, but the meta data was lost. As most of it is articles or recipes, she believes the title or first line or so of text will be good ...
2
votes
1answer
4k views

Can't start PowerShell as administrator

I have Windows 7, and I want to run PowerShell as an administrator. I found it in the Start Menu, right clicked it and selected Run as administrator, but I get the following: Windows Explorer has ...
1
vote
1answer
37 views

Open the start menu using Powershell

Am currently working on a business process automation software and literally user actions are simulated by robots. I need to pass some information to the start menu of my windows 7 and i was wondering ...
0
votes
1answer
27 views

Manage Azure Active Directory application manifest through PowerShell

I have a large number of applications running in Azure that need to have some very specific values set in their Manifests in the Active Directory section of the old Azure Management portal. Is there a ...
7
votes
2answers
3k views

Running Script on Shutdown using Windows 8

Is there any way to execute a Batch- or PowerShell-Script on shutdown using Windows 8 without disabling FastBoot? I know you can add a script using "gpedit.msc", but I found that Windows 8 won't ...
1
vote
0answers
16 views

Automated XP Mode install

I manage a conference lab environment, and one thing we would like to do is install the 1.0 version of our primary software, as a bit of a nostalgia playground. The thing is, this old version really ...