powershell

September UK PowerShell User Group – Remoting: SlideDeck

Thanks for those who attended tonight’s User Group event on PowerShell remoting. I mentioned during the presentation that I would make the slides available on my blog, you can view or download them from below. PowerShell 2 remoting View more presentations from jonathanmedd. test

September UK PowerShell User Group - Remoting

On Tuesday 14th September 20:30 (BST) I will be presenting for an online meeting of the UK PowerShell User Group. The topic will be PowerShell 2.0 Remoting and I will be looking at what you need to make this available and the consequent benefits of doing so. Sign up details are below: http://msmvps.com/blogs/richardsiddaway/archive/2010/09/02/september-powershell-user-group.aspx

Tivoli Monitoring, WMI and Server Buffers Full

If you run Tivoli Monitoring 6.2 to monitor Windows Server systems and use other applications to query WMI, e.g. PowerShell and Get-WmiObject, then you may receive the error ‘Server buffers are full and data cannot be accepted’. Restarting the WMI service will temporaily clear it, but the issue is liable to come back again. This can occur because of a file handle leak in the ITM Windows OS agent when collecting “Processor Information” attribute group.

PowerShell 2.0: One Cmdlet at a Time 107 Add-Type

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Add-Type cmdlet. What can I do with it? Imbed code from modern programming languages into your PowerShell session or scripts. The list of valid languages are: C#, C# 3.0, VisualBasic and JScript - C# is the default. Use the Language parameter to specify one if it is not C#. Example: Within a PowerShell session use some C# code to create a TakeAway class and create a static method Minus.

PowerShell 2.0: One Cmdlet at a Time 106 Import-LocalizedData

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Import-LocalizedData cmdlet. What can I do with it? Enable text in scripts displayed to users to be presented in their own language. The cmdlet uses the automatic variable $PSUICulture to determine the language to use and alternate text is stored within .psd1 files in subdirectories of the folder that the script is stored.

PowerShell 2.0: One Cmdlet at a Time 105 Set-StrictMode

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Set-StrictMode cmdlet. What can I do with it? Configure strict mode for the current scope. An error will be generated when the content of an expression, script or script block violates coding rules. Note: it is possible to use the Version parameter to pick which coding rules to use. The PowerShell help lists the current possible options as:

PowerShell 2.0: One Cmdlet at a Time 103 Update-List

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Update-List cmdlet. What can I do with it? Add, Remove or Replace items from a property value of an object. This cmdlet can only update a property when it supports the IList interface. So far this does not include any of the core Windows PowerShell cmdlets - however it does include some of the cmdlets that ship with Exchange 2007 and later.

PowerShell 2.0: One Cmdlet at a Time 104 Trace-Command

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Trace-Command cmdlet. What can I do with it? Begin a trace of a command or expression. Example: Examine debug info for Parameter Binding when piping a string through to Get-Service. Trace-Command -Name ParameterBinding -Option All -Expression {‘winmgmt’ | Get-Service} -PSHost You will see it is possible to work through the debug info to find out what is happening:

PowerShell 2.0: One Cmdlet at a Time 102 Disable-PSRemoting

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Disable-PSRemoting function. Note: This is a proxy command which calls the Disable-PSSessionConfiguration cmdlet. What can I do with it? Disable PowerShell remoting on a computer that has previously been enabled for remoting. Note: This command must be run from a PowerShell session with administrative privileges. Example: Retrieve the current PSSessionConfiguration settings. Disable PowerShell remoting, then retrieve the PSSessionConfiguration settings again to compare.

PowerShell 2.0: One Cmdlet at a Time 101 Wait-Process

Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Wait-Process cmdlet. What can I do with it? Wait for a process to stop before proceeding further. Example: Open an instance of Notepad. Use Wait-Process to pause the console session until Notepad is closed. Notepad Wait-Process -Name Notepad You will notice that the console pauses whilst Notepad is open Once Notepad is closed, control of the session is returned to the user.