Apr 30, 2012
Microsoft Script Explorer for Windows PowerShell
While digging around on the Internet for some PowerShell code I came across a new tool from Microsoft called Microsoft Script Explorer for Windows PowerShell (pre-release). Microsoft Script Explorer for Windows PowerShell (pre-release) helps scripters find Windows PowerShell scripts, snippets, modules, and how-to guidance in online repositories such as the TechNet Script Center Repository, PoshCode, local... read more
Apr 30, 2012
Creating Folder Shares with PowerShell
Here is a cool little function that you can use to create a share on a system. Save this function in a PowerShell module and load to your toolset.To run this cfunction you must have full administrator privileges, this function also sets the ErrorActionPreference to stop. function New-Share { param($Path, $Name) try { $ErrorActionPreference = ‘Stop’ if ( (Test-Path $Path) -eq $false) { $null =... read more
Apr 29, 2012
Adding Additional Fonts to PowerShell and Command Console
Ever wanted to add a different font to PowerShell and command prompt, we’ll here is an easy way to add it with PowerShell. Open a PowerShell with Administrator privileges and execute the following commands. $key = ‘HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont’ Set-ItemProperty -Path $key -Name ‘000’ -Value ‘Courier New’ To select a font,... read more
Apr 29, 2012
Converting User Names to SIDs with Powershell
While doing some Active Directory work ran across a need to translate a user name to a SID (security identifier) to help find traces of it in the registry. Here is an easy way to do this with PowerShell function. function getSID($name, $domain=$env:userdomain) { $objUser = New-Object System.Security.Principal.NTAccount($domain,$name) $strSID =... read more
Apr 28, 2012
Converting Adobe Type 1 Fonts AFM for use on Windows 7
Recently ran into an interesting issue where a client had a purchased Adobe Type 1 font the had been using on their Mac OSX systems and need to use the font on their newer Windows systems. Being that the fonts were Adobe Type 1 fonts and only had the .AFM files this was an issue with using the font on a Windows system, so it had to be converted. This was achieved by using Fondu and AfmToPfm. Fondu was run... read more
