Tagged Questions

Description of Windows PowerShell 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. The ...

learn more… | top users | synonyms

1
vote
1answer
33 views

How can I copy a file on a network share using a different login with powershell or batch file?

I have a file in a shared location that I want to copy over to my local harddrive. However I will not be running as a user that has access to the share. So I want to be able to authenticate under a ...
0
votes
2answers
51 views

xcopy files created this month in PowerShell

I wrote this code to copy files, what I need is a way to make it copy just the files created this month or created last 31 days? $a = "L:\EndMonths\" $a +=get-date -format MMMM xcopy "L:\28*.zip" $a ...
1
vote
1answer
56 views

Office365 Exchange: Cannot open shared two calendars in Outlook

The problem: Outlook won't open the calendars on another user's mailbox and and a room mailbox, even when users have permission. Note: This problem is affecting more than one account on more than one ...
2
votes
2answers
70 views

Powershell Access to the path denied

I'm sure this has been asked a million times, but I can't figure out why I can't run this simple command in powershell: PS> new-item -path c:\users\me\desktop\testfolder -name (get-date).txt ...
1
vote
1answer
50 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 ...
4
votes
3answers
102 views

How do I set a environment variable from a powershell command?

I want to have a environment variable that contains the day of week in cmd.exe. When I run this command I get the result I want. C:\Users\tisc>powershell (get-date).dayofweek Friday Here I'm ...
0
votes
0answers
39 views

Number of commands for a shell vs. how powerful a shell is [closed]

So I just started my operating systems class at my university, and my professor said something that interested me, something that I'm not sure if I agree with. He was introducing the various shells ...
0
votes
0answers
38 views

Scripted Access (powershell) to Google Apps Data, other scripts OK, but must run on Win7 without installing anything “extra”

Is there a way to get powershell scripting access to the data stored in a Google Apps account? I've been poking through their API documentation and it looks like way over-kill for my needs. What I'd ...
0
votes
0answers
30 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 ...
-2
votes
0answers
38 views

Get all the machines in a SharePoint farm [closed]

I'm writing a really big script that will get a lot of info from my farm. I'd like to make it work dynamically, so I would need to: Get all the database servers in the SharePoint farm Get all the ...
1
vote
1answer
66 views

How to create a shortcut on the desktop with PowerShell

I have been referring to answer number three of this post to write my PowerShell script, but it doesn't appear to be working. $linkPath = Join-Path ([Environment]::GetFolderPath("Desktop")) ...
3
votes
1answer
44 views

How can I get a property of an object in powershell without using parentheses?

I often find that I have to surround a command in parentheses and then use the property access to operator (dot-syntax) to get the value of a property. This is rather annoying since I have to go back ...
1
vote
2answers
100 views

In Windows, is there a way to launch a local .exe remotely and have the .exe launch into the logged in session?

I've written a .bat file to launch an .exe file. start chrome.exe I'm invoking that .bat file from a remote machine using psexec (pstools) psexec 10.60.103.10 -u admin -p pizza1234 ...
3
votes
2answers
121 views

Is PowerShell a complete replacement for console/cmd?

Right now I'm using the Windows console (cmd.exe) for some easy tasks (as checking my ip configuration or running some applications). But now I heard that there is PowerShell which actually is way ...
1
vote
2answers
80 views

Replacement for edit.exe in 64-bit Windows cmd/powershell

Is there a replacement for the in window editor of 16/32 bit versions of windows? Would be nice to have, though of course there are many workarounds to this problem.
2
votes
2answers
129 views

Delete multiple files on PowerShell command line

With PowerShell, what is the most concise way to delete multiple explicitly named files? E.g. on *ix it would be: rm subDir/a.png anotherDir/b.jpg thirdDir/c.gif I'm currently using: echo ...
-1
votes
2answers
141 views

How do I create a wake up script using PowerShell? [closed]

Possible Duplicate: Alarm clock software that can turn the computer on? I need something that can wake someone up in the morning - basically like a cron event in Linux. I think this needs ...
0
votes
1answer
68 views

Powershell XML precessing very slow

I have a couple (20) of svg-fonts (xml based font format), on average each one of them is about 300kb and contains about 100 Glyph-tags. I would like to process each glyph with Inkscape. So the part ...
1
vote
1answer
55 views

Script to assign and remove arbitrary secondary IPs to an interface

I'm trying to figure out how to write a script that will let me arbitrarily assign and remove a secondary IP address to a system. I'm most comfortable with batch scripting, so I'd rather focus on ...
3
votes
2answers
65 views

PowerShell File Count Behaviour

I'm new to PowerShell and have a question on the following behaviour. I'm trying to count the number of files in a directory of a certain type. If there are some, I will then copy them elsewhere. ...
1
vote
1answer
169 views

How to change theme in Windows 7 with Powershell script?

I would like to have a script that would change the current theme of Windows 7. I found the registry entry where this stored, but I apparently need to take some further action to get windows to load ...
0
votes
4answers
89 views

How do I do a find-replace on a windows batch file string?

