PowerShell Team
Automating the world one-liner at a time…
Latest posts
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...
Getting Started with AppLocker management using Powershell
Have you tried out the new AppLocker feature in Windows 7? If not, check it out here and here. Also check out the AppLocker references during TechEd here along with a related video here. AppLocker allows you to specify applications that can or cannot run on the machines in your network. AppLocker’s management tools are optimized towards creating an “allow list” of applications i.e. the list of applications that are allowed to run. Applications not on the allow list are blocked by the system. Perhaps, you have been intrigued by “allow listing” and have tried to implement this approach to get a control over t...
PowerShell 2.0 – Differences Between Win7Beta and Win7RC
Oisin Grehan, PowerShell MVP has done a diff between Powershell 2.0 that shipped with Win7 Beta and Win RC... very useful if you have moved to RC build (or planning to do so) http://www.nivot.org/2009/05/22/PowerShellV20DifferencesBetweenCTP3Win7BetaAndWin7RC.aspx. PowerShell team thanks Oisin for this useful blog post. Osama Sajid, Program Manager