List/Grid Brainteasers Subscribe RSS feed of category Brainteasers

Find an unused drive letter

Find an unused drive letter

Your task is to write the shortest code to find one of the unused drive letters (excluding a,b and c). PowerShell’s default aliases are allowed. You have one week.  Answers… Read more »

Enum’s numeric values

Enum’s numeric values

Without any loop statements or pipelines, get the numeric values of an Enum (such as IO.FileAttributes) in 1 statement.

Private variable

Private variable

Attain the value of a private variable declared in a child scope from that scope’s own child scope.

Format elements

Format elements

Given an Array of at least 2 elements, return a new Array of formatted elements without using array indices, pipelines or loop statements.

Reverse text line

Reverse text line

Given an Array of at least 2 elements, return a new Array of formatted elements without using array indices, pipelines or loop statements.

© 2012 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.