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

A Parameter connot be found that matches parameter name 'SingleItemRecoveryEnabled'

I am currently trying to set up GFI mail archiving with office 365, and have been following these instructions; I have gotten to the point of disabling the recoverable items folder on the journaling ...
0
votes
0answers
34 views

Avoid Mount-DiskImage assigning drive letter to networkshare

I have a driveletter for a network share that I'd like to keep, but how do I avoid Mount-DiskImage from assigning the same drive letter? $mountResult = Mount-DiskImage -ImagePath "C:\path\to\dvd.iso" ...
1
vote
0answers
52 views

Running a specific PowerShell command in CMD

Im able to run simple PowerShell commands in cmd such as "LS" for instance this way: PowerShell -Command ls But what I really want to run is: [System.IO.Directory]::GetFiles("\\.\\pipe\\") If I ...
0
votes
2answers
60 views

Powershell A Drive C Does Not Exist

I am using a regular system, nothing virtual, my C drive is not mapped which I see in some forums. Environment path not set? I started a tutorial to learn Powershell, and the first thing I tried to ...
-1
votes
1answer
45 views

script or powershell or batch file to select and connect to a specific SSID [closed]

Is anyone aware of a way in windows 10 to programmatically select (i.e. connect to) a specific SSID/wiFi network? I have a couple of use/test cases where I need to connect to different SSID's at ...
1
vote
0answers
32 views

Identify Hyper-V VM network adapter connected to specific vSwitch

I am trying to identify a specific network adapter connected to the Internal vSwitch, so I can subsequently bind the DHCP server role to that adapter. There are 3 Network Adapters, 2 connected to ...
0
votes
1answer
43 views

Check how long untill being logged off in win7 (from cmd)? [duplicate]

When I was young, I learned a quick way to set a timer to turn off my computer shutdown -f -s -t 3600 That would give me 1 hour until log off and shutdown. I remember in windows xp, there would be ...
0
votes
1answer
96 views

Lenovo BIOS setting using PowerShell

I am trying to change BIOS settings through a PowerShell, when I run the below command line, it runn succesfully, but when I reboot the PC I see no change on the BIOS settings. the command line: ...
4
votes
1answer
29 views

Avoid creating duplicate Hyper-V switches

I am trying to create a PowerShell script (for learning purposes if anything) to set up a virtual Hyper-V cluster from scratch using the new NanoServer. Its still in its early stages, and I'm learning ...
3
votes
3answers
200 views

Replace app package on Windows 10

I recently updated to Windows 10 Home Build 10586. Some built-in apps, however, appear to have been corrupted. One example being MSN News: I have uninstalled and re-installed these apps several ...
0
votes
1answer
55 views

ICS through powershell

In order to enable ICS through powershell, I used the following: # Register the HNetCfg library (once) regsvr32 hnetcfg.dll # Create a NetSharingManager object $m = New-Object -ComObject ...
0
votes
1answer
85 views

How do I replace the system shell (explorer.exe) with another process in Windows 10?

This is for Windows 10. Is there a way to replace explorer.exe with, for example, a powershell script? I'm looking to start a custom shell application without having to have explorer.exe run in ...
0
votes
0answers
172 views

Remove appx package for all users

Fresh Windows 10 install. Somehow the MSN Weather app became corrupted. (Unable to launch) I removed the app with the following Powershell command: Remove-AppxPackage -Package ...
0
votes
0answers
52 views

Unable to access ElasticSearch on AWS

I am trying to use curl in powershell to access elasticsearch on an AWS instance, with no luck. I can access the instance using putty with no problems, and can successfully run a health check on ...
0
votes
1answer
46 views

Using Powershell To Download Pictures

I'm running Powershell 4.0 and I was wondering, it is possible to automate the task of downloading 5 pictures every day from a site and store them in my downloads folder? I prefer not to use any third ...
-1
votes
1answer
33 views

How can I change the time that an e-mail was received via Microsoft Exchange Server or Microsoft Outlook?

As the question says, how can I change the time that an e-mail was received either via Microsoft Outlook or via Microsoft Exchange Server (as an Administrator account) directly? There are numerous ...
0
votes
1answer
21 views

Variable Appendendage Printing Literal String

