An interactive shell, scripting and programming language, and surrounding environment from Microsoft. Commonly used by system administrators managing Microsoft software (including Windows, Exchange, SharePoint, and cloud services Azure and Office 365), PowerShell is included by default with Windows, ...

learn more… | top users | synonyms (1)

1
vote
3answers
6k views

How to set or clear “Manager can update membership list” using PowerShell

For distribution group, I can set parameter Manager can update membership list using the ADUC mmc, but I can't find how to do it using PowerShell. Moreover, even is Manager can update membership list ...
2
votes
2answers
1k views

Powershell script to pull users from an ad group and create folder with permissions

I saw a question that was similar however the answer they got was in vbscript. (http://serverfault.com/questions/33861/powershell-command-prompt-create-folders-from-ad-group-members) I need to create ...
1
vote
1answer
2k views

Free/busy information from powershell?

Are there any powershell commandlets for reading free/busy information in exchange 2007/2010? I have been unable to find any.
1
vote
2answers
3k views

Using Export-Mailbox without including subfolders

I want to delete a certain group of messages from somebody's mailbox. I already have the basic Powershell command ready to go: Get-Mailbox -Identity jshmoe | Export-Mailbox -SubjectKeywords ...
1
vote
2answers
2k views

PowerShell: Copy all AD users of an OU to another OU

I'm trying to copy all users of OU "A" to the OU "B". My PowerShell shot at this is $sourceEntry = [ADSI]"LDAP://OU=A,DC=demo,DC=com" $targetEntry = [ADSI]"LDAP://OU=B,DC=demo,DC=com" $searcher = ...
1
vote
3answers
4k views

How do I increase maximum attachment size in Exchange 2007 SP1?

I've been looking all over for a relatively simple answer to a fairly straightforward question: "how do I increase the maximum size of attachments that can be sent and/or received in Exchange 2007?". ...
2
votes
3answers
1k views

HBA card status

Is it possible somehow to get status of a HBA card using PowerShell or any other API instead of logging to a server and run "powermt display path"?
43
votes
11answers
77k 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.
3
votes
1answer
2k views

Is PowerShell 2.0 on Windows XP SP3 64 bit possible?

The normal location for the download of PowerShell v2.0 is Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0) (KB 968929). You'll notice that there isn't a listing for ...
1
vote
1answer
983 views

There a easy way to move/change a public folder structure exchange server 2007?

I looking to see if anyone has had any experience with restructuring a public folder tree that basically requires the movement of a public folder from one subfolder to another. I figure that we would ...
13
votes
12answers
111k views

Windows command prompt: how to get the count of all files in current directory?

What command would you use in cmd.exe to find the number of files in the current directory? Is there a powershell option here? Update: I was hoping to avoid dir, as I know there are 10,000+ files in ...
3
votes
2answers
20k views

How to uninstall software using batch file

I want to uninstall a software by calling a bat file. It must be automatically, without entering any parameters during the uninstallation. How to make the bat file which would be able to uninstall ...
2
votes
1answer
460 views
1
vote
4answers
2k views

Compare-Object gives false differences

I have some problem with Compare-Object. My task is to get difference between two directory snapshots made at different times. First snapshot is taken like this: ls -recurse d:\dir | export-clixml ...
0
votes
1answer
5k views

Windows 08 R2 Backup : create task template

it is possible to create a backup template or somehow configure backup shedule besides regular daily backup to local disk. I want to backup whole system every sunday to shared network folder. I must ...
4
votes
1answer
644 views

get-eventlog issue

I wanted to get a quick report of some log entries I saw on a server, so I ran: Get-Eventlog -logname system -newest 10 -computer fs1 | fl I got events back however the descriptions were all wrong. ...
4
votes
2answers
3k views

How to get DNS SERVER Statistics ? Total Queries per day ? (windows Server 2003)

Using a script (powershell for example) How can i get the total Queries on a DNS Server (Windows Server 2003 - Active Directory Environment) ? Thanks
1
vote
5answers
3k views

