Microsoft’s command-line scripting language. V 3.0, which was introduced in Windows 8 and Server 2012, supports code autocompletion (IntelliSense). Remote sessions are more reliable, and there is a bigger selection of cmdlets and built-in functions.

learn more… | top users | synonyms

0
votes
1answer
46 views

Create a new VPN connection via Powershell

I have to create an application with PowerShell that creates a new VPN connection (adapter) to a given host, with given settings (credentials, etc...). The computers will be running Windows 7. I ...
1
vote
0answers
31 views

Does powershell use CLR?

I know that powershell was built on top of .net. So does that mean it uses CLR? If yes, does that mean CLR works as an interpreter, converting directly from *.ps1 into machine code?
1
vote
2answers
25 views

Select-Object For AD Groups Only

I'm trying to setup a script to find all permission information of file shares on our network. At the moment I have a Powershell script that does this, but it includes groups, users, SID account, ...
1
vote
1answer
79 views

Is it possible to install PowerShell 3 on a Windows Server 2003 or 2003 R2?

On a Windows Server 2003 rig (which already has .NET 4 but no 4.5 on it) that is to be expired before the end of the year, I'd like to run a few PowerShell 3 scripts on a scheduled base as the scripts ...
0
votes
1answer
127 views

Simple batch file fails on Windows Server 2012

On a Windows 2012 Server, from a logged-in Administrator (local and domain), created a batch file "test.bat" by redirecting console input into a file: echo Hello When run from PowerShell cmd prompt ...
0
votes
1answer
71 views

PowerShell Get ACL For Folders In A Text File

I have a text file with the exact paths of the folders that I want to get permission information from, and I am trying to use PowerShell to get the information from each folder. I want to add the ...
0
votes
1answer
28 views

Powershell Get File Shares Into Array

I am trying to get a list of folders shared on a file server, and put them into an array. This is the code I have at the moment: $FileServer = "ServerName" [array]$FileServerShares = gwmi ...
0
votes
2answers
63 views

PowerShell Get List Of Folders Shared

I am trying to get a list of folders that are shared on a file share. At the moment I have 2 test folders: \\MYPC\Test1 \\MYPC\Test2 This is the code I have at the moment: $FileServer = Read-Host ...
0
votes
1answer
46 views

Get-ChildItem Returns No Files Through Remoting but Works Correctly When Logged In Interactively on Remote System

I have just started working with the remoting features of PowerShell 3.0. My current problem is that I can log in to remote machine "secondmachine" and execute the command gci ...
1
vote
0answers
163 views

Changing current culture

I need to change the current culture for a script and nothing I tried works. I've tried using the Set-Culture cmdlet. I've trued setting [System.Threading.Thread]::CurrentThread.CurrentCulture. Is ...
0
votes
2answers
26 views

Recall PowerShell command for edit

I know about the Invoke-History command (alias r) to recall and execute a previous command, e.g. r 29 but is there a way to recall command 29 but not execute it, i.e. put it into the current line you ...
1
vote
2answers
430 views

How to run a PowerShell script from a console window when there is Å, Ä or Ö in the search path?

When I right click on a script.ps1 file and select "Run with PowerShell", a PS console window comes up, and my script can't run for some reason. So I get an error, but I can't actually read the ...
1
vote
1answer
146 views

Unable to SSH to my virtual machine via Windows Power Shell ISE

I have a Linux VM guest running in my vmWare host that I want to access using Windows PowerShell ISE. I normally can SSH to my VM, but I cannot with Windows PowerShell ISE. When I try to do SSH to my ...
1
vote
1answer
1k views

get-vm - wasn't recognized as name of cmdlet

We are trying to write a powershell script to start/stop our vm's, but the get-vm command isn't working. The error message is get-vm: the term 'get-vm' is not recognized as the name of a cmdlet, ...
0
votes
2answers
94 views

Why does running Powershell script line by line work, but the same thru executing script file - does not?

In Windows 7 Prof, executing in Windows Powershell_ISE (as administrator) the Powershell (ver. 3) commands produces expected result (of adding a domain user to local/machine Administrators group) but ...
0
votes
1answer
234 views

Powershell Script to Return Directories Without a Zip File Created/Modified Within the Last 7 Days

I have a series of folders on a server that needs to be regularly checked that they are being backed up correctly. We like to have at least 1 backup in that folder that is no less than 7 days old. The ...
0
votes
0answers
122 views