I have a variable $emp and an individual folder variable for each employee in this variable. So I have 1) $GeorgeFullSaveDir and 2) $JamesFullSaveDir. Using a foreach loop I iterate the values of ...
0
votes
1answer
36 views

Tail pattern with context in Powershell

If I tail a log like this: gc xxx.log -last 1 -wait | sls -patt 'Exception' -simple | % {write $_.Context.PreContext $_.Line $_.Context.PostContext} it works as expected spitting out lines ...
0
votes
0answers
40 views

How to make program show up on a designated virtual display in Windows 10

So as some of you surely know, in Linux you can open a program directly on a specific display by exporting a variable export DISPLAY=:0.0 and then starting a program. Since Windows 10 also ...
0
votes
0answers
193 views

Windows Store Apps Greyed Out [Windows 10]

All of the windows store apps (store included) are greyed out and when I click them an error comes up that says "There's an error with the app. Contact your system administrator to fix it." The ...
1
vote
1answer
56 views

Robocopy replace same date file move

I'm using robocopy to move data. I want to achieve this IF Source File data (Newer or Same) move/overwrite data Else skip file I need a switch or a way to just excluded newer not newer or same ...
0
votes
1answer
19 views

Filter running processes by digital signature authority

I want to write a script that will kill all processes whose executables are signed by a certain authority. I know how to get the list of running processes, and how to send a filtered list off to be ...
0
votes
1answer
42 views

How to find/export only one value (primary SMTP) from multi-valued Proxy Addresses

I have a script which search values in attribute Company and Proxy Addresses. Get-ADUser -Filter * -SearchBase 'OU=Stu,OU=LOWA,OU=IDLOWA,DC=ad,DC=ju,DC=com' -Properties company,proxyaddresses | ...
2
votes
2answers
94 views

Powershell Script to Export all Devices in Device Manager as tree or list?

With former Windows versions, it was possible to print the information from the Device Manager, but it does not seem possible to do this with Windows 7 any longer. I am looking for a Powershell ...
0
votes
1answer
86 views

Add 'Open Powershell here as admin' option to folder context menu

I have been looking for a way to open an elevated Powershell prompt from Windows Explorer directly, via the context menu of the folder I want to open the prompt in. I'm using Windows 10 and all the ...
0
votes
1answer
33 views

The Windows PowerShell snap-in 'System.Management-Automation' is not installed on this computer

I have Power shell version 4.0 under windows server 2012.. now I run the following powershell command :- $admin = "domain\user" $pwd = "*****" | ConvertTo-SecureString -asPlainText -Force $LiveCred = ...
1
vote
0answers
15 views

Get-VM for a hyper-v , what are the differecnes between VMName & Name

I want to get a list of VMS for a Hyper-V server, so I run the following command , to get the VMs details inside hyper-v server named "hyperV01":- PS C:\Windows\system32> Invoke-Command ...
0
votes
2answers
49 views

Append Variable To String

Can you append a variable to the beginning of a string? I have tried, unsuccessfully to accomplish this. In my sample below, I get the literal value returned, not the two variables combined. ...
0
votes
1answer
47 views

Lost Connectivity to Hyper V Host after Creating External Switch

Background: We had a SAS disk fail that was part of a RAID 10 array. Unfortunately, when it failed, it also kicked its mirrored pair in the SPAN offline as well, meaning the whole array was ...
0
votes
2answers
125 views

Remove-Item : Cannot bind argument to parameter 'Path' because it is null

