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
1answer
258 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
25 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
46 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 ...
3
votes
0answers
129 views

WMI query fails with “A security package specific error occurred.” Exception 80070721

Problem In Powershell after executing the following command ... Get-WmiObject Win32_ComputerSystem -Credential second.nl\administrator -ComputerName srv02.second.nl ... the following exception is ...
2
votes
1answer
53 views

Delete a folder with no owner in Windows 8.1

I'm using Windows 8.1 and I'm trying to delete a folder on a secondary hard drive. I tried a things that I had read here, but nothing seems to be working. Here's what I've done: Tried rd command ...
3
votes
1answer
51 views

Jams Client illegal characters in path

I am getting an "illegal characters in path" error with the following code. Any thoughts? $source = \\md\drive\MMM\<<DriveEnv>>\AA\Extracts\Active\filename.csv $newfilename = ...
0
votes
2answers
73 views

PS script that monitors folder and copies to new folder and renames

I'm looking to fix a PowerShell script that I have and add some more features to it. Currently, it's working as intended: when a file is saved to a directory, it moves the item to a new one. What ...
0
votes
0answers
37 views

Powershell possible to give input to underlying script

I am sorry I could not think of a better title. My problem is I have a PowerShell script which calls a git command (git credential-wincred store) to store credentials to connect to a git repository. ...
0
votes
0answers
49 views

Find and delete duplicate root certificates

We are in a disconnected domain and have just implemented updated root certificates via group policy. I have found now though, that there are a number of duplicated root certificates in the users ...
2
votes
1answer
60 views

Security risks when bypassing the Execution Policy in PowerShell?

I know that you can bypass the current execution policy in PowerShell by passing -ExecutionPolicy Bypass at the command line, but what does this actually do? I know it allows scripts to run, but I'm ...
2
votes
1answer
44 views

Batch file to add Java Cryptography Extension files to updated Java

I'm trying to automate the following situation on a Windows 7 workstation. I use Java only for a single vendor app that requires the Java Cryptography Extension files to be placed in \security. ...
1
vote
0answers
131 views

Why is Microsoft.Update.Session so slow? Can I make it faster?

I'm running this script script (as discussed here): $Session = New-Object -ComObject Microsoft.Update.Session $Searcher = $Session.CreateUpdateSearcher() $Searcher.Search("IsInstalled=1").Updates | ...
0
votes
0answers
38 views

Migrate users from old print server to new print server

I am trying to script out a method of moving users from our old 2003 server to our new 2012 server. The clients are using Windows 7 and 8.1. The trouble is I am new to scripting, and googling hasn't ...
1
vote
1answer
68 views

command to check if directory size is greater than 1g

I am looking for a command (Windows or Linux) that calculates the directory size and returns true or 0 if the directory size is greater than 1gb. If less than 1gb returns 1 or false. Powershell ...
4
votes
1answer
105 views

How do I specify chmod 744 in Powershell?

I know that I can use icacls to specify the permission on the file, and from What is the equivalent of chmod 777?, I can use icacls myfile.txt /grant Everyone:F But how do I set an equivalent for ...
2
votes
3answers
1k 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 ...
1
vote
1answer
59 views

Import Registry Hive

I have a set of "Registry Hive Files (.)" that am attempting to import via PowerShell. The goal is to have the script run across many machines in the environment and not have to manually do it via ...
2
votes
1answer
528 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
0answers
21 views

Why does my PowerShell belief it's a Cygwin terminal?

Lately I discovered that colorama* does not work as intended. It does not convert ANSI escape sequences into WinAPI calls to change the PoSh console text colors. I noticed that it works correct in an ...
1
vote
0answers
50 views

can't kill installer made with innosetup

For years I have been making installers with innosetup, on Windows XP SP3. I have just installed the latest innosetup, 5.5.6 (u) (for Unicode) on Windows 7 Professional, 64-bit. I made a new ...
0
votes
0answers
25 views

Automate Outlook Settings

When I move between work computers (not by choice), there's a few Outlook 2013 settings I always end configuring. Is there a way to automate this? The settings I change: Mark items as read after 0 ...
0
votes
0answers
36 views

Cant register app packages Windows 10

I know that this question is asked a lot around here, but i have tried all solutions and I dont get it to work. About a month ago my start menu and metro apps stopped working. I tried a lot and ended ...
-2
votes
1answer
57 views

Is it useful to replace old styled linux shell command with well designed?

I found out that linux commands are too old and require a lot of effort in order to learn all of them. Is it reasonable to replace them with new ones?
1
vote
1answer
91 views

Windows PowerShell - How to view commands history date/time

I want to list entered commands in Windows PowerShell with their respective timestamps. How can I do it with Get-History command? Also if that isn't doable then please show me a way to check which ...
0
votes
1answer
21 views

Is there a way to log what application or device is using a USB port?

I have a DAQ connected through USB, and every now and then it drops signal and the application using it crashes. I have a feeling that some other process or service is interrupting the USB. Is there a ...
2
votes
0answers
67 views

In Windows 10 it possible to set a unique wallpaper for each display via command line or powershell?

