Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Powershell get-process select start time

Posted on 2013-06-06
9
Medium Priority
?
577 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 40

Accepted Solution

by:
Subsun earned 2000 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 71

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

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 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