Whenever possible, try to avoid raw .NET access if you would like to create more readable code. For example, the following line returns the current date:
[System.DateTime]::Now
Here is a much better approach: simply use Get-Date:
Get-Date
Remember: Raw .NET access is the last resort if no appropriate cmdlet is available.
ReTweet this Tip!
Posted
Jul 19 2010, 08:00 AM
by
ps1