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)

-2
votes
0answers
12 views

Exchange Powershell Help.. deleting cal entries for a specific user based on a keyword

Powershell Guru's i need some help. i need to delete all calendar entries for one of my users that has a keyword in the subject. how would i structure this command. Thanks
0
votes
0answers
16 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
4 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
20 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
25 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! ...
4
votes
1answer
24 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
56 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
33 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
29 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
96 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
24 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
26 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
40 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
67 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
22 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
0answers
16 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 ...
-1
votes
2answers
36 views

Can you use a powershell script to find all shares on servers? [closed]

I just want to know all shares on a server, or better all shares in the domain. I was hoping it was possible through a powershell script.
2
votes
1answer
35 views

Errors when attempting to update source files, Server 2012R2 (errors 80073701 and 14081)

I have a Windows Server 2012R2 machine that I installed with Server Core, and then decided that I wanted to switch to GUI. I'll make the long story short: I ran windows updates, and now the source ...
1
vote
2answers
95 views

Powershell - Set-ClusteredScheduledTask - Error “Incorrect function.”

I'm experimenting with Powershell to add a ClusteredScheduledTask on a clustered server (Win 2012/R2) Technet sample code gives error: #canned exampled from ...
0
votes
1answer
20 views

Using New-ADComputer's -ServicePrincipalNames

I'm trying to use the New-ADComputer -ServicePrincipalNames parameter with no success. $comp = New-ADComputer -passthru -name "server1" -path "ou=Org2,ou=Org1,dc=mydomain,dc=com" -DNSHostName ...
0
votes
0answers
30 views

How to Create a mailbox in Exchange 2010 with Linux

How do I create from a linux server (with winexe installed) a new mailbox for a user that's already known in Active Directory? When I try the following: ./winexe -U ...
0
votes
1answer
31 views

How to execute a Powershell cmdlet as a specific user and save the return value in a variable?

How can I execute a Powershell cmdlet as a specific user and save the return value in a variable? What I got so far is this snippet Start-Process powershell.exe -Credential $credentials -NoNewWindow ...
1
vote
2answers
36 views

New-ManagedContentSettings - not working properly under Exchange 2010

I have a client that is divesting a business unit into a new AD forest, Exchange org, etc. We're using Quest tools to migrate users and mailboxes. However, I have to build the new infrastructure to ...
0
votes
1answer
16 views

Exchange 2010 Search-Mailbox to delete Exchange Journal emails

I am using this PowerShell command to try and delete emails from our Exchange Journal, [PS] C:\Windows\system32>Search-Mailbox -Identity exchangejournal -SearchQuery ...
-1
votes
0answers
33 views

How to access Virtual machine using powershell script

I want to access the virtual machine using powershell script. For that I used below script, Enter-PSSession -computername sheetal-VDD -credential compose04.com\abc.xyz1 where, sheetal-VDD is ...
0
votes
1answer
14 views

How do I create a mailbox in powershell and determine which mailstore it creates it in?

I need to edit a powershell script that creates new users and add a section that creates them a mailbox, problem I am having is that I need it to check the first letter of the username to determine ...
0
votes
2answers
50 views

Exception calling “UploadFile” with “2” argument(s): “The Content-Type header cannot be set to a multipart type for this request.” [duplicate]

I am working with a script that is supposed to first check if a PC is alive then FTP a file to a server. However, when running the script I am getting the following error: Exception calling ...
1
vote
2answers
31 views

Scripting for Public Calendars in Office 365

We have about 10 onsite technicians who do breakfix work. I would like to create a unified calendar that shows all of their appointments for the day, week and month without having to populate it ...
-1
votes
1answer
42 views

Best Practices for User folder permissions [closed]

The following is my bat file. Is there a way I can substitute First.Last with usernames from a CSV file? My boss doesn't want to do all the users at once. He's afraid that something may happen so he's ...
-1
votes
0answers
21 views

PowerShell - Retrieving files on a remote server via the click of a button on a .aspx web page [migrated]

Here's my problem: I have a PowerShell script which runs successfully when I execute the script from PowerShell itself. However, when the script is called via the click of a button on a web page, it ...
0
votes
1answer
40 views

I am unable to set the owner of a folder back to the user from my bat file

The following bat file is being used to fix permissions for Users in our organization. Everything works perfectly until we try to set the owner back to the user. takeown /F F:\Users\First.Last /R ...
6
votes
2answers
103 views

Invoke-Restmethod breaks script in PS 4.0

