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.

learn more… | top users | synonyms (1)

1
vote
0answers
30 views

How can I force dnscmd.exe to provide its output in English?

How can I force dnscmd.exe to provide its output in English? I have automation that parses the output of various dnscmd commands, such as dnscmd /info > dnsInfo.txt. I'm using PowerShell to ...
0
votes
0answers
13 views

Using Powershell, append a table to an existing Word document [migrated]

I have a Powershell script that reads data from a CSV file to create a table in an existing Word document. It works fine as far as creating the table, but it seems to be deleting the contents of Word ...
2
votes
1answer
67 views

cUrl for an HTTPS address/domain times out unless previously accessed from browser

I've lost a couple days to this problem and hope it sparks a thought from someone. I am integrating several systems together using Powershell scripts. One of the two services I am connecting to ...
2
votes
1answer
41 views

Need to format power shell output

I am pretty new to powershell and have been trying various ways to split the results from the following powershell script I found but have had no luck. At the moment the script list everything in 4 ...
6
votes
1answer
124 views

How can I generate a list of the security groups a set of users belong to?

I have been asked to generate a list of the security groups (so specifically not the distribution groups) that a list of approximately 50 users belong to. I have a list of users, users.txt that ...
2
votes
2answers
40 views

Find last run defrag WMI or Reg key

I am trying to discover if there has been a defrag run on our servers. To save myself going to each one and loading the defrag program and checking the "Last Run" column I thought WMI might have this ...
0
votes
2answers
28 views

Pipeline input to functions - Write-progress and Alias

I'm currently working on a script to gather a whole lot of information from computers in a domain. As I want to show how far it has come along (the task may run for hours or minutes) I wanted to use ...
1
vote
1answer
26 views

Give users access to Set-Mailbox command to change -ProhibitSendReceiveQuota -Prohibit SendQuota and -IssueWarning in Exchange 2010

Is it possible to give users access to Set-Mailbox command to change -ProhibitSendReceiveQuota -ProhibitSendQuota and -IssueWarning parameters on every mailbox on Exchange server 2010 without giving ...
0
votes
1answer
52 views

Exchange Powershell - Creating Distribution Groups

I'm trying to add some new distribution lists to exchange using the below. C:\>Import-CSV "c:\external.csv" | foreach {New-DistributionGroup -Name $_.name -Type $_.Type} I've created a CSV file ...
0
votes
0answers
14 views

connect-nacontroller - slow connection

I've recently started working with Powershell and the Netapp Data-Ontap Module V 3.0 When running 'connect-nacontroller', there is a very long pause before the connection is made and I am able to ...
-1
votes
0answers
35 views

PowerShell Script With Logo

I have a PowerShell script that runs and emails results. The script runs fine and the results are emailed. The problem is that in the script, I am trying to send along a logo in the email. I'm not ...
1
vote
1answer
60 views

Getting list of users indirectly members of an AD group through LDAP

I'm having a bit of a problem with LDAP search that should specify whether a user is a member of a given AD group or not (recursively). Basically, what I'm doing is issue a LDAP search with the ...
0
votes
3answers
49 views

AD Management via powershell on 2008 enterprise

windows server 2008 enterprise, without hyper-v x64 We have a client server that I am trying to automate some functions on using power shell directly on the server. I have the gateway service ...
0
votes
1answer
36 views

Unrecognized element 'ProviderOption' when trying to use Powershell Set-WebConfigurationProperty

I am trying to build a Powershell script to automate connection string changes to our deployed web applications. I am trying to use the WebAdministration command Set-WebApplicationProperty but am ...
0
votes
1answer
37 views

Script for finding users who does not have specific aliases entry - not working

I wrote the below script for finding users who does not have specific aliases entry in the exchange account, but it returns all user in the OU. can someone help. thank you Get-Recipient ...
1
vote
1answer
14 views

no mof generated with composite resource - powershell dsc

I'm having an issue where the .mof file doesn't get generated when using a composite resource in it.The directory gets created fine and no errors are shown. It might be a simple issue to some fresh ...
0
votes
2answers
40 views

powershell check windows update on a server

