Solved

Powershell get-process select start time

Posted on 2013-06-06
9
546 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hi all.   The other day I had to change the passwords for a bunch of users on the fly. Because they were so many, I decided to do it in an automated way and I would like to share it with you all.   If you are not doing it directly in a Domain Co…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

16 Experts available now in Live!

Get 1:1 Help Now