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

4
votes
1answer
5k views

How to re-install Windows 10 calculator app

I uninstalled the calculator like this in PowerShell: Get-AppxPackage *windowscalculator* | Remove-AppxPackage. How do I reinstall it? Many thanks in advance.
1
vote
1answer
21 views

How can I automatically import a certificate to a Windows GPO?

I'm looking for a way to import a root certificate into a specific active directory group policy object. I've tried certutil -dspublish but that would only publish it to a global AD store. How can I ...
0
votes
0answers
29 views

Copy Files based on different file name

I would like to keep two different folders in sync. I was thinking of going with Robocopy with the /XO flag, however, the files are renamed when moved to the second folder and cannot be compared. I ...
-1
votes
0answers
17 views

using powershell, is it possible to convert an XLS file to XLSx?

I am trying convert and Xls file to XLSX format using powershell but I cant seem to get this to work $xlExcel8 = 56 This command does not seem to want to convert to XLSX, not even sure what that ...
1
vote
1answer
20 views

Windows task schduler keep showing 0x41301

I have wrote the following .ps1 file:- [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $request = [System.Net.WebRequest]::Create("https://localhost/") $response = ...
0
votes
0answers
14 views

Building a program/script for generating e-mails: suggested approach? [on hold]

Background I've been thinking about this for a long time but haven't gotten around to it until now. If this is the wrong forum, let me know and I can post it in a more appropriate place. As I work in ...
1
vote
0answers
16 views

How to set Powershell Color scheme permanently

With PowerShell 5.0, there are lot of customization options. Presently I have created my own color scheme. But I couldn't figure it out how to set these color options permanently. ...
1
vote
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" ...
-5
votes
0answers
31 views

In german we call “Mädchen für Alles” a person who mades all tasks which others friendly refuse ;-) [on hold]

Sry iam little bit ironic but i would get more real world feedback or a new view why is Powershell so pushed but still even in only W2012 W8 enviroments just a pressure to Admins or just interesting ...
2
votes
1answer
4k 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 ...
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. ...
3
votes
4answers
10k views

How can I copy a directory, overwriting its contents if it exists using Powershell?

I have a directory Source with some files in it, which I would like to copy to a folder Destination. Destination may exist, and it may have files in it already. Any files with the same name as those ...
1
vote
1answer
20 views

Powershell window drops off the bottom of the screen