We have some 1000 + servers, we are doing monthly patching activity. i need to check the patches are updated on the servers or not, is it possible to check based on the Microsoft Security Bulletin ...
0
votes
1answer
40 views

Get login name using email address with Powershell

I need a powershell script, to get login names using the e-mail address. i am having a note with e-mail address of some users. I want to get login IDs and account information of the users in the ...
0
votes
0answers
21 views

Logman user switch confusion

I'm setting up a powershell script that installs a logman counter on several servers that are in dire need of some performance monitoring. The documentation states that the -u switch works with ...
3
votes
2answers
154 views

Must create PowerShell script to change Password Expiry and Date to change next password

I've been tasked with creating a script that reads in a file a list of Active Directory user IDs and then clears the flag for Password Never Expires. In addition, my security officer doesn't want the ...
-3
votes
1answer
42 views

Install .EXE without displaying windows [closed]

I want to install an .exe file without displaying windows, by supplying value to parameters ? How can i do from Commands or script not in UI ?
1
vote
3answers
68 views

New-ADUser -Name Length too long

I need to add about 500 users to an OU in AD I have scripted out everything I need, however, it gives the error: the name provided is not a properly formed Here is the script New-ADUser -Name ...
3
votes
2answers
72 views

What do the contents of PowerShell's $PSVersionTable represent?

If I echo $PSVersionTable in PowerShell, I get what appears to be multiple bits of version information. The name's of the properties are CLRVersion BuildVersion PSVersion WSManStackVersion ...
1
vote
3answers
79 views

24 hour expiration of first password

EDIT** I'm thinking of running a scheduled task at the end of every workday to retrieve all accounts who have never logged on and disabling their accounts. Please excuse any syntax errors. I may very ...
0
votes
1answer
57 views

Puppet not running powershell script on Windows 2008 server

The puppet agent on my Windows VMs is not executing powershell scripts. I have tested it with a very simple script as well. The script is stored on C drive as test.ps1. Its contents are as follows:- ...
1
vote
1answer
41 views

Advanced function - Getting local security group members of computer objects

I'm trying to compile a list of groups that have access to a set of computers/servers in our organization, with regards to MSDN license reporting.. :-/ basing my work out of the Hey Scripting Guy's ...
3
votes
1answer
119 views

How is the computer chassis type assigned

So you can use Get-WmiObject win32_systemenclosure | select chassistypes To get the Windows chassis type for a machine as defined in this list: ...
1
vote
0answers
38 views

Powershell Script to audit all mapped drives in an OU

Similar to this post: http://powershell.com/cs/forums/p/9777/16289.aspx I'm looking for a powershell script that will let me query all the machines in an OU on my network and see what drives they have ...
0
votes
0answers
24 views

Setup an Account Password Reset to expire in Office 365 Exchange?

Is there a way to setup a user account so that it's password expires (in the next 5 minutes) for purposes of testing out a password expiration policy in Office 365? I'd like to do this on a test user ...
8
votes
1answer
300 views

How do I run my PowerShell scripts in parallel without using Jobs?

If I have a script that I need to run against multiple computers, or with multiple different arguments, how can I execute it in parallel, without having to incur the overhead of spawning a new PSJob ...
3
votes
1answer
93 views

Powershell Script to output all Distribution groups and nested groups into a csv

Hi I'm pretty new to powershell so I might be going about this completely wrong but I have to dump all our companies Distribution groups, their nested groups, and the users of those groups into a csv ...
-2
votes
0answers
20 views

ENABLE / DISABLE Local Group Policy Editor Settings in Windows Server 2008 r2 - Powershell [duplicate]

Inside Local Group Policy Editor in windows server 2008 r2 all settings under gpedit.msc>computer configuration > Administrative Templates > windows update , should be Enabled under In the Windows ...
-2
votes
1answer
43 views

Powershell - Create folders and shares from a CSV

I have a repetitive task on Server 2012 R2 I'd love to automate. I have a CSV list of around 40 folder names I want to create (The names in this CSV changes). I then want to have those folders shared ...
1
vote
1answer
55 views

