2015/05/18

PowerShell - Report Expiring User accounts

In the video game industry it is common practice to hire consultants to take care of the Quality Assurance, which consists of a means of the software engineering processes and methods used to ensure quality. Those people are most likely Testers and usually spend most of their day testing games in development to find bugs.

The problem is, once in a while managers forget to update the expiration dates of their Consultant/External Partners even if they got a couple of reminders, and since we have some automation process taking care of the off-boarding (thanks to PowerShell! ;-)...it is becoming fun when those guys can't connect to their accounts on Monday morning...and they lost all their access.


So I wrote a tiny script to report any expiring user accounts and send it to the IT department every Monday morning, just to give us a heads up.

Report Example

2015/05/04

Microsoft Ignite 2015 in Chicago

This week I will be in Chicago, Illinois to attend the Microsoft Ignite 2015. The last time I was in Chicago was for the Marathon in 2012. I kept a great souvenir of the city and people were super nice!

This time I'm going to attend the Microsoft Ignite all week but first I will meet my coworkers at the NetherRealm video games studio (where they work on Mortal Kombat) and visit their workplace.



If you want to meet me, I'm planning to attend sessions related to Nano servers, Docker/Containers, Windows Server/System Center and anything interesting on Automation.

I will also be at the Scripting Guys and Sapien Booth:

  • Scripting Guys Booth - Tuesday May 5 - 10:30am
  • Sapien Technologies Booth #355 - Wednesday May 6 - 3:00pm



Willis Tower



Running the Chicago's Marathon in 2012
Marathon is a 26 miles/42 km race, I finished in 3 hours and 20 minutes! :-)


Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

2015/04/12

PowerShell/Active Directory - Retrieve Groups managed by a User

I recently had an interesting request at work:
Finding a way to list all the groups a specific user was managing.

If you look into the properties of an Active Directory group object, you will find under the tab "ManagedBy" the name of a user or group who is managing the group and possibly its members if the "Manager can update membership list" is checked.

Group object properties / Managed By tab


This is nice for one group.... what if the user manage tons of them ?

2015/04/10

PSBlogWeek on Advanced Functions - Free eBook available

Last week I participated to the PowerShell Blog Week with a couple of community well-known Bloggers/Enthusiasts/MVP. The topic of the week was Advanced Functions.

It seems a lot of people enjoyed the event and I hope a great amount learned something from it.

I'm happy to announced that all the articles have been combined into a free ebook (Thanks to Jeffery Hicks) available in different format.

PowerShell Blog Week - Advanced Functions
By Adam Bertram, Boe Prox, Francois-Xavier Cat, Jeffery Hicks, June Blender, Mike F. Robbins.


Download:



Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

2015/03/30

Standard and Advanced PowerShell functions

This post is part of the PowerShell Blogging Week (#PSBlogWeek), a series of coordinated posts designed to provide a comprehensive view of a particular topic.

This week topic will be focused on Windows PowerShell Advanced Functions.


In this post, we'll discuss Standard and Advanced Functions and why you should write advanced functions.


When you have been working with PowerShell for some time, creating reusable tools is an obvious evolution to avoid writing the same code over and over again. You will want to have modular pieces of code that only do one job and do it well - that’s the role of functions.

Let's suppose you have to accomplish a task that requires multiple lines of code, for example:

# Computer System
Get-WmiObject -Class Win32_ComputerSystem
# Operating System
Get-WmiObject -class win32_OperatingSystem
# BIOS
Get-WmiObject -class Win32_BIOS

2015/03/27

PowerShell Blogging Week

Next week, from the 30th of March to the 4th of April, I will be participating to the PowerShell Blogging Week with a couple of community well-known Bloggers/Enthusiasts/MVP.

But.. what is the PowerShell Blogging Week: This event was initiated by Jeffery Hicks and Adam Bertram and will focus on one PowerShell topic.

Each participants will be posting one article on his/her affected day, on their respective blog.  You can follow the event by following the blogs bellow, using the twitter hashtag #PSBlogWeek or the Twitter list created by Mike F Robbins.

Topic of the PBW: PowerShell Advanced Functions.

Here’s the list of bloggers who are involved, their Names, Twitter handles and their blog:

Name
Twitter
Blog
Adam Bertram @adbertam http://www.adamtheautomator.com/
Boe Prox @proxb http://learn-powershell.net/
Francois-Xavier Cat @lazywinadm http://www.lazywinadmin.com/
Jeffery Hicks @jeffhicks http://jdhitsolutions.com/blog/
June Blender @juneb_get_help http://www.sapien.com/blog/
Mike F. Robbins @mikefrobbins http://mikefrobbins.com/


Stay tunned !!

Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

2015/03/01

Update: LazyTS v1.1

I found some time over the week-end to fix some bugs and add a few things to LazyTS. You'll now be able to quickly search though the displayed data using the small highlight util and open a Remote Desktop connection using the Shadow feature (View and Control)

See this link for more information about RDP Shadow.

What is LazyTS ?

LazyTS is a PowerShell script to manage Sessions and Processes on local or remote machines. It also allows you to Disconnect/Stop sessions and Send Interactive message to one or more sessions.

This tool is using the module PSTerminalService which relies on the Cassia .NET Library.I used Sapien PowerShell Studio 2014 to which make life easier if you want to start building WinForms tools and add PowerShell code.


Feature requests and Bugs report
I also want to thank those who are sending me features request and reporting bugs ! This is greatly helpful !!! Merci!! You can contact me using info (at) lazywinadmin.com

2015/03/04 Update: Fixed issue when using RDP Shadow and getting the error "This computer name is invalid"
2015/03/02 Update: Fixed a small issue where you got the following message : Exception setting "Item": "Exception calling "Set_Item" with "2" argument(s): "Cannot set Column 'CurrentTime' to be null. Please use DBNull instead."" This was related to an issue with ConvertTo-DataTable

2015/02/24

Two free live trainings from MVA on Desired State Configuration !

This week Microsoft Virtual Academy (also knows as MVA) will host two great live training events, one tomorrow and another one after tomorrow on Desired State Configuration.

If you are not familiar with MVA, It provides free online IT training & learning of Windows, Microsoft Technologies through courses designed by industry experts.

I did not play much with this new feature but I plan to invest more time into it in the next few weeks, this is definitely the future of system configuration management. If you are like me the two following events are a great way to start!

UPDATE: Videos are now available, see links below

What is Desired State Configuration ?

DSC is a new management platform in Windows PowerShell that enables deploying and managing configuration data for software services and managing the environment in which these services run.

DSC provides a set of Windows PowerShell language extensions, new Windows PowerShell cmdlets, and resources that you can use to declaratively specify how you want your software environment to be configured. It also provides a means to maintain and manage existing configurations.
Source: Technet