full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/PS7Zip/1.3.0.1604/Tests/PS7Zip.Tests.ps1 | PS7Zip.Tests.ps1 | # $PSScriptRoot Fix
If (!($PSScriptRoot)) {
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
}
$PSVersion = $PSVersionTable.PSVersion.ToString()
Import-Module $PSScriptRoot\..\PS7Zip -Verbose -Force -ErrorAction SilentlyContinue
Describe "PS7Zip Module PS$PSVersion" {
Context 'Strict mode' {
... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/src/New-ModuleFromTemplate.ps1 | New-ModuleFromTemplate.ps1 | <#
.Synopsis
Creates a new PowerShell module from a Plaster template.
.DESCRIPTION
The cmdlet is a wrapper for creating PowerShell modules with a defined structure based on a Plaster template file.
.EXAMPLE
New-ModuleFromTemplate -DestinationPath .\SampleProject -ModuleName mymodule -Description "T... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/src/Add-MandatoryParameters.ps1 | Add-MandatoryParameters.ps1 |
function Add-MandatoryParameters {
[CmdletBinding()]
Param(
[Parameter(Mandatory)]
[System.Management.Automation.InvocationInfo]
$InvocationInfo,
[Parameter(Mandatory)]
[Hashtable]
$Parameters
)
$boundedParametersFromCaller = $... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/src/New-CmdletFromTemplate.ps1 | New-CmdletFromTemplate.ps1 | <#
.Synopsis
Creates a new Cmdlet for the specified module
.DESCRIPTION
.EXAMPLE
#>
function New-CmdletFromTemplate {
[CmdletBinding()]
Param(
# Specifies the path to the module folder
[Parameter(Mandatory)]
[string]
$DestinationPath,
# Speci... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/src/Add-NonMandatoryParameters.ps1 | Add-NonMandatoryParameters.ps1 | <#
Add key/value pair with passed value, with the default value or without the key/value pair
dependent if the parameter and the NoPrompt switch have been specified.
#>
function Add-NonMandatoryParameters {
[CmdletBinding()]
Param(
[Parameter(Mandatory)]
[Hashtable]
... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/src/Test-MandatoryParameter.ps1 | Test-MandatoryParameter.ps1 |
function Test-MandatoryParameter {
[CmdletBinding()]
Param(
[Parameter(Mandatory)]
[System.Management.Automation.ParameterMetadata]
$Metadata
)
$Metadata.Attributes `
| Where-Object {
($_.GetType() -eq [System.Management.Automation.ParameterAttr... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/tests/TestHelper.ps1 | TestHelper.ps1 |
function Get-ValidDestination
{
Write-Output @{ DestinationPath = "${TestDrive}\mymodule" }
}
function Get-ValidModuleName
{
Write-Output @{ ModuleName = "mymodule" }
}
function Get-ValidDescription
{
Write-Output @{ Description = "My description!" }
}
function Get-ValidMandatoryArgs
{
... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/tests/New-ModuleFromTemplate.Tests.ps1 | New-ModuleFromTemplate.Tests.ps1 | #Requires -Modules Pester, testing
Import-ModuleFromPath -Parent
. "${PSScriptRoot}\TestHelper.ps1"
$mut = 'Templates'
$sut = 'New-ModuleFromTemplate'
Describe "'$sut' tests with mandatory parameters only" {
$destination = "${TestDrive}\mymodule"
$moduleName = "mymodule"
$description = 'My de... |
PowerShellCorpus/PowerShellGallery/Templates/0.2.2/tests/New-CmdletFromTemplate.Tests.ps1 | New-CmdletFromTemplate.Tests.ps1 | #Requires -Modules Pester, testing
Import-ModuleFromPath -Parent
$mut = 'Templates'
$sut = 'New-CmdletFromTemplate'
Describe "'$sut' tests with default values" {
$destination = "${TestDrive}\DummyModule"
Copy-Item -Path "${PSScriptRoot}\DummyModule" -Destination $destination -Recurse -Force
$c... |
PowerShellCorpus/PowerShellGallery/Kabompo/1.1.1.132/Kabompo.Logging.ps1 | Kabompo.Logging.ps1 | #
# Kabompo.Logging.ps1
#
function Register-KabompoLogging
{
<#
.SYNOPSIS
Starts logging of KABOMPO module.
.DESCRIPTION
Initializes the logging to the KABOMPO logfile in the subdirectory "log". Please be sure, that the executing user has write access to this folder.
The log file wil... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoServerRunningTask.ps1 | Get-ePoServerRunningTask.ps1 | Function Get-ePoServerRunningTask
{
<#
.SYNOPSIS
Gets ePoServer Task information for running tasks using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that fu... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Invoke-ePOCommand.ps1 | Invoke-ePOCommand.ps1 | Function Invoke-ePOCommand
{
<#
.SYNOPSIS
Sends the command specified to the McAfee EPO server.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer script variable created by that functions connection to... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Find-ePoDetectedSystem.ps1 | Find-ePoDetectedSystem.ps1 | Function Find-ePoDetectedSystem
{
<#
.SYNOPSIS
Finds a system using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection to the server. Us... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoGroup.ps1 | Get-ePoGroup.ps1 | Function Get-ePoGroup
{
<#
.SYNOPSIS
Gets ePoGroup information using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection to the server. U... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoQuery.ps1 | Get-ePoQuery.ps1 | Function Get-ePoQuery
{
<#
.SYNOPSIS
Gets queries available using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection to the server. Uses ... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Find-ePoSystem.ps1 | Find-ePoSystem.ps1 | Function Find-ePoSystem
{
<#
.SYNOPSIS
Finds a system using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection to the server. Uses the I... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Remove-ePoUser.ps1 | Remove-ePoUser.ps1 | Function Remove-ePoUser
{
<#
.SYNOPSIS
Removes a user from ePo API.
.DESCRIPTION
Removes the specifed user from ePo API using the core.removeUser API command. Needs either the Unique ID or Name
of the user to remove
.EXAMPLE
Remove-ePoUser -UserName "ne... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoGroupSystem.ps1 | Get-ePoGroupSystem.ps1 | Function Get-ePoGroupSystem
{
<#
.SYNOPSIS
Finds a system or systems in an ePoGroup using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connect... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoCommandHelp.ps1 | Get-ePoCommandHelp.ps1 | Function Get-ePoCommandHelp
{
<#
.SYNOPSIS
This returns the help for the specified command made available by the API.
.DESCRIPTION
This returns the help for the specified command made available by the API. Requires an active connection to the EpoServer.
.PARAMETER Command
The command t... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoTaskLogHistory.ps1 | Get-ePoTaskLogHistory.ps1 | Function Get-ePoTaskLogHistory
{
<#
.SYNOPSIS
Gets the task log history from the McAfee server.
.DESCRIPTION
Gets the task log history from the McAfee server. Uses the tasklog.listTaskHistory api command.
This function is still a Work in Progress.
.PARAMETER taskId
The Id ... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoClientTask.ps1 | Get-ePoClientTask.ps1 | Function Get-ePoClientTask
{
<#
.SYNOPSIS
Gets client task information based on filter parameter.
.DESCRIPTION
Gets client task information based on filter parameter. Uses the clienttask.find api command
.PARAMETER Filter
The search string to use for finding the client task. Defaults t... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoTaskLogSubTask.ps1 | Get-ePoTaskLogSubTask.ps1 | Function Get-ePoTaskLogSubTask
{
<#
.SYNOPSIS
The Get-ePoTaskLogSubTask gets information about the taskID specified.
.DESCRIPTION
The Get-ePoTaskLogSubTask gets information about the taskID specified. Needs Connect-ePoServer to have been run
and uses the Invoke-ePoCommand function.
... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoUser.ps1 | Get-ePoUser.ps1 | Function Get-ePoUser
{
<#
.SYNOPSIS
Gets users from ePo API.
.DESCRIPTION
Gets users from ePo API using the core.listUsers API command.
.EXAMPLE
Get-ePoUser
Gets all of the users returned by the core.listUsers API command.
.NOTES
Gets u... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Start-ePoQuery.ps1 | Start-ePoQuery.ps1 | Function Start-ePoQuery
{
<#
.SYNOPSIS
Runs a query using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection to the server. Uses the Invoke... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Start-ePoServerTask.ps1 | Start-ePoServerTask.ps1 | Function Start-ePoServerTask
{
<#
.SYNOPSIS
Starts the specified server task.
.DESCRIPTION
Starts the specified server task. Requires the taskId of the servertask to run. Uses the
scheduler.runServerTask api command.
.PARAMETER TaskID
The id number of the server task to ru... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Connect-ePoServer.ps1 | Connect-ePoServer.ps1 | Function Connect-ePoServer
{
<#
.SYNOPSIS
The Connect-ePoServer function establishes a connection the McAfee EPO Server.
.DESCRIPTION
The Connect-ePoServer function establishes a connection the McAfee EPO Server. All results are returned in XML
format. The System.Net below is to bypass unstru... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoPermissionSets.ps1 | Get-ePoPermissionSets.ps1 | Function Get-ePoPermissionSet
{
<#
.SYNOPSIS
Gets users from ePo API.
.DESCRIPTION
Gets users from ePo API using the core.exportPermissionSets API command.
.EXAMPLE
Get-ePoPermissionSet
Gets all of the permission sets returned by the core.exportPermissionSets API command.
... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoTable.ps1 | Get-ePoTable.ps1 | Function Get-ePoTable
{
<#
.SYNOPSIS
Gets table information using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection to the server. Uses... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Get-ePoServerTaskList.ps1 | Get-ePoServerTaskList.ps1 | Function Get-ePoServerTaskList
{
<#
.SYNOPSIS
Gets ePoServer Task information using the ePo API.
.DESCRIPTION
Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,
as this function uses the epoServer global variable created by that functions connection t... |
PowerShellCorpus/PowerShellGallery/Posh-ePoAPI/1.4.3/Functions/Start-ePoClientTask.ps1 | Start-ePoClientTask.ps1 | Function Start-ePoClientTask
{
<#
.SYNOPSIS
Starts the specified client task on specified target system.
.DESCRIPTION
Starts the specified client task on specified target system. Requires the productId and taskId of the clienttask to run. Uses the
clienttask.run api command.
.... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/DSCResources/MSFT_xIisModule/xIisModuleDesigner.ps1 | xIisModuleDesigner.ps1 | $diff = join-Path ${env:ProgramFiles(x86)} "Beyond compare 2\bc2.exe"
$friendlyName = "xIisModule"
$resourceName = "MSFT_$friendlyName"
$classVersion = "1.0.0"
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path
$originalModuleRoot = join-Path $scriptroot "..\.."
$originalModuleRootPath = Resolve-Path $origin... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xIisMimeTypeMapping_RemoveVideo.ps1 | Sample_xIisMimeTypeMapping_RemoveVideo.ps1 | configuration Sample_RemoveVideoMimeTypeMappings
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebSiteDefaults.ps1 | Sample_xWebSiteDefaults.ps1 | <#
.SYNOPSIS
An example of configuring the website default settings.
.DESCRIPTION
This examples show how to use xWebSiteDefaults for configuring the website default settings.
#>
Configuration Sample_xWebSiteDefaults
{
param
(
# Target nodes to apply the configuration
... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xIisLogging_Rollover.ps1 | Sample_xIisLogging_Rollover.ps1 | configuration Sample_xIisLogging_Rollover
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration
Node $NodeName
{
xIisLoggi... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebConfigKeyValue_AddAppSetting.ps1 | Sample_xWebConfigKeyValue_AddAppSetting.ps1 | <#
.SYNOPSIS
Adds an app setting WebsiteTitle to the configuration file of the website.
.DESCRIPTION
This example shows how to use the xWebConfigKeyValue DSC resource for adding an extra key and value to appSettings.
It will add a key WebSiteTitle with value to the configuration of ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xIisFeatureDelegation_AllowSome.ps1 | Sample_xIisFeatureDelegation_AllowSome.ps1 | configuration Sample_IISFeatureDelegation
{
param
(
# Target nodes to apply the configuration
[string[]] $NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $NodeN... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebAppPoolDefaults.ps1 | Sample_xWebAppPoolDefaults.ps1 | <#
.SYNOPSIS
An example of configuring the application pool default settings.
.DESCRIPTION
This examples show how to use xWebAppPoolDefaults for configuring the application pool default settings.
The resource is currently limited to configuring the managed runtime version and the id... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xSSLSettings_RequireCert.ps1 | Sample_xSSLSettings_RequireCert.ps1 | configuration Sample_xSSLSetting_RequireCert
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration
Node $NodeName
{
xSSLS... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xIisHandler_Remove32Bit.ps1 | Sample_xIisHandler_Remove32Bit.ps1 | configuration Sample_RemoveSome32BitHandlers
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $Nod... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xIisLogging_Truncate.ps1 | Sample_xIisLogging_Truncate.ps1 | configuration Sample_xIisLogging_Truncate
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration
Node $NodeName
{
xIisLoggi... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebsite_WithSSLFlags.ps1 | Sample_xWebsite_WithSSLFlags.ps1 | configuration Sample_xWebsite_NewWebsite
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost',
# Name of the website to create
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String] $WebSiteName,
# Source... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebsite_NewWebsiteFromConfigurationData.ps1 | Sample_xWebsite_NewWebsiteFromConfigurationData.ps1 | Configuration Sample_xWebsite_FromConfigurationData
{
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
# Dynamically find the applicable nodes from configuration data
Node $AllNodes.where{$_.Role -eq 'Web'}.NodeName
... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xIisServerDefaults.ps1 | Sample_xIisServerDefaults.ps1 | configuration Sample_IISServerDefaults
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $NodeName
... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebsite_NewWebsite.ps1 | Sample_xWebsite_NewWebsite.ps1 | configuration Sample_xWebsite_NewWebsite
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost',
# Name of the website to create
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String] $WebSiteName,
# Source... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebsite_RemoveDefault.ps1 | Sample_xWebsite_RemoveDefault.ps1 | configuration Sample_xWebsite_StopDefault
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $NodeN... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebConfigKeyValue_RemoveAppSetting.ps1 | Sample_xWebConfigKeyValue_RemoveAppSetting.ps1 | <#
.SYNOPSIS
Removes an app setting WebsiteTitle from the configuration file of the website if present.
.DESCRIPTION
This example shows how to use the xWebConfigKeyValue DSC resource for ensuring a key is not pressent in appSettings.
It will remove a setting with key WebSiteTitle fr... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebApplication.ps1 | Sample_xWebApplication.ps1 | <#
This shows an example for all possible settings for the xWebApplication resource
#>
configuration MSFT_xWebApplication_Present
{
param
(
# Target nodes to apply the configuration
[String[]] $NodeName = 'localhost',
[Parameter(Mandatory)]
[ValidateNotNullOrEmp... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebAppPool.ps1 | Sample_xWebAppPool.ps1 | <#
.SYNOPSIS
Create and configure an application pool.
.DESCRIPTION
This example shows how to use the xWebAppPool DSC resource to create and configure an application pool.
#>
Configuration Sample_xWebAppPool
{
param
(
[String[]]$NodeName = 'localhost'
)
Im... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Examples/Sample_xWebApplication_NewWebApplication.ps1 | Sample_xWebApplication_NewWebApplication.ps1 | <#
.SYNOPSIS
Create a new web application on the Default Web Site
.DESCRIPTION
This example shows how to use the xWebApplication DSC resource to create a new web application.
#>
Configuration Sample_xWebApplication_NewWebApplication
{
param
(
# Target nodes to apply the... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xSSLSettings.Tests.ps1 | MSFT_xSSLSettings.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xSSLSettings'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -P... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xIISFeatureDelegation.tests.ps1 | MSFT_xIISFeatureDelegation.tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIISFeatureDelegation'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Tes... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xIISLogging.tests.ps1 | MSFT_xIISLogging.tests.ps1 | $script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIisLogging'
# Unit Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-n... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xWebApplication.Tests.ps1 | MSFT_xWebApplication.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebApplication'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xIISHandler.tests.ps1 | MSFT_xIISHandler.tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIISHandler'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Pa... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xWebsite.Tests.ps1 | MSFT_xWebsite.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebsite'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xWebAppPool.Tests.ps1 | MSFT_xWebAppPool.Tests.ps1 | #requires -Version 4.0
# Suppressing this rule because IIS requires PlainText for one of the functions used in this test
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceNa... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xWebVirtualDirectory.tests.ps1 | MSFT_xWebVirtualDirectory.tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebVirtualDirectory'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xWebConfigKeyValue.tests.ps1 | MSFT_xWebConfigKeyValue.tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebConfigKeyValue'
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))
if ( (-not (Test-Path -Path (Join-Path -Pat... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Unit/MSFT_xIisMimeTypeMapping.tests.ps1 | MSFT_xIisMimeTypeMapping.tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIisMimeTypeMapping'
#region HEADER
$moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebConfigKeyValue.Integration.Tests.ps1 | MSFT_xWebConfigKeyValue.Integration.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebConfigKeyValue'
#region HEADER
# Integration Test Template Version: 1.1.1
[String] $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebConfigKeyValue.config.ps1 | MSFT_xWebConfigKeyValue.config.ps1 |
configuration MSFT_xWebConfigKeyValue_Config
{
Import-DscResource -ModuleName xWebAdministration
xWebConfigKeyValue IntegrationAppSetting
{
Ensure = 'Present'
ConfigSection = 'AppSettings'
Key = $env:xWebConfigKeyValueIntegrationKey
Value ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xIISFeatureDelegation.config.ps1 | MSFT_xIISFeatureDelegation.config.ps1 | configuration MSFT_xIISFeatureDelegation_AllowDelegation
{
Import-DscResource -ModuleName xWebAdministration
xIisFeatureDelegation AllowDelegation
{
SectionName = 'security/authentication/anonymousAuthentication'
OverrideMode = 'Allow'
}
}
configuration MSFT_xIISFeatureDeleg... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebsiteDefaults.config.ps1 | MSFT_xWebsiteDefaults.config.ps1 | [string] $originalValue = (Get-WebConfigurationProperty `
-PSPath 'MACHINE/WEBROOT/APPHOST' `
-Filter 'system.applicationHost/sites/virtualDirectoryDefaults' `
-Name 'allowSubDirConfig').Value
if ($originalValue -eq "true")
{
$env:PesterVirtualDirectoryDefaults = "false"
}
else
{
$env:Pe... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebAppPoolDefaults.Integration.Tests.ps1 | MSFT_xWebAppPoolDefaults.Integration.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebAppPoolDefaults'
#region HEADER
# Integration Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -Child... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebAppPool.config.ps1 | MSFT_xWebAppPool.config.ps1 | #requires -Version 4.0
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')]
param ()
$ConfigData = @{
AllNodes = @(
@{
Node... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_XIISLogging.config.ps1 | MSFT_XIISLogging.config.ps1 | configuration MSFT_xIisLogging_Rollover
{
Import-DscResource -ModuleName xWebAdministration
xIisLogging Logging
{
LogPath = 'C:\IISLogFiles'
Logflags = @('Date','Time','ClientIP','UserName','ServerIP')
LoglocalTimeRollover = $true
LogPeriod = 'Hourly'
LogFo... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebsite.Integration.Tests.ps1 | MSFT_xWebsite.Integration.Tests.ps1 | $script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebsite'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (J... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xSSLSettings.config.ps1 | MSFT_xSSLSettings.config.ps1 | #requires -Version 4
configuration MSFT_xSSLSettings_Present
{
Import-DscResource -ModuleName xWebAdministration
Node $AllNodes.NodeName
{
xSSLSettings Website
{
Ensure = 'Present'
Name = $Node.Website
Bindings = $Node.Bindings
}
... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xIISHandler.config.ps1 | MSFT_xIISHandler.config.ps1 | configuration MSFT_xIISHandler_RemoveHandler
{
Import-DscResource -ModuleName xWebAdministration
xIisHandler TRACEVerbHandler
{
Name = 'TRACEVerbHandler'
Ensure = 'Absent'
}
}
configuration MSFT_xIISHandler_AddHandler
{
Import-DscResource -ModuleName xWebAdministration... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebsite.config.ps1 | MSFT_xWebsite.config.ps1 | #requires -Version 4
configuration MSFT_xWebsite_Present_Started
{
param(
[Parameter(Mandatory = $true)]
[String] $CertificateThumbprint
)
Import-DscResource -ModuleName xWebAdministration
Node $AllNodes.NodeName
{
xWebsite Website
{... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xSSLSettings.Integration.Tests.ps1 | MSFT_xSSLSettings.Integration.Tests.ps1 | $script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xSSLSettings'
#region HEADER
# Integration Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResour... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebApplication.Integration.Tests.ps1 | MSFT_xWebApplication.Integration.Tests.ps1 | $script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebApplication'
#region HEADER
# Integration Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCRes... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebsiteDefaults.Integration.Tests.ps1 | MSFT_xWebsiteDefaults.Integration.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebsiteDefaults'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebApplication.config.ps1 | MSFT_xWebApplication.config.ps1 | #requires -Version 4
configuration MSFT_xWebApplication_Present
{
Import-DscResource -ModuleName xWebAdministration
Node $AllNodes.NodeName
{
xWebApplication WebApplication
{
Website = $Node.Website
Ensure = 'Present'
Name = $Node.WebApplicat... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebAppPool.Integration.tests.ps1 | MSFT_xWebAppPool.Integration.tests.ps1 | #requires -Version 4.0
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xWebAppPool'
#region HEADER
# Integration Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleR... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xWebAppPoolDefaults.config.ps1 | MSFT_xWebAppPoolDefaults.config.ps1 | [string] $constPsPath = 'MACHINE/WEBROOT/APPHOST'
[string] $constAPDFilter = 'system.applicationHost/applicationPools/applicationPoolDefaults'
[string] $constSiteFilter = 'system.applicationHost/sites/'
[string] $originalValue = (Get-WebConfigurationProperty -pspath $constPsPath -filter $constAPDFilter -name manag... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xIISFeatureDelegation.Integration.Tests.ps1 | MSFT_xIISFeatureDelegation.Integration.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIISFeatureDelegation'
#region HEADER
# Integration Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath '... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xIISMimeTypeMapping.config.ps1 | MSFT_xIISMimeTypeMapping.config.ps1 | configuration MSFT_xIISMimeTypeMapping_Config
{
Import-DscResource -ModuleName xWebAdministration
xIIsMimeTypeMapping AddMimeType
{
Extension = '.PesterDummy'
MimeType = 'text/plain'
Ensure = 'Present'
}
}
configuration MSFT_xIISMimeTypeMapping_AddMimeType
{
I... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xIISHandler.Integration.Tests.ps1 | MSFT_xIISHandler.Integration.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIISHandler'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Pa... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_xIISMimeTypeMapping.Integration.Tests.ps1 | MSFT_xIISMimeTypeMapping.Integration.Tests.ps1 |
$script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIISMimeTypeMapping'
#region HEADER
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not ... |
PowerShellCorpus/PowerShellGallery/xWebAdministration/1.17.0.0/Tests/Integration/MSFT_XIISLogging.Integration.Tests.ps1 | MSFT_XIISLogging.Integration.Tests.ps1 | $script:DSCModuleName = 'xWebAdministration'
$script:DSCResourceName = 'MSFT_xIISLogging'
#region HEADER
# Integration Test Template Version: 1.1.0
$script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.... |
PowerShellCorpus/PowerShellGallery/TelligentLocalInstance/0.0.6/Initialize.ps1 | Initialize.ps1 | #Requires -Version 3
function Initialize-TelligentInstanceManager {
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true, HelpMessage="The path where Telligent Instances Manager will store instances and builds.")]
[string]$InstallDirectory,
[string]$DatabaseServerInstance =... |
PowerShellCorpus/PowerShellGallery/TelligentLocalInstance/0.0.6/TelligentLocalInstance.ps1 | TelligentLocalInstance.ps1 | Set-StrictMode -Version 2
function Get-Configuration {
$base = $env:TelligentInstanceManager
if (!$base) {
Write-Error 'TelligentInstanceManager environmental variable not defined'
}
$data = @{
#SQL Server to use.
SqlServer = if($env:TelligentDatabaseServerInstance)... |
PowerShellCorpus/PowerShellGallery/SCOrchDev-Networking/2.1.0/SCOrchDev-Networking.tests.ps1 | SCOrchDev-Networking.tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$manifestPath = "$here\SCOrchDev-Networking.psd1"
Import-Module $manifestPath -Force
Describe -Tags 'VersionChecks' 'SCOrchDev-Networking manifest' {
$script:manifest = $null
It 'has a valid manifest' {
{
$script:manifest = T... |
PowerShellCorpus/PowerShellGallery/PowerShellForGitHub/0.1.0/Tests/GitHubLabels.tests.ps1 | GitHubLabels.tests.ps1 | <#
.Synopsis
Tests for GitHubLabels.psm1 module
#>
[String] $root = Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)
if ($env:AppVeyor)
{
$global:gitHubApiToken = $env:token
$message = 'This run is executed in the AppVeyor environment.
GitHubApiToken won''t be decrypt... |
PowerShellCorpus/PowerShellGallery/PowerShellForGitHub/0.1.0/Tests/GitHubAnalytics.tests.ps1 | GitHubAnalytics.tests.ps1 | <#
.Synopsis
Tests for GitHubAnalytics.psm1 module
#>
[String] $root = Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)
if ($env:AppVeyor)
{
$global:gitHubApiToken = $env:token
$message = 'This run is executed in the AppVeyor environment.
GitHubApiToken won''t be decr... |
PowerShellCorpus/PowerShellGallery/xSqlPs/1.4.0.0/Samples/sql101.ps1 | sql101.ps1 | # Configuration to install Sql server database engine and management tools.
#
# A. Prepare a local self signed certificate with the following steps:
# 1. Get MakeCert.exe if you don't have. ( MakeCert.exe is shipped with windows SDK: http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx)
# 2. Open console ... |
PowerShellCorpus/PowerShellGallery/xSqlPs/1.4.0.0/Tests/MSFT_xSqlAlias.Tests.ps1 | MSFT_xSqlAlias.Tests.ps1 | Import-Module "$PSScriptRoot\..\DSCResources\MSFT_xSqlAlias\MSFT_xSqlAlias.psm1" -Prefix 'xSqlAlias' -Force
Describe 'Get-TargetResource'{
Mock -ModuleName MSFT_xSqlAlias -CommandName Get-ItemProperty -MockWith {
Write-Output 'DBMSSOCN,localhost,1433'
}
$SqlAlias = Get-xSqlAliasTargetRe... |
PowerShellCorpus/PowerShellGallery/MrAADAdministration/1.4/Write-Log.ps1 | Write-Log.ps1 | <#
.Synopsis
Write-Log writes a message to a specified log file with the current time stamp.
.DESCRIPTION
The Write-Log function is designed to add logging capability to other scripts.
In addition to writing output and/or verbose you can write to a log file for
later debugging.
.NOTES
Created by:... |
PowerShellCorpus/PowerShellGallery/MrAADAdministration/1.4/Send-ADUserPasswordExpirationNotification.ps1 | Send-ADUserPasswordExpirationNotification.ps1 | <#
.Synopsis
Send-ADUserPasswordExpirationNotification gets a list of users whose passwords are expiring
and sends the user a email notification.
.DESCRIPTION
Send-ADUserPasswordExpirationNotification gets a list of users whose passwords are expiring
within a given number of days. The function outputs... |
PowerShellCorpus/PowerShellGallery/MrAADAdministration/1.4/Invoke-ADReplication.ps1 | Invoke-ADReplication.ps1 | <#
.Synopsis
Invoke-ADReplication forces an immediate replication between domain controllers.
.DESCRIPTION
Invoke-ADReplication is a PowerShell advanced function that uses repadmin to
force immediate replication of a domain controllers within a given domain. By
default the function initiate replicat... |
PowerShellCorpus/PowerShellGallery/MrAADAdministration/1.4/Get-ADUserPasswordExpiration.ps1 | Get-ADUserPasswordExpiration.ps1 | <#
.Synopsis
Get-ADUserPasswordExpiration gets a list of users whose passwords are expiring.
.DESCRIPTION
Get-ADUserPasswordExpiration gets a list of users whose passwords are expiring
within a given number of days. The function outputs ADUser objects and requires
the ActiveDirectory PowerShell modul... |
PowerShellCorpus/PowerShellGallery/MrAADAdministration/1.4/Test-ADUser.ps1 | Test-ADUser.ps1 | function Test-ADUser {
[CmdletBinding()]
param (
[alias('UserName')]
[Parameter(Mandatory=$false,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]]$Identity = $env:USERNAME
)
... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/publish.ps1 | publish.ps1 | [cmdletbinding()]
Param(
[Parameter(Mandatory)]
[string]
$APIkey
)
$tags = @(
"Menu"
,
"Cli"
,
"Sub-Menu"
,
"Main-Menu"
,
"Show-Command"
,
"Console"
,
"Menus"
,
"Main"
,
"Sub"
,
"User"
,
"Men... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/build.ps1 | build.ps1 | [cmdletbinding()]
Param(
[string]$ModuleFileName = 'CliMenu.psm1'
,
[switch]$Major
,
[switch]$Minor
,
[switch]$LoadModule
,
[string]$description = 'Easily build and edit CLI menus in Powershell'
)
END
{
write-verbose -message "ModuleFilename = $moduleFileName"
... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Rubbish/Set-MenuItem.ps1 | Set-MenuItem.ps1 | function Set-MenuItem
{
[cmdletbinding()]
Param
(
[string]
$Name
,
[string]
$DisplayName
,
[string]
$Description
,
[scriptblock]
$Action
,
[bool]
$DisableConfirm
,
[int]
$MenuName
)
BEGIN
{
$f = $MyInvocation.InvocationNa... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Rubbish/Set-Menu.ps1 | Set-Menu.ps1 | function Set-Menu
{
[cmdletbinding()]
Param
(
[string]
$Name
,
[string]
$DisplayName
,
[switch]
$IsMainMenu
)
BEGIN
{
$f = $MyInvocation.InvocationName
Write-Verbose -Message "$f - START"
}
PROCESS
{
$menu = Get-Menu -Name "$Name"
if ($menu... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/Add-MenuItem.ps1 | Add-MenuItem.ps1 | function Add-MenuItem
{
<#
.Synopsis
Add a Menu Item to a menu.
.DESCRIPTION
Add a Menu Item to a menu. This cmdlet support input (Menu Items) from the pipeline.
.EXAMPLE
C:> $items = Get-MenuItem -MenuName main
C:> $items | Add-MenuItem -Menu subMenu
This will copy Menu Items from the m... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/Set-MenuOption.ps1 | Set-MenuOption.ps1 | function Set-MenuOption
{
[cmdletbinding()]
Param
(
[string]
$MenuFillChar = "*"
,
[ConsoleColor]
$MenuFillColor = [consolecolor]::white
,
[string]
$Heading = "[Heading not set]"
,
[ConsoleColor]
$HeadingColor = [consolecolor]::white
,
[string]
$... |
PowerShellCorpus/PowerShellGallery/CliMenu/1.0.52.0/Functions/Get-MenuItem.ps1 | Get-MenuItem.ps1 | function Get-MenuItem
{
<#
.Synopsis
Get a list of menu-items
.DESCRIPTION
Returns a list of menus by Menu-name, Menu-ID or the menu object
.EXAMPLE
C:> Get-MenuItem
Returns all menu-items for all menus
.EXAMPLE
C:> Get-MenuItem -MenuName MainMenu
Returns the menu-items for the m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.