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

How do I tail Windows 10 Update Log

I have a following batch file that runs on startup wuauclt.exe /detectnow /updatenow start /min C:\Windows\WindowsUpdate.log But now in Windows 10 log file simply has the following Windows ...
35
votes
5answers
34k views

How to copy text from PowerShell

Sometimes I want to copy a command from Powershell to paste in a document, or I want to copy the output? How can I select and copy text in Powershell? At least I know a way how to paste a text (or a ...
1
vote
1answer
25 views

How to recursively delete directories skipping some directories/files from command line in windows?

Suppose I have a complex path of directories: <ROOT> folder1 folder2 sub1 sub2 folder3 sub1 sub2 ... and suppose in some folders there are files named "skip.me" How ...
0
votes
1answer
56 views

HTTP request from PowerShell has wrong remote IP

I am trying to write a PowerShell script that performs an HTTP request. The request is handled by a PHP script which needs to know the IP address of the client. To this end, it reads ...
0
votes
0answers
23 views

Monitoring file activity - bulk renaming, creating - Ransomware activity

Masters, I need some suggestion how to monitor the disks for bulk file activity like bulk renaming, bulk creating..etc.. Is it possible with performance monitor or should i use powershell? I would ...
0
votes
0answers
54 views

Transfer file to Windows Server 2008 R2

In a LAN, I have a Windows Server 2008 R2 machine; access to server through Remote Desktop is granted both 1) from a LAN host 2) from the internet, thanks to a virtual server configured in the ...
13
votes
2answers
23k views

How do I set an executable's working directory via the command line, prior to executing it?

If I run a program on the command line whose location is resolved through the Path environment variable, the program's working directory is generally set to its installation directory. I would like ...
1
vote
1answer
39 views

wmic command returns no instance when accessing Win32_BaseBoard class

Why does Win32_BaseBoard return no instances in PowerShell? wmic path "Win32_BaseBoard" get "Model"
0
votes
0answers
18 views

Passing parameters to powershell script

I've been trying to create a small powershell script that upgrades all my packages using Chocolatey on Windows. Here's what I've already got: param( [string]$mode = "upgrade" ) //This I use to ...
3
votes
1answer
50 views

Get-Hotfix showing updates are installed at 12.00 am but actually it is not

I ran the below command in powershell. it is showing 12:00:00 AM as Installed time. but actually I pushed it at 3:00 AM. So how to get the actual time? Get-Hotfix -ComputerName XXXX | Where-Object ...
1
vote
1answer
34 views

Powershell console not updating with latest Windows Management Framework installs

I am using Windows 7 SP 1 64 bit. When I installed Windows Management Framework 4, the nice new blue consoles have not been installed. I even further upgraded to Windows Management Framework 5 and ...
0
votes
0answers
58 views

Local ovf to Hyper V using Virtual Machine Converter with Powershell

Now that I want convert and import a vmware VM to Hyper V. My ovf file with vmdk amd mf files are located in C:\OvfHVTest2. I used the command in powershell: Import-Module "C:\Program ...
0
votes
0answers
36 views

How to connect to a wireless Display adapter automatically through scripts or Task Scheduler?

I am trying to project files to a Samsung TV which has a windows display adapter. I want to automate the entire process. So when the TV is switched on, I want the computer to continuously check for ...
2
votes
3answers
3k views

Windows 10 Update 1511 Breaks Hyper-V Switches

After upgrading to windows 10 v1511, the Hyper-V switch I had has gone all over the place. Aside from being disabled, and not being able to start, the network connections manager shows the switch ...
3
votes
3answers
2k views

How can I start/stop a Windows Service through a Linux bash script?

I want to create a script that will be kicked off through an SSH server to start/stop a Windows service. The SSH user is part of the Administrator group. However, when I execute the script, I get an ...
2
votes
0answers
31 views

Powershell hangs on error

