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
1answer
571 views

How can I filter a Dynamic Distribution Group by Database name?

I need to create a dynamic DL to list the members of an individual database and I'm unable to get the powershell command to filter the results properly. [PS] C:\>New-DynamicDistributionGroup -Name ...
1
vote
1answer
597 views

Access Denied when creating a scheduled task with powershell and the com schedule.service object

I have a powershell script that creates a scheduled task using a call to RegisterTask via the Schedule.Service com object. Essentially: $ts = new-object -com Schedule.Service $ts.Connect() ...
1
vote
1answer
157 views

legitimacy of the tasks in the task scheduler

Is there a way to know the source and legitimacy of the tasks in the task scheduler in windows server 2008 and 2003? Can I check if the task was added by Microsoft (ie: from sccm) or by a 3rd party ...
1
vote
1answer
841 views

Obtain device driver version and associated GUID using PowerShell?

Right now, I am getting two separate objects A Win32_NetworkAdapter WMI object A Win32_PnpSignedDriver WMI object In my previous scripts, I've made sure I was calling separate objects, and ...
1
vote
1answer
432 views

Exchange 2010 Cmdlets for Sent Items in a Distribution group

Here is the scenario that I am in and am stuck on how to get this the correct way. What I'm looking for is a syntax that will provide me with statistics on what users have emailed "Sent" for the day. ...
1
vote
1answer
48 views

Is it possible to open an Active Director or Exchange Management Console user dialog directly from Powershell?

I'd like to be able to launch either the AD user dialog, or the EMC mailbox dialog directly from a Powershell script to open a specific user. The workflow goes something to the effect of "Does ...
1
vote
1answer
652 views

Powershell Exchange script returning inconsistent results - PS weirdness

Maybe someone can shed some light on a bit of Powershell weirdness I've come across and can't explain. This PS script returns a list of exchange databases, their sizes and the number of mailboxes in ...
1
vote
1answer
618 views

Adding a linked server via Powershell

I'm trying to add a linked server to my local SQL Server 2008 R2 setup from within a Powershell script. Here's what I've been trying so far (and variants): EXEC master.dbo.sp_addlinkedsrvlogin ...
1
vote
1answer
583 views

“Get-OwaVirtualDirectory” very very slow when accessing CAS in different site

I have a CAS server in a different AD site, and every Exchange 2010 command runs quickly... except for the one that use IIS and Get-XXXVirtualDirectory. In these cases it takes several minutes for ...
1
vote
1answer
804 views

How to show disabled/enabled status in Exchange 2010 EMS

I'm using this little script to show me the size of mailbox, usage, lastlogontime of all users mailboxes. Get-MailboxDatabase "MDB01" | Get-MailboxStatistics | Sort totalitemsize -desc | ft ...
1
vote
1answer
627 views

Certreq -retrieve can't find the specified CA

I'm currently writing a Powershell script and have run into a bit of a roadblock. Basically, the script requests, approves, and retrieves new certificates from our CA using certreq.exe and ...
1
vote
1answer
47 views

net file for admin drivenet file

Simple question for you this morning. I'm currently using the net file command in command prompt to obtain the connected user to a drive (F). I want to know how can I do to get the same information, ...
1
vote
1answer
677 views

Creating home folders using Quest Active Roles cmdlets

