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

3
votes
0answers
116 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 ...
3
votes
0answers
83 views

Path too long, but it's not?

I'm trying to run a Get-ChildItem -Recurse against a file share and I'm getting some "path too long" errors. But when I dig into it, some of them aren't. I'm using -ErrorVariable to capture the error ...
3
votes
0answers
759 views

Line wrapping in Powershell ISE Console?

I sometimes write long lines of code as I am playing with things in the PowerShell ISE (v4 on Windows 8.1). I find its console window helpful in many ways, but I'm unable to figure out how to make it ...
3
votes
0answers
148 views

What are AMT sessions used for?

I'm familiar with Powershell sessions (ie Enter-PSSession) and what they can be used for. I'm attempting to remotely manage power through vPro, so I've been messing around with the IntelvPro module ...
3
votes
0answers
335 views

Windows8 Metro Applications, change PackageUserInformation from Staged to Installed?

Curious problem I'm running into. We have a series of Samsung ATIV Smart PC 700T's that come pre-installed with Windows 8 core. Unfortunately we need these on the domain so we're upgrading them to ...
2
votes
0answers
65 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 ...
2
votes
0answers
154 views

PowerShell Script to Rename - Copy - Move

I am trying to write a PowerShell script to do the following. step 1 Rename files in source (FTP folders) directories with it's "current_name_datetime.csv" as per a source file "Source_list.csv" ...
2
votes
0answers
52 views

How to programmatically change permissions on computer objects in Active Directory

I've inherited control of an OU within an enterprise Active Directory domain. All of the computer objects in our OU are owned (and only writeable by) my predecessor. This prevents me from re-adding ...
2
votes
0answers
60 views

Regex expression cuts zero in the end

I have a script with powershell regex in it, and after I upgraded from Windows 7 to 10 it working different. Regex: if ($srv -match '^[0-9]{1,3}\.[0-9]{1,3}$'){$srv = "192.168.$srv"} Expected: ...
2
votes
0answers
170 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
231 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 ...
2
votes
0answers
54 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 ...
2
votes
0answers
121 views

How to rename files in file from lines of a text file

