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

Cancel button not working in form created in powershell

We are creating a powershell script that creates a form window, that accepts a password. Now normally this is rather simple, but we are having it loop 5 times if a wrong password is created. We have ...
0
votes
1answer
28 views

Where can one find list of keyboard shortcuts for powershell?

Where can one find the complete list of keyboard shortcuts for the last version of Powershell terminal (windows 10)? I've been googling for an hour and the best I found were: ISE Shortcuts - which ...
-1
votes
0answers
23 views

Windows Shell Functions

So I was following this tutorial: https://msdn.microsoft.com/en-us/library/windows/desktop/hh127427(v=vs.85).aspx when I cam across the sentence that casually says "Call the SHChangeNotify function"....
0
votes
0answers
24 views

Uninstalling Calculator App Windows 10, Package could not be registered error

My Windows 10 calculator stopped working. I can't seem to re-install it using the PowerShell methods described on various Google searches. I receive 'Package could not be registered' errors. Here's ...
0
votes
0answers
12 views

Taking ownership of a folder and adding full permissions to a domain account in powershell?

Taking ownership of a folder and adding full permissions to a domain account? I have a Powershell function that does part of this, but it doesn't use the domain account to take ownership and add ...
0
votes
0answers
14 views

unable to run {Get-VM} on a windows 2008 server

I have the following :- 1.a scanning server which is windows 2012 R2. where I am running the following command to get all the vm inside remote hyper-v servers :- $vCenterServer = 'Server123';$...
0
votes
0answers
24 views

Ansible with Windows Server 2012 and SQL Server 2014

I've been playing around with ansible and with WinRM to manage windows servers and have been slightly successful with it to run basic commands. However when i try to run an exe file from within the ...
3
votes
1answer
49 views

PowerShell commands no longer recognized

I installed a package on my Win7 x64 computer using Chocolately. As part of the installation, it wanted to upgrade PowerShell to 5.0. Since this happened basic PowerShell commands no longer work. I'...
0
votes
1answer
57 views

Use FFMPEG To Convert .MKV to .MP4 With Conversion Settings

I am using a powershell script and ffmpeg to convert mkv files to mp4 files so that I can stream them using serviio The script executes as it should, however when serviio tries to add the converted ...
0
votes
0answers
35 views

Invert the direction of the mousepad

I wonder if I can invert the scroll direction of my mousepad. I'd like to scroll upwards and have that action scroll downwards and vice-versa. I tried doing it with Windows PoweShell but got an error. ...
0
votes
0answers
38 views

Automate Exporting of Outlook Calendar to CSV

Is it possible to create a powershell or cmd script that will automatically export Outlook's calendar to a CSV file? Edit: There is a way to do so from within Outlook, but I was wanting an example as ...
1
vote
2answers
40 views

Powershell To Delete All Files With Certain File Extension

I want to scan a directory (there are no subs) and delete any file with an extension of .avi I tried this syntax, but no errors are thrown, and no files are deleted. This is the code I tried get-...
0
votes
1answer
41 views

How do you make an bat file that talks to a server?

Basically I have employees and I don't want them to know my powershell commands. So I would like to make my .BAT files into EXE files and everytime it is ran it will ask for a user name and password ...
0
votes
0answers
26 views

Windows PowerShell version 3.0 doesn't support installation of an exe

I am trying to install an exe using C# code (.net framework 4.5) and PowerShell script in remote machine. The remote machine's OS is Windows 7 and its PowerShell version is 3. The exe has been moved ...
1
vote
2answers
70 views

Start Microsoft Edge maximized on first run

I'm developing an image for Windows 10 to deploy, and one of the requirements is that when Edge is started for the first time it should be maximized (not fullscreen, but maximized - the same result as ...
0
votes
1answer
37 views

Determine 32bit/64bit from powershell script inside Inno Setup

Consider the following powershell script: [System.IntPtr]::Size [Environment]::Is64BitProcess If I run this directly inside powershell on a 64bit machine, then I correctly get 8 True But when I ...
2
votes
1answer
44 views

Does Powershell have any sort of .bashrc equivalent?

I have some functions I'd like to load by default when I open an administrative powershell. Is there any equivalent to say .bashrc or .profile that I could use to automatically import the scripts ...
3
votes
1answer
27 views

Is there a way to open regedit to the current path in powershell?

I'm using the Set-Location commandlet to move into the desired path in the registry. Is it possible to run regedit to that it opens in that path? Sort of like if you go into cmd, cd to the path you ...
0
votes
1answer
50 views

Display Popup from script executed as System user

I've a scheduled task, executed by System user. It's can sometimes display a popup to interacts with the user. This work fine if I launch the script myself, but not displaying when launched by the ...
-1
votes
1answer
50 views

