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

What causes ‘Has Stopped Working’ CLR20r3 errors for PowerShell?

My question is specific to the CLR20r3 error ONLY, for PowerShell instances ONLY. I can't seem to pin down which thread ended up causing this, but I'm going to open one of my applications that's ...
0
votes
1answer
12 views

Find out when is the last time a Google Chrome opened/used by the user?

I was wondering if there is a way to find out when is the last time user opened or used their Google Chrome browser remotely (i.e. via PowerShell or registry key.) I know that ...
0
votes
0answers
14 views

Edit existing content with powershell

I know it's a silly google question, but I didn't find something really simple for my need. I have a .txt file with the following content: hostname [ip] exec /bin/bash Now, every time when I ...
0
votes
0answers
12 views

Is it possible to initiate SCCM 2007 updates from the command line or powershell on client's computer?

Current Process: 1. RDP to client's machine 2. Install updates that are advertised in User Interface 3. Reboot Issues: 1. We have to remote into one machine at a time, which is a nightmare. 2. We ...
1
vote
1answer
21 views

How to get ESX host information using powershell

I am an asp.net/c# software developer and do not have a lot of knowledge in networking and server management. Now I want to build a simple asp.net web application which allow users to scan ESX hosts ...
-1
votes
0answers
7 views

Change the behaviour of the up and down arrows in PowerShell

I'm interested in porting zsh-history-substring-search to PowerShell. However, I'm unsure if it is possible to change the behaviour of the up and down arrows. Is it?
2
votes
0answers
15 views

Powershell: Dealing with multiple parameter sets

I have a function worked out that has 2 parameter sets, both of which contain mandatory parameters. I would like to design the function so that the sets can each be used alone, or together. This is ...
2
votes
0answers
29 views

Copy based on last modified date of files

I want to copy from below source dir to the desired destination as shown below. Source dir: --Dummy ----dirA (contain files last modified 2/7/2015) ----dirB (contain files last modified 3/7/2015) ...
0
votes
0answers
4 views

Powershell: Set-ItemProperty not working when script running from C# webapplication [migrated]

I have a C# web application which hosted on IIS 7.5, which runs powershell script for creating apppool and website. if I run the powershell script from command prompt it working but when i run it ...
2
votes
2answers
47 views

Replace Command Prompt with Powershell on Power User Menu

I would like to replace the Command Prompt option on the power user (Winx) menu with and option for Powershell. Like many Windows user I've slowly been transitioning from using the traditional windows ...
0
votes
0answers
6 views

Stop PowerShell from sharing command history between simultaneous instances

Let's say I have two PowerShell instances open simultaneously. If I type a command in one of those instances, hit enter, switch to the other one and hit "up", the command I previously typed appears ...
0
votes
0answers
28 views

PowerShell script to monitor files in multiple folders

Can anyone help me with the PowerShell script below to monitor files in multiple folders (like D:\test1 and D:\test2 and D:\Test3)? SET FOLDER TO WATCH + FILES TO WATCH + SUBFOLDERS YES/NO $watcher = ...
0
votes
0answers
35 views

Add Increasing Numbers to Beginning of FileName in Powershell

I have a set of files in a folder, all pdfs. There is no uniform name to the documents, but I would like each one to be proceeded by a number, followed by an underscore, then "TAB." In other words, ...
0
votes
1answer
57 views

How does start.exe work?

I found out that start.exe might be useful as a tool intended to run installed programs. So I can run Word: start winword # located in "C:\Program Files\Microsoft Office 15\root\office15\WINWORD.EXE" ...
0
votes
0answers
37 views

Power Shell script to delete the User profiles from the windows server 2008 r2 to local machine(Windows 7)

