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

1
vote
0answers
43 views

Storage Spaces unusable read speed

I've created a Storage Space with parity using 10 2TB disks and transferred 10TB onto it. However I am getting appalling read speeds. When I try and copy data off it, it takes ages to get going ...
2
votes
1answer
24 views

Auto Wi-Fi connection on Windows

I am looking on how to connect to a WiFi SSID on Windows OS, but I have not been successful. First of all I tried using windows commands like: netsh connect ssid=SSIDNAME name=PROFILENAME This ...
0
votes
1answer
45 views

PowerShell WMI function call with multiple variable [closed]

I want to call a WMI method which is taking one string as input , one integer as input and one integer as output. Here is the Current Example: $obj=Get-WmiObject -class "class1" -namespace "space1" ...
1
vote
0answers
164 views

Configuring Windows 8/8.1/10 File History via command line

tl;dr: Is there a way to configure windows 8 file history via unattended command-line/some script? long story: I'm configuring a lot of stand-alone (non-domain) PCs and I think some backup is better ...
0
votes
0answers
34 views

Need python or power shell code that configure the network of a Windows VM without accessing the VM inside

I want to configure the network of a Windows VM, and I want to run script from jump station. Since we have to configured network, initially we don't have IP, so I only configure the network via v ...
0
votes
1answer
30 views

Windows 7: Redirect folder from PowerShell?

Is there a way to redirect a folder using PowerShell on Windows 7? Bonus points for being able to do so as an admin to another account. To be very clear, what I want to do is this. I do NOT want to ...
0
votes
0answers
38 views

How to use powershell script to gather lastbootup time from a list of computers and write results into csv file

I am new to powershell. I need to gather lastbootup time of a list of computers and then write the output into a csv file. pclist.txt contains below contents computer1 computer2 output.txt with ...
3
votes
2answers
280 views

Managing LetsEncrypt Certificate expiration and auto-renewals

I've been experimenting with LetsEncrypt SSL certificates and managed to get certificates set up and installed on Windows for use with IIS using the ACMESharp Powershell library. The process to do ...
0
votes
1answer
52 views

Is there any way to add an HTTP Header to every IE request on a computer?

I would like to add a custom HTTP Header to every Internet Explorer request on a computer (or every browser request). I don't know if this is possible whatsoever, if you have heard of anyway to ...
0
votes
0answers
31 views

Changine Region Formats with powershell

When running get-culture on a remote machine the commandlet does it's job just fine however when I tried "set-culture en-US" it doesn't seem to do anything even when run locally. That's on Windows ...
1
vote
2answers
66 views

How do you add a reference to a program in the Windows command prompt?

When I'm in Visual Studio's command prompt, I can for example use nuget.exe by simply calling: nuget -SomeParameter blabla However, when I call this code in the Windows Powershell or command prompt ...
-1
votes
1answer
31 views

how to run my network configuration script on one VM without having IP

but question is how can we put our script on that VM. or how to copy our script to that VM. because we gonna configure network via script. so is there any way to access the VM without having IP or any ...
1
vote
1answer
41 views

How do I enable both PowerShell Remoting and SPN for SQL Server Reporting?

I have tried this question on Stack Exchange - Database Administrators (http://dba.stackexchange.com/q/129286/51925), but I don't get any responses, so I'll try here. I'm struggling with remoting ...
0
votes
1answer
88 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
47 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 ...
4
votes
1answer
498 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 ...
1
vote
0answers
33 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
85 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 = ...
1
vote
1answer
38 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
92 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
51 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 ...
3
votes
2answers
120 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
41 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
146 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
102 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
79 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
67 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
40 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
32 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
29 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
52 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
66 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
91 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
45 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
37 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
71 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
483 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
106 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
26 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
67 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
35 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
54 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
18 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
38 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
77 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
41 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
30 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
104 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
48 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
45 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, ...