0
votes
0answers
5 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
0answers
17 views

Windows Symlink & Copy

I am trying so desperately hard to map a drive to sharepoint online with little success. (I have tried everything possible to get this working.) Closest I have got is being able to make a shortcut to ...
0
votes
1answer
24 views

PowerShell will not start

I am getting this message when trying to run PowerShell Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell. I have tried repairing ...
1
vote
1answer
22 views

Open Powershell in ConEmu from context window

I would like to open Powershell inside ConEmu from Windows Explorer's context menu so that it contains the same directory as Windows Explorer. I know about the "Integration" settings, but I cannot ...
0
votes
1answer
19 views

How do I install the PowerShell Community Extensions (PSCX)

I'm on Windows 8.1, and fairly new to Windows-side development. I've had PSCX suggested to me, but for the life of me, I can't figure out how to install PSCX 3.1 on Windows 8.1 and make the cmdlets ...
2
votes
3answers
164 views

Which Powershell Function could check whether a certain port is in LISTENING state on localhost?

Introduction Aim: to check whether a port is in LISTENING state on localhost by using a PowerShell function The following command: New-Object Net.Sockets.TcpClient.Connect("127.0.0.1",10389) ...
0
votes
1answer
31 views

How to check whether a specific service exists using Powershell?

Introduction According to this documentation it is possible to check which services have been stopped on Windows by executing the following command: Get-Service | Where-Object {$_.status -eq ...
-1
votes
0answers
39 views

slow computer performance on windows power shell and command prompt

I have a window and I've been using it for 1 year now, starting 6 months ago, I had frequently started to feel laggy in running command prompt/power shell I have installed many software on this ...
1
vote
5answers
124 views

How can I both pipe and display output in Windows' command line?

I have a process I need to run within a batch file. This process produces some output. I need to both display this output to the screen and send (pipe) it to another program. The bash method uses ...
0
votes
1answer
111 views

How to calculate the StartTime / UntilTime parameter using Get-Printer in Powershell?

I have an printer setup using the GUI and set the printer availabilty from 18:40 until 3:00 As well i got the PS command "Get-Printer Printer1 | format-list" The result of the command puts out: ...
0
votes
1answer
55 views

Create and configure a Windows taskbar toolbar via a script

When I right-click a Windows taskbar toolbar, I can toggle some options such as Show Text, Show Title and Lock the Taskbar. I can also reorder the icons on the toolbar and set it's position. How can ...
0
votes
1answer
51 views

Modify a scheduled task with PowerShell

How can I modify the action step in a scheduled task? We have hundreds of scheduled tasks that point to a particular path and run a PowerShell script. How can we find those tasks and then change the ...
2
votes
1answer
72 views

Powershell LastWriteTime is incorrect

I am running the following script to create directories based on the first 9 characters in the filenames in the directory and then moving te files into these directories based on their filenames. dir ...
0
votes
1answer
58 views

Regexp based editing of content in large CSV files [duplicate]

I wanted to remove certain pattern of contents based on a regex from csv file which is very large in size containing 100,000+ records, how is it possible via windows commandline? I also have sed and ...
0
votes
2answers
59 views

move-item or copy-item then remove-item

I have a list of files that I want to move from one folder to another location and retain the folder structure in the new location for example I have the following files 1.txt 2.txt 3.txt located as ...
1
vote
1answer
92 views

Is there anyway to see when a Windows firewall rule was created/enabled using PowerShell v2 or CMD?

I have been poking around the interwebs but I cannot seem to find a definitive answer to this question. I am forced to work with PowerShell v2. I know that using the following command will give me a ...
2
votes
1answer
55 views

Use PowerShell to interpret registry values

Consider the following key, as an example HKEY_CLASSES_ROOT\txtfile\shell\open\command and its (Default) value %SystemRoot%\system32\NOTEPAD.EXE %1 This value determines what will happen when ...
0
votes
1answer
84 views

Windows Explorer Does Not Include Hidden Files' Size When Calculating Folder Size

It seems Windows Explorer does not include the sizes of "hidden" files when calculating the parent folder size, even when I check "Show hidden files, folders, and drives" in the "Folder and Search ...
5
votes
3answers
2k views

Delete all Files from Folder and Sub Folders

I'm wanting to remove all files from a folder structure so I'm left with an empty folder structure. Can this be achieved in either Batch or VBS scripting? I have tried a very basic batch command but ...
0
votes
0answers
25 views

Best way to deploy Powershell 4.0 on Windows 7 sp1 and server 2008

I am planning to deploy powershell 4.0 on all Win 7 and server 2008 and 2008R2. I did some research about this, but couldn't find the official way to do it. I can just use batch file or GPO to ...
1
vote
1answer
99 views

Need to create a robocopy in Powershell 1.0

My ultimate goal is to mirror a folder and its subdirectories with the restriction of only copying files with the extensions, sln, vcxproj, cs, cpp, hpp, c, and h. There are far too many subfolders ...
0
votes
0answers
87 views

Schedule Task through Windows PowerShell

Since the action "Display a message" on Task Scheduler on Win 8 is 'deprecated', thought of creating it through PowerShell, but can't get it to work, any idea where the problem is: $A = ...
0
votes
1answer
48 views

How can I execute WinRAR serially against each archive in a folder?

I have about 100 large RAR files in the same folder, and I'm trying to delete a particular filespec from within each archive. I'm using PowerShell 2.0 on Windows Storage Server 2008 R2. I'm by no ...
0
votes
1answer
47 views

Run script from powershell in the same window

I have installed PHP and PHPUnit in my PC. Both of these files are in same directory and I have added to enviroment variable path. I have also associate .phar extension to run with php.exe ...
0
votes
1answer
1k views

pip is not recognized as an internal or external command

I have installed pip and distribute, and no errors came up. But when I enter pip into the cmd or windows powershell, it gives me an error. However, when I import pip into python, no errors come up. I ...
1
vote
0answers
40 views

How can I make cygwin commands a priority over built in windows commands?

If I run ls in powershell the windows built in ls function is run. how can I make cygwin ls run instead? I've tried moving cygwin/bin to top begin system path variable, but that didn't work. is ...
0
votes
0answers
272 views

How to copy file names matching a pattern in powershell

I am new to powershell. I need to copy the whole folder structure from source to destination with filenames matching a pattern. I am doing the following. But it just copies the content in the root ...
0
votes
1answer
63 views

Is there a way to find out if a Windows 7 workstation has updates turned off in the control panel?

I have a domain with a group policy to run updates every night at 3AM. If the computer is turned off, the next time a user logs into the computer, the updates are downloaded. When the users shuts ...
1
vote
2answers
2k views

Using the Windows 8.1 command prompt to view Windows activation key

I am not able to access my control panel, probably due to some corrupt system files. And to request help from Microsoft, I need to give them my Windows 8.1 product key. So is there any way I can ...
0
votes
1answer
139 views

Set proxy settings and proxy authentication

I've asked this question on StackOverflow but it's not getting lots of attention, I thought it would be better to port it here: I'm new to PowerShell, and I'm tired of changing proxy settings and ...
0
votes
0answers
28 views

Shell hangs after passing STDIN to EDITOR with -w parameter

I want to edit svn's svn:ignore property: svn propedit svn:ignore . This doesn't work: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time ...
1
vote
1answer
60 views

Powershell script with multiple msiexec calls [closed]

I am having problem with multiple msiexec calls in my PS Script msiexec /package $msi1 /l*v $logfolder\log1.log /qn msiexec /x $msi2 /l*v $logfolder\log2.log /qn msiexec /i $msi3 /l*v ...
1
vote
2answers
160 views

why cant we maximize the command prompt but whereas we can run the powershell maximised

According to this answer windows command prompt cant be maximized, but what makes the windows to view maximizing through powershell, what does the difference while maximizing in windows powershell and ...
2
votes
2answers
296 views

Windows Task scheduler Winlogon events - logout not enough(?)

I created a powershell script that I want to run on every logout / restart / shut down. For trigger I set a custom event: Log: System, Source: Winlogon, Event ID: 7002. I found the above event id ...
0
votes
0answers
50 views

Need a PowerShell analog to the following command

I Need to repeat the following shell command on a windows server 2012 that uses powershell. Found that start command was nearly the same but I need it to be powershell like. The command (it runs in ...
0
votes
1answer
105 views

Robocopy: copy files preserving folder structure but adding a subfolder

I need to copy a folder which contains subfolders with files to a shared folder on another machine. During that the script should create a custom sub folder in each destination folder and place files ...
1
vote
1answer
78 views

Grep analog in Powershell

I'm trying to make a port for a project from linux to MS Server. The problem is that there is grep command with special options grep -c string and grep -e which I need to convert. Found that similar ...
2
votes
2answers
147 views

Have Windows (or PowerShell) Log Everything I do in a Command Line?

Is it possible to have windows log every command I type & the output I see on the console? Sometimes I find that I want to see what I did 2 hours ago just to be sure I typed a certain parameter ...
0
votes
1answer
99 views

Is there a limit to the number of IP addresses for a Windows Firewall rule's Scope?

I've got a Powershell script that adds IP addresses trying to run brute force attacks on my server to a firewall rule that blocks them from accessing it. Recently it stopped working, and started ...
1
vote
2answers
99 views

Batch file for starting powershell in a specific directory

I am learning to program in python through the book "Learn python the hard way". Therefore I use powershell to run my programs. Since I had to manually change the directory every-time I started ...
4
votes
1answer
122 views

Why does running PowerShell change my console font?

I have a strange problem on my laptop - when I run Powershell within an existing console window, the font choice for the window changes. For example, this is cmd.exe immediately after opening the ...
0
votes
0answers
60 views

Powershell not exiting when called from Orchestrator

I'm trying to run a powershell script from orchestrator. The script works fine from my interactive prompt but when run from a orchestrator runbook it never exits and the overall runbook appears to be ...
0
votes
1answer
106 views

Replace a variable with its value inside powershell command prompt

In Windows PowerShell, is there a way to "evaluate" a variable so that I have its value pasted into the command prompt? The usage scenario I would like to perform is as follows: let's say I have a ...
3
votes
1answer
330 views

Powershell scripts works manually but not as a scheduled task

I have a powershell script that converts .doc to .pdf files. When I execute it manually, it works perfectly on my windows server 2012. When I execute it as a scheduled task, opens an instance of ...
0
votes
2answers
87 views

Concrete cases for CMD/BATCH use [closed]

Please excuse my inexpertise. I don't have much experience with the command line. From my searches, the main reason for CMD use(*) is automation. I haven't, though, found concrete cases. Most ...
0
votes
1answer
189 views

Powershell won't start, fails with 'Value cannot be null. Parameter name input'

I have a brand new install of Windows 8.1 with Visual Studio. Running Powershell opens a window that closes immediately. Launching powershell from cmd.exe, I get the following error: Windows ...
1
vote
0answers
66 views

How to pipe a group of files through a .exe using powershell?

I am currently using a .exe named "vbadecompiler.exe" to process a group o ".xlsm" files. Those are to many to process manually therefore Powershell seems like the answer. My current attempt is the ...
1
vote
1answer
494 views

Can logon script be assigned to a user in a windows machine which is not a part of domain through powershell?

This is the suggested way to add a logon script to a local user in Windows. http://technet.microsoft.com/en-us/library/cc770908.aspx Edited: I also found the following : ...
0
votes
0answers
35 views

HomeDirectory is not getting created through powershell scripts

I tried the following to create a user and assign a home directory to the user. $comp = [ADSI]'WinNT://localhost,computer'; $user = $comp.Create('User', 'account14'); $user.SetPassword('Welcome1$'); ...
4
votes
1answer
943 views

Windows Backup Using Powershell

I wrote the following Powershell Script to perform a one time backup of my Windows Server 2008 R2 machine. The idea is to perform a Weekly backup to a different external drive and schedule the script ...