Replce Kix script with Powershell

We are looking to replace our current Kix scripts with Powershell scripts and I was curious how to test group membership to map network drives. Our current kix script basically just does an if ...
0
votes
3answers
1k views

Console apps don't work in Powershell

I've inherited a Windows Server 2003 r2 box. I've got a Powershell script that I'd need to get running on the machine, but something seems terribly wrong with the system. For example, opening a ...
3
votes
2answers
1k views

IIS Administration PowerShell Cmdlets on Windows 2008 R1

I am trying to use IIS Administration PowerShell Cmdlets on top of Windows 2008 R1. According to this article you need to load these Cmdlets. However the options to load the cmdlets does not exist in ...
1
vote
1answer
2k views

PowerCLI Syntax: copy-harddisk

Whats the correct syntax for coping a vmdk with PowerCLI? I'd like to do the same as vmkfstools -i Get-HardDisk Machine1 | Copy-HardDisk "[DS] Machine2/test.vmdk" Produces: Copy-HardDisk : ...
2
votes
1answer
800 views

Powershell 2.0 : issue import-Module in a background job

I launch a script in backgroung using Start-Job command. In this script, I load a module using Import-Module. The job stay blocked in the running state at the Import-Module step. The same behaviour ...
3
votes
1answer
9k views

Use Powershell to find out what uses lots of memory (on 64 bit Windows)

How do I find out (in Powershell) what process/whatever uses the most memory? Edit: I am trying to figure out how to use Powershell to find out what's using all the physical memory in case Task ...
6
votes
4answers
8k views

PowerShell script, showing commands run

I am playing around with PowerShell scripts and they're working great. However, I am wondering if there is any way to also show all the commands that were run, just as if you were manually typing ...
0
votes
1answer
2k views

add-computer cmdlet cached password question

I have been working with Add-Computer, trying to get a script going to auto-add local computers to a domain. The code is good, but I cannot for the life of me figure out if there is a way to easily ...
0
votes
1answer
159 views

How do I find out with PowerShell that my workstation dropped of the domain?

I use VMWare snapshots a lot and reverting to an earlier snapshot sometimes drops the computer off the domain controller. I am looking for a PowerShell script that would determine that the workstation ...
2
votes
2answers
3k views

Remote Powershell in Exchange 2007

Im wondering if it's posible to use Powershell from a remote computer (without installing Exchange manegment tools on the remote computer) to create or list user mailboxes. And if so, how?
18
votes
3answers
14k views

In a PowerShell script, how can I check if I'm running with administrator privileges?

In a PowerShell script, how can I check if I'm running with administrator privileges?
0
votes
1answer
886 views

Cannot install PowerShell 2 on my Vista x64 machine

Help! I'm trying to install PowerShell 2 on my main machine. Its running Vista x64 Home Premium. I'm running on an account with admin privileges. I've tried asking this question on Super User, but ...
1
vote
3answers
4k views

Powershell - How to launch Explorer.exe with path \\server\c$ (different credential)

