PowerShell Team
Automating the world one-liner at a time…
Latest posts
Traps vs Try/Catch
Someone as asking about Traps vs Try/Catch and Jason Shirk (PowerShell developer) gave a nice concise and precise answer that I thought I would share with you: Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Summer Scripting Game : Its ON
The 2009 Summer Scripting Games have officially begun. For the last few days the Scripting Guys have been revealing the events one day at a time. For more information on the events, you can refer to this post from ScriptingGuys. This year’s scripting games are partnered with the Microsoft PowerShell MVP’s at PoshCode.org. The new PoshCode allows you to review other people's scripts, to vote on the scripts you think are best, and to modify other people's submissions and submit the changes you like. This is how most scripters work. They look for scripts, find something they think is useful, and modify it. The same ...
Kudos to the Win7 Diagnostics Team
Have you ever had problems connecting to a network and gotten one of those dialog boxes that offers to repair it? Mostly the networking just works but every now again one of the 10,000 moving parts required to make networking function gets misaligned and I get this dialog box. I always try and it has never worked for me. This is one of those "triumph of hope over experience" moments for me. Last Thursday I was in a big meeting and could connect to the network,. I really needed the network so I decided, I'll give it a go. What was different this time is that I'm running Windows 7 an...
Help Us Help You By Signing Up For A Site Visit
Windows Server Site Visits in July 09 (Open to US and Canada participants only) The Windows Server User Research team wants to conduct site visits to learn from people who are involved in any and all aspects of managing servers! We’re hitting the road in July to understand what needs to be improved in our server management software. If your company has at least 500 PCs and has offices in North America, we’d like to consider visiting your company and meeting with 2-4 members in your IT department. We will be offering each participant their choice of a retail Microsoft software or hardware from...
Windows Event Log in PowerShell – Part II
In part 1 of “Event logs in Powershell” we talked about differences between Get-EventLog and Get-WinEvent. In this second part we will dig deeper into Get-WinEvent. Starting in Windows Vista, the Windows Event Log was updated to provide a more powerful event model which allows for events to be easily categorized into logs and for event providers to be easily discovered. PowerShell V2 lets you search the Event Log for the data that's interesting to you, making it easier than ever to mine events from the Event Log. The new Get-WinEvent cmdlet provides access to all event logs on the system, inclu...
2009 Summer Scripting Games
Scripting Games start on June 15th and the excitement is building up. Details about the events in the game are emerging. Beginner and Advanced 100 meter Dash Beginner and Advanced Long jump Scripts can be submitted/viewed at http://scriptinggames.poshcode.org/ . There is a TechNet Forum in case you have a question or want to discuss something. http://social.technet.microsoft.com/Forums/en/2009summerscriptinggames/threads Have fun :-) Osama Sajid
Scripting Games 2009 – More details
Scripting Guys have posted more details about the 2009 scripting games, read it here. Stay tuned to their blog and Twitter for updates Thanks Osama Sajid
Managing Remote Sessions
PowerShell V2 introduces a new capability which allows you to remotely manage machines in your organization. You may have already tried this new feature. In this blog, I will show how an administrator can manage different remote sessions (created by different users from different clients) Scenario: Using PowerShell remoting, normal users can perform non-admin tasks on a machine remotely. There might be situations where an Administrator of the machine may want to terminate specific sessions created by specific users. This Administrator task can be achieved by just restarting WinRM service. However this is n...
Peering into script modules
Sometimes it’s handy to access internal elements of script modules. For instance you may be using a 3rd party module in your application and would like to see the internal state for debugging purposes. This can be accomplished with the invoke operator (&) which allows you to access a modules session state: & $module {script block} The script block is executed in the context of the module. Create a script module that exports nothing: Save to a file ‘NoExport.psm1’, import the module and assign to a variable: If we try to call function ‘Hidden’ we get an error because it was no...