Installing Fonts with PowerShell

The mechanism of installing fonts with PowerShell works slightly differently since the Windows 10 1809 feature update. Previously we could use this one-liner: (New-Object -ComObject Shell.Application).Namespace(0x14).CopyHere(“C:\Build\Font\A39WB_.TTF”,0x14); But since 1809 this installs the font to the per-user location as opposed to … Continue reading

|

Search Active Directory using ADSISearcher Filters

[catlist name=”PowerShell ADSI and Active Directory” conditional_title=”Other Posts in this Series:” numberposts=5 pagination=yes customfield_orderby=”series_post_order” order=”asc”] This post discusses how we can search Active Directory using ADSISearcher filters.  Using search filters can improve search performance significantly. Consider the following where we … Continue reading

Export Data to a CSV and Maintain the Column Order

This post provides a simple example of how we can export data to a CSV and maintain the column order: $csvFile = “c:\temp\alkane.csv” $exampledata = @(@(“John”,”37″),@(“Peter”,”14″),@(“Michelle”,”22″),@(“Abdul”,”31″),@(“Roger”,”22″),@(“Rachel”,”50″)) $csvwrapper = @() foreach($person in $exampledata) { $name = $person[0] $age = $person[1] #append … Continue reading

Use ADSI to Search Computers in Active Directory

[catlist name=”PowerShell ADSI and Active Directory” conditional_title=”Other Posts in this Series:” numberposts=5 pagination=yes customfield_orderby=”series_post_order” order=”asc”] This post provides a simple example of how we can use ADSI to search computers in Active Directory.  You may wish to further optimise this … Continue reading

|