In Windows 10 I found the feature to allow setting a unique wallpaper per desktop monitor (control /name Microsoft.Personalization /page pageWallpaper), however; I have a need to script this for a ...
0
votes
0answers
20 views

Is it possible to run a Citrix published program through Powershell?

I have been trying to create a way of making powershell execute SSH communication with a remote server but I don't have a way of getting the connection information (domain/ip). The only way I can ...
0
votes
0answers
46 views

Get-AppxPackage in vbscript

I need to run a vbscript to be able to list all of the packages installed. I know this functionality exists in PowerShell is there a way to see app packages installed on a computer in vbscript?
0
votes
0answers
147 views

Task Scheduler don't run task action script

head to Plan C anyway How to setup a task scheduler to run, effectively, a .bat which runs a .ps1 script (closes firefox, wait 3 seconds and enter suspend mode) or directly run the .ps1 whichever ...
1
vote
1answer
96 views

Powershell append text file in loop

I am trying to get a list of groups in AD via powershell. I am not exactly sure where to put the Out-File. I want it to read from the csv file and search ad for groups names containing the location ...
1
vote
2answers
70 views

Unable to invoke-command from Server 2012 R2 to Windows 8

I am trying to run an invoke-command from a Windows Server 2012 virtual to a Windows 8 virtual. The machines are in the same domain and on the same subnet. I have ran the Enable-PSRemoting -force ...
0
votes
0answers
39 views

Convert vmware .ovf to hyper-v

Can you please tell me if there is any script that I can do(preferably in python or powersehll), for taking vmware .ovf(+his vmdk) and import it in hyper-v machine? I don't want to convert with third ...
0
votes
1answer
65 views

Issue with network drives freespace check - Powershell script

I have a batch file which deletes some files from the network drives and then calls a powershell script. The powershell script gets the space details of all the network drives, and send out a mail. ...
0
votes
0answers
185 views

Can Microsoft Edge be launched in “Private Mode” through cmd?

Can Microsoft-Edge be launched in "Private Mode" through the command line? I'm using this shell command to launch it with a specific URL: start microsoft-edge:www.google.com Is there some kind of ...
0
votes
1answer
13 views

Mercurial pull across network drive in powershell script from scheduled task

So I previously had this question: Mapped Drive inaccessible from Windows Scheduled task in which I discovered how to get access to a drive a python script I was running needed to put files in. I ...
1
vote
1answer
77 views

Set the Creation Date of a file to that of another file with Powershell

Can someone help me get this line right? powershell Set-ItemProperty -LiteralPath '[NewVideo]' -Name CreationTimeUtc -Value ('[CreationTimeOfOldVideo]' -as [Datetime]) I am trying to rotate video ...
0
votes
2answers
308 views

Is it possible to use WinRM on Windows 10?

My question is if WinRM can be install on a Windows 10 because on the page says: Installing WinRM If WinRM is not already installed with your operating system you can find it in the following ...
0
votes
0answers
57 views

Can the PowerCli command “Get-VM” indicate if a VM is a SRM replica or not

I am working on powercli 5.5 release 1e and i run the following command to get a list of vm under a hypervisor server:- Get-VM now i got many useful info such as :- > powerState Version ...
-3
votes
1answer
32 views

Is it possible to Automate Windows Set up on Hyper-V using Powershell? [duplicate]

I wanna know if that it's possible. I can create a new VM and start it but I don't know if the configuration of Windows can be automatize by a Powershell script.
0
votes
2answers
106 views

What can cause screen locking on my computer (colleagues trolling)?

While I was away from my comp, my colleagues trolled my windows 7 computer, and now occasionally windows locks as I am typing, or a tab closes randomly. :) I noticed a colleague typing in a ...
-1
votes
1answer
62 views

How to set up Windows on VM using Powershell (Hyper-V)

I know how to create a VM and I know how to start that VM on Hyper-V using the script of Powershell but it's the first use of the VM so I need to set up Windows and I don't know how using the ...
0
votes
1answer
80 views

What is Install-Module command in Powershell?

Various Microsoft articles refer to the Powershell command Install-Module, but I can't find any reference to what this actually is and it's not very amenable to googling. I have psget installed, so I ...
2
votes
2answers
96 views

PowerShell Command Highlighting

When I type a message into powershell such as git commit -m 'Commit msg' I'm unable to see the -m due to syntax highlighting. Is there a way to disable this feature or change the colors it is using? ...
2
votes
1answer
215 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
1answer
105 views

Can't seem to make OneGet/Chocolatey work on Windows 10

I got pretty excited about OneGet. But I can't get it to work. I followed the instructions here: http://www.hanselman.com/blog/AptGetForWindowsOneGetAndChocolateyOnWindows10.aspx . Basicaly, what I ...
0
votes
0answers
78 views

While run the powershell script on Chef server getting : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available

I have Created powershell script and try to run the script on chef server with .rb extension.After run the script chef throwing error message : Backup-backup,Fail,Windows PowerShell is in ...
0
votes
0answers
115 views

How to create new Virtual Desktops in a script to launch multiple applications in multiple desktops in Windows 10?

In the case where hibernation is not possible, after turn off and turn on the computer would be useful have a script to reconfigure the system as it was before: How to write a script to launch ...