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
1answer
112 views

How to Concatenate user name and surname while adding users from csv?

I want to add users to AD using the following command in Powershell: (This is a single line command but I am breaking apart it to be more readable) import-csv C:\list.csv | Foreach-Object { ...
2
votes
1answer
121 views

How to install a Windows Feature on Docker container (Windows 2016 Server) that requires a “server restart”?

I try to install the Windows feature "NetworkController" on a docker container on Windows 2016 Server TP4, using Powershell. After I run "Add-WindowsFeature NetworkController", I get the message: "...
0
votes
1answer
170 views

A script keeps popping up on startup?

So, I restarted my entire system two days ago and after installing all the software I need I realized that whenever I turn my PC on there's something running on the start bar. I quickly checked what ...
0
votes
1answer
108 views

Powershell ISE cannot attach to Docker container / Windows Container

I can connect and attach to a docker container / windows container on Windows 2016 Server just fine with Powershell. But when I try the same with Powershell ISE, I get the error below. PS C:\> ...
0
votes
0answers
63 views

What are the reasons of slow (scrolling) behavior of PowerShell?

I came up with this topic at this question: http://stackoverflow.com/questions/35652644/access-windows-2016-server-container-docker-container-via-gui (see comments). It is true that on some computers ...
0
votes
1answer
105 views

How to run determine current directory as parameter and pass to script activated from context menu

not sure the title is entirely adequate so let me explain a little clearer. I have an existing powershell script which deletes backups of specific file types. What I want to be able to do is right ...
0
votes
2answers
58 views

How to download a file from command line?

I tried wget, powershell and betsadmin, but I can't do it. Can someone help me ? The url (which is a live download link if you click on it in a browser) is: http://ww5.365planetwinall.net/Sport/...
3
votes
1answer
30 views

Merging Scripts…Wrong Type of File-Object (Maybe)?

I have a script that I used very frequently to get a list of files and then process them with ffmpeg, the beginning of which read: $files = Get-ChildItem -Path "Season *\*" -Include *.mp4, *.mkv, *....
0
votes
0answers
66 views

How to close a file opened on some network computer, from another computer on the same network?

In my university, we have a domain network, and all the students have their accounts, and some MBs of network storage, which they can login from any computer on the network. So I work on many ...
1
vote
1answer
108 views

Add-WindowsFeature FS-NFS-Services “the name was not found”

I have a fresh installation of Windows Server 2012 and need to create a NFS share. Using these instructions: PS C:\> Import-Module ServerManager this works ok - I'm returned to the prompt. ...
2
votes
2answers
289 views

Powershell - How to use “remove-item” with multiple wildcard selectors?

I have a folder called "test-folder" which contains alot of files with different types. I want to delete all music files. (mp3, mp4, mpeg ...) I know i can delete all mp3 files like this: remove-...
1
vote
1answer
120 views

Batch file/alias/powershell to activate/deactivate IE 11 proxy server

I would like to have a batchfile/cmd alias/powershell command to switch the useage of a proxy server in IE11 on and off, so basically to check/uncheck the following settings: IE->Options->Connections->...
1
vote
0answers
52 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
26 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
65 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
410 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
35 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
64 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
44 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
662 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
149 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
66 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
83 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
32 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
78 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
150 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 = [System.Net.WebRequest]::Create("https://...
0
votes
1answer
80 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
2k 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
75 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. Set-...
1
vote
1answer
274 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
53 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
180 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
126 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
211 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
100 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 : https://community....
0
votes
1answer
259 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 ...
1
vote
2answers
177 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
339 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
83 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
47 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
70 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
44 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
70 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
112 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
242 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
67 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
55 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
108 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
611 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
206 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 ...