My script PowerShell: $liste = get-content "Y:\Users\H\Documents\D\Game Of Throne\prod\recup.txt" ` |Select-Object -last 1 $liste | ForEach-Object {Write-Host ($i++) $line} get-childItem ...
2
votes
0answers
146 views

Trying to rename large amount of .doc files based off first line or so of text

I was attempting to help a friend, who had a bunch of data recovered, but the meta data was lost. As most of it is articles or recipes, she believes the title or first line or so of text will be good ...
2
votes
0answers
993 views

Pin a tile (App or shortcut) to a specified position on Startscreen (Windows 8 / Powershell)

The title is nearly the whole question. I am searching a solution to pin an installed app or desktop application to the windows 8 startscreen. I am in an enterprise environment and the purpose is to ...
2
votes
0answers
559 views

PowerShell stops executing commands/programs

Sometimes my PowerShell stops executing programs and I have yet to find out why. In this state, when I enter the name of an EXE file, the PowerShell immediately returns to a command prompt without ...
1
vote
0answers
9 views

Windows 10: iTerm-like system-wide hotkey for showing PowerShell on any virtual desktop

This is my iterm preferences window. Here I set a system-wide hotkey where if I press that hotkey, no matter what virtual desktop (or rather the OS X equivalent of virtual desktop) I'm on, my current ...
1
vote
0answers
15 views

How do I install Azure Powershell *on* an Azure Cloud Service?

I have need for a cloud based intranet application to run Azure Powershell. I've done a bunch of digging and I cannot find anywhere that gives me an understanding of the process I need to follow to ...
1
vote
0answers
12 views

Can I load Powershell AD Module as another user?

I have a script that I use to automate AD and Office 365 account provisioning. Everything is working just fine. The only "problem" is that I have a regular domain account and another account which is ...
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 ...
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 ...
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 ...
1
vote
0answers
120 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 | ...
1
vote
0answers
46 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 ...
1
vote
0answers
89 views

Powershell Mouse Moving Script on XP

Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(500,100) The above code should move the mouse to a specific position (500,100), ...
1
vote
0answers
185 views

Invoke-Command from elevated powershell with non-elevated creds

I'm trying to run a script that requires elevation to set certain registry values to allow CredSSP on local and remote computers and, during this script, I need to access a network share as a ...
1
vote
0answers
59 views

Compress traffic when copying a lot of files over network between two Windows machine?

The tools under unix/linux, e.g., scp, rsync, etc., support compression when copying files. Does any Windows (Server) tools do the compression when copying? I will need to copy 5TB of text files ...
1
vote
0answers
70 views

How to tell when wusa.exe has finished running?

This question is sort of split between programming and sysadmin, so here goes: I've got a PowerShell script which install dependencies for a piece of software. One of these dependencies is a .msu ...
1
vote
0answers
32 views

Remote PowerShell, which machine is making the incoming connection?

I'm trying to identify the connecting machine within a remote PowerShell session. The reason is so a script can behave differently depending on which machine is connecting. Get-PSSession doesn't ...
1
vote
0answers
134 views

Enumerate remote SMB shares with PowerShell on non-Windows system using WIndows 7

I need a way to enumerate the SMB shares of a remote, non-Windows system while using PowerShell on my Windows 7 system. The file server I'm checking is not running a Windows OS. However, I need to ...
1
vote
0answers
113 views

Why is Powershell able to change registry values regardless of registry permissions?

Using Windows 8.1 Enterprise. Through Regedit I removed permissions from Administrators and even System for the key HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings. I was under the ...
1
vote
0answers
117 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, ...
1
vote
0answers
104 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 ...
1
vote
0answers
68 views

Set printer preferences

I am writing a script setting up printers and drivers. One of the driver I install, contains a bug for old printers used with platforms further than Windows Vista. I need to update the preferences of ...
1
vote
0answers
68 views

Want to send automatic mails from email server, That To addres has to read from email that i received.?

I want to send multiple mail automatically. I will receive mail as FROM: abc@domain1.com TO: 123@domain2.com BODY: mail contains (username@domain3.com) What I want to is take the ...
1
vote
0answers
103 views

Properly extracting from an array

I have a CSV with one column, numbers formatted as 111-0000, that I'm reading in to process one at a time. I'm trying to import the column of information from the CSV, but I'm having trouble figuring ...
1
vote
0answers
49 views

Powershell tee command locks file

Is it possible to run powershell tee command so that it doesn't lock the file, allowing to view it?
1
vote
0answers
83 views

In >= Windows 8, how might I return all MSMQ Journal entries for named Queue in powershell?

As introduced in MSMQ Cmdlets (https://technet.microsoft.com/en-us/library/hh405007(v=vs.85).aspx), we now have the ability to query our queue. If I run PS C:\Get-MsmqQueue Then I get a full list ...
1
vote
0answers
152 views

Is there a Powershell remoting equivalent of using psexec as the system account?

PSEXEC has a -s argument that will "Run the remote process in the System account." I'm currently using a Powershell remoting session as follows: $s = New-PSSession -computerName $server The user ...
1
vote
0answers
84 views

Issues Adding Data to an XML Document w/PowerShell

Trying to add an element to an existing XML file using PowerShell. I have looked at several examples and my 'add' script works but, it is misplacing the element. Sample of XML I am using: ...
1
vote
0answers
212 views

Why does PowerShell give “Access Denied” for Get-Content on a directory?

By accident, I recently tried running Get-Content on a directory. I'd initially thought it was a file because it was named very similarly to a common file I'd expected to be in the location. So I was ...
1
vote
0answers
422 views

How do I use Powershell to set Delegate permission on a mailbox?

When I add a user to Outlook delegation, using this method I see them in the following powershell command [PS] C:\Windows\system32>Get-CalendarProcessing aaaa| fl AutomateProcessing ...
1
vote
0answers
263 views

Set-AzureStorageAccount - GeoReplicationEnabled parameter will be deprecated in a future release

I get the following warning in powershell for this command: Set-AzureStorageAccount -StorageAccountName $storageAccount -GeoReplicationEnabled $false WARNING: GeoReplicationEnabled parameter ...
1
vote
0answers
2k views

How do I gain access to my C: drive after completely locking it down?

I know the title might seem completely ridiculous but please read this before being biased. Okay, so I got myself into a real squeeze. I installed Windows 10 technical preview for Enterprise on a ...
1
vote
0answers
122 views

Unable to send files over 1 MB via FTP on Windows

I tried to send multiple files via FTP commands using simple batch script. It works fine when the file size is less than 1 MB but when the file is larger than 1 MB I get the following error log. ...
1
vote
0answers
226 views

Setting up SQL Express on Azure VM

I'm trying to set up SQL express on an Azure VM. I already have SSMS 2012 installed but I cannot access .\SQLEXPRESS. This MSDN discussion says: run powershell script "ConfigureSQLExpress.ps1" ...
1
vote
0answers
24 views

“Autoscroll” Pdfs one by one from a “play-list”/directory

Is there a way to achieve this: open multiple .pdf from a "playlist"/given directory one by one in the same window, with auto-scrolling enabled? (Explanation: 1st pdf opens- autoscrolls to the end- ...
1
vote
0answers
40 views

How can I get Emacs to run correctly in a Windows console with codepage 65001 (UTF-8)?

When my codepage is set to 65001 (UTF-8) in a Powershell terminal, emacs -nw displays garbage. When the codepage is set to 437, emacs -nw works. I would like to be able to run emacs -nw (much quicker ...
1
vote
0answers
132 views

Automation of control panel > Wireless Network settings(802.11 modes) through Powershell or any other automated procedures

I want to automate the "Control Panel\Network and Internet\Manage Wireless Networks" page in Windows through Powershell or any other automated procedures, to change my wireless adapter's mode to all ...
1
vote
0answers
449 views

Get-Command missing in Powershell after installing Version 4

Something must have gone wrong by installing dot net framework 4.5 and Powershell 4.0 I tried repair install of framework 4.5 and even deinstallation and reinstallation, but it doesn't help. PS ...