PowerShell for Windows Admins:

Powershell


January 26, 2015  11:08 AM

Filtering on if an AD property exists

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

There are times when you want to filter the results based on whether a user has an AD property set.  You could do this: Get-ADUser -Filter * -Properties Title | Where Title  | select Name, Title However, that involves pulling back all of the users and then filtering. Not very efficient...

January 21, 2015  12:21 PM

Awkward file and folder names

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Spent some time today dealing with a situation where there were special characters – namely [ ] in folder a file names £> Get-ChildItem -Path C:\Test Directory: C:\Test Mode                LastWriteTime     Length Name ----               ...


January 18, 2015  10:11 AM

PowerShell Summit NA 2015 Agenda changes

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

We’ve had to make some minor changes to the Summit agenda – the revised schedule is shown on the event web site - http://eventmgr.azurewebsites.net/event/home/PSNA15


January 18, 2015  5:02 AM

PowerShell Heroes 2015

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Powershell.org has announced the 2015 list of PowerShell Heroes- Bookmark and Share     0 Comments     RSS Feed     Email a friend


January 12, 2015  11:41 AM

Event log dates

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

You can use Get-EventLog to query the event logs on you system Get-EventLog -LogName System One frequent task is to check if events occurred during a specific timespan. You may feel that you need to use a where-object filter to do this but there is a simple method. Get-EventLog -LogName...


January 11, 2015  5:21 AM

Add-Computer is your friend

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

When spinning up new machines and joining them to the domain at least 2 reboots are required. One when you rename the machine (Windows used to let you specify the name at install time – the removal of that feature was a step backwards) and the other when you join it to the domain. I was...


January 9, 2015  11:30 AM

foreach, pipelines and $_

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

I’ve recently seen a few questions where people have been using a pipeline inside a foreach loop and experienced problems when they’ve tried to access properties on the looping objects. To illustrate we’ll start with a CSV file containing emailaddresses and job titles. £> Import-Csv...


January 7, 2015  2:27 PM

DHCP scope lease time

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
DHCP, Powershell, Windows Server 2012, Windows Server 2012 R2

I wanted to reduce the lease time on a DHCP scope $lt = New-TimeSpan -Hours 12 Set-DhcpServerv4Scope -ScopeId 10.10.54.0 -LeaseDuration $lt You could even make it a one liner if you wished Set-DhcpServerv4Scope -ScopeId 10.10.54.0 –LeaseDuration (New-TimeSpan -Hours 12)


January 6, 2015  11:50 AM

A use for default parameters – default powershellget repository

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

When you use Find-Module by default all repositories are searched £> Find-Module -Name Pester | ft Version, Name, Repository -a Version Name   Repository ------- ----   ---------- 3.2.0   Pester PSGallery 3.2.0   Pester PowerShellModules If you don’t give a module name...


January 6, 2015  2:56 AM

PowerShell Summit Europe 2015–topic submissions

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Topic submissions for the PowerShell Summit Europe are still open. If you want to be considered as a speaker please submit your topic very soon. At the moment there aren’t enough submissions to enable us to put on a quality event. The 2014 European Summit was an excellent event with many good...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: