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

1
vote
1answer
13 views

Exchange Powershell

trying to create script to delete exchange 2010 mailbox messages. creating input file in csv format with three headers. Recipients Subject Sender with these values: line1: ...
1
vote
0answers
5 views

Detect when a drive is plugged into a Hyper-V host and automatically attach it to a VM as a pass-through disk

I current am using a WS2012R2 file server and it is a VM. I already have a NAS storage for backing the data up on it and now I want to add a offsite USB storage drive as well... While it isnt much ...
-1
votes
1answer
26 views

Windows 10 Provisioned Apps

I am trying to create a nice clean bloatware free Windows 10 image. I have used the following line in PS but it seems to remove a lot more than just rubbish apps, but even after running the command, ...
0
votes
0answers
16 views

How can I run a powershell script such that it does not create a tab on the toolbar?

Most of the time I have a powershell script running while I work (its basically a local server). I never interact with it directly, its always a background task. Despite this, it still hogs space on ...
0
votes
0answers
21 views

How to monitor File History on Windows 8.1 / 10 remotely?

We are using File History feature in Windows 8.1 and 10 on the machines. It's been working well. Is there anyway from the administrator point of view (remotely) that can monitor this activity ...
0
votes
1answer
16 views

Powershell script to return all logged on users on domain

I have a powershell script that returns all of the users logged into all of the machines on the domain. For some reason, it works fine when ran as an individual line query session console ...
0
votes
0answers
22 views

Text pipe not working in powershell

As asked by someone else here: https://github.com/trentm/node-bunyan/issues/322... The command node somescript.js | bunyan (where somescript.js writes utf8 text to stdout and bunyan consumes stdin) ...
1
vote
1answer
23 views

Using Powershell OUT-FILE changes data

Here is sample code that displays physical disk info on the console (with much thanks to guyc@computerperformance.co.uk): Get-WmiObject Win32_DiskDrive | % { $disk = $_ $partitions = "ASSOCIATORS ...
0
votes
1answer
33 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
24 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
3answers
48 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 ...
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
2answers
81 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
12 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
17 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
38 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
55 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 ...
0
votes
0answers
36 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 ...
-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
34 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
32 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 ...
0
votes
1answer
45 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
vote
3answers
35 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 ...
-1
votes
1answer
76 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 ...
0
votes
1answer
41 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 ...
1
vote
0answers
44 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
23 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
0answers
39 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
27 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 ...
1
vote
0answers
34 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
1answer
38 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

PowerShell can't create folder on network mount

I've create a drive with the Letter Z: and shared it so that the Network Path is: \\GOELA2682012SRV\srv2012r2 I now want to create a folder on there using PowerShell. This doesn't work: New-Item ...
1
vote
1answer
66 views

How can I create a Windows 10 taskbar shortcut to launch PowerShell with Administrator privileges?

Whenever I run PowerShell I almost exclusively need to run it in Administrator mode, however the taskbar shortcut only seems to enable this by right-clicking on the icon and selecting Run as ...
0
votes
0answers
13 views

Choco Install Mongodb throws internal server error 500

I am stuck on installing mongodb with chocolatey. This is the command I use: choco install mongodb I execute it in powershell with administrative rights. This is the error (translated from ...
0
votes
0answers
34 views

How to direct (Python) error messages printed in a PowerShell console to a text file

Firstly, the errors I'm interested in redirecting are NOT PowerShell errors, but those generated by a Python script that is called within my PowerShell script. I have read multiple post on here (and ...
0
votes
0answers
22 views

Accessing underlying object of SWbemObject instance [duplicate]

I'm using vbscript to interact with the WMI classes. I am querying the Win32_GroupUser class which is defined here https://msdn.microsoft.com/en-us/library/windows/desktop/aa394153%28v=vs.85%29.aspx. ...
0
votes
0answers
27 views

GUI Variables in Powershell [migrated]

I'm looking to setup a GUI that will determine the next step of a first time setup application. I originally programed the whole thing using batch but would like a more user friendly look. The program ...
0
votes
0answers
38 views

Looking to rename large amount of files using bat script

I'm still pretty new to the use of powershell, scripts, and the like, so I'm sorry that I don't have some form of script to start with. All I have is the specifics on my problem. I have a large ...
3
votes
0answers
44 views

Complex wmi queries using execquery

In powershell I can do a query like > get-wmiobject -query 'select * from win32_groupuser' | % {[wmi]$_.partcomponent|select domain,name,SID} Which will list for each wmi, the domain, name and ...
0
votes
0answers
43 views

How to find mp3 files on a remote server using Powershell

I have created a powershell script to search for mp3 files on my workstation. This is successful on my workstation, how can I run this on my network of 80 workstations? $strComputers = Get-Content ...
3
votes
1answer
73 views

Getting SID from win32_groupuser

I am trying to get the SIDs of users and groups by querying get-wmiobject -query 'select groupcomponent,partcomponent from win32_groupuser` output: __GENUS : 2 __CLASS : ...
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 ...
1
vote
1answer
29 views

Powershell KeyPress Modifiers

$Textbox.Add_Keydown({ If ($Args[1].key -eq 'Shift' -and $Args[1].key -eq 'Return'){Function A} ElseIf ($Args[1].key -eq 'Return'){Function B} }) I want to be able to make it do X on Shift+Enter ...
0
votes
0answers
25 views

Powershell keydown Shift+Enter

Foreach ($Var in $UserVariables){ $Var.Add_Keydown({ If ($Args[1].key -eq 'Shift' -and $Args[1].key -eq 'Return'){Export} ElseIf ($Args[1].key -eq 'Return'){Display} }) ...
0
votes
0answers
15 views

powershell or netcat over ADSL

is there anyway to use powershell for getting access to my office pc from home via my RDP Server i have 2 pc's : pc1 ( office ) connected via ADSL with dynamic ip pc2 ( RDP server ) static ip i ...
1
vote
1answer
27 views

simple batch script not working PS, but works in cmd [duplicate]

I have a .bat script that just cds into a directory cddocs.bat cd \Users\Me\Documents\NetBeansProjects\ It is in my home folder. (C:\Users\Me) In cmd when I run it C:\Users\Me>cddocs ...
0
votes
1answer
33 views

How can I see users' Office 365 Password date (date last changed, date it will expire, etc.)?

I know I can see the password dates (date last changed, date it will expire, etc.) for our in-house Active Directory. How do I see this information for Office 365 accounts, either with PowerShell or ...
0
votes
0answers
18 views

powershell session in conemu is not seeing an odbc driver

If I open a powershell session normally I can run a script that uses the "PostgreSQL ANSI" odbc driver without issue. If I open a powershell session in conemu (same arch, same user) I get a "data ...
6
votes
1answer
683 views

Renaming files in a folder in Windows using Powershell

In a directory, I have some .jpg files. The file names are integers starting from 1.jpg to 150.jpg. I would like to subtract 1 from each file name. So the file names would be 0.jpg to 149.jpg. I ...