Solved

Powershell get-process select start time

Posted on 2013-06-06
9
559 Views
Last Modified: 2013-06-06
Hi Guys,

I have written this powershell script:

 Get-Process -ComputerName server-exam01 dp* | select starttime


however it does not tell me the start time of the process. Please can someone help me.
0
Comment
Question by:chgl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 39225163
what is the output of the script run?
0
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39225175
try this

Get-Process -ComputerName server-exam01 dp* | select StartTime

script
Powershell script is case sensitive

I have run for local computer, and i got above result. it should work on remote computer too
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39225186
@takecoffee
in this case powersehll is not case sensitive.
i can run Get-Process  *r* | select name,StaRttiMe
and it will work fine, its not the issue.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39225195
That seems to be a bug with Get-Process command in collecting process details.. If remoting enabled on server server-exam01 then you can try..

Invoke-command -ComputerName server-exam01 -scriptblock {Get-Process dp* | select starttime}

Open in new window


Else try with WMI..
get-WmiObject Win32_Process -computername server-exam01 | ? {$_.name -like "dp*"} | Select Name,@{N="CreationDate";E={[System.Management.ManagementDateTimeconverter]::ToDateTime($_.CreationDate)}}

Open in new window

0
 
LVL 70

Expert Comment

by:Qlemo
ID: 39225337
It is not a bug, it's a feature. Many properties of processes are available only on the local machine. The StartTime property is one of them (see NotSupportedException in http://msdn.microsoft.com/en-us/library/system.diagnostics.process.starttime.aspx).
0
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39225349
aha good to know ..
0
 

Author Comment

by:chgl
ID: 39225686
what does the @ before the {N=....} mean?
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39225700
It's for creating a custom property..

N= is short form of Name=
E= is short form of Expression=

Ref : http://technet.microsoft.com/en-us/magazine/hh750381.aspx
0
 

Author Comment

by:chgl
ID: 39225714
brlliant thanks :)
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PowerShell: Adding ToGB to a script 4 70
Modifying AD Group Policy Powershell to list unused GPO 5 74
Powershell script. 6 49
Add server count in powershell 4 19
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question