The Context: Powershell launched as a domain admin. From this Powershell window, Is it possible to open c$ of a remote box (\server\c$) in explorer.exe without asking for credential (using the ...
0
votes
1answer
735 views

powershell get listening tcp sockets

I'm looking for some way to list the open sockets on a (local) machine. In particular I'd like to get the listening tcp socket addresses. (Much like the info from netstat.exe - but in a powershell ...
1
vote
1answer
707 views

How to schedule SQL-Agent to run a maintenance plan every x minutes?

My name is aSkywalker and I am an involuntary DBA. I have done some research, and would like to back up transaction logs every 10 minutes. I have written some powershell scripts to compress, encrypt ...
1
vote
4answers
6k views

How to add a firewall rule with PowerShell?

I made a very simple script to enable Remote Desktop connections on a computer: # Allow Remote Desktop connections (Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace ...
8
votes
6answers
619 views

Powershell challenge

I've been challenged by a friend to do the following: "Find the quickest and easiest way of sorting a directory listing by the LAST character of the filenames." He's done it on Linux using the ...
1
vote
6answers
277 views

Standardising on a single Windows Scripting Language

I wasn't quite sure whether this would be better on StackOverflow or not, feel free to move it if you think it's more appropriate there. Anyway on to the question... The Situation We currently ...
0
votes
1answer
939 views

powershell get changed files and copy them

Trying to copy all changed files from a directory (recursively) to a new location, keeping the directory structure intact. I put the changed files into an array: $datechanged = ...
2
votes
1answer
2k views

Determine Users Accessing a Shared Folder Using PowerShell

I need to determine the users/sessions accessing a shared folder on a Windows XP (SP2) machine using a PowerShell script (v 1.0). This is the information displayed using Computer Management | System ...
2
votes
1answer
251 views

Dynamically add Server 2008 NLB Nodes

I have a small NLB cluster for Terminal Servers. One of the things we're looking at doing for this particular project (this is for a college class) is dynamically creating Terminal Servers. What ...
3
votes
1answer
9k views

Scripting inventory of machine name, current username, Operating System using WMIC or powershell

I have a text file of every machine in our Windows Active Directory domain, and I would like to determine the currently logged in user (if any) and operating system of each machine using WMIC: WMIC ...
0
votes
2answers
2k views

Run PowerShell script within a maintenance plan

I have an SQL Server 2008 database, run on a 64-bit Windows Server 2008. I created a pretty simple PowerShell script that automates a bunch of tasks. I would like this script to run as part of our ...
1
vote
2answers
202 views

Understand PowerShell version

I have a VPS with PowerShell installed. How do I know if it's a RTM or CTP? I ran $host.Version and I got : Major Minor Build Revision ----- ----- ----- -------- 2 0 -1 -1 WTF ...
0
votes
2answers
608 views

Backup IIS6 With PowerShell and WMI

I am trying to backup IIS6 with PowerShell, I have found the method I am after in WMI's IISComputer.BackupWithPassword however when I try to execute it with the following PowerShell: $IISComputer = ...
2
votes
2answers
113 views

Use powershell to build VPC's

Our developers use VPC's to develop systems. When a developer joins a team he needs a VPC for that project. The developers have also a tendency to "break" the VPC. Building a VPC and installing the ...
0
votes
3answers
619 views

Pulling scheduled meetings out of Exchange

I am inexperienced with the powershell and with Exchange Management Console. I am trying to find a way to extract all of the meeting invitations over a period of time with the following information: ...
10
votes
7answers
44k views

How do I turn windows features on or off using powershell or commandline in windows 7?

I have scripted against sysocmgr in Windows XP, servermanagercmd in server 2008, and now I find that I have to use a new PowerShell module servermanager to install features on Server 2008 R2 and so I ...
1
vote
3answers
39k views

Script to list current user's mapped network drives

I have a Windows XP/ Server 2003 environment here users have mapped different network drives themselves using arbitrary drive letters. Some of these users do not know how to tell the true UNC path of ...
1
vote
2answers
3k views

How to configure winrs for localhost?

On executing commands on localhost I get Access Denied error as follows PS C:\Windows\System32> winrs -r:localhost dir Winrs error:Access is denied. PS C:\Windows\System32> Followig is my ...
3
votes
4answers
4k views

Disable a specific ethernet card via batch commands on Windows

What I would like to do is disable a NIC based on the connection name (aka: what you see in the "network connections" window, or what you would use with netsh commands). I know enabling/disabling can ...
5
votes
6answers
38k views

Execute program on remote computer using PowerShell

How can I execute a program on a remote machine using powershell?
2
votes
1answer
392 views

Copying files within a Workgroup

I have three boxes operating in a Windows Server workgroup within a closed network. (No Domain / No AD) There are several derivations of the scenario that I'm about to outline, but I'm sure I will be ...