Renaming multiple files with same filename but different extensions

I have 180 files in a folder all with the SAME filename but 180 DIFFERENT extensions. I want them all to be .jpg. I cannot seem to make windows or dos or powershell work to rename all files to a ...
0
votes
2answers
69 views

Add Show/Hide hidden folders to Windows 7 context menu

Recently I've been bugged by the fact that it is so difficult to turn on "Show Hidden Files" in Windows as compared to other OS (ie. Ubuntu). I've been searching for a way to add an option to "Toggle ...
0
votes
2answers
42 views

powershell - simulate Windows-D to clear and restore screen

I have a request to get a screenshot of users desktop icons. I can use Powershell to capture, but need to clear the screen first, take the shot, then restore the screen. Keystrokes 'Windows+D" will ...
-1
votes
0answers
29 views

Decided to hide Windows Store app; can't manage to have it back now [duplicate]

I recently decided to hide some pre-installed Windows 10 apps on my tablet. My bad, I also accidentally proceeded in compiling an unwanted line on PowerShell: the one hiding the Windows Store, as it ...
-2
votes
0answers
25 views

Read from text file and replace in another text file

I want to read from a text file line by line from file A and replace those values to file B and need to save as .ps1 Example: TEXT FILE A is having 145655 165789 178987 need to put these values ...
-1
votes
1answer
45 views

How do I export Task Manager stats into a file with PowerShell?

I want to see if it's possible to pipe CPU/Memory usage and processes into something like a csv every few minutes with PowerShell. Any ideas? EDIT: By using "Task List" I was able to send ...
0
votes
1answer
25 views

Change powershell color return error

I was trying to change the CommandForgroundColor by command Set-PSReadlineOption -TokenKind Command -CommandForegroundColor DarkGray but I got return as: A parameter cannot be found that matches ...
0
votes
0answers
44 views

Powershell 5.0 SHA-3?

Does anyone know if it is possible to calculate SHA-3 in power shell 5.0 ? If it is not the case are there any open source 3rd party software i can use ?
0
votes
1answer
36 views

How to format a date field in powershell?

In this script, I can get the date for shortcuts, but is in YYYYMMDD (and time) format. I'm going for MM/dd/yyyy. I've tried several suggestions from the web, but all result in errors, maybe because ...
-1
votes
0answers
33 views

How to close first IE tab by Powershell?

I use Powershell script to export all IE tabs url to .csv file and the same script to load the urls from this file afterwards. The script works fine, but when loading the urls from backup, there is ...
0
votes
0answers
17 views

Alert When Windows Task Scheduler Fails to Run [duplicate]

We have a script that is a security script, checking logs. Almost always it can be ignored and, for the most part, is; it sends out an email when it sees an issue in some logs of a particular type, ...
1
vote
1answer
44 views

Getting an error while creating multiple folders using `powershell` command-line

I am trying to create multiple folders using windows powershell by typing this into the command-line mkdir folder-one folder-one/sub-folder folder-two. However, I get the following error: C:\...
1
vote
2answers
53 views

How to detect each Windows OS is used with powershell

I would like to check which version of windows is used in a remote machine, I'm using this command: $version=[Environment]::OSVersion.Version | % {"{0}.{1}.{2}" -f $_.Major,$_.Minor,$_.Build} I get ...
1
vote
1answer
18 views

Powershell becomes normal shell after running cmd

I want to use "start-ssh-agent.cmd" (is part of git for windows installation) from powershell. The problem is: if i run this in powershell my powershell becomes a normal shell. The prompt changes from ...
0
votes
0answers
28 views

Need to parse error logs and set up an alert system on a remote Windows computer [closed]

All I need to set up an alert system that can tell me when a hard drive has failed in a remote computer system. I manage approximately ~10 Windows 7 machines and they all have LSI RAID cards with 3+ ...
1
vote
1answer
791 views

Powershell script to run a .reg file on remote computers

I have tried creating a batch file using PsExec to update registry settings on remote computers without success so I am now trying to use Powershell. I have compiled the following script by using ...
0
votes
0answers
37 views

Visual Studio newbie need help making a VB front end to a PS script

I'm a system admin at work and part of the day to day is creating new mailboxes for users in Office 365 and we are forced to use powershell to do this. The only variable in the PS commands is the user'...
1
vote
0answers
46 views

Can't initialize VM's on HyperV Windows Server 2012

I'm really stuck with this and I can't understand why I sunddendly can't make ANY VM to start succesfully in my system. I had just one VM, and it was working perfectly, then for some reasons I booted ...
1
vote
1answer
23 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: user1@campus.edu,...
1
vote
0answers
9 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
58 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
23 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
28 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
34 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 /server:...
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
36 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
53 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
35 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
121 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 ...