Tag Archives: Script

Austin PowerShell Users Group – Slides and Code

Last week I had the pleasure of presenting for the Austin PowerShell UG, this is a group run by Ricc Babbitt. During this session I presented the following topic:

Reach the next level with PowerShell

During this presentation I walked the audience through the process of developing a short script to gather information from a system. I pinpointed a number of steps that you can take while developing a script and how to combine the output from different sources in order to get a complete picture of what is running in your environment.

The code has been shared on GitHub in my Events repository:

Reach the next level with PowerShell

I also shared the slides I used and my other presentations on SlideShare:


Share

QuickTip: Change PowerShell Console Size and Buffer

Changing the size of the PowerShell console is something that has been made easier in recent versions of PowerShell. But when working with older versions of PowerShell or with automated systems it is useful to be able to do this programmatically.

To set the buffer to 5000 lines and a line width of 160 characters we run the following code:

1
$host.UI.RawUI.BufferSize = New-Object System.Management.Automation.Host.Size(160,5000)

To determine the current width and buffer of the console we can check the following variable:

1
$host.UI.RawUI.BufferSize

Note that when you attempt to decrease the width to below the current width you will be presented with an error:

Share

250000 Downloads in Technet Script Gallery

Jaap Brasser - TechNet Script GalleryApproximately one year ago I saw the number of downloads tick over a hundred thousand, today my total downloads from the TechNet Script Gallery has reached 250,000.  To celebrate this milestone I have uploaded all of the scripts I have stored in the TechNet Script Gallery also to GitHub to simplify the updating and collaboration with others.

My personal preferred method of installing and sharing scripts is by using the PowerShell Gallery, which is available at PowerShellGallery.com or by using the PowerShellGet cmdlets, for example the following two lines of code can find the scripts and modules I have currently posted:

1
$(Find-Script;Find-Module).Where{$_.Author -match 'Jaap Brasser'}

FindModuleandScripts

The complete list of my scripts is now available on GitHub:
Jaap Brasser – GitHub – SharedScripts
Jaap Brasser - GitHub - SharedScripts

And also in the TechNet Script Gallery:
Jaap Brasser – TechNet Script Gallery

As I personally mostly see benefit in sharing of modules and not so much single scripts and function I am working on converting some of the scripts I have written into modules and once they are finalized I will upload those to the PowerShell Gallery as well. So my question to the community is as follows, which improvements are you most interested in or what would you like to see next?

Feel free to use the comment section underneath this post to share your ideas or feedback. That is it for now, until the next milestone!

250,000 Downloads
My TechNet Community Profile
My entries in TechNet Script Gallery
Jaap Brasser – GitHub Profile
Jaap Brasser – PowerShell Gallery

Share

New article on PowerShell Magazine: Get last login date for local account

LastLogon

Two weeks ago I wrote Get-LocalLastLogonTime and blogged about this. In this script I use the [adsi] type accelerator in combination with the WinNT provider to retrieve the LastLogin property of a user account. I wrote a short article on this for PowerShell Magazine : Get last login date for local account

1
([ADSI]"WinNT://computer/jaapbrasser").lastlogin

For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine.

Links in this Article
PSTip: Get last login date for local account
PowerShell Magazine
External Articles
My entries in TechNet Script Gallery
Get-LocalLastLogonTime
Share

150000 Downloads: A personal milestone

150000Downloads

Earlier today the counter on my TechNet community profile tipped over from 149,999 to 150,000. A major milestone for me personally as I never expected when I uploaded my first script, Get-FileVersion: Script to check file properties, that I would get this level of feedback. After uploading my first few scripts I remember my excitement when I received my first email from TechNet with a question to one of the scripts. Nowadays I occasionally struggle to keep up with the requests and questions that the scripts generate, and I love the interaction and feedback I have received.

That is also the reason for this post, a thank you to everyone using, breaking and improving my scripts. I have learned a lot and I have revisited some of my ideas on your experiences. It has been very rewarding keeping up with all the developments, suggestions and questions.

I have created a new section on my blog to be able to keep track of the scripts I have released it is available in the top section of this site, Scripts. It contains all the direct links to my script pages and the relevant Q and A sections in the TechNet Script Gallery.

ScriptsSection

In conclusion I would like to thank everyone from participating in discussions that prompted me to write, re-write and re-re-write my scripts for countless iterations and I hope to hear more from everyone in the future!

150,000 Downloads
My TechNet Community Profile
My entries in TechNet Script Gallery
New Script Section

 

Share