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

2
votes
2answers
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
5 views

How to reduce PowerShell CPU spikes

On a windows server 2008R2 (VM, only 1CPU), I'm noticing hefty CPU spikes, completely disabling signing in via RDP / freezing connected sessions. Logging shows the ESX CPU demand scratches 3000 points ...
1
vote
1answer
10 views

Powershell Script not firing

I'm pretty new to powershell but im executing the following script in PS ISE: $source = "E:\MEX_Websites\Customer_Hosting\MyFolderB\Reports\" $filter = "*.*" $fsw = New-Object System.IO....
0
votes
0answers
10 views

Visibility of Connectify notification icon on Windows 10

I'm currently needing to frequently connect my Windows 10 (Version 1511, OS Build 10586.318) laptop to the internet via my cable-tethered Samsung Android phone. Every time I've happened to power-cycle ...
0
votes
0answers
14 views

Downgrade Windows storage spaces pool from Windows 10 to Windows 8.1

I have a storage spaces pool that was originally on Windows 8.1. When I moved the pool to a Windows 10 system, I unfortunately upgraded the storage spaces pool to the newer 'Windows 10 version'. So ...
-1
votes
0answers
13 views

Chocolatey as non-admin user

I´m starting to use Chocolatey in the network of my hotel for software installs. I have a domain set on Win 2008 and all my users are not admins. So, lets say I have a user JOE that is not an admin ...
1
vote
2answers
26 views

Converting C# Regex To PowerShell

Our Software department has a program that runs SQL scripts from a certain folder. I now need to replicate this functionality in PowerShell. C#: var commands = Regex.Split(sqlFileText, @"^\s*GO\s*$",...
0
votes
1answer
13 views

Equivalent of pmset noidle -u on Windows

On OS X one can easily temporarily prevent the Mac from sleeping using the command: pmset noidle -u pmset - manipulates power managment settings noidle - flag stands for sleep prevention method u -...
0
votes
0answers
12 views

How to view actions by Windows Shell

I am trying to automate the installation of an number of packages using PowerShell 2.0 in Windows 7. Each set corresponds to a product build (which may be an upgrade or downgrade depending on the ...
0
votes
1answer
20 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 ...
-1
votes
2answers
52 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 ...
-1
votes
1answer
19 views

Do startup scripts in Windows Server run asynchronously?

As I'm debugging a startup script for a remote VM, I'm trying to run some commands that rely on the ones before. The errors I'm getting are inconsistent; sometimes, 2 out of 3 steps will run, ...
2
votes
1answer
36 views

Powershell Script to find log files more then 10 MB and send mail whenever a new file generated in that folder

I need to find new files in a folder which are over 10MB in size, and then send a mail with the name of the files. Tricky part: Mail should be send when there is a new file arrives in the folder, So ...
0
votes
1answer
36 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 ...
0
votes
1answer
5k views

Powershell File Rename Date/Time

I have used a script from a previous post and modified it slightly: Get-ChildItem "c:\test\*.txt" | ForEach-Object { Rename-Item $_.FullName "$BackupFolder$($_.BaseName -replace " ", "_" -...
1
vote
1answer
211 views

Enumerate remote SMB shares with PowerShell on non-Windows system using WIndows 7

I need a way to enumerate the SMB shares of a remote, non-Windows system while using PowerShell on my Windows 7 system. The file server I'm checking is not running a Windows OS. However, I need to ...
1
vote
2answers
159 views

Windows 10 - virtual desktop startup automation

I've not been able to find much on this so I thought I'd ask here: I am looking for a way to have multiple virtual desktops created on logon and a few applications automatically started in each. For ...
35
votes
9answers
16k views

Cannot change powershell default font to Lucida Console

This is a trivial problem, but it annoys me that I can't get to the bottom of it: I'm running Windows 8, Powershell version 3.0. By right-clicking on the title bar I can go into the Properties and ...
0
votes
0answers
27 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 ...
2
votes
1answer
3k views

How do I leverage Bitlocker cmdlets?

This article hints at being able to unlock a bitlocked drive using: Unlock-BitLocker -MountPoint -Password However, I know diddly squat about Powershell and how to use the Powershell cmdlets to do ...
-1
votes
0answers
24 views

Windows Shell Functions [migrated]

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
1answer
61 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
26 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
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
34 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
55 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'...
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" ...
0
votes
3answers
5k views

FTP: Cannot connect using FileZilla on Windows - 503 Failure of data connection

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
0answers
36 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. ...
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 http://social.technet.microsoft.com/Forums/en-US/...
0
votes
0answers
39 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
75 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 ...
1
vote
2answers
42 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-...
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 ...
0
votes
1answer
42 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
1answer
3k views

Setting registry permissions with Powershell

I have a registry key that I need to take ownership of and then set a permission set on. I'm able to take ownership, but when setting the permission, it only applies to the very top level of the ...
2
votes
2answers
4k 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 system.net....
0
votes
1answer
40 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 ...
24
votes
7answers
33k views

Linux “Top” command for Windows Powershell?

I am looking for a PowerShell cmdlet that can provide similar functionality to the Linux Top app. Something that refreshes at some given interval and displays the process list with CPU % util. I have ...
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 ...
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. ...
1
vote
3answers
2k 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
48 views

Detect application crash based on app user's name

been trying to create script to detect user's application crash. (Assume the computer is used by multiple users) so far only managed to come out below code to query the application (based on user ...
0
votes
1answer
51 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
52 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 ...
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 &...
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 ...