I want to change a variable from some\original\path to some\replaced\path by doing a find-replace and changing the "original" part in the path. set x=some\original\path set y= ???? (y is now ...
1
vote
1answer
120 views

Powershell execute SFTP command

I want to make a call to mintty.exe (OpenSSH/SFTP from CygWin) via Powershell. How can be done most effectively ?
5
votes
3answers
430 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 alternatives to wget? I need wget to simply ...
1
vote
1answer
62 views

Default Encoding in Windows PowerShell 2 on Win7?

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
98 views

Running logon scripts with the standard user access token?

I have a powershell script which executes after I logon to my account. This is done by a group policy logon script. Because I am in the Administrator group this script is run with elevated rights ...
1
vote
1answer
62 views

Runing PowerShell in Metasploit's Meterpreter?

I'm running this command in meterpreter: execute -H -c -i -f powershell.exe This is the output: Process 2716 created. Channel 3 created. Windows PowerShell Copyright (C) 2009 Microsoft ...
0
votes
0answers
105 views

OpenSSH and remote invocation (using Powershell?)

Before I ask the questions, I have to provide some context information... I have a SSIS server which invokes a SSIS package. The SSIS package copies a file to a file server. After the copy action, ...
1
vote
2answers
86 views

What is the correct syntax to exclude a folder's contents but not the folder itself

I have a powershell script that copies files from $source to $dest and it excludes some files types. It excludes my csv files and web.config files fine, but it won't exclude the Log folder contents. ...
1
vote
2answers
135 views

How do you install .net4 on a Server 2008 r2 machine through psremoting in powershell?

I need to write a script that installs .net 4 remotely using powershell to a group of Server 2008 R2 machines. I based my script off of ...
-1
votes
7answers
154 views

Official PowerShell documentation? [closed]

Something official or a de facto reference Something that gives Method Syntax examples, ie this but for PowerShell Some semi relevant links ss64.com/ps/write-host.html ...
0
votes
0answers
62 views

Writing xml with powershell

i have a script that get all the info i need about my SharePoint farm : [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null $farm = ...
4
votes
1answer
215 views

How do I make PowerShell run as administrator start in my home directory?

Whenever I run PowerShell as administrator, it starts in C:\WINDOWS\system32\WindowsPowerShell\v1.0. How do I make it start in my user's home directory instead? My $HOME has the expected value, i.e., ...
1
vote
1answer
52 views

How to make PowerShell Alias to execute a file?

I want to have this: Set-Alias pr php \.fileToExecute So that it runs the file in PHP (depending on where I am located when I execute pr).
0
votes
1answer
126 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
131 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
46 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 ...
1
vote
3answers
117 views

What is the simple method to set PowerShell default font to Consolas?

To make it clear, i would like to have Consolas font set as default for that, no matter how, when I launch PowerShell, it is the font used to display console text. I've found very few explanations ...
3
votes
2answers
452 views

PowerShell equivalent of curl

Is there an equivalent of curl in PowerShell? Does it have some similar built-in capability or is there a 3rd party cmdlet?
0
votes
1answer
80 views

PowerShell looks like Windows command prompt (cmd)?

I just reinstalled Windows 7, but for some reason the default PowerShell looks like the "cmd.exe" program instead of its usual blue awesomeness. Anyone know how to fix this? Any way other than ...
2
votes
2answers
190 views

How can I run PowerShell scripts from VirtualBox shared folders when using remote signed execution policy?

I'm using VirtualBox with a shared folder mapped to drive E:. I want to run a PowerShell script from drive E:. I set: Set-ExecutionPolicy Remotesigned I added file://vboxserver using the advanced ...
1
vote
2answers
248 views

Querying against Active Directory

I'm the "script guy" at my work, which is a blessing and a curse... I've been tasked with generating a script of: Can you create a script to pull all users that have a proxy address that is not ...
1
vote
1answer
100 views

How do I add custom entries to PowerShell's jump list?

In Windows 7, when you pin an application to the taskbar, you can right-click on it to display a "jump list". For example, Windows Media Player displays your recent playlists and some common tasks. ...
2
votes
1answer
48 views

Two sets of colors/properties in powershell/cmd?

I am witnessing strange behavior of PowerShell. Namely when I am running it from Start menu I am getting image on the left, but if I run it from the Run menu (Win + R) I get the image on the right: ...
0
votes
1answer
42 views

How do I launch emacs in terminal mode within Powershell?

When I do the obvious thing in Powershell: Start-Process "C:\bin\emacs-23.3\bin\emacs.exe" -ArgumentList "-nw" Then emacs loads a new "cmd.exe" terminal, within which it is in terminal mode, ...
0
votes
1answer
43 views

Hide menu bar Powershell ISE

Is there a way to hide the menu bar of Powershell ISE?
0
votes
0answers
66 views

How do I enable Powershell remoting on Windows XP Home

I've installed Powershell 2, and the WinRM service on my Windows XP Machine. I've then followed the instructions here. As I recall the first time I tried Enable-PSRemoting, it ran through just fine. ...
2
votes
4answers
213 views

Remote Powershell Execution on a machine without Powershell?

My computer is Windows 7 and has Powershell running, I'd like to execute commands to pull back information (specifically netstat) from a bunch of other machines (Windows XP) that do not have ...
0
votes
0answers
110 views

Elevate privileges in command line temporarily [closed]

Possible Duplicate: Is there any 'sudo' command for Windows? I was wondering if someone can shed some light on this. Say I'm doing stuff in a normal (not admin) command shell, and I ...
0
votes
1answer
59 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 ...

1 2 3 4 5