Remotely start VLC w/Salt Stack

Using Salt Stack, how does one remotely start a Windows program on the console screen? In other words, from my Salt Master (CentOS based), I want to push this sort of command to Windows 7 (with Salt ...
2
votes
1answer
326 views

How to lock Powershell ISE console output scroll?

I'm using Powershell ISE for running some batch scripts. The outputs will be long and these programs will run for quite a some time. The problem I'm facing is I'm unable to lock the console output to ...
3
votes
1answer
43 views

Installing Windows patch from command line gives BSOD but fine if double clicked?

I'm trying to programatically install some Windows updates that were manually downloaded. If I double click the .exe and run through the install manually - everything works fine. If I, however, use ...
0
votes
2answers
3k views

How to Enable Data Deduplication in Windows 8.1 client

How can i enable Data Deduplication in Windows 8.1 x64 client. http://weikingteh.wordpress.com/2013/01/15/how-to-enable-data-deduplication-in-windows-8/ The above link discusses the same for a ...
3
votes
1answer
718 views

Is there a way to disable script echoing in the PowerShell ISE?

Whenever I want to test execution of my script in the PowerShell ISE, the entire script gets echoed to the console before it executes. Then, any actual output from the script gets written starting on ...
0
votes
1answer
733 views

Can't change Powershell ExecutionPolicy of User Account

Typing Get-ExecutionPolicy in PowerShell as Administrator returns Restricted, but when I run Powershell as User Account and type Get-ExecutionPolicy it returns Unrestricted. Why is that ? I thougt ...
0
votes
1answer
318 views

Running a powershell script at startup

I am writing a script to remove a computer from the domain, rename it, then add it back. It works fine when I set the trigger to AtLogOn but when I switch to AtStartUp I run into some issues. I get ...
4
votes
2answers
3k views

Remote powershell permissions restricted to machine

I am unable to execute powershell scripts on a remote server, but only on my current machine - please help. Running the following script to give a list of a temp directory on the remote server works ...
0
votes
0answers
26 views

Powershell Text numerical manipulation

Good Evening, I have been playing around with this for a while, I'm also somewhat new to Powershell, so a solid explanation would be appreciated. I have to scrub text files for bad data which is ...
2
votes
1answer
235 views

Why is the Windows Features window showing PowerShell 2.0 installed?

I'm running a Windows 8 machine. The "Windows Features" window tells my that I'm using PowerShell 2, but the PowerShell environment itself says otherwise, see screenshot below. Why is the Windows ...
0
votes
0answers
114 views

Tail for Powershell v3?

I'm running the following command in my powershell terminal: Get-Content C:\wamp\bin\apache\apache2.2.22\logs\lysol-dbau.access.log -Tail 10 -Wait So I want to start with the last 10 lines of the ...
0
votes
4answers
4k views

Can't install Powershell 3.0

Im trying to install powershell 3.0 on my Win7 64 bit pc, but I get the error "the update is not applicable to your computer." After googling the error, all the solutions I see are that you need to ...
4
votes
3answers
2k views

Upgrading Windows 7's PowerShell v3, to Windows 8's PowerShell v3

I have becoming increasingly aware that Windows 7's PowerShell v3 lacks cmdlets / functions and modules found in Windows 8's version of PowerShell 3. My question: Is there anyway of 'upgrading' ...
0
votes
1answer
324 views

Powershell, Task Scheduler or loop and sleep

I have a job that needs to go off every minute or so, it loads a DLL i have written in C# that retrieves state for an SQL Server Mirror (Primary, Mirror and witness) for a number of databases; it ...
2
votes
1answer
323 views

How do you install the NETTCPIP from Powershell 3.0 in Windows 7.0

How do you install the new NETTCPIP from PowerShell 3.0 in Windows 7.0? I've double checked what I've got installed with $host.version and it's showing as 3.0, so why aren't the new NET TCP/IP ...
25
votes
8answers
14k views

Equivalent of Linux `touch` to create an empty file with PowerShell?

In PowerShell is there an equivalent of touch? For instance in Linux I can create a new empty file by invoking: touch filename On Windows this is pretty ackward -- usually I just open a new ...
82
votes
6answers
55k views

Native alternative to wget in Windows PowerShell?

I know I can download and install the aformentioned library (wget for Windows), but my question is this: In Windows PowerShell, is there a native alternative to wget? I need wget simply to retrieve ...