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

A task inside my windows task scheduler will cause my server to stop responding

I have the following AppPoolActivation.ps1 file, to call a URL :- [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $request = ...
0
votes
1answer
13 views

Will BoxStarter's Install-WindowsUpdate reboot the machine?

I use BoxStarter Install-WindowsUpdate to keep my development machines up to date. I run it from the PowerShell commandline. PS C:\Users\Administrator> Install-WindowsUpdate I think I one time ...
3
votes
0answers
29 views

Convert XML to CSV automatically in Powershell

I've got a few thousand xml files with different formats I'm trying to convert to CSV. I've noticed that in Excel you can open an XML file 'as an XML table', and it will create a schema based on the ...
0
votes
0answers
35 views

Copy Files based on different file name [on hold]

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
19 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 ...
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
27 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 = ...
-5
votes
0answers
33 views

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

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 ...
1
vote
1answer
21 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 ...
0
votes
0answers
32 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: ...
1
vote
1answer
23 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 ...
2
votes
2answers
68 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 ...
0
votes
1answer
25 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
49 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
40 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 ...
1
vote
1answer
23 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
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 ...
1
vote
0answers
18 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 ...
0
votes
2answers
16 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
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 ...
3
votes
1answer
40 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

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: ...
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
28 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
36 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. ...
0
votes
0answers
203 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 ...
1
vote
1answer
34 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
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
1answer
32 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 ...
3
votes
1answer
32 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
25 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
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 ...
0
votes
0answers
11 views

How to autostart a node.js instance on Windows 2008 R2 as Administrator on boot?

I've created a batch file and placed it in autostart folder on Win 2008 R2 (AWS) This node.js script simply waits for a request from another AWS instance and launches a Watir-Webdriver session with ...
1
vote
1answer
43 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 ...
0
votes
2answers
38 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 ...
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
2answers
74 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
1answer
30 views

run powershell script as local admin

i am creating a PS script that need to be run on more than 500 machine. Script will execute via task scheduler at specific interval. I am not sure what is the best way to execute this script with ...
-1
votes
1answer
33 views

Can't create windows 10 powershell shortcut with admin privilege

I want to create shortcut to powershell with admin privileges, but start as administrator option is disabled and i am using admin account on Windows 10. I can start admin powershell via context menu, ...
3
votes
1answer
22 views

How to remove command duplicates?

The new PowerShell has a default irritating feature of keeping duplicate commands in the keyboard buffer. For example, if I had executed the command DIR ten times, pushing the Up Arrow will show ten ...
1
vote
0answers
11 views

Windows 10: iTerm-like system-wide hotkey for showing PowerShell on any virtual desktop

This is my iterm preferences window. Here I set a system-wide hotkey where if I press that hotkey, no matter what virtual desktop (or rather the OS X equivalent of virtual desktop) I'm on, my current ...
0
votes
0answers
31 views

Can't Remove Folder with Powershell But Can with Command Prompt

I'm trying to delete a folder in an install script using PowerShell. The script copies a bunch of files to a distribution folder (using RoboCopy) and then cleans up superfluous files and folders. I ...
1
vote
1answer
16 views

How do I install Azure Powershell *on* an Azure Cloud Service?

I have need for a cloud based intranet application to run Azure Powershell. I've done a bunch of digging and I cannot find anywhere that gives me an understanding of the process I need to follow to ...
1
vote
0answers
13 views

Can I load Powershell AD Module as another user?

I have a script that I use to automate AD and Office 365 account provisioning. Everything is working just fine. The only "problem" is that I have a regular domain account and another account which is ...
0
votes
1answer
17 views

Powershell Has Stopped Working

When I run powershell I get the error: powershell has stopped working There doesn't seem to be any relevant errors in the EventLog. I get this when I run powershell as an admin or a normal user. ...
1
vote
1answer
48 views

How to use Powershell to filter out multi-lines group of text from a file?

I have an error log that I would like to filter out all the known errors using Powershell. I know how to filter by line in powershell, but my problem is that the errors in the error log span multiple ...
-1
votes
1answer
71 views

Add Powershell as Administrator to Explorer Context [duplicate]

Presently I have run Command Prompt as Admin in my context menu. I would like to have similar functionality for Powershell as Admin. Can any one guide me, how do I achieve that? Simply I tried to ...
1
vote
1answer
40 views

Have output of 'sudo' script printed to same Powershell window?

I found this 'sudo' script online: function Elevate-Process { $file, [string]$arguments = $args; if([System.IO.File]::Exists("$(get-location)\$file")) { $file = ...