I just upgraded from Powershell 3.0 to 4.0 (http://www.microsoft.com/en-nz/download/details.aspx?id=40855) If I now run Powershell and enter a garbage command (e.g. Blah), Powershell will display an ...
0
votes
0answers
33 views

I need a simple powershell script to send server usage,memory,disk space, I/o metric to graphite from a local machine through http protocol

I',m a beginner. I need a powershell script to send the metric such as cpu usage,disk space, server speed etc to graphite through TCP http
2
votes
2answers
104 views

Need a progress bar when doing a silent install in PowerShell

At my job, I do a lot of installing and reinstalling of the same software. I wrote a script in Powershell to silently install everything for me, which works great. However, because it's silent there ...
0
votes
1answer
36 views

ConEmu: how to redirect output of spawned application

I successfully use ConEmu to start different instances of a command line application MYAPP in different tabs. E.g. by predefined task cmd /k MYAPP Tab1 -new_console:t:MyAppTitle ... To monitor ...
10
votes
2answers
4k views

Delete multiple files on PowerShell command line

With PowerShell, what is the most concise way to delete multiple explicitly named files? E.g. on *ix it would be: rm subDir/a.png anotherDir/b.jpg thirdDir/c.gif I'm currently using: echo ...
42
votes
6answers
82k views

Copy and paste in Windows PowerShell

How do I effectively copy and paste input and output in the Windows PowerShell?
6
votes
3answers
19k views

Why can't Excel open a file when run from task scheduler?

I wrote a powershell script that opens an excel workbook and runs a macro. When I run that script from PS console, or even from command line using powershell.exe script.ps1, it jus works. When I set ...
0
votes
1answer
65 views

Parsing a string variable in a batch file for LAPS / ADU&C

I am trying to implement LAPS (Local Admin Password Solution) on our network and I am having issues integrating LAPS with the ADU&C right-click context menu. My goal is for our Helpdesk staff to ...
0
votes
1answer
56 views

Powershell Get Computer Names who are connected to the Home Directory

In AD we have Home Directory setup, and it points to a File Server which the folder it their [username]. I would like to know who is connect to those Home Directories by Computer Name by using ...
0
votes
0answers
34 views

PowerShell Script is not digitally signed

I am trying to call a Powershell script from another Powershell script. When I try to execute the script, I receive to following error message: After researching the error on Google, I entered the ...
0
votes
1answer
52 views

How to call an excel function with powershell

I wonder how can I call a fucntion using powershell? Normally in excel to find how many "string" is used in a row we use =NB.SI(range,"string"). I would like to call this function ...
3
votes
1answer
3k views

Why are “get-hotfix” and “wmic qfe list” in Powershell missing installed updates?

I'm trying to write a script to make sure a certain hotfix is installed. On one of our test computers running Windows 8.1, get-hotfix returns an incomplete list of hotfixes: Yet there are tons of ...
0
votes
1answer
32 views

Powershell redirect to variable value containing colon

Is there a way to use a variable whose value contains the colon character as a filename string in a command-line redirect? Powershell always treats the colon as a drive separator, regardless of escape ...
0
votes
1answer
86 views

PowerShell & Batch Files With User Input

OK first a thanks to nex84 for answering my last question and all those that gave input as well at this link http://superuser.com/a/1051727/569550... I now have a new question but it ties with the ...
0
votes
1answer
44 views

Change CreationTime using the file name

I name all of my home video files according to an exact protocol. An example is: Aug 09,2005@13.21.12.mp4 Typically, the original file is not an mp4 so I go through the process of converting, ...
0
votes
0answers
29 views

Easiest way to run automate Azure VM from powershell

I have an Azure VM that I use as a backup server. Most of the time it's stopped, and I intend to just start it if our primary server goes offline. Note, this doesn't need to be automatic. ...
1
vote
1answer
37 views

PowerShell v5: Suppress Out-Default output in nested functions

I'd like to suppress any output then function_b is invoked: Function function_a { "test" | Out-Default } function function_b { [CmdletBInding()] param() function_a } # These are ...
-1
votes
1answer
245 views

Windows 10 Calculator is gone [duplicate]

I'm trying to open the calculator app on my Windows 10 64 bit machine. When I search for calc in the start menu and click it, I get an error you'll need a new app to open this I tried ...
17
votes
2answers
11k views

How do I get get-childitem to filter on multiple file types?

I'm trying to get a list of all the XSL and XSLT files in a directory. dir -recurse -filter *.xsl,*.xslt -name But the following error: Get-ChildItem : Cannot convert 'System.Object[]' to the ...
0
votes
0answers
27 views

How to get about_ help files in PowerShell

I somewhat brand new to PowerShell and I was trying to figure out how to get the about_function help files or any of the information (as seen here: ...
-1
votes
1answer
55 views

Open files or folders containing a space from Powershell

When I try to open a folder or file that has a space in its name, it returns an error. For example, when trying to open Java Scripts.txt: PS C:\Users\Sergio\Desktop> cat Java Scripts.txt ...
0
votes
1answer
117 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
26 views

Start multiple PowerShells with same keyboard shortcut

Its really annoying i can only start first PoweShell with custom keyboard shortcut i assigned for it. And i usually need more then one PowerShell. Also my PowerShell icon is default blank paper, seems ...
0
votes
2answers
3k views

Set Physical Path Credentials in IIS7 Using Powershell

I have a number of applications under a Default Web Site in IIS7. A number of the applications have to have their Physical Path Credentials set to a specific user rather than using application user. ...
1
vote
1answer
21 views

Trouble outputting file size in a text file using powershell command

This is what I am trying to do: createfile until EOF $drives = Get-WmiObject win32_volume | ? {{$_.DriveType -eq 3} | % {{Get-PSDrive $_.DriveLetter[0]} foreach ($drive in $drives){{ ...
1
vote
1answer
37 views

Do Until in Powershell

I'm connecting via serial port with powershell to a device and I'm trying to change one value until another value gets to 0. I'm using Do-Until but it just runs endlessly with the first value being ...
1
vote
4answers
42 views

Batch Renaming on a file share

We currently have a CIFS share hosted from a SAN device and are planning to move toward a case management system. The issue I'm having is a lot of the various files in our file share end with a ...
0
votes
1answer
52 views

restoring a mysql db via powershell

Say I have the following command: "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u user --password=pass dbname < backup.sql It works fine in cmd but in PowerShell I get the following: At ...
0
votes
1answer
76 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:\> ...
1
vote
0answers
46 views

PowerShell suddenly hangs on executing any command

I'm on Windows 8.1 and have been using this particular Windows installation for about 3 years. I am not a heavy Powershell user per se, but I do some programming and any command line work (git, node) ...
0
votes
1answer
75 views

Kill process based upon path to image

I've inherited an environment in which two different processes use identical names but their executable files are stored in different file paths. None, one, the other, or both may be running at any ...
0
votes
0answers
31 views

SSH client freezes on Windows Powershell when Console Output is UTF-8

I'm using the OpenSSH client provided with msysgit on a Windows 10 machine. I prefer using it because it is configured the same way as non-Windows machines (unlike Putty, for example). Unfortunately ...
0
votes
0answers
41 views

Windows 10 sync between devices, settings and apps loss

I have PC and laptop with win 10 pro both. Recently I had to reset laptop and start from scratch. With win10 reset feature it went smoothly. However... after reset and connecting to my MS account, on ...
2
votes
1answer
420 views

Powershell for Creating a scheduled task in which runs monthly

I'm trying to create a scheduled task with powershell, the task is supposed to run the 1st of every month, but I can't figure out how to use New-ScheduledTaskTrigger with a monthly interval. EG: ...
1
vote
3answers
1k views

Schedule a Powershell script in Windows 8?

How can I schedule a Powershell script to run every day at 3am in Windows 8?