Good Afternoon I have created the following powershell function script{ param ( [string]$path = {"C:\PowerShellTest\Med Rec\1\", "C:\PowerShellTest\Med Rec\2\", "C:\PowerShellTest\Med ...
1
vote
1answer
38 views

Using powershell + regex to tidy file names

I have a hard drive containing files with names that have been formatted by the "File History" feature of windows. A typical file name looks like this: Randomfile - blah (2015_05_29 14_56_40 ...
1
vote
1answer
42 views

MSConfig what does it edit specifically in Windows 7, 8, 10?

It used to be that the msconfig.exe used to edit the boot.ini from what I understand. Now in Windows 7, 8, and 10 I can't find out what it edits. Which part of the operating system does it change ...
0
votes
1answer
45 views

Powershell Script with Procdump

So I have a system that runs pretty slow at night when running a report. I've configured Performance Monitor to monitor the system. What I'm finding out is there is a process that is tying up all ...
1
vote
1answer
33 views

Denied user shows recent logon time

We have a terminal server that is restricted to specific users via an Active Directory group. One user had access, but back in March 2015, his access was removed. When I run Get-WmiObject -class ...
0
votes
0answers
34 views

Auto generated help vs installed help in PowerShell

I'm using PowerShell 4.0. Here is a snippet of the syntax of the Get-ChildItem command if the local help is not installed (PowerShell displays auto-generated help) : SYNTAX Get-ChildItem ...
0
votes
0answers
31 views

Running PowerShell script leads to endless loop of open windows

When I open a PowerShell script from Explorer or within a PowerShell console window, a new PowerShell console window opens, which opens a new console window, which then opens a new console window. No ...
0
votes
0answers
34 views

Mircosoft Surface 3 Allow this device to wake the computer grayed out

I have a powershell script that wakes computers on lan (wol) using a magic packet. The script works fine for normal desktops but won't work with Microsoft surface 3 tablets. The device is connected ...
1
vote
1answer
63 views

Powershell script delivered via SCCM 2012 to fully remove Windows 8.1 apps

I am looking for guidance concerning performing the above task. My Powershell script is as below, the script currently removes one specific named app. $AppsToDelete="*Microsoft.WindowsReadingList*" ...
0
votes
0answers
17 views

PS compare-object ¿ignoring? output of nested get-childitem

When I run: if((compare-object (get-childitem $SourceDirectory -recurse) (get-childitem $DestinationDirectory -recurse)) -eq $null) { write-host "Compare successful" } else { write-host "Compare ...
0
votes
1answer
62 views

Changing colors of the powershell prompt in Windows 10

In Windows 10, the powershell prompt has improved with more coloring. Command parameters are now highlighted in a different color, making the experience much nicer. However, I like to customize the ...
0
votes
0answers
57 views

Convert a txt file into csv using powershell

The document that I am trying to convert is Formatted like so: 2012/12/09 REPORT OF USERS PAGE 1 HRS RG POSITION OPTIONAL ADDITIONAL USER # ...
0
votes
0answers
22 views

Change taskbar position from powershell

I would like to make a shortcut on my desktop to change the position of the taskbar from top to bottom and vice versa. Is there an easy way to do it in powershell without messing up with the ...
0
votes
0answers
33 views

Why do these benchmarks NOT saturate the CPU.

I ran two trivial benchmarks in Powershell and C. I ran this on reasonably well endowed i7-2600 with 16 Gig Win 7 Pro. Both ran using two of the 8 cores (really 4 cores dual hyper threaded) and ran ...
2
votes
1answer
31 views

Command executes fine through cmd but not through PowerShell

This command doesn't work: netsh advfirewall set allprofiles firewallpolicy blockinboundalways,allowoutbound This command works: netsh advfirewall set allprofiles state on I've tried using ...
0
votes
1answer
244 views

Can't open Windows 10 built-in apps after KB3116908

After updating my W10 PC (KB3116908). All my built-in apps don't want open. I used PowerShell to reinstall them but even after rebooting my PC, they don't want open but there are ever in the Windows ...
2
votes
1answer
24 views

Outlook 365 - How to automatically activate Auditing?

We're testing Office365 and are playing with the settings for reporting/auditing on OneDrive for business. We need to be able to see who has opened/edited/blah all files as all companies do for ...
0
votes
0answers
17 views

Importing modules when execution policy is set to Restricted

First off, I'm aware that scripts are disabled when the execution policy is restricted, I'm just looking for clarification on something. Basically, if I try to import a script module or run a ...
0
votes
0answers
44 views

Powershell: Windows patching on multiple servers

We have about 1000+ servers and they patch by WSUS. In WSUS we assigned the patch and after that we login to the servers and download n Install the patches. Once it done we restart the machine as per ...
0
votes
0answers
22 views

How can I disable/enable multiple hardware components with a single command?

I am a web developer/designer during the day, but at night I play DJ gigs. For music, I need several hardware components disabled. Then, after the gig, I reenable all of the hardware. Each of these ...
0
votes
0answers
20 views

Login a generic user via PowerShell

I would like to write a script, which has the purpose to login a generic user to a remote computer. I would like to do this via PowerShell and without any external tools, except any of the ...