Solved

Powershell get-process select start time

Posted on 2013-06-06
9
542 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 68

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now