Category: Powershell

PowerShell Export-Csv

PowerShell Export-Csv with Get-QADUser This page is where PowerShell meets CSVDE, any knowledge of CSVDE and its switches is helpful in understanding how to use Export-Csv.  Even if your ultimate goal is to bulk-import accounts into Active Directory, there are sound reasons to master Export-Csv first.  For instance, exporting user …

PowerShell Foreach-Object

PowerShell Foreach-Object Cmdlet Looping is a core method for scripting.  About the only topic of confusion in PowerShell is that between the ForEach operator and the Foreach-Object cmdlet. In a nutshell if you need pipelining study this page.  If you want a quick easy method study the simple PowerShell loops …

PowerShell Get-Acl Cmdlet

PowerShell Script Files – Get-Acl From a strategic point of view Get-Acl (Access Control List) is a stepping-stone to changing permissions with Set-Acl.  When learning about Get-Acl select a file rather than a folder, those SID numbers can be so meaningless. Example 1: Get-Acl Owner Check Example 2: Get-Acl -Replace …

PowerShell v 3.0 Foreach-Object Loops

PowerShell v 3.0 Foreach-Object Changes I want to draw your attention to changes to Foreach-Object in PowerShell 3.0, while highlighting the differences between the Foreach statement and the Foreach-Object cmdlet. Topics for PowerShell 3.0’s Foreach-Object Loop Foreach-Object in PowerShell 2.0 Foreach-Object in PowerShell 3.0 Foreach Statement More on PowerShell Foreach …

Windows PowerShell Quotes

Introduction to Windows PowerShell Quotes Did you ever use a traditional single-bladed screwdriver on a square ‘Philips’ head?  Sometimes you get away with it, but sooner or later you will literally "screw up" – well it’s the same with PowerShell’s quotes. Topics for PowerShell Quotes Introduction to the right sort …

PowerShell Hashtable

Introduction To PowerShell Hashtable I think of a PowerShell's hashtable as a super array.  Whereas arrays are one dimensional, hashtables have multiple keys.  Hash tables make it easier to work with the underlying connections, they work on Key = Value pairs. Topics for PowerShell’s Hashtable Introduction to PowerShell Arrays and …

PowerShell Set-Acl Cmdlet

PowerShell Script Files – Set-Acl With Set-Acl (Access Control List) you can actually change permissions on files or folders, thus adjust who can see sensitive information.  If you are new to this cmdlet I recommend that you start with the safer, easier Get-Acl before you risk creating a rogue script …

Windows PowerShell 5.0

What’s New In PowerShell 5.0 Windows Server 2012 R2 introduced the notion of Desired State Configuration (DSC), PowerShell 5.0 advances this concept through OneGet.  The holy grail is to simplify discovering and installing software on your Windows computer. PowerShell 5.0 New Features Windows PowerShell OneGet Windows Management Framework 5.0 PowerShell …