DCSIMG
one-liner - Shay Levy

Shay Levy

If you repeat it, PowerShell it!

News


btn_donate_LG

View Shay Levy's profile on LinkedIn Follow Shay Levy at Twitter Shay Levy's Facebook profile Subscribe to my FriendFeed


site statistics




Browse by Tags

All Tags » one-liner (RSS)
Tracing commands - Get-CommandTraceSource
Windows PowerShell provides several cmdlets to trace various low-level PowerShell components. When tracing, components generate detailed messages about each step in its internal processing. Developers use the trace data to monitor data flow, program execution, and errors. Tracing is mostly for developers but they are available to all users. The following shows the output of Trace-Command using its first help code example (for more information about the Trace-Command cmdlet, type: Get-Help Trace-Command...
QuickTip: How long since a file was last written to?
Here’s a quick way to find out. Pipe the file to the New-TimeSpan cmdlet. PS > Get-ChildItem foo.txt | New-TimeSpan Days : 319 Hours : 7 Minutes : 8 Seconds : 48 Milliseconds : 409 Ticks : 275873284097833 TotalDays : 319.29778252064 TotalHours : 7663.14678049536 TotalMinutes : 459788.806829722 TotalSeconds : 27587328.4097833 TotalMilliseconds : 27587328409.7833
Mailbox Creation Time
Do you happen to know or have a rough guess when exactly your mailbox was created? From a client perspective (Outlook), you can get the date quite easily. One thing you do need to know in advance is the property tag for the PR_CREATION_TIME property name. We can get that with MFCMapi. Download MFCMapi HERE and launch it. From the menu, click ‘Session’ and choose the first menu item: ‘Logon And Display Store Table’ Choose the Outlook profile you want to load and press OK. Double click your mailbox...
QuickTip: How do you check Internet connectivity?
With the following PowerShell one-liner you can check if the machine you’re working on has internet connectivity. The result is a Boolean value. If TRUE, the local machine is connected to the internet; if FALSE, it is not. Minimum supported client : Windows Vista [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet