PowerShell is Microsoft's new scripting language in 2006, and significantly upgraded in 2009. It allows interpreted scripts based on PowerShell cmdlets and .NET primitives.
63
votes
7answers
57k views
How to zip/unzip files in Powershell?
Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?
37
votes
22answers
12k views
PowerShell? Do you use it? Can you show me some cool system administration things I can do with it?
I keep reading everywhere that PowerShell is the way of the future. When it was first released I did a whole bunch of virtual labs, but since then I still haven't used it in a production environment. ...
24
votes
8answers
19k views
How do I diff two text files in Windows Powershell?
I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't ...
24
votes
7answers
25k views
SSH via PowerShell
Is it possible to open an SSH session in PowerShell? Currently I use PuTTY but it would be nice if that were not required.
19
votes
8answers
2k views
PowerShell Quickstart [closed]
What is the best way you jump-started your Powershell adoption?
What resources, tips, scenarios got you up to speed quickly?
18
votes
14answers
3k views
What are some good resources for learning PowerShell scripting? [closed]
Are there online resources or books that you would recommend as an introduction to PowerShell scripting? The resources I've found primarily focus on interactive use.
16
votes
13answers
2k views
What's your favorite Powershell command or script for system administration? [closed]
What's your top Powershell command? Let's make a list and vote up the best ones!
15
votes
4answers
50k views
How to create Active Directory user account with powershell
I am constantly setting up research and development environments that require active directory accounts. Since we place these environments in isloated networks each environment needs its own active ...
15
votes
3answers
930 views
Why does Powershell take so long to init?
When I fire up powershell it takes ~10-15 seconds to init and give me a prompt. Anyone know what it's doing when you first fire it up that might contribute to that? This is XP Pro, 2 GB of memory, ...
14
votes
8answers
4k views
Method to integrate Powershell scripts with non-Windows workflow?
I love the smell of new machines in the morning.
I'm automating a machine creation workflow that involves several separate systems across my infrastructure, some of which involve 15 year old perl ...
13
votes
3answers
2k views
PowerShell Script to find AD users with adminCount > 0
I've recently discovered the "adminSDHolder" feature of Active Directory. I need a quick way to identify all users who will be affected by it, namely a script to dump the user accounts.
12
votes
3answers
15k views
How to set ExecutionPolicy: access to registry key denied
I'm running Windows Server 2008 as admin and I tried to set ExecutionPolicy as Remotesigned for PowerShell v2 like this:
Set-ExecutionPolicy RemoteSigned
But I got this error:
Set-ExecutionPolicy ...
11
votes
2answers
200 views
What is the industry standard method for administering the change of the local administrator password for all machines on a domain?
Although there appears to be three available options, one of which is actually secure, there seems to be only two available choices that will be able to impact machines that are not powered on at the ...
10
votes
5answers
24k views
Need to add a “Wait” command to a Powershell script
Here is my current code:
Write-output “ENTER THE FOLLOWING DETAILS - When Creating Multiple New Accounts Go to EMC hit F5(refresh) and make sure previous new account is listed before ...
10
votes
6answers
16k views
How to get robocopy running in powershell?
I'm trying to use robocopy inside powershell to mirror some directories on my home machines. Here's my script:
param ($configFile)
$config = Import-Csv $configFile
$what = "/COPYALL /B /SEC/ /MIR"
...