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



2015/02/15

Introducing WinFormPS: PowerShell module to interact with WinForms controls


I started to work on a PowerShell module called WinFormPS.
This module contains a few functions that let you interact with Windows Form controls such as DataGridView, ListBox or Button controls for example.

To build those forms I mostly use PowerShell Studio from Sapien but this can also work with any simple Form created from scratch.

The motivation to create User Interfaces has always been to ease the work of  departments and teams with some of their heavy tasks, or simply to speed up some very repetitive processes. I definitely don't have a developer background, so please bear with me and feel free to critique or push update to the module on GitHub :-)


WinForms
Windows Forms (WinForms) is the name given to a graphical (GUI) class library included as a part of Microsoft .NET Framework, providing a platform to write rich client applications for desktop, laptop, and tablet. While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a comparable paradigm and only act as a platform for the user interface tier in a multi-tier solution. -Wikipedia

2015/02/04

PowerShell Studio 2014/2015 - Editor Preset : Dark theme


Today a quick post to share one of the editor preset I created for Sapien PowerShell Studio.

Because I prefer to work with a dark theme, when installing PowerShell Studio, one of the first thing I do is to set my layout to Editor Only and put a Dark theme like the "Visual Studio 2013 Dark".

On the editor side, the tool come with a couple of preset but none of them are dark/black.
So I created my own...

Update: Adding details on how to change the PowerShell Studio theme and link to Anonymous Pro font

Download from GitHub
https://github.com/lazywinadmin/PowerShell/tree/master/_PowerShellStudio/EditorPresets