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
48 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
101 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 Files\...
3
votes
1answer
63 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 {...
0
votes
0answers
52 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
0answers
34 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
48 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
197 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
52 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 ...
0
votes
1answer
75 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
0answers
44 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
77 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 (=NB.SI(range,"...
0
votes
1answer
63 views

Manage Azure Active Directory application manifest through PowerShell

I have a large number of applications running in Azure that need to have some very specific values set in their Manifests in the Active Directory section of the old Azure Management portal. Is there a ...
0
votes
1answer
57 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
0answers
40 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. ...
0
votes
1answer
102 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 ...
-1
votes
1answer
543 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 re-...
0
votes
1answer
48 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
30 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: https://technet.microsoft.com/en-us/library/...
2
votes
1answer
51 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
68 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 Get-...
0
votes
1answer
28 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 ...
1
vote
1answer
27 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
39 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 ...
0
votes
1answer
109 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 ...
1
vote
0answers
69 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
0answers
43 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
49 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 ...
4
votes
2answers
809 views

Switching default audio device with a batch file

I'm trying to write a batch file on Windows 10 that allows me to switch between my headset and my speakers as default audio device when I run it. I don't want to use any third-party software. I tried ...
1
vote
2answers
395 views

Why does Set-Location say “A positional parameter cannot be found that accepts argument '…'”

I'm tryin to change my working directory using set-location. This is what I've done so far: Set-Location H:\09- DISTRIBUTION\engineer\drft-tmp\310-DOUGLAS\60kV BLDG Design DWGs Here is the error: ...
0
votes
1answer
25 views

Text moves more to the right when looping

This is my output below when creating a function with a for loop inside it: NO Type -- ---- 1 System.Int32 2 System.Int32 3 System.Int32 4 System.Int32 5 ...
2
votes
1answer
161 views

How to delete all files that don't have a certain string in their name

I have seen Deleting all files that do not match a certain pattern - Windows command line However, I have not seen anything regarding how to delete everything that does not contain a certain string ...
0
votes
1answer
152 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
136 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
1answer
121 views

Sending e-mail via powershell (Net.Mail.SmtpClient or Send-Mailmessage) works, but not when invoked by Task Scheduler

I have done a script to check UPS status, log it and send notification e-mail. Script works fine if run manually, but when executed via Task Scheduler, it does not send the e-mail. It does everything ...
1
vote
4answers
50 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 ...
1
vote
1answer
112 views

PowerShell & Batch files

I have written a PowerShell line directly in PowerShell and it works perfectly but I can't get the .bat to run it. I think my PowerShell script running is blocked by corporate. If I can get the ...
0
votes
1answer
48 views

Powershell - Display matching custom object properties in single table

I am having trouble with the output of my script displaying information in the way that I would like it to. I would like to view the matching properties (objects are generated in a foreach loop, so ...
0
votes
2answers
192 views

Powershell : Get variables from remote machine and store them in an excel file in local machine

I asked this question before, but I think I didn’t explain it well: I'm working on a project that use powershell scripts: I would like to execute in a remote machine, a file named “Remote” (existed in ...
0
votes
0answers
48 views

Remove site from trusted site

I have a powershell script in place for adding a URL/Site to trusted site as below: Param ( [Parameter(Mandatory=$true,ValueFromPipeline=$true,ParameterSetName="SingleDomain")] [Alias('Sites')...
0
votes
1answer
96 views

Copy multiple files using Powershell

How can I copy all files of kind:docx from all directories under and including e.g. D:\Doc_Source, to destination E:\Doc_Destination, in batches of e.g. 500, and only when there are none left in E:\...
1
vote
0answers
175 views

“git mv *” returns “bad source” in Powershell

When inside a git repository in Powershell or CMD, issuing git mv * whatever will return fatal: bad source, source=*, destination=whatever This works fine when using MSYS (Git Bash).
0
votes
3answers
131 views

How to Delete Folders with Powershell using Remove-Item

I am trying to use powershell to delete a lot of folders. When I try running the command: Remove-Item -Filter Angle -WhatIf I get the error: Supply values for the following parameters Does anyone ...
0
votes
4answers
194 views

Executing a powershell script through batch file

I am trying to execute a powershell script through a batch file, at the moment I am only testing this to get it running so the .ps1 file is simply a hello world script. This ALMOST works fine except ...
-1
votes
1answer
40 views

Converting powershell array into table

I have an array of comma separated data that I need to do operations on. In the past I would write to a file then Import-Csv that file back to a variable. Is there anyway to split the data into ...
1
vote
1answer
46 views

How to use Powershell code to loop through subdirectories and delete specific folders?

If I am in my current working directory, is there a powershell code that I can run which will loop through the subdirectories and delete all folders that are named 400eV, 410eV, 420eV... up to 500eV? ...
1
vote
1answer
73 views

Adding date to the name of multiple files in multiple folders

I have a directory which contains 400+ subfolders. In each of this subfolders a new file appears every day. Each new file has the same name as the file that appeared in the same folder yesterday. Each ...
0
votes
0answers
42 views

Unable to kill a process

With admin rights and Powershell, I want to kill a nasty process. PS D:\_prj> Get-Process someapp* | Stop-Process -Force (or without -Force). That works in 99% of cases. Unfortunately, sometimes ...
0
votes
1answer
203 views

How to fix truncated PowerShell output, even when I've specified -width 300

I'm trying to get a list of all the directories and files on an external hard drive, with one fully-qualified directory/file path per line. I'm using PowerShell on Windows 10 to achieve this. This is ...
0
votes
0answers
65 views

Powershell Start-Process command parameter escaping

I try to open an elevated powershell from within a powershell session. This works: powershell -NoExit -Command "Start-Process PowerShell -ArgumentList @('-NoExit','-NoProfile') -Verb RunAs" This ...
1
vote
0answers
17 views

Suffix Aliases feature in powershell

I'm looking for ability to run certain cmdlets when calling files with some extensions. For example, when calling PS> .\test.php I want to call Invoke-Php .\test.php. Something like suffix aliases ...