Using Powershell to get a group of specific perfmon counters

I'm trying to set up a script that generates blg files every set amount of time, using powershell. I know this can be done using perfmon XML templates, but for this specific project I have to do it ...
-1
votes
2answers
273 views

Can I use Powershell to configure Local group policy settings in windows server 2008 r2

in Windows server 2008 r2 , for this manual process open run >gpedit.msc > computer configuration > windows templates > windows update > specify intranet microsoft update service location > ...
0
votes
0answers
32 views

Dropping attachments when importing millions of .MSG files into Outlook via PowerShell script

For various reason, I need to migration several million emails from one archiving solution to another. The only method of getting the data out of Solution A is by using a proprietary utility to dump ...
-1
votes
0answers
6 views

How would I go about setting php handler mapping and fastcgi parameters without using GUI

I like to be able to set php handler mapping and fastcgi parameters without GUI - would I be correct in saying, this can be done using Poweshell or if not, what would be best approach to do this. ...
0
votes
1answer
64 views

Querying for inactive users from a specific OU using powershell with the help of AD filter and LDAP filter

I am trying to get the list of all inactive members from a specific OU named inactive with the following queries: ...
1
vote
0answers
69 views

New-PSSession across domain boundaries

I am trying to bring up a virtual machine that needs to be able to create new sessions (with New-PSSession). The highly engaging about_Remote_Troubleshooting is my constant companion, of course! ...
5
votes
1answer
36 views

Race conditions in account creation script with email account and Office 365 sync--any good way besides time delay to resolve?

I have a powershell script that I use to create new users. Every year we add hundreds of interns, so automation is crucial. Someone in HR runs the script, so the script is supposed to be foolproof. I ...
4
votes
1answer
80 views

Powershell Get-Process negative memory value

I was making some verifications with Powershell Get-Process cmdlet and got some weird values about some processes. I tested on a server with a SQL Server Instance running and consuming 3GB+ RAM as ...
0
votes
1answer
40 views

Copy specific files listed in a CSV file

I'm working in a Windows 2008 R2 Server and I'm trying to copy certain files listed in a csv file from one partition to another, headers are: ZipFile,Site.A,Site.B ZipFile column contains the ...
-1
votes
1answer
35 views

Powershell Security Groups

Active Directory via powershell want to add users to a specific group. But that is a member of a particular group of users that other members do not want to be included in the relevant group. For ...
3
votes
1answer
129 views

How can I create Organizational Units recursively on Powershell?

I'm writing a Powershell script to populate all the company users to a Active Directory from a CSV file. The script uses the Powershell command New-ADUser and it should know, for every user, where is ...
0
votes
0answers
30 views

How can I identify tiered storage volumes and their storage tiers

I've asked this over at stackoverflow and at technet without an answer so I thought I'd try here... Using either PowerShell or some C# magic how can I: A) Identify a volume drive letter that is ...
0
votes
0answers
34 views

Servers Occasionally Hang After Using win32_volume WMI Class

I am using gwmi win32_volume to query remote machines and every so often I have a remote server that does not return from the query. It is like it is hung or in a stuck state. The command I am using ...
1
vote
1answer
90 views

What's the 64-bit equivalent of `Get-wmiobject win32_service`?

I'm using powershell to get a list of services from several computers to see which ones use the administrator to run. So far I have: Get-wmiobject win32_service | Select -Property startName, ...
3
votes
1answer
78 views

PowerShell - How to break a row with array into mulitple rows?

I am writing a PowerShell script to export users' information including the SharePoint Group(s) he or she belong to. Part of script show below: $web = Get-SPWeb $webURL $users = Get-SPUser -Web ...
0
votes
1answer
48 views

:Powershell Register-ClusteredScheduledTask from XML

I'd like to take my tasks on a non-clustered server, and import them as clustered tasks on a new cluster that has been built and tested. Here's what I have tried: cls ...
0
votes
1answer
40 views

Repeat the csv header twice without “Append” (PowerShell 1.0)

I have prepared a PowerShell script to export a list of system users in CSV format. The script can output the users list with Export-csv with single header row (the header row at top). However my ...