项目作者: RamblingCookieMonster

项目描述 :
Various PowerShell functions and scripts
高级语言: PowerShell
项目地址: git://github.com/RamblingCookieMonster/PowerShell.git
创建时间: 2014-03-08T22:50:48Z
项目社区:https://github.com/RamblingCookieMonster/PowerShell

开源协议:MIT License

下载


PowerShell

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:

Instructions

These files contain functions. For example, Invoke-Sqlcmd2.ps1 contains the Invoke-Sqlcmd2 function.

  1. # PowerShell 5, or PackageManagement available?
  2. Install-Module WFTools -Force
  3. Import-Module WFTools
  4. Get-Command -Module WFTools
  5. Get-Help ConvertTo-FlatObject -Full
  6. # Alternatively:
  7. # Download and unblock the file(s).
  8. # Dot source the file(s) as appropriate.
  9. . "\\Path\To\Invoke-Sqlcmd2"
  10. # Use the functions
  11. Get-Help Invoke-Sqlcmd2 -Full
  12. 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.

TechNet Galleries Contributions

Many of these functions started out in the Technet Gallery. You might find more context at these links.

Help!

Would love contributors, suggestions, feedback, and other help!