Tagged Questions
0
votes
1answer
42 views
How to remap shortcut in Powershell
I want to remap the shortcut in powershell, for example, I'd like to use Ctrl + a to make cursor at beginning of line, Ctrl + e to make cursor at the end of line, etc.
I searched the method in Google ...
1
vote
1answer
52 views
PowerShell touch all files newer than
I have found the following question on ServerFault:
Windows recursive touch command
Which partially answers my question with this answer:
Windows recursive touch command
However, I would like to ...
2
votes
1answer
374 views
Powershell Select-String to remove a string line from a variable if matched
I am trying to do the following:
Look for a file in a folder which has been modified in the past 24 hours
Find a specific section of the file
Remove lines from the section matching specific ...
0
votes
1answer
195 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 ...
8
votes
3answers
2k views
Show human-readable file sizes in the default PowerShell ls command
How can I modify the default ls (Get-ChildItem) in PowerShell so that it displays human-readable file sizes, like ls -h on a *nix machine?
ls -lh does simple logic with the file size, so that it ...
1
vote
1answer
680 views
How can I sort objects by third column in Powershell?
I've a text file like this:
4108689096 2531 ./ssss/132432.odt
481446057 2293 ./abc/a.txt
3157353085 1096 ./dsjvbjf/c.docx
653380669 1824 ./bcd/x.avi
And I'd like to achieve in Powershell to sort ...
0
votes
2answers
325 views
can I get powershell to properly copy multiline text like Bash in Ubuntu does?
I use an Ubuntu VM at home for Rails development and I've gotten a bit spoiled by Bash. When I copy multiline text from Bash, it seems like it's pretty good about knowing that text is single line or ...
3
votes
1answer
724 views
How to start a Windows XP Virtual PC application using Powershell from Windows 7?
This is a shortcut target of an application I launch from Windows 7 that starts a program in Windows XP Mode.
%SystemRoot%\system32\rundll32.exe ...
51
votes
3answers
23k 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 ...
1
vote
1answer
443 views
Default Encoding in Windows PowerShell 2?
What is the default encoding (charset) used by PowerShell?
I have figured out it is not UTF-8, but how can I know what encoding is used then instead?
Thanks!
2
votes
1answer
2k views
Running msiexec with PowerShell
I'm try to run msiexec in PowerShell but I keep getting an error message. If I run it from cmd then it's all fine.
Can someone please let me know how I can run this command in PowerShell?
This is ...
5
votes
2answers
2k views
Powershell: Get inital character string from file name and create directory from string, then move files
I have a folder with the following file names:
00150005D201110172338427995.vpf
00150005D201110180005318058.vpf
00150013D201110180014448082.vpf
00150013D201110180022268098.vpf
...
3
votes
2answers
70 views
Any quick way to call a directory using an environment variable in Powershell
Say I have a user environment variable named p and it's value is the path where I store my projects.
In Command Prompt you can use them to quickly access a particular directory from anywhere on the ...
0
votes
1answer
193 views
Get-Clusternode error
I've just started in the world of Powershell and I'm writing a simple script to put hosts in maintenance mode, apply patches, reboot, then put back into server. I decided to use the failover ...
2
votes
1answer
887 views
problem powershell cant access to a network share
I use PowerShell to check if any ports are open on my computers. I have eight Windows Server 2008 R2 machines and run the following script:
$localhost = get-content env:computername
foreach($port in ...
7
votes
3answers
5k views
Where can I download Powershell 2.0 for Windows 7?
I have spent the better part of a day hunting the Internet looking forr a way to download Powershell 2.0 to my already Win7 environment. Windows 7 is supposed to come with PS 2.0 however - I have 1.0. ...
6
votes
4answers
5k views
Is Windows PowerShell 2.0 installed by default on Windows 7?
http://msdn.microsoft.com/en-us/library/ff637750.aspx claims
Windows PowerShell 2.0 needs to be installed on Windows Server 2008 and Windows Vista only. It is already installed on Windows Server ...
2
votes
2answers
2k views
Using powershell call native command-line app and capture STDERR
I'm using a port of a cygwin tool on Windows which writes normal status messages to STRERR. This produces ugly output when run from PowerShell:
PS> dos2unix.exe -n StartApp.sh StartApp_fixed.sh
...
5
votes
1answer
3k views
WinRM - what it is and how to use it?
During installing updates I noticed 'PowerShell 2.0 and WinRM' update. Upon reading some Microsoft & Wikipedia pages I read that it is remote management system that runs on SOAP and that it is ...
0
votes
2answers
459 views
Windows PowerShell ISE doesn't import PSCX 2.0 module
i am using Powershell 2.0 with the PSCX 2.0 module.
When writing PS scripts inside Windows PowerShell ISE no Cmdlets from the PSCX module are availible. For example running "Get-DriveInfo" from ...
3
votes
2answers
2k views
Where is Powershell 2.0?
I just uninstalled Powershell 1.0 and installed Powershell 2.0. Where are the Start Menu shortcuts?