I tried the following script on a Windows Server 2008 R2 to delete the User Profiles on a Windows 7 client machine. PS C:\> get-content localcomputer-list.txt | get-userprofile | where {$_.LastUse ...
0
votes
1answer
24 views

Win Server 2012 PowerShell 4 script to Copy, Rename, and Touch a File

I created a PowerShell 4 script to backup the Outlook 2013 VbaProject.OTM file by copying it from the production directory to a backup directory, and adding a filename suffix of the current date and ...
1
vote
1answer
23 views

Powershell - How can I copy full error information in a trap

I am using Powershell's trap feature because I would like to output full error information when there's an error and I have to reply to the error. Without the use of a trap Powershell will not show me ...
1
vote
0answers
25 views

get-command : Object reference not set to an instance of an object

I have PowerShell 4 on a Windows 7 laptop. I just installed PowerGUI, and discovered I am getting this error: get-command : Object reference not set to an instance of an object. Powershell_ISE, ...
3
votes
1answer
50 views

Get wall-clock time of a windows process with command line

Is it possible to get an uptime from a windows process which is not based on the clock settings of the system? A linux-based solution is something like: ps -eo comm,etime With some researches, I ...
0
votes
1answer
12 views

Removing a Group from Offline Global Address List in Powershell

This is for an Azure Office365 tenant: Basically, when I run a an object query against a group like this: Get-UnifiedGroup "GroupName" | Select Object * It gives me a list of all the different ...
0
votes
1answer
20 views

Replacing text in multiple files-getting duplicate error

I want to loop through all files (2 for this test) in current folder and replace text. The replacement is working but I'm left with newfile1 and newfile2 in file1 and the same in file 2. Where I just ...
0
votes
0answers
13 views

How to create multiple VM using powershell script in azure using single cloud sercice

I am trying to create multiple VM in azure using powershell scripts but I am unable to create. It says The specified Production slot is already occupied.Please help me to resolve this issue. Thanks in ...
1
vote
0answers
33 views

Can't run PowerShell as admin inside of Webstorm

I am trying to figure out how to run PowerShell as an admin embedded in Webstorm. I can run PowerShell as non-admin in Webstorm, but when I try to run PowerShell as admin inside Webstorm I get the ...
1
vote
1answer
29 views

Powershell ISE scrolls to the bottom of the console upon re-focus

With PowerShell ISE: If using a split view (showing both the console and script pane), re-focusing on the console from the script pane (or another console tab) will always scroll to the bottom. To ...
0
votes
0answers
12 views

AD: Best way to streamline Exchange permissions

Looking at streamlining some local helpdesk processes, and one of the most common requests that we deal with is requests for a user to have access to another's mailbox. Typically, we grant this access ...
0
votes
0answers
36 views

Wake up computer from sleep to shutdown

I wonder if it is possible to wake up the computer from sleep at a certain time during the day and shutdown automatically. Maybe giving a popup asking for 5 seconds if I am using the computer to give ...
1
vote
1answer
26 views

Unique identifier for USB drive in Powershell

According to win32_volume class documentation here the device name that shows up under device manager is is unavailable as a property of win32_volume. Is the SerialNumber property unique to the device ...
0
votes
1answer
38 views

PowerShell - Quasi equivalent strings are infact not equivalent?

I have a string which I'm passing into my script as an argument. For the purpose of displaying the code on here however, I have specified these manually in the code. These variables are: ...
0
votes
1answer
21 views

Getting System Health info via PowerShell

Is it possible to get System Health status via PowerShell? Info like CPU Utilization, Used RAM, CPU temperature, etc.
1
vote
2answers
27 views

Powershell: Dir /s - Remove Repeated Folders

Situation: In Powershell, I'm using: $folders = dir -s C:\Users\Name\Downloads\*.ttf | Select Directory foreach ($folder in $folders) { echo $folder } To display folders whose contents ...
1
vote
0answers
16 views

Conditional Restart Timer - Windows Updates

I am looking to require restarts based on certain conditions within our environment. Currently we deploy Windows Updates via WSUS, but do not enforce forced restarts (this has a long history due to ...
0
votes
0answers
27 views

Enter-PSSession does not work for remote access

I want to have remote access to one of my server but there are some problems. first of all when I want to add this server(m-ad-vserver) in dashboard of server manager this error appears: ...
0
votes
1answer
39 views

Spawn command line prompt to a remote Windows machine

Is it possible in Win7, Win8.1, Server 2K8 and 2012 to "shadow" or rather spawn a console and 'impersonate' or 'masquerade' a user command line prompt ? I am domain admin and I would like to interact ...
0
votes
0answers
22 views

Python/Powershell Script for Telnet

I'm most familiar with powershell and python so a solution which utilized either of them would be ideal. I'm also open to other ideas on resolving this issue. So I have a situation where an old ...
1
vote
1answer
41 views

Nano alternative for windows powershell

I am looking for software similar to nano for linux bash but for windows powershell. Is there any built in so I do not have to install something? EDIT Nano is a text editor that runs within the ...
2
votes
0answers
23 views

How do I send an already running process to the background in power shell?

In bash, a process that is already running in the foreground can be suspended by hitting control Z. You can then bring it back to the foreground with fg or let it continue running in the background ...
0
votes
0answers
12 views

powershell sort and filter a file with multiple filter files

I have multiple files Collect.log a file with all the software known on a computer keep.log software that should be kept remove.log software that should be removed out.log all software from ...
1
vote
1answer
17 views

Archive of Microsoft's Powershell 2.0 Documentation?

When looking up information on a specific cmdlet built into Powershell, Microsoft let's you choose between version 3.0, 4.0, and 5.0. See this page for an example - ...
0
votes
0answers
22 views

How to download file from a local server cache windows server

How could I download a files from a local server cache address path I was given? Not sure how to do this on windows server: Link to local sever cache: \\sdgd07mjbvbw2\Users\BuildUser\Downloads Here ...
0
votes
0answers
20 views

PowerShell font changes after launching

I'm trying to set the font of PowerShell to be Lucida Console 14, but something strange is happening. When I launch PowerShell, the font is what I want it to be, but a second later (before the prompt ...
-1
votes
0answers
17 views

Powershell XML comparision

I am trying to compare web.config file from production to non production using powershell script. I am able to generate code which can compare upto one level but beyond that I didn't find any help ...
0
votes
1answer
27 views

Parse and Switch Elements of Folder Names using Powershell

I have been trying to write a powershell script (my first) to parse out only the folders within a directory select only those folders matching a specific naming convention ('SEASON YEAR') switch the ...
0
votes
0answers
28 views

How to transfer files from PC via powershell

By either browsing out to the remote computer's filesystem (ex. cd \computername\share) or using PSsession, how can I transfer files to and from the remote machine? Tried: copy-item \source ...
1
vote
2answers
45 views

Colored text in command prompt/PowerShell is blurry

A troll must've mucked about with my computer during the night. I did not see this issue yesterday. It seems like only colored text is affected by this blurry madness. What is going on and how do I ...
1
vote
0answers
33 views

How do I use the Python commands in PowerShell?

I work in a GIS department and I'm trying to learn Python to automate something boring. I started using "Learn Python the Hard Way", but I can't figure out how to run Python scripts from PowerShell. I ...
3
votes
2answers
31 views

Hard Code a system value?

I work for a Tech company, and when we sell computers we also include a sticker with an inventory number, for easy reference in our database. My question is as follows: Is there a way (I am sure ...
0
votes
1answer
30 views

PowerShell unable to Set-Execution policy

I am trying to set the script execution policy in PowerShell. But when I tried, I get: PS C:\Users*> Get-ExecutionPolicy Restricted PS C:\Users*> Set-ExecutionPolicy RemoteSigned ...
2
votes
1answer
44 views

How to rename an executable from its details

I have loads of .exe files that got renamed to file1.exe, file2.exe, etc. When you look at a file's Details under Properties (in Windows Explorer), it has the original file name under "Product Name". ...
1
vote
2answers
77 views

How to check version of IE on Windows 7 with PowerShell?

I want to check which version of IE I have on my Windows 7 machine. I would like to do this with the command line, either through Command Prompt or PowerShell. Thank you!
0
votes
0answers
70 views

Windows 8.1 Pro x64 None of the Modern UI apps work, Powershell, CMD, and wsreset returns error

So, today somehow my pc got messed up while I wasn't home, don't ask how because i don't know (maybe a windows update gone wrong, or ghosts were messing with it :) ) First it started with black scrn ...