Of PowerShell and Other Things
Pingback from Windows 2008 Security - PowerShell UG - February
Pingback from Windows 2008 Security - PowerShell advanced function parameters
Pingback from Windows 2008 Security - Thursday ???????? Live Meeting
Pingback from Windows 2008 Security - LiveMeeting ???????? Last Call
Pingback from Posts about online meetings as of March 16, 2009
Pingback from Windows 7 Troubleshooting Packs « On-Site Computer Services, Inc. in New Orleans Blog 504-469-6991
Several time ago I wrote post about practical differences between foreach and foreach-object:
vpodans.spaces.live.com/.../cns!BB1419A2CFC1E008!273.entry
(post in Russian). The general performance difference is that foreach is vary fast when you work with simple data (large count of little data) and very slow when you work with large count of big data.
Richard,
File association is optional - this is just one of the features you select when running the setup. Deselect the feature and PowerGUI won't associate itself with the PS1 file extension.
With that said, we will have a look for better ways to set association and make it easier to remove it.
Dmitry
I don't remember seeing the option. I'l look closer next time I install
Also, I have just spent a few minutes experimenting with file associations and could not find any issues.
Both on XP and Vista, I could:
1. Right-click a .PS1 file,
2. Pick "Open With",
3. Click "Choose Program",
4. Pick Notepad or PowerShell ISE,
5. Select the checkbox to make it the default application.
This worked flawlessly - even changed file icons - and required no registry activity whatsoever.
Afraid I'm using Windows 7 and the choice to change the default was grayed out even with elevated privileges.
Other apps didn't have this issue
ONELINER
(get-date) - (Get-WmiObject Win32_OperatingSystem ).ConvertToDateTime((Get-WmiObject Win32_OperatingSystem).LastBootUpTime)
but pretty ugly, and two WMI requests.
with .net its better looking
(get-date) - [Management.ManagementDateTimeConverter]::ToDateTime((Get-WmiObject Win32_OperatingSystem).LastBootUpTime)
The one liner is ugly and doesn't gain anything. Probably slower due to two WMI calls
.NET version is better looking but looks don't win when scripting. As long as it work ugly is good
.NET vs WMI probably comes down to personal preference
Back here msmvps.com/.../creating-temporary-files.aspx or
We saw how to watch for WMI events msmvps.com/.../powershell
When I did the post on creating temporary files msmvps.com/.../2009
When I posted about cleaning the temp folder msmvps.com/.../11
This is an interesting series of postings I'd like to mention in my own blog. But could you add Access to your "Filed under" so I can give folks a generic tag to search on?
Thanks, Tony Toews, Microsoft Access MVP
Thanks for the feedback. I've added Access to the "Filed Under" tags as requested.
If there is anything you would like covered in this series let me know.
I will eventually publish all the functions as a PowerShell module for download
Thanks muchly. I've blogged this as well so others will ssee this. I was rather startled to see your first posting on PowerShell and Access. I had no idea.
Great post you got here. I'd like to read a bit more concerning that topic.