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
0answers
24 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
33 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
48 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
37 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
54 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
37 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
122 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
15 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
31 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
40 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
40 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
64 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
61 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
vote
1answer
45 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
39 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
64 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
50 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 ...
0
votes
1answer
91 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
64 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
85 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
33 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" /anotherswitch:"...
1
vote
0answers
55 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
34 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
36 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
46 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
36 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
99 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
24 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 german)...
0
votes
0answers
46 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
23 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
40 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
54 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
52 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
80 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
52 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
40 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
35 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
17 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
30 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 C:\...
0
votes
1answer
59 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
19 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
748 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 ...
1
vote
0answers
25 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 ...
0
votes
1answer
103 views

ErrorCode: TargetDiskBlobAlreadyExists

I am creating an AzureRM VM using existing VHD, the error which I received is New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $vm New-AzureRmVM : Long running operation failed with ...
2
votes
1answer
44 views

Removing lines from powershell txt file

I'm having to simulate killing of task from process list. I get process list, send it to the text file process.txt and then have user input the task they want to kill. My main problem, is I have to do ...
0
votes
0answers
102 views

What is the difference in Windows CMD and PowerShell redirection and text Encoding?

Granted, this is not a great title, but to be honest I was unsure how to word the question without posting an essay as the question. This description should add some flesh. Problem: I have a Python ...
0
votes
1answer
102 views

What is psprovider in powershell?

I am new to PowerShell and trying to understand the concept of psprovider. I know I can use Get-PSProvider to show a list of available psproviders All of the help I am finding, assumes I know things ...
1
vote
1answer
81 views

Powershell equivalent of 'msconfig'?

I use 'msconfig' to control what programs startup at boot (etc) - is there a powershell way of doing the same ? I tried: get-help startup This brings up: Register-PSSessionConfiguration Get-...
0
votes
0answers
25 views

Move-item with control if directory exist wont move the stuff inside this directory if the name contains a 1 infront

My code will move items from an existing structure to a new one. For this it has to take many folders and merge it to one. Sometimes there is a folder which exists. My script will now go inside the ...
0
votes
1answer
57 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 ...