I have created the following script to take data from a csv and create new users in AD: Import-Csv c:\newusers.csv | ForEach-Object -Process {New-QADUser -name $.'un' -ParentContainer ...
1
vote
1answer
383 views

search logs for events associated with Task Scheduler

I'm working with a Server08 box (Web Edition) where the Task Scheduler had run a set of unchanged housekeeping scripts for months. Over the last week, Scheduler has failed to start scripts twice. ...
1
vote
1answer
516 views

Installing a service on a remote machine with powershell

I am using powershell 1.0 and I need to install a service on a remote machine and first uninstall it if it exists. This is my script I have that installs the service, however, I seem unable to ...
0
votes
1answer
18 views

PowerShell DSC Pull Server with digitally signed module - ErrorDetail is The PS <path to module> is either missing or its associated MOF schema

I've configured a test DSC pull server and I'm attempting to use a digitally signed xPowerShellExecutionPolicy file but I am constantly getting an error stating that the MOF schema file is invalid or ...
0
votes
1answer
30 views

Windows Server 2012 R2 The route addition failed: The system cannot find the file specified

I am using a simple powershell command,(ran as Admin) as follows. route –p add 172.30.200.0 mask 255.255.255.0 0.0.0.0 IF 28 I have done this no problem on Windows 8.1, but when I do this in ...
0
votes
1answer
14 views

Want to get checkpoint details for particular VM through “VMM PowerShell Script” activity

i have orchestrator with service manager installed . now i want to give facility to my developers to get checkpoint information about respective VMs (particular) from SMportal so that they can revert ...
0
votes
1answer
16 views

Unable to perform enable-bitlocker and lock-bitlocker successively

I am trying to enable bitlocker on windows server 2012 R2 data volume using following command: Enable-BitLocker -MountPoint $volume -Password ($password | ConvertTo-SecureString -AsPlainText -Force) ...
0
votes
1answer
89 views

powershell : System.Object[] instead of the actual path

The script below does not produce the path to the files in question, in my CSV file. Instead it is giving me System.Object[]. Please advise as to what I am doing wrong here. My goal is to clean up ...
0
votes
1answer
57 views

Write-S3Object : A parameter cannot be found that matches parameter name 'Credentials'

I’m trying to set up AWS deployment via the AWS Tools for Powershell on a new machine using write-s3object -credentials $aws_creds ..., and I’m running into the following error: Write-S3Object : A ...
0
votes
1answer
71 views

Powershell script issue

I am having an error with the script below: $server_names = Get-Content "C:\ArchivedFolders.txt" Foreach ($server in $server_names){ Copy-Item "\\$server\C$\Mail\*" -Destination ...
0
votes
1answer
54 views

Set-SCOMMaintenanceMode EndTime Duration Clarification

Microsoft provides the Set-SCOMMaintenanceMode cmdlet in part to manage the SCOM maintenance system. A required parameter is the declaration of how long the maintenance mode should last (-EndTime). ...
0
votes
1answer
70 views

How to run Azure cmdlets in background?

Several Azure PowerShell cmdlets have very tedious run times; a trivial task such as setting a static IP address on a virtual machine can take more than a minute (I guess this is because the cmdlet is ...
0
votes
1answer
59 views

Access 'Response Time (ms)' windows disk counter from powershell

In perfmon there is a 'Response Time (ms)' column on disk tab. It shows response time by process. How can I get this value in powershell? I didn't find any solution in the internet. WMI serves just ...
0
votes
1answer
112 views

AAD Sync not able to connect to online service using powershell

When trying to connect to my Office 365 tenant using connect-msolservice from powershell I get the following error: Connect-MsolService : The HTTP request was forbidden with client authentication ...
0
votes
1answer
204 views

Powershell: invoke-expression with “find”-command

I need to call DISM.exe via its absolute path which changes dependent on system architecture. Therefore, I store the filepath of dism.exe in a variable and then proceed to execute the wntire command ...
0
votes
1answer
66 views

Allowing multiple executables into a “Run only specified applications” group policy at one time

At my workplace we whitelist executables using a "Run only specified Windows applications" group policy applied to the domain. At certain times we need to whitelist large number of executables at a ...
0
votes
1answer
127 views

Dump user's Exchange mailbox to explorer while retaining folder structure

I have a user who will be retiring in a few days. He's been tasked with dumping out all mail that is related to the organization's customers and classifying it under our organizational structure ...
0
votes
1answer
236 views

Windows Server 2012 RD Licensing Issuing Multiple Temp Licenses Per Machine

I have just setup a Windows Server 2012 RDS environment with Per Device CALs. Looking at RD Licensing Manager it is handing out multiple temp CALS per machine and multiple permanent CALS per machine. ...
0
votes
1answer
150 views

Moving computer with powershell in MDT

I have MDT 2013 deploying several images. With Powershell I would like to move them to the correct OU as well. Is that possible? I was trying with the following but it does not seem to work: ...
0
votes
1answer
136 views

How to start multiple Azure VM at the same time?

I'm trying to use Powershell scripts to start multiple VMs at the same time. I only know how to start one single VM or all VMs at the same time, but in my case, I only want to make change to selected ...
0
votes
1answer
138 views

Is it possible to execute Azure automation runbook on Visual Studio?

I am considering about two cases. One is edit runbooks on Visual Studio, then execute them to perform Automation task directly. Another one is that edit runbooks on Visual Studio, then I use ...
0
votes
1answer
72 views

List mapped zombie drives in powershell

I'm writing a little powershell script for some basic logs that have to be generated. Right now I'm stuck with logging mapped network drives: $colDrives = Get-WmiObject Win32_MappedLogicalDisk ...
0
votes
1answer
130 views

Powershell cmdlet requesting optional parameters as mandatory when running as script

I am trying to use powershell to create a script which I use to add vpn connections to windows 8.1 machines. For this microsoft has made the add-vpnconnection cmdlet. When running add-vpnconnection ...
0
votes
1answer
449 views

Powershell use Get-WinEvent with hashtable to query very specific time range

I'm trying to make a powershell script that essentially automates the account lockout tools. ideally I'll be able to get a fairly efficient query that can identify recently locked out accounts then ...
0
votes
1answer
1k views

Powershell execution policy within SQL Server

Can anyone help? Firstly I apologise if this is the wrong forum and for the amount of text you have to read. I'm not allowed to post images yet and a picture is worth a thousand words..... When ...
0
votes
1answer
133 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 ...
0
votes
1answer
551 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: ...
0
votes
1answer
111 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 ...
0
votes
1answer
470 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
1answer
2k 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 ...
0
votes
1answer
79 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
1answer
361 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

Extract Summary property from VMM with PowerShell

I have a Windows Server 2008R2 running SCVMM 2012. I successfully removed a virtual machine, according to the Jobs output from VMM, as seen in this screenshot. As you can see, the VM has a red ...
0
votes
1answer
427 views

Powershell IIS works in command line but not in asp.net

I am trying to run a add-website script via asp.net. Where I want to be able to easily add new websites as an administrator. But I have the issue the command is not recognized. The command line ...
0
votes
1answer
170 views

PowerShell won't rename an export .csv file

I am trying to rename the file export.csv to the $name but with a .csv extension instead of .file. The output is still $name.file. Import-Module ActiveDirectory $name = Read-Host "Enter Group Name" ...
0
votes
1answer
138 views

Pstools or Powershell or Both

I'm having a problem at the moment deploying and managing windows services and I'm looking for advice on the best course of action. Here's what I have working (below) - the problem is it's a bit ...
0
votes
1answer
136 views

Delete files except ones created on sundays with in last 4 weeks

I have a script that copies some files around and deletes older files from destination. right now it just deletes everything older than 10 days. to increase backup retention we need to keep files that ...
0
votes
1answer
246 views

What rights should non-admin user have to run Get-WmiObject?

I am trying to monitor windows machine with the help of wmi and powershell remoting. I managed to successfully start remote session with that machine throught non-admin user account, but now I have a ...