full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/Get-MenuOption.ps1 | Get-MenuOption.ps1 | function Get-MenuOption
{
<#
.Synopsis
Get a list menu options
.DESCRIPTION
Returns a PSCustomObject with all menu options. This CmdLet has no parameters
.EXAMPLE
C:> Get-MenuOption
Returns all menu-items for all menus
.NOTES
NAME: Get-MenuItem
AUTHOR: Tore Groneng tore@firstpoint.no ... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/Get-Menu.ps1 | Get-Menu.ps1 | $script:Menus = New-Object -TypeName System.Collections.ArrayList
$script:MenuOptions = [pscustomobject]@{
MenuFillChar = "*"
MenuFillColor = [consolecolor]::White
Heading = ""
HeadingColor = [consolecolor]::White
SubHeading = ""
SubHeadingColor = [consolecolor]::W... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/New-MenuItem.ps1 | New-MenuItem.ps1 | function New-MenuItem
{
<#
.Synopsis
Create a new Menu-Item for a Menu.
.DESCRIPTION
Menu-Items are the action elements of the Menu. You add Menu-Items to a Menu.
.EXAMPLE
C:> New-MenuItem -Name "PasswordReset" -DisplayName "Reset a user password" -Action { Set-UserPassword }
This will create... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/New-Menu.ps1 | New-Menu.ps1 | function New-Menu
{
<#
.Synopsis
Create a new Menu
.DESCRIPTION
You can create as many menus you like, however you may only have one main Menu. The Menu must
have a name, hence the Name parameter is Mandatory. The first Menu you create will become
the main Menu even if you do not specify the IsMainM... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/Show-Menu.ps1 | Show-Menu.ps1 | function Show-Menu
{
<#
.Synopsis
Show a Menu.
.DESCRIPTION
If executed without parameters, it will build and show the main Menu. If the MenuID parameter is
specified, it will show the menu with that ID. You may also use the cmdlet to invoke a specific
Menu-Item on a specific menu.
.EXAMPLE
C... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Scripts/menu.ps1 | menu.ps1 | $str = @'
<root>
<Header>
<Customer Name="Customer1">
<clientExceptionNotes>Execption delivery address</clientExceptionNotes >
</Customer>
</Header>
<Header>
<Customer Name="Customer2">
<clientExceptionNotes></clientExceptionNotes >
</Customer>
</Header>
</root>
'@
$script:menuItems = ... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Scripts/Example.ps1 | Example.ps1 | Remove-Module cliMenu -ErrorAction SilentlyContinue; Import-Module .\CliMenu.psd1
Set-MenuOption -Heading "Helpdesk Inteface System" -SubHeading "LOIS by Firstpoint" -MenuFillChar "#" -MenuFillColor DarkYellow
Set-MenuOption -HeadingColor DarkCyan -MenuNameColor DarkGray -SubHeadingColor Green -FooterTe... |
PowerShellCorpus/PowerShellGallery/RemoteAdmins/1.0.8/PullList.ps1 | PullList.ps1 | #Resolves each computer to FQDN. DNS suffix must exist in the local machine.
Function ResolveDNS ($Computers) {
Write-Verbose -Verbose "Resolving the Computer Name..."
$ResolvedComputers = $Computers | foreach {
Try {
Resolve-DnsName $_ -ErrorAction Stop | select Name -ExpandProperty... |
PowerShellCorpus/PowerShellGallery/AzureRM.SiteRecovery/4.1.0/AzureRmRecoveryServicesStartup.ps1 | AzureRmRecoveryServicesStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apach... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/Get-SAPSupportApiKey.ps1 | Get-SAPSupportApiKey.ps1 | <#
.SYNOPSIS
Get the default API key for wagnerSolutions SAP Support Rest API
.DESCRIPTION
.LINK
Set-SAPSupportAPIKey
#>
function Get-SAPSupportAPIKey
{
[CmdletBinding()]
$registryPath = "HKCU:\Software\wagnerSolutions\PSSAPSupport"
$apiKey = Get-ItemProperty $registryPath -Name... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/Set-SAPSupportApiKey.ps1 | Set-SAPSupportApiKey.ps1 | <#
My Function
#>
function Set-SAPSupportApiKey
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, Position=1)]
[string]$ApiKey
)
$registryKey = "HKCU:\Software\wagnerSolutions\PSSAPSupport"
if((Test-Path $registryKey) -ne $true){
New-Item $registryKey -... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/EnsureSAPSupportApiKey.ps1 | EnsureSAPSupportApiKey.ps1 | <#
My Function
#>
function EnsureSAPSupportApiKey
{
param(
[Parameter(Position=1)]
[string]$ApiKey
)
if([string]::IsNullOrWhiteSpace($ApiKey))
{
$ApiKey = Get-SAPSupportApiKey
}
if([string]::IsNullOrWhiteSpace($ApiKey) -or $ApiKey -eq "undefined")
{
throw "No... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/EnsureSAPSupportCredential.ps1 | EnsureSAPSupportCredential.ps1 | <#
My Function
#>
function EnsureSAPSupportCredential
{
param(
[Parameter(Position=1)]
[pscredential]$Credential = $null
)
if($Credential -eq $null) {
$registryPath = "HKCU:\Software\wagnerSolutions\PSSAPSupport"
$password = (Get-ItemProperty $registryPath -Name "Pass... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/Set-SAPSupportCredential.ps1 | Set-SAPSupportCredential.ps1 | <#
My Function
#>
function Set-SAPSupportCredential
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, Position=1)]
[PSCredential] $Credential
)
$registryKey = "HKCU:\Software\wagnerSolutions\PSSAPSupport"
if((Test-Path $registryKey) -ne $true){
New-Item $regi... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/Get-SAPInstallationDownload.ps1 | Get-SAPInstallationDownload.ps1 | <#
My Function
#>
function Get-SAPInstallationDownload
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$DownloadId,
[Parameter(Position=2)]
[string]$GroupId = "00200682500000001943",
[string]$ApiKey,
[PSCredential] $Credential,
[Syst... |
PowerShellCorpus/PowerShellGallery/wagnerSolutions.SAPSupportAPI/1.0.4/Get-SAPPatchDownload.ps1 | Get-SAPPatchDownload.ps1 | <#
My Function
#>
function Get-SAPPatchDownload
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$DownloadId,
[Parameter(Mandatory=$False, Position=2)]
[string]$GroupId = "00200682500000001943",
[Parameter(Mandatory=$False)]
[ValidateSet('WIN32','NT_... |
PowerShellCorpus/PowerShellGallery/xThunderbird/1.0.8/Example/Sample_xThunderbird.ps1 | Sample_xThunderbird.ps1 | # Sample configuration using xThunderbird.
Configuration Sample_InstallxThunderbird
{
param
(
[Parameter(Mandatory)]
$VersionNumber,
[Parameter(Mandatory)]
$Language,
[Parameter(Mandatory)]
$OS,
[Parameter(Mandatory)]
$LocalPath
)
Import-DscResource -module xThunde... |
PowerShellCorpus/PowerShellGallery/iPerfAutomate/1.0.2/IperfAutomate.Tests.ps1 | IperfAutomate.Tests.ps1 | #region import modules
$ThisModule = "$($MyInvocation.MyCommand.Path -replace '\.Tests\.ps1$', '').psd1"
$ThisModuleName = (($ThisModule | Split-Path -Leaf) -replace '\.psd1')
Get-Module -Name $ThisModuleName -All | Remove-Module -Force
Import-Module -Name $ThisModule -Force -ErrorAction Stop
#endregion
describe 'Mod... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/helpers/Get-BoundParameter.ps1 | Get-BoundParameter.ps1 | function Get-BoundParameter
{
<#
.Description
returns bound parameters excluding common parameters and any others explicitly excluded
#>
[CmdletBinding()]
[OutputType([hashtable])]
param
(
[Parameter(Mandatory = $true)]
[hashtable]
$BoundParameters,
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/helpers/Invoke-OneLoginRestMethod.ps1 | Invoke-OneLoginRestMethod.ps1 | function Invoke-OneLoginRestMethod
{
[CmdletBinding()]
param
(
[string]
$Method = "Get",
[Parameter(Mandatory)]
[string]
$Endpoint,
[Parameter(Mandatory)]
[OneLogin.Token]
$Token,
[hashtable]
$Body
)
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/helpers/Set-OneLoginDefaultToken.ps1 | Set-OneLoginDefaultToken.ps1 | function Set-OneLoginDefaultToken
{
param
(
[OneLogin.Token]
$Token
)
$ModuleName = $PSCmdlet.MyInvocation.MyCommand.Module.Name
$Module = Get-Module -Name $ModuleName
$Commands = $Module.ExportedCommands.GetEnumerator() |
Select-Object -ExpandProperty value |
Wh... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Set-OneLoginUser.ps1 | Set-OneLoginUser.ps1 | function Set-OneLoginUser
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Medium")]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[OneLogin.User]
$Identity,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginRole.ps1 | Get-OneLoginRole.ps1 | function Get-OneLoginRole
{
[CmdletBinding(DefaultParameterSetName = "Filter")]
[OutputType([OneLogin.Role])]
param
(
[Parameter(ParameterSetName = "Filter")]
[ValidateScript(
{
$EnumValues = [OneLogin.RoleParameters].GetEnumNames()
f... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginEvent.ps1 | Get-OneLoginEvent.ps1 | function Get-OneLoginEvent
{
[CmdletBinding()]
[OutputType([OneLogin.Event])]
param
(
[ValidateScript(
{
$EnumValues = [OneLogin.EventParameters].GetEnumNames()
foreach ($Property in $_.GetEnumerator().Name)
{
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/New-OneLoginRefreshToken.ps1 | New-OneLoginRefreshToken.ps1 | function New-OneLoginRefreshToken
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Medium")]
[OutputType([OneLogin.Token])]
param
(
[Parameter()]
[ValidateNotNullOrEmpty()]
[OneLogin.Token]
$Token,
[switch]
$SetAsDefault
)
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginGroup.ps1 | Get-OneLoginGroup.ps1 | function Get-OneLoginGroup
{
[CmdletBinding()]
[OutputType([OneLogin.Group])]
param
(
[int]
$Identity,
[Parameter(Mandatory)]
[OneLogin.Token]
$Token
)
$Splat = @{
Token = $Token
Endpoint = "api/1/groups"
}
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Invoke-OneLoginUserLogoff.ps1 | Invoke-OneLoginUserLogoff.ps1 | function Invoke-OneLoginUserLogoff
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "High")]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory)]
[OneLogin.Token]
$Token
)
begin
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginCustomAttribute.ps1 | Get-OneLoginCustomAttribute.ps1 | function Get-OneLoginCustomAttribute
{
[CmdletBinding()]
[OutputType([string])]
param
(
[ValidateNotNullOrEmpty()]
[OneLogin.Token]
$Token
)
$Splat = @{
Token = $Token
Endpoint = "api/1/users/custom_attributes"
}
Invoke-OneLoginRestMet... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Remove-OneLoginUserRole.ps1 | Remove-OneLoginUserRole.ps1 | function Remove-OneLoginUserRole
{
[CmdletBinding(SupportsShouldProcess,ConfirmImpact = "High")]
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory = $true)]
[int[]]
$RoleId,
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginUserGroup.ps1 | Get-OneLoginUserGroup.ps1 | function Get-OneLoginUserGroup
{
[CmdletBinding()]
[OutputType([OneLogin.Group])]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory)]
[OneLogin.Token]
$Token
)
process
{
$Identity = ... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Invoke-OneLoginUserLockout.ps1 | Invoke-OneLoginUserLockout.ps1 | function Invoke-OneLoginUserLockout
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "High")]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[int]
$IntervalInMinutes = 0,
[OneLogin.Token]
$Token
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/New-OneLoginUser.ps1 | New-OneLoginUser.ps1 | function New-OneLoginUser
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Medium")]
[OutputType([OneLogin.User])]
param
(
[Parameter(Mandatory = $true)]
[string]
$firstname,
[Parameter(Mandatory = $true)]
[string]
$lastname,
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Add-OneLoginUserRole.ps1 | Add-OneLoginUserRole.ps1 | function Add-OneLoginUserRole
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Medium")]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory = $true)]
[int[]]
$RoleId,
[Parameter(Mand... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Remove-OneLoginUserCustomAttribute.ps1 | Remove-OneLoginUserCustomAttribute.ps1 | function Remove-OneLoginUserCustomAttribute
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "High")]
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory = $true)]
[string[]]
$Cus... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Set-OneLoginUserCustomAttribute.ps1 | Set-OneLoginUserCustomAttribute.ps1 | function Set-OneLoginUserCustomAttribute
{
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Medium")]
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory = $true)]
[ValidateScript(
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/New-OneLoginToken.ps1 | New-OneLoginToken.ps1 | function New-OneLoginToken
{
[CmdletBinding()]
[OutputType([OneLogin.Token])]
param
(
[Parameter(Mandatory)]
[System.Management.Automation.Credential()]
[PSCredential]
$Credential,
[Parameter(Mandatory)]
[OneLogin.AdminRegions]
$Regio... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Remove-OneLoginUser.ps1 | Remove-OneLoginUser.ps1 | function Remove-OneLoginUser
{
[CmdletBinding(SupportsShouldProcess,ConfirmImpact = "High")]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[OneLogin.Token]
$Token
)
begin
{
$Splat = @{
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginUserApp.ps1 | Get-OneLoginUserApp.ps1 | function Get-OneLoginUserApp
{
[CmdletBinding()]
[OutputType([OneLogin.App])]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory)]
[OneLogin.Token]
$Token
)
process
{
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginUser.ps1 | Get-OneLoginUser.ps1 | function Get-OneLoginUser
{
[CmdletBinding(DefaultParameterSetName = "Filter")]
[OutputType([OneLogin.User])]
param
(
[CmdletBinding(DefaultParameterSetName = "Filter")]
[ValidateScript(
{
$EnumValues = [OneLogin.UserFilterParameters].GetEnumNames()
... |
PowerShellCorpus/PowerShellGallery/OneLogin/1.0.10/functions/Get-OneLoginUserRole.ps1 | Get-OneLoginUserRole.ps1 | function Get-OneLoginUserRole
{
[CmdletBinding()]
[OutputType([OneLogin.Role])]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[OneLogin.User]
$Identity,
[Parameter(Mandatory)]
[OneLogin.Token]
$Token
)
process
{
$Identity = Get-On... |
PowerShellCorpus/PowerShellGallery/TaskRunner/1.0/StartProcess_GetSignal.ps1 | StartProcess_GetSignal.ps1 | Param (
[ValidateNotNullOrEmpty()]
[string] $fileName,
[ValidateNotNullOrEmpty()]
[string] $signalFileName
)
Write-Host "Inside StartProcess-GetSignal.ps1"
$ErrorActionPreference = 'SilentlyContinue'
$filePath = [System.IO.Path]::Combine($PSScriptRoot, $fileName)
$signalFile = [... |
PowerShellCorpus/PowerShellGallery/MSIgnite2016_PSV5Unplugged/1.0.2/MSIgnite2016_PSV5Unplugged-Demo.ps1 | MSIgnite2016_PSV5Unplugged-Demo.ps1 | <#
This scripot is for teaching by having people open it in PowerShell_ISE and selecting a line and
using F8 to run it.
Check out what it does and then explore. Look up the help and try different variations and parameters.
As such. This script is NOT meant to be run in it's entirety.
I put a return as the fi... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Get-TsmNode.ps1 | Get-TsmNode.ps1 | <#
.Synopsis
Gets the TSM nodes that exist on a server.
.DESCRIPTION
This cmdlet gets the TSM sessions that exist on a server. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Get-TsmNode FS*
.EXAMPLE
Get-TsmSession
... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Get-TsmFilespace.ps1 | Get-TsmFilespace.ps1 | <#
.Synopsis
Gets the TSM Filespaces that exist on a server.
.DESCRIPTION
This cmdlet gets the TSM Filespaces that exist on a server.
If you use the SchedName parameter, you must also pass the
policy domain parameter.
.EXAMPLE
Get-TsmFilespace
.EXAMPLE
Get-TsmFilespace -PolicyDomain POLICYDO... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Set-TsmEnvironmentVar.ps1 | Set-TsmEnvironmentVar.ps1 | <#
.Synopsis
Sets the required environmental variables for dsmadmc to run from powershell.
.DESCRIPTION
The Set-TsmEnvironmentVar sets the environment variables required for dsadmac
and subsequently this module as well. This command defaults to the default
path location for both the dsm.opt and the pa... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Remove-TsmNode.ps1 | Remove-TsmNode.ps1 | <#
.Synopsis
Removes one or more TSM node.
.DESCRIPTION
This function removes nodes from TSM. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Remove-TsmNode NODENAME
.EXAMPLE
Remove-TsmNode -NodeName NODENAME
.EXAMP... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Get-TsmAssocation.ps1 | Get-TsmAssocation.ps1 | <#
.Synopsis
Gets the TSM Associations that exist on a server.
.DESCRIPTION
This cmdlet gets the TSM Associations that exist on a server.
If you use the SchedName parameter, you must also pass the
policy domain parameter.
.EXAMPLE
Get-TsmAssociation
.EXAMPLE
Get-TsmAssociation -PolicyDomain ... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Invoke-TsmCommand.ps1 | Invoke-TsmCommand.ps1 | <#
.Synopsis
Invoke-TsmCommand runs a command in the TSM cmd line.(dsmadmc)
.DESCRIPTION
This command runs a command in the TSM command line and returns
the result. The string that is returned is tab delimited.
The command only returns data, so you will need to do know
the headers of the columns. ... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Stop-TsmSession.ps1 | Stop-TsmSession.ps1 | <#
.Synopsis
Stops one or more TSM Sessions running on a server.
.DESCRIPTION
This cmdlet stops TSM sessions running on a server. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Stop-TsmSession 12345
.EXAMPLE
Get-Tsm... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Get-TsmProcess.ps1 | Get-TsmProcess.ps1 | <#
.Synopsis
Gets one to many TSM Processs.
.DESCRIPTION
This cmdlet gets the TSM sessions that exist on a server. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Get-TsmProcess 2356
.EXAMPLE
Get-TsmProcess
#>
func... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Set-TsmCredential.ps1 | Set-TsmCredential.ps1 | <#
.Synopsis
Sets the username and password variables for dsmadmc to run from powershell.
.DESCRIPTION
The Set-TsmCredential is used to store the username and password for dsmadmc to run as.
This allows you to not have to pass the username and password everytime.
.EXAMPLE
Set-TsmCredential username p... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Test-TsmEnvornmentVar.ps1 | Test-TsmEnvornmentVar.ps1 | function Test-TsmEnvironmentVar
{
$EnvPath = (Get-ChildItem Env:PATH).value
if(-not $EnvPath.Contains("baclient"))
{
throw "The environmental variable PATH does not contain the TSM client installation directory. You can manually edit your PATH variable or use Set-TsmEnvornmentVar"
}
... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Stop-TsmProcess.ps1 | Stop-TsmProcess.ps1 | <#
.Synopsis
Stops one or more TSM Processs running on a server.
.DESCRIPTION
This cmdlet stops TSM Processs running on a server. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Stop-TsmProcess 12345
.EXAMPLE
Get-Tsm... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Remove-TsmFilespace.ps1 | Remove-TsmFilespace.ps1 | <#
.Synopsis
Removes one or more TSM filespaces.
.DESCRIPTION
This function removes filespaces from TSM. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Get-TsmFilespace DOMAIN SCHEDULE NODENAME
.EXAMPLE
Get-TsmFiles... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Remove-TsmAssociation.ps1 | Remove-TsmAssociation.ps1 | <#
.Synopsis
Removes one or more TSM associations.
.DESCRIPTION
This function removes associations from TSM. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Get-TsmAssociation DOMAIN SCHEDULE NODENAME
.EXAMPLE
Get-Ts... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Rename-TsmNode.ps1 | Rename-TsmNode.ps1 | <#
.Synopsis
Renames the TSM nodes that exist on a server.
.DESCRIPTION
This cmdlet Renames the TSM sessions that exist on a server. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Rename-TsmNode FS*
.EXAMPLE
Rename-... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/New-TsmAssociation.ps1 | New-TsmAssociation.ps1 | <#
.Synopsis
Creates a new TSM Assocation.
.DESCRIPTION
This function creates a new Assocation. The default
server is the connection set in your opt file. You can also choose
which TSM server you are using.
.EXAMPLE
New-TsmAssociation PolicyDomain SchedName NODENAME
.EXAMPLE
New-TsmAssociat... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/Get-TsmSession.ps1 | Get-TsmSession.ps1 | <#
.Synopsis
Gets the TSM Sessions running on a server.
.DESCRIPTION
This cmdlet gets the TSM sessions running on a server. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
Get-TsmSession FS*
.EXAMPLE
Get-TsmSession
... |
PowerShellCorpus/PowerShellGallery/PSTSM/1.0/Public/New-TsmNode.ps1 | New-TsmNode.ps1 | <#
.Synopsis
Creates a new TSM node.
.DESCRIPTION
This function creates new nodes. The default
server is the connection set in your opt file. You can also choose
which TSM server you are querying.
.EXAMPLE
New-TsmNode NODENAME PASSWORD DOMAIN
.EXAMPLE
New-TsmNode -NodeName NODENAME -NodePas... |
PowerShellCorpus/PowerShellGallery/365Tools/2.0.1/init.ps1 | init.ps1 |
# use this file to define global variables on module scope
# or perform other initialization procedures.
# this file will not be touched when new functions are exported to
# this module.
|
PowerShellCorpus/PowerShellGallery/365Tools/2.0.1/get-alternateinfo.ps1 | get-alternateinfo.ps1 | function Get-AlternateInfo
{
<#
.SYNOPSIS
Creates a CSV-file with user data from Office 365 with users that don't have their alternate contact information set up.
.DESCRIPTION
This function creates a CSV-file with user data fetched from Office 365 that includes users that don't have their alternate in... |
PowerShellCorpus/PowerShellGallery/365Tools/2.0.1/Get-AdminInfo.ps1 | Get-AdminInfo.ps1 | function Get-AdminInfo
{
<#
.SYNOPSIS
Gets information on the administrative users on your tenant, to make sure you comply with Microsoft best practices.
.DESCRIPTION
.EXAMPLE
Get-AdminInfo
#>
if (!(get-module msonline)) {open-msolconnection}
#region Get data
$AdminRole = Get-... |
PowerShellCorpus/PowerShellGallery/365Tools/2.0.1/New-MSOLReport.ps1 | New-MSOLReport.ps1 | function New-MSOLReport
{
<#
.SYNOPSIS
Creates a CSV-file with user data from Office 365
.DESCRIPTION
This function creates a CSV-file with user data fetched from Office 365, such as licensing status, mailbox size, etc.
.EXAMPLE
New-MSOLReport -outfile c:\temp\somefile.csv
.EXAMPLE
Ne... |
PowerShellCorpus/PowerShellGallery/365Tools/2.0.1/Open-MSOLConnection.ps1 | Open-MSOLConnection.ps1 | function Open-MSOLConnection
{
<#
.SYNOPSIS
Connects and loads a MSOL PoSH Connection.
.DESCRIPTION
Gets credential for MSOL Session, configures a new session and loads it.
.EXAMPLE
Open-MSOLConnection
#>
$LiveCred = Get-Credential
$Session = New-PSSession -Name MSOL -Config... |
PowerShellCorpus/PowerShellGallery/365Tools/2.0.1/get-mailboxauditsettings.ps1 | get-mailboxauditsettings.ps1 | function Get-MailboxAuditSettings
{
<#
.SYNOPSIS
Display all mailboxes that don't have audit enabled. Gives you the option to enable directly.
.DESCRIPTION
This function generates an overview of all mailboxes that don't have auditing enabled. When specifying the -activate switch, auditing will be enab... |
PowerShellCorpus/PowerShellGallery/xReleaseManagement/1.0.0.0/DSCResources/MSFT_xTokenize/MSFT_xTokenize.Tests.ps1 | MSFT_xTokenize.Tests.ps1 | $module = (Split-Path -Leaf $PSCommandPath).Replace(".Tests.ps1", ".psm1")
$code = Get-Content $module | Out-String
# You have to comment out the Export-ModuleMember line or you will get an
# error.
$code = $code -replace "Export-ModuleMember", "# Export-ModuleMember"
# Load the contents of the module into memo... |
PowerShellCorpus/PowerShellGallery/xReleaseManagement/1.0.0.0/Examples/xTokenize_NoTokenFile.ps1 | xTokenize_NoTokenFile.ps1 | ############################################################
# DSC Tokenization Example - No Token File
#
# This script supports using the technique described in this
# blog post http://tinyurl.com/tokenization which uses the
# XML transform functionality of Web Deploy to create a
# tokenized version of the web... |
PowerShellCorpus/PowerShellGallery/xReleaseManagement/1.0.0.0/Examples/xTokenize_TokenFile.ps1 | xTokenize_TokenFile.ps1 | ############################################################
# DSC Tokenization Example - With Token File
#
# This script supports using the technique where you simply
# create a copy of your web.config and add .token to the file
# extension. This will result in two files in your target
# folder (web.config and... |
PowerShellCorpus/PowerShellGallery/xReleaseManagement/1.0.0.0/Tests/ResourceDesignerTests.ps1 | ResourceDesignerTests.ps1 | # Hi Donovan – I just spoke with the lead Dev, and what’s broken is
# Test-xDscResource.
# Apparently, Hashtable is supported as an embedded instance.
#
# A bug has been filed on this, please continue to use it and we’ll ignore
# that specific error in the test tool.
"Testing DSC Resource"
"Test-xDscResource... |
PowerShellCorpus/PowerShellGallery/ServerManagementTools/0.4.0.66/Public/Get-DfsrBacklogStatus.ps1 | Get-DfsrBacklogStatus.ps1 | function Get-DfsrBacklogStatus {
<#
.SYNOPSIS
Retrieves the count of pending file updates between two DFS Replication partners.
.DESCRIPTION
The Get-DfsrBacklogStatus cmdlet retrieves a count of pending updates between two computers that participate in Distributed File System (DFS) Replicati... |
PowerShellCorpus/PowerShellGallery/ServerManagementTools/0.4.0.66/Public/Get-IISLogPath.ps1 | Get-IISLogPath.ps1 | function Get-IISLogPath {
<#
.SYNOPSIS
Retrieve webiste logging path.
.DESCRIPTION
The Get-IISLogPath cmdlet retrieves the log file path for one or more websites configured on the target computer.
.PARAMETER Name
Specifies a name of one or more websites. Get-IISLogPath retrieves... |
PowerShellCorpus/PowerShellGallery/ServerManagementTools/0.4.0.66/Public/Get-RDSession.ps1 | Get-RDSession.ps1 | function Get-RDSession {
<#
.SYNOPSIS
Lists Remote Desktop sessions on a given server.
.DESCRIPTION
The Get-RDSession cmdlet retrieves a list of Remote Desktop sessions from a local or remote computer.
.PARAMETER ComputerName
Specifies the name of the computer to query. Default ... |
PowerShellCorpus/PowerShellGallery/ServerManagementTools/0.4.0.66/Public/Invoke-LogRotation.ps1 | Invoke-LogRotation.ps1 | function Invoke-LogRotation {
<#
.SYNOPSIS
Compresses log files by month.
.DESCRIPTION
The Invoke-LogRotation cmdlet retrieves a list of log file in the specified locations and compressed them into a ZIP archive by month. Once the contents of the archive are verified the original log files ... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Private/Add-TypeName.ps1 | Add-TypeName.ps1 | <#
.Synopsis
Adds TypeName to piped object
.Parameter TypeName
String array of typenames
#>
filter Add-TypeName {
Param([string[]]$TypeName)
foreach ($name in $TypeName) {
$_.PSObject.TypeNames.Insert(0, $name)
}
$_
} |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Private/Invoke-DockerHubWebRequest.ps1 | Invoke-DockerHubWebRequest.ps1 | <#
.Synopsis
Helper function to query Docker Hub API.
.Description
Helper function to query Docker Hub API.
Supports singular and paginated requests.
.Parameter Request
Request part of the URL, e.g.: 'search/repositories/?query=alpine'
.Parameter Paginated
Make paginated request. Autom... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Private/Resolve-DockerHubRepoName.ps1 | Resolve-DockerHubRepoName.ps1 | <#
.Synopsis
Adds 'library' path component to the piped name, if it has only one path component.
Used to resolve names for official repositories like 'alpine' and 'mariadb'.
.Link
https://docs.docker.com/registry/spec/api/
#>
filter Resolve-DockerHubRepoName {
if ($_ -match '/') {
$_
... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Public/Get-DockerImageTag.ps1 | Get-DockerImageTag.ps1 | <#
.Synopsis
Get Docker image tags for image
.Description
Get Docker image tags for image via Docker Hub API
.Parameter Name
Docker repository (image) name
.Parameter MaxResults
Maximum number of results to return. Default is 100.
.Example
Get-DockerImageTag -Name 'mariadb'
Get tags for 'ma... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Public/Get-DockerImageDockerfile.ps1 | Get-DockerImageDockerfile.ps1 | <#
.Synopsis
Get Docker image Dockerfile.
.Description
Get Docker image Dockerfile.
Build history is available only for some automated builds.
.Parameter Name
Docker repository (image) name
.Example
Get-DockerImageDockerfile -Name 'jwilder/nginx-proxy'
Get Dockerfile for 'jwilder/ngin... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Public/Get-DockerImageBuildHistory.ps1 | Get-DockerImageBuildHistory.ps1 | <#
.Synopsis
Get Docker image build history
.Description
Get Docker image build history
Build history is available only for some automated builds.
.Parameter Name
Docker repository (image) name
.Parameter MaxResults
Maximum number of results to return. Default is 100.
.Example
Get-DockerImag... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Public/Get-DockerImageBuildDetail.ps1 | Get-DockerImageBuildDetail.ps1 | <#
.Synopsis
Get Docker image build details
.Description
Get Docker image build details
Build history is available only for some automated builds.
.Parameter Name
Docker repository (image) name
.Parameter MaxResults
Maximum number of results to return. Default is 100.
.Example
Get-DockerImag... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Public/Get-DockerImageDetail.ps1 | Get-DockerImageDetail.ps1 | <#
.Synopsis
Get detailed information for a Docker image.
.Description
Get detailed information for a Docker image, including full description in markdown.
.Parameter Name
Docker repository (image) name
.Example
Get-DockerImageDetail -Name 'mariadb'
.Example
'alpine' | Get-DockerImageDetai... |
PowerShellCorpus/PowerShellGallery/psdockerhub/1.0.11/Public/Find-DockerImage.ps1 | Find-DockerImage.ps1 | <#
.Synopsis
Search for docker images on Docker Hub
.Description
Search for docker images on Docker Hub via Docker Hub API.
You can filter search by Name/Description, Stars, Downloads, Official images and Automated builds.
.Parameter SearchTerm
Search term. Docker Hub will search it in the Name and De... |
PowerShellCorpus/PowerShellGallery/RockPaperScissors/0.1/Private/Get-RPSAISelection.ps1 | Get-RPSAISelection.ps1 | function Get-RPSAISelection
{
[CmdletBinding()]
[Alias()]
[OutputType([Choice])]
Param
(
)
Begin
{
}
Process
{
return (Get-Random -InputObject ([enum]::GetValues([type][Choice])) );
}
End
{
}
}
enum Choice
{
Rock = 0
Pap... |
PowerShellCorpus/PowerShellGallery/RockPaperScissors/0.1/Private/Get-RPSResult.ps1 | Get-RPSResult.ps1 | function Get-RPSResult
{
[CmdletBinding()]
[Alias()]
[OutputType([Result])]
Param
(
# Param1 help description
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[Choice]$Player1Choice,
# ... |
PowerShellCorpus/PowerShellGallery/RockPaperScissors/0.1/Private/Get-RPSUserSelection.ps1 | Get-RPSUserSelection.ps1 | function Get-RPSUserSelection
{
[CmdletBinding()]
[Alias()]
[OutputType([Choice])]
Param
(
)
Begin
{
}
Process
{
do
{
$userChoice = Read-Host -Prompt 'Enter choice: (R)ock, (P)aper, (S)cissors';
switch ($userChoice)
... |
PowerShellCorpus/PowerShellGallery/RockPaperScissors/0.1/Public/Start-RPSGame.ps1 | Start-RPSGame.ps1 | <#
.Synopsis
Start a new Rock-Paper-Scissors game.
.DESCRIPTION
Rock-Paper-Scissors is a zero sum hand game in which each player simultaneously forms one of three shapes with an outstretched hand.
As this is within PowerShell, you select your entry via text input instead.
The original r... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Join-Worksheet.ps1 | Join-Worksheet.ps1 | Function Join-Worksheet {
<#
.SYNOPSIS
Join two worksheets based on a common value
.DESCRIPTION
Join two worksheets based on a common value
This wraps calls to Get-CellValue, Join-Object, and Export-XLSX.
BETA NOTE:
Minimal manual testing, no Pester ... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Remove-FreePane.ps1 | Remove-FreePane.ps1 | function Remove-FreezePane {
<#
.SYNOPSIS
Remove FreezePanes on a specified worksheet
.DESCRIPTION
Remove FreezePanes on a specified worksheet
.PARAMETER Worksheet
Worksheet to remove FreezePanes from
.PARAMETER Passthru
If specified, pass the Works... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Import-XLSX.ps1 | Import-XLSX.ps1 | function Import-XLSX {
<#
.SYNOPSIS
Import data from Excel
.DESCRIPTION
Import data from Excel
.PARAMETER Path
Path to an xlsx file to import
.PARAMETER Sheet
Index or name of Worksheet to import
.PARAMETER Header
Replacement headers. M... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Export-XLSX.ps1 | Export-XLSX.ps1 | Function Export-XLSX {
<#
.SYNOPSIS
Export data to an XLSX file
.DESCRIPTION
Export data to an XLSX file
.PARAMETER InputObject
Data to export
.PARAMETER Path
Path to the file to export
.PARAMETER WorksheetName
Name the worksheet you are... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Get-Workbook.ps1 | Get-Workbook.ps1 | function Get-Workbook {
<#
.SYNOPSIS
Return a Workbook from an ExcelPackage
.DESCRIPTION
Return a Workbook from an ExcelPackage
.PARAMETER Excel
ExcelPackage to extract workbook from
.EXAMPLE
$Excel = New-Excel -Path "C:\Excel.xlsx"
$WorkBo... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/ConvertTo-ExcelCoordinate.ps1 | ConvertTo-ExcelCoordinate.ps1 | Function ConvertTo-ExcelCoordinate
{
<#
.SYNOPSIS
Convert a row and column to an Excel coordinate
.DESCRIPTION
Convert a row and column to an Excel coordinate
.PARAMETER Row
Row number
.PARAMETER Column
Column number
.EXAMPLE
ConvertTo-... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Format-Cell.ps1 | Format-Cell.ps1 | function Format-Cell {
<#
.SYNOPSIS
Format cells in an Excel worksheet
.DESCRIPTION
Format cells in an Excel worksheet
Note:
Each time you call this function, you need to save and re-create your Excel Object.
If you attempt to modify the Excel obje... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Set-FreezePane.ps1 | Set-FreezePane.ps1 | function Set-FreezePane {
<#
.SYNOPSIS
Set FreezePanes on a specified worksheet
.DESCRIPTION
Set FreezePanes on a specified worksheet
.PARAMETER Worksheet
Worksheet to add FreezePanes to
.PARAMETER Row
The first row with live data.
Ex... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Add-PivotTable.ps1 | Add-PivotTable.ps1 | function Add-PivotTable {
<#
.SYNOPSIS
Add a pivot table to an Excel worksheet
.DESCRIPTION
Add a pivot table to an Excel worksheet
Note:
Each time you call this function, you need to save and re-create your Excel Object.
If you attempt to modify t... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Add-Table.ps1 | Add-Table.ps1 | function Add-Table {
<#
.SYNOPSIS
Add a table to an Excel worksheet
.DESCRIPTION
Add a table to an Excel worksheet
Note:
Each time you call this function, you need to save and re-create your Excel Object.
If you attempt to modify the Excel object, ... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Get-Worksheet.ps1 | Get-Worksheet.ps1 | function Get-Worksheet {
<#
.SYNOPSIS
Return an ExcelPackage Worksheet
.DESCRIPTION
Return an ExcelPackage Worksheet
.PARAMETER Name
If specified, return Worksheets named like this
.PARAMETER Workbook
Workbook to extract worksheets from
.PARAMETE... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Search-CellValue.ps1 | Search-CellValue.ps1 | function Search-CellValue {
<#
.SYNOPSIS
Find a value in a spreadsheet
.DESCRIPTION
Find a value in a spreadsheet
Specify an xlsx path, an ExcelPackage object, or a WorkSheet to search, and a ScriptBlock you want to run the cell values against
.PARAMETER Path
... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Add-PivotChart.ps1 | Add-PivotChart.ps1 | function Add-PivotChart {
<#
.SYNOPSIS
Add a pivot chart to an Excel worksheet
.DESCRIPTION
Add a pivot chart to an Excel worksheet
Note:
Each time you call this function, you need to save and re-create your Excel Object.
If you attempt to modify t... |
PowerShellCorpus/PowerShellGallery/PSExcel/1.0.2/Save-Excel.ps1 | Save-Excel.ps1 | function Save-Excel {
<#
.SYNOPSIS
Save an OfficeOpenXml ExcelPackage
.DESCRIPTION
Save an OfficeOpenXml ExcelPackage
.PARAMETER Excel
An ExcelPackage object to close
.PARAMETER Path
If specified, save as this path
.PARAMETER Close
If sp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.