I had a Powershell script that used Invoke-RestMethod that was working in powershell 3.0. However, I upgraded to powershell 4.0 to fix a bug in powershell 3. When I did so, my script seems to have ...
0
votes
0answers
28 views

Active Directory Lightweight Directory Services user-credentials

Does anyone know how the "user-credentials" string is encoded/encrypted that is used for Active Directory Lightweight Directory Services? Thanks. ...
0
votes
1answer
26 views

PowerShell 'get-ClusterQuorum' output is not showing 'QuorumType' column

PowerShell cmdlet get-ClusterQuorum output is not showing QuorumType column. Has anybody seen this before?
-2
votes
0answers
31 views

Powershell Copy Function very slow

We have a main files server for a local office, I placed a ESXI host in one of our data centres, I used the recursive copy function to create a small powershell script, and scheduled this for 9pm. For ...
1
vote
1answer
137 views

Looking for a powershell script that can pull a file from a set of PC's and FTP

I'm looking to write a script (preferably powershell) that will essentially copy a file from a bunch of PC's and FTP it to a server. So the structure of the environment is that we have a file on ...
1
vote
2answers
53 views

Modify CIFS share ACL's

I would like to modify permissions on a number of NetApp CIFS shares (over 100). These are user shares and each share has a different user with "Change" share permission, this permission now needs to ...
3
votes
1answer
176 views

How to catch Exceptions with PowerShell

I am getting this error. Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) At F:\Code\powershell\network_shutdown\TurnNetworkOff.ps1:19 char:26 + ...
-2
votes
1answer
62 views

powershell script that outputs date of the day as a file name

I have a script which lists local admins of all hosts in Active Directory below: $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"") $Searcher.Filter = "(objectClass=computer)" ...
1
vote
1answer
51 views

How to start a runbook using web service call to SC Orchestrator in Powershell?

I have System Center Orchestrator 2012 R2 and I want to start a Runbook on the runbook server by calling the web service. The orchestrator console works fine if I browse to it like so: ...
2
votes
2answers
60 views

Format disk with diskpart if not formatted

I'm trying to write a script to create and format a partition in Windows Server 2008R2. Now, when disk 1 is selected, I need to format it, only if it is not formatted already. This is what I have ...
3
votes
1answer
77 views

I am getting Invalid class errors for my PowerShell script

When I run this script, I get this error Get-WmiObject : Invalid class “Msvm_ImageManagementService” and Get-WmiObject : Invalid class "MSPower_DeviceEnable" and Get-WmiObject : Invalid class ...
0
votes
1answer
110 views

PowerShell startup script applied via GPO failing ambiguously

Script: $folder = "$env:HOMEDRIVE\TestFolder" New-Item -ItemType directory -Path $folder note that the same group policy error occurs when $folder is set to "C:\..." Execution policy is ...
-1
votes
1answer
79 views

Top level files size with powershell

I have the following script it does what I want, but only for one drive (that I have to specify), and on the server I am running it on. I want to be able to do this for every disk in my server and ...
9
votes
1answer
125 views

Small issue with the Domain Name System (DNS) Server Cmdlets

I'm wondering if I need to clear some cache or something with the issue I'm having. I'm trying to remove A records from a DNS Zone and replacing them with a CName record that has the same host name. ...
0
votes
1answer
58 views

Automate app pool recycling of an Azure Cloud Service Web Role

How can I script (e.g. using PowerShell) the action to recycle the app pool of a web site hosted in a Web Role on Azure Cloud Services? Only one instance of the cloud service is running (used for ...
0
votes
1answer
69 views

robocopy says its receiving invalid parameters in when used in powershell script

I'm attempting to use robocopy in a PowerShell script, but currently failing. When I run the following command manually robocopy \\corporatesystem00.local.com\C$\Maven\ ...
1
vote
1answer
66 views

Force active directory replication after joining a server to a domain?

I'm trying to create more 'self-service' virtual machines for the developers to use. On of the requirements is after running a script to bootstrap the machine and join it to the domain, that the ...
3
votes
1answer
148 views

Strange format-list behavior in this PowerShell script

I have a weird behavior with format-list. When I paste the following code directly into the shell - everything works like a charm: @("Administrator","SomeUser","SomeOtherUser") |% { ...
0
votes
1answer
25 views

What is the upper limit (maximum limit ) of WinRM MaxShellsPerUser

For executing the remote powershell commands i need to configure WsMan, In WsMan MaxShellsPerUser specifies the maximum number of concurrent shells that any user can remotely open on the same ...