PowerShell one-liner: Get eventlog

Use PowerShell one-liner to get eventlog details quickly and easily. In this article you will find several useful examples which will help you in daily operational tasks. Get-Eventlog The Get-EventLog cmdlet actually serves two purposes: it enables you to manage your event logs, and it also enables you to get at the events contained within those event logs. To get lognames list we just have to use parameter -list : …

PowerShell one-liner: Test connectivity

In this one-liner series I would like to show you several ways to test connectivity. There are lots of methods and basic commands to check network connection like ping, telnet, tracert etc. However it this post you will find out how to combine other PowerShell commands into one-liner script. Most common PowerShell command is Test-Connection which returns basically the same output as Ping. To use it for a bunch of …

PowerShell one-liner: Find AD user based on property

While working in Active Directory based environment you are often dealing with AD user accounts and probably using often Get-ADUser command. In this article I want to present several simple examples how to use it. Normally when we want to display user details we use -Identity : To list names of all available user properties we can use Get-Member command: The case will be a little bit different when we …

PowerShell one-liner: Get AD user groups

Starting from today we will add new series of articles describing one-liner scripts. In this post I would like to show you how to get group names that user is a member of using just one-liner script. Get-ADUser allows you to list all information for Active Directory user account. This command is a part of ActiveDirectory module where you can also see other commands. Check available modules on your PC: …