Various PowerShell functions and scripts. These are published as WFTools on the PowerShell Gallery (thanks to @psrdrgz for the idea!)
Two functions have been migrated to their own repositories to simplify and enable improved collaboration. Copies remain here for historical purposes and may be updated:
These files contain functions. For example, Invoke-Sqlcmd2.ps1 contains the Invoke-Sqlcmd2 function.
# PowerShell 5, or PackageManagement available?
Install-Module WFTools -Force
Import-Module WFTools
Get-Command -Module WFTools
Get-Help ConvertTo-FlatObject -Full
# Alternatively:
# Download and unblock the file(s).
# Dot source the file(s) as appropriate.
. "\\Path\To\Invoke-Sqlcmd2"
# Use the functions
Get-Help Invoke-Sqlcmd2 -Full
Invoke-Sqlcmd2 -ServerInstance MyServer\MyInstance -Query "SELECT ServerName, VCNumCPU FROM tblServerInfo" -As PSObject -Credential $cred | ?{$_.VCNumCPU -gt 8}
Note: Using Import-Module to load these functions will break certain scenarios for Invoke-Parallel's variable import (details) - dot source the function if you need this.
Many of these functions started out in the Technet Gallery. You might find more context at these links.
- ConvertFrom-SID
- Get-ADGroupMembers
- Get-FolderEntry
- Get-GPPFile
- Get-GPPShortcut
- Get-InstalledSoftware
- Get-MSSQLColumn
- Get-NetworkStatistics
- Get-PropertyType
- Get-ScheduledTasks
- Get-UACSetting
- Get-UserSession
- Invoke-Parallel
- Open-ISEFunction
- Test-ForAdmin
Would love contributors, suggestions, feedback, and other help!