I believe this is due to windows scaling, as I have it on 200% (I have a 4k 13" laptop screen). Are there any settings anywhere I can fiddle with so that it doesn't open with half of it off the ...
1
vote
1answer
41 views

Move Files to an Alphabetically Cataloged Sub-Directory

I have a variety of "files" (not folders) of the same type (e.g. ".docx"), in the same directory. Also, in that SAME directory, I have a sub-directory named "catalog", and within it, alphabetical ...
2
votes
2answers
65 views

How can I tell if my batch file is running?

I have a batch script which is run from an AT command, and may get run more than once. When it starts, I need it to detect if it already running, and if so, exit (the second one) immediately. It ...
1
vote
3answers
3k views

How do I install the PowerShell Community Extensions (PSCX)

I'm on Windows 8.1, and fairly new to Windows-side development. I've had PSCX suggested to me, but for the life of me, I can't figure out how to install PSCX 3.1 on Windows 8.1 and make the cmdlets ...
1
vote
2answers
8k 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, ...
0
votes
1answer
19 views

Filter running processes by digital signature authority

I want to write a script that will kill all processes whose executables are signed by a certain authority. I know how to get the list of running processes, and how to send a filtered list off to be ...
0
votes
0answers
30 views

How to Create Local Windows Desktop Service Accounts?

Question: In Windows Home / Professional, (Windows 10), what is the recommended way to create a Local Service Account? Is there any documentation for this? (Powershell, GUI, etc). Clarification: ...
0
votes
1answer
31 views

Powershell is slow to start and will not show the working path

When I fired up powershell it used to look something like this I recently reinstalled Windows 10 on my machine, and now I have two issues with Powershell. Firstly, it takes a little over 10 seconds ...
0
votes
1answer
24 views

Use winexe and powershell to configure some service on a Windows

I'm making a script to configure SNMP on a Windows. This script had to be launched from a Centos OS. I'm quite a zero in Windows scripting so i found a PSscript on the Internet : ...
0
votes
1answer
47 views

Windows 10 Powershell - get-smbserverconfiguration - returns this even though I'm not connected to any servers

I am running a new (not upgrade) installation of Windows 10 Home on a desktop at home. This is my personal computer on an AT&T U-Verse connection that I pay for. When I execute the Powershell ...
0
votes
1answer
38 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 ...
0
votes
1answer
30 views

How do I find keyloggers and other hidden biles/processes from the command line in windows 8.1? [closed]

I have noticed a great number of system "Glitches" as of late. Recently while poking around explorer, i believe in my system32 dir, i noticed that every time I entered a subdirectory and existing to ...
0
votes
1answer
34 views

Is there a way to get rid of window frames?

I don't need a general solution, I just want to get rid of the window frame for PowerShell. For example, this is how my desktop looks now: And here is what I ideally want: But under the case ...
8
votes
5answers
23k views

How to rename multiple files in multiple folders with one command

We want to rename our *.html files to *.php but (sadly enough) have not enough knowledge to do it with a cmd prompt command and/or batch file. The problem is that each file is in separate folder – ...
5
votes
2answers
585 views

Why does running PowerShell change my console font?

I have a strange problem on my laptop - when I run Powershell within an existing console window, the font choice for the window changes. For example, this is cmd.exe immediately after opening the ...
1
vote
1answer
6k views

How to fix this WinRM error? (Set-WSManQuickConfig error)

On Windows XP Pro SP3, when I run Set-WSManQuickConfig (after agreeing to the new settings), I get this error: Set-WSManQuickConfig : <f:WSManFault ...
1
vote
1answer
22 views

Powershell/WMI to map mounded drive device IDs to Volume Letter

Right now I am using these two WMI queries to get information about drives on a machine: get-wmiObject -Class Win32_LogicalDisk -Namespace root\CIMV2 -Computername $name get-wmiObject -Class ...
0
votes
0answers
15 views

How do I unprovision default apps in Windows 10?

I'm trying to set up computers for the school district I work for and I can't seem to uninstall the default apps for all users. If I use Powershell and run Remove-AppxPackage -Package [packagename] it ...
0
votes
0answers
17 views

How can I grant mailbox permissions with PowerShell so that each member in a group has Full Access to every other member of the group?

I'm faced with the task of granting Full Access and Send As permissions on a large group of customer service representatives. I want each member (of a distribution group) to have Full Access and Send ...
4
votes
2answers
220 views

Pipe file content into PowerShell command without loading the entire file to memory

I've recently started using PowerShell, hoping to never miss Bash again. I want to restore an instance of a PostgreSQL database. In Bash, or in the old command prompt, I would type: psql ...
0
votes
1answer
19 views

Copy source backup folder contents to a folder where the name is the local date

I'm needing to move only the contents (files and subfolders) of a folder located in: \\serverA\critical\ to a new folder where the name must be the local date in: \\serverB\dd-mm-yyyy and then ...
0
votes
2answers
15 views

Steps Needed to Install .Net and SQL Express on Windows Server 2012

Please forgive the simplicity of this question, but I work mostly with Linux servers and older versions of Windows Server. My exact question is how are packages installed on Windows Server 20212, ...
0
votes
1answer
28 views

Monitor and control a VPN connection

I have one VPN connection on my work PC I need constantly connected. However, it occasionally disconnects, and I discover this in a time consuming way, like thinking I have a bug in my work or ...
3
votes
1answer
39 views

Can't list SQL databases like directories with PowerShell

I'm trying to list databases with PowerShell. I'm able to use Inkoke-Sqcmd cmdlet, but I can't list databases with this command: dir SQLSERVER:\SQL\myserver\sqlinstance\Databases Get-ChildItem : No ...
0
votes
1answer
33 views

Spaces between parameters in a Powershell command

I want to know why when I let spaces between paramters in a powershell command I have errors : With space : (don't work) wmic desktopmonitor get screenwidth, screenheight Expression GET non valide. ...
2
votes
1answer
3k 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 ...
0
votes
0answers
28 views

win32_shadowcopy Unsupported shadow copy context

The result of entering (Get-WmiObject -list win32_shadowcopy).create("C:\","Backup") into powershell is ReturnValue : 5 ShadowID : {00000000-0000-0000-0000-000000000000} However the ...
1
vote
1answer
27 views

Enabling PowerShell ISE or OutGrid View, reboot required?

I would like to use an OutGrid View in one my powershell scripts. According to MSDN, in Windows Servers this feature is not enabled by default in PowerShell 2.0. Apparently, the only way to enable ...
0
votes
1answer
33 views

automatically add domain group to new windows installation

I ran across the following catch22 in my workstation installation script while trying to automatically add a domain group to the local administrators. The catch I’m experiencing is the following: ...
2
votes
1answer
32 views

Send E-Mail from Powershell Script to Multiple Recipients based on ActiveDirectory User

I have a script that I would like to dynamically send an email containing some info and go to certain people based on who in the company is running the script thanks to ActiveDirectory. I have ...
0
votes
0answers
182 views

How do I reinstall windows 10 apps and store, powershell commands not working

I have tried all powershell commands that I could find on the internet that say will reinstall my windows 10 default apps with no luck, some commands get the shell working but lead to nothing but ...
5
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 ...
3
votes
1answer
5k views

What is the Start Screen Control in Windows 8.1 Enterprise

I have read different things on the new Windows 8.1 Enterprise RTM. One of the feature is the Start Screen Control. Start Screen Control: This feature allows you to control the look of the Start ...
0
votes
2answers
36 views

Running a script when I exit a program

I want to identify when a specific program is being shut down, and run a script when it does. Is there a way to do that on Windows? The thing I had in mind is running automated git commit + push ...
3
votes
1answer
30 views

What is powershell2.exe?

I have a process running on a server named powershell2.exe. It is not under the path where I would expect PowerShell to be running; instead it is deep in my **C:\Program Files** tree, within a folder ...
0
votes
0answers
23 views

Turn on/off volume from batch file or command Windows 10

I had a piece of code for windows 8.1 that turned the volume off/on so could put it in a batch file for startup. Need something for windows 10 if it's available
3
votes
2answers
73 views

Why am I not getting my logon session from a WMI query?

I'm writing a program one of whose functions is to get the current logon sessions on a Windows computer. It queries WMI for the current sessions with logon type 2 (interactive), logon type 10 (remote ...
0
votes
0answers
17 views

How to change the mapping to BEL?

Powershell in Windows 10 comes default with BEL mapped to Critial Stop. (I think previous versions use [Console]::Beep().) How do I change it to Windows Default Beep instead? I have many applications ...