full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Examples/Sample_xFileUpload.ps1 | Sample_xFileUpload.ps1 | Configuration FileUploadConfiguration
{
param (
[parameter(Mandatory = $true)]
[String] $destinationPath,
[parameter(Mandatory = $true)]
[String] $sourcePath,
[PSCredential] $credential,
[String] $certificateThumbprint
)
Import-DscResource -modulename xPSDesiredStateConfiguration
no... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Examples/Sample_xArchive_RemoveArchiveNoValidation.ps1 | Sample_xArchive_RemoveArchiveNoValidation.ps1 | <#
.SYNOPSIS
Removes the expansion of the archive located at 'C:\ExampleArchivePath\Archive.zip' from the
destination path 'C:\ExampleDestinationPath\Destination'.
The resource will only check if the expanded archive files exist at the destination.
No validation is performed ... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1 | New-PSSessionConfigurationResource.ps1 | Import-Module -Name 'xDSCResourceDesigner'
$resProperties = @{
Name = New-xDscResourceProperty -Description 'Name of the PS Remoting Endpoint' `
-Name Name -Type String -Attribute Key
RunAsCred = New-xDscResourceProperty -Description 'Credential fo... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1 | GenerateXRemoteFileSchema.ps1 | $DestinationPath = New-xDscResourceProperty -Name DestinationPath -Type String -Attribute Key -Description 'Path under which downloaded or copied file should be accessible after operation.'
$Uri = New-xDscResourceProperty -Name Uri -Type String -Attribute Required -Description 'Uri of a file which should be copied or ... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xWindowsPackageCab.Tests.ps1 | MSFT_xWindowsPackageCab.Tests.ps1 | Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath 'CommonTestHelper.psm1')
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xWindowsPackageCab' `
-TestType 'Unit'
try
{... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xRegistryResource.Tests.ps1 | MSFT_xRegistryResource.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xServiceResource.Tests.ps1 | MSFT_xServiceResource.Tests.ps1 | # Need to be able to create a password from plain text to create test credentials
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscRes... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xScriptResource.Tests.ps1 | MSFT_xScriptResource.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xPackageResource.Tests.ps1 | MSFT_xPackageResource.Tests.ps1 | $script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $script:testsFolderFilePath -ChildPath 'CommonTestHelper.psm1'
Import-Module -Name $script:commonTestHelperFilePath
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleN... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xEnvironmentResource.Tests.ps1 | MSFT_xEnvironmentResource.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xWindowsProcess.Tests.ps1 | MSFT_xWindowsProcess.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) `
-ChildPath 'CommonTestHelp... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xMsiPackage.Tests.ps1 | MSFT_xMsiPackage.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Describe 'xMsiPackage Unit Tests' {
BeforeAll {
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:comm... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xWindowsFeature.Tests.ps1 | MSFT_xWindowsFeature.Tests.ps1 | # Needed to create a fake credential
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) `
-ChildPath 'CommonTestHelper.psm1') `
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/ResourceSetHelper.Tests.ps1 | ResourceSetHelper.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
$script:testsFolderFilePath = Split-Path -Path $PSScriptRoot -Parent
$script:moduleRootFilePath = Split-Path -Path $script:testsFol... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xRemoteFile.Tests.ps1 | MSFT_xRemoteFile.Tests.ps1 | $Global:DSCModuleName = 'xPSDesiredStateConfiguration'
$Global:DSCResourceName = 'MSFT_xRemoteFile'
#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-... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xWindowsOptionalFeature.Tests.ps1 | MSFT_xWindowsOptionalFeature.Tests.ps1 | Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath 'CommonTestHelper.psm1')
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xWindowsOptionalFeature' `
-TestType 'Unit'
t... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xUserResource.Tests.ps1 | MSFT_xUserResource.Tests.ps1 | # To run these tests, the currently logged on user must have rights to create a user
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) `
-ChildPat... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/CommonResourceHelper.Tests.ps1 | CommonResourceHelper.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Describe 'CommonResourceHelper Unit Tests' {
BeforeAll {
# Import the CommonResourceHelper module to test
$testsFolderFilePath = Split-Path -Path $PSScriptRoot -Parent
$moduleRootFilePath = Split-Path -Path $testsFolder... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xArchive.Tests.ps1 | MSFT_xArchive.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Describe 'xArchive Unit Tests' {
BeforeAll {
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonT... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Unit/MSFT_xGroupResource.Tests.ps1 | MSFT_xGroupResource.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xServiceSet.Integration.Tests.ps1 | xServiceSet.Integration.Tests.ps1 | <#
These tests should only be run in AppVeyor since they currently require the AppVeyor
administrator account credential to run.
Also please note that these tests are currently dependent on each other.
They must be run in the order given and if one test fails, subsequent tests will
also fail.... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsPackageCab.config.ps1 | MSFT_xWindowsPackageCab.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[Parameter(Mandatory = $true)]
[ValidateSet('Pr... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xEnvironmentResource.config.ps1 | MSFT_xEnvironmentResource.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[ValidateNotNull()]
[String]
$... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsProcess.Integration.Tests.ps1 | MSFT_xWindowsProcess.Integration.Tests.ps1 | <#
These tests should only be run in AppVeyor since the second half of the tests require
the AppVeyor administrator account credential to run.
Also please note that some of these tests depend on each other.
They must be run in the order given - if one test fails, subsequent tests may
also fai... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xServiceSet_BuiltInAccountOnly.config.ps1 | xServiceSet_BuiltInAccountOnly.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
$Name,
[ValidateSet('Present', 'Absent')]
[ValidateN... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xArchive_ValidateOnly.config.ps1 | MSFT_xArchive_ValidateOnly.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Path,
[Parameter(Mandatory = $true)]
[ValidateNotNull... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xMsiPackage.Integration.Tests.ps1 | MSFT_xMsiPackage.Integration.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $script:testsFolderFilePath -ChildPath 'CommonTestHelper.psm1'
Import-Module -Name $script:commonTestHelperFilePath
$script:testEnvi... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xGroupResource_MembersToIncludeExclude.config.ps1 | MSFT_xGroupResource_MembersToIncludeExclude.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$GroupName,
[ValidateSet('Present', 'Absent')]
[Valida... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xRegistryResource.EndToEnd.Tests.ps1 | MSFT_xRegistryResource.EndToEnd.Tests.ps1 | <#
WARNING: DO NOT RUN THESE TESTS ON A VALUABLE MACHINE!
Running on a disposable VM or AppVeyor is strongly recommended.
If these tests go awry, your machine's registry could be corrupted which will brick your machine!
If this happens to you, it is fixable, but the fix is difficult and time-consumi... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xGroupResource_NoMembers.config.ps1 | MSFT_xGroupResource_NoMembers.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$GroupName,
[ValidateSet('Present', 'Absent')]
[Valida... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xUserResource.config.ps1 | MSFT_xUserResource.config.ps1 |
# Integration Test Config Template Version 1.0.0
param
(
[Parameter(Mandatory)]
[System.String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[System.String]
$UserName = 'Test UserName',
[System.String]
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsProcessWithCredential.config.ps1 | MSFT_xWindowsProcessWithCredential.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Path,
[Parameter(Mandatory = $true)]
[AllowEmptyStrin... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xArchive_CredentialOnly.config.ps1 | MSFT_xArchive_CredentialOnly.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Path,
[Parameter(Mandatory = $true)]
[ValidateNotNull... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xArchive.EndToEnd.Tests.ps1 | MSFT_xArchive.EndToEnd.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Describe 'xArchive End to End Tests' {
BeforeAll {
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$commonTestHelpe... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsFeature.Integration.Tests.ps1 | MSFT_xWindowsFeature.Integration.Tests.ps1 | <#
Integration tests for Installing/uninstalling a Windows Feature. Currently Telnet-Client is
set as the feature to test since it's fairly small and doesn't require a restart.
RSAT-File-Services is set as the feature to test installing/uninstalling a feature with
subfeatures.
#>
# Suppressing ... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xEnvironmentResource.EndToEnd.Tests.ps1 | MSFT_xEnvironmentResource.EndToEnd.Tests.ps1 | <#
Please note that some of these tests depend on each other.
They must be run in the order given - if one test fails, subsequent tests may
also fail.
#>
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResource... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xRegistryResource.Integration.Tests.ps1 | MSFT_xRegistryResource.Integration.Tests.ps1 | <#
WARNING: DO NOT RUN THESE TESTS ON A VALUABLE MACHINE!
Running on a disposable VM or AppVeyor is strongly recommended.
If these tests go awry, your machine's registry could be corrupted which will brick your machine!
If this happens to you, it is fixable, but the fix is difficult and time-consumi... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xMsiPackage_LogPath.ps1 | MSFT_xMsiPackage_LogPath.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$ProductId,
[Parameter(Mandatory = $true)]
[ValidateNo... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xRegistryResource_WithDataAndType.config.ps1 | MSFT_xRegistryResource_WithDataAndType.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Key,
[ValidateSet('Present', 'Absent')]
[String]
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xMsiPackage_NoOptionalParameters.ps1 | MSFT_xMsiPackage_NoOptionalParameters.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$ProductId,
[Parameter(Mandatory = $true)]
[ValidateNo... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xPackageResource.Integration.Tests.ps1 | MSFT_xPackageResource.Integration.Tests.ps1 | Import-Module "$PSScriptRoot\..\CommonTestHelper.psm1"
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xPackageResource' `
-TestType 'Integration'
try
{
Describe 'xPackage Integration Tests' {
B... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xWindowsFeatureSet.Integration.Tests.ps1 | xWindowsFeatureSet.Integration.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xServiceResource.Integration.Tests.ps1 | MSFT_xServiceResource.Integration.Tests.ps1 | <#
These tests should only be run in AppVeyor since they currently require the AppVeyor
administrator account credential to run.
Also please note that these tests are currently dependent on each other.
They must be run in the order given and if one test fails, subsequent tests will
also fail.... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xArchive_ValidateAndChecksum.config.ps1 | MSFT_xArchive_ValidateAndChecksum.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Path,
[Parameter(Mandatory = $true)]
[ValidateNotNull... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xUserResource.Integration.Tests.ps1 | MSFT_xUserResource.Integration.Tests.ps1 | <#
To run these tests, the currently logged on user must have rights to create a user.
These integration tests cover creating a brand new user, updating values
of a user that already exists, and deleting a user that exists.
#>
# Suppressing this rule since we need to create a plaintext password to ... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xProcessSet.Integration.Tests.ps1 | xProcessSet.Integration.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xRemoteFile.config.ps1 | MSFT_xRemoteFile.config.ps1 | $TestConfigPath = Join-Path -Path $PSScriptRoot -ChildPath "MSFT_xRemoteFile.config.ps1"
$TestURI = "file://$TestConfigPath"
$TestDestinationPath = Join-Path -Path $ENV:Temp -ChildPath "MSFT_xRemoteFile.config.ps1"
# Integration Test Config Template Version: 1.0.0
configuration MSFT_xRemoteFile_config {
Impo... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xGroupResource_Members.config.ps1 | MSFT_xGroupResource_Members.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$GroupName,
[ValidateSet('Present', 'Absent')]
[Valida... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xWindowsOptionalFeatureSet.Integration.Tests.ps1 | xWindowsOptionalFeatureSet.Integration.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xRegistryResource_KeyAndNameOnly.config.ps1 | MSFT_xRegistryResource_KeyAndNameOnly.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Key,
[ValidateSet('Present', 'Absent')]
[String]
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xScriptResource.Integration.Tests.ps1 | MSFT_xScriptResource.Integration.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'Common... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xProcessSet.config.ps1 | xProcessSet.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
$ProcessPaths,
[ValidateSet('Present', 'Absent')]
[S... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsFeature.config.ps1 | MSFT_xWindowsFeature.config.ps1 |
param
(
[Parameter(Mandatory)]
[System.String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[System.String]
$Name,
[ValidateSet('Present', 'Absent')]
[System.String]
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xServiceSet_AllExceptBuiltInAccount.config.ps1 | xServiceSet_AllExceptBuiltInAccount.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
$Name,
[ValidateSet('Present', 'Absent')]
[ValidateN... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xScriptResource_NoCredential.config.ps1 | MSFT_xScriptResource_NoCredential.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$FilePath,
[Parameter(Mandatory = $true)... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xGroupResource.Integration.Tests.ps1 | MSFT_xGroupResource.Integration.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")]
param ()
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xRemoteFile.Tests.ps1 | MSFT_xRemoteFile.Tests.ps1 |
$Global:DSCModuleName = 'xPSDesiredStateConfiguration' # Example xNetworking
$Global:DSCResourceName = 'MSFT_xRemoteFile' # Example MSFT_xFirewall
#region HEADER
# Integration Test Template Version: 1.1.0
[String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocat... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xMsiPackage.EndToEnd.Tests.ps1 | MSFT_xMsiPackage.EndToEnd.Tests.ps1 | <#
Please note that some of these tests depend on each other.
They must be run in the order given - if one test fails, subsequent tests may
also fail.
#>
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Describe 'xMsiPackage End to End Tests' {
BeforeAll {
# Import C... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xWindowsFeatureSet.config.ps1 | xWindowsFeatureSet.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
$WindowsFeatureNames,
[ValidateSet('Present', 'Absent')]
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xArchive.Integration.Tests.ps1 | MSFT_xArchive.Integration.Tests.ps1 | $errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
Describe 'xArchive Integration Tests' {
BeforeAll {
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$commonTestHelp... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsPackageCab.Integration.Tests.ps1 | MSFT_xWindowsPackageCab.Integration.Tests.ps1 | Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath 'CommonTestHelper.psm1')
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xWindowsPackageCab' `
-TestType 'Integration'
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xGroupSet.Integration.Tests.ps1 | xGroupSet.Integration.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")]
param ()
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsOptionalFeature.config.ps1 | MSFT_xWindowsOptionalFeature.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[ValidateSet('Present', 'Absent')]
[ValidateNot... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsOptionalFeature.Integration.Tests.ps1 | MSFT_xWindowsOptionalFeature.Integration.Tests.ps1 | Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'CommonTestHelper.psm1')
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xWindowsOptionalFeature' `
-TestType 'Integration'
... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xWindowsOptionalFeatureSet.config.ps1 | xWindowsOptionalFeatureSet.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
$WindowsOptionalFeatureNames,
[ValidateSet('Present', 'Absent... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/xGroupSet.config.ps1 | xGroupSet.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
$GroupName,
[ValidateSet('Present', 'Absent')]
[Vali... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xWindowsProcess.config.ps1 | MSFT_xWindowsProcess.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Path,
[Parameter(Mandatory = $true)]
[AllowEmptyStrin... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xServiceResource_CredentialOnly.config.ps1 | MSFT_xServiceResource_CredentialOnly.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[ValidateSet('Present', 'Absent')]
[ValidateNot... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xServiceResource_AllExceptCredential.config.ps1 | MSFT_xServiceResource_AllExceptCredential.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[Parameter(Mandatory = $true)]
[ValidateNotNull... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xEnvironmentResource.Integration.Tests.ps1 | MSFT_xEnvironmentResource.Integration.Tests.ps1 | # These tests must be run with elevated access
$errorActionPreference = 'Stop'
Set-StrictMode -Version 'Latest'
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
$script:commonTestHelperFilePath = Join-... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xDSCWebService.xxx.ps1 | MSFT_xDSCWebService.xxx.ps1 | ######################################################################################
# Integration Tests for DSC Resource xDSCWebService
#
# There tests will make changes to your system, we are tyring to roll them back,
# but you never know. Best to run this on a throwaway VM.
# Run as an elevated administrator... |
PowerShellCorpus/PowerShellGallery/xPSDesiredStateConfiguration/6.4.0.0/Tests/Integration/MSFT_xScriptResource_WithCredential.config.ps1 | MSFT_xScriptResource_WithCredential.config.ps1 | param
(
[Parameter(Mandatory = $true)]
[String]
$ConfigurationName
)
Configuration $ConfigurationName
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$FilePath,
[Parameter(Mandatory = $true)... |
PowerShellCorpus/PowerShellGallery/xWinEventLog/1.1.0.0/WinEvent.Tests.ps1 | WinEvent.Tests.ps1 | <#
.NOTES
#>
Import-Module $PSScriptRoot\DSCResources\MSFT_xWinEventLog\MSFT_xWinEventLog.psm1 -Prefix WinEventLog -Force
#Getting initial Value for Capi2 Log so we can test the ability to set Isenabled to False
#and then set it back to its original value when we're done
$Capi2Log = Get-WinEv... |
PowerShellCorpus/PowerShellGallery/xWinEventLog/1.1.0.0/Examples/Demo1.ps1 | Demo1.ps1 | cls
$before = Get-WinEvent -ListLog "Microsoft-Windows-MSPaint/Admin"
configuration Demo1
{
Import-DscResource -module xWinEventLog
xWinEventLog Demo1
{
LogName = "Microsoft-Windows-MSPaint/Admin"
IsEnabled = $true
LogMode = "AutoBackup"
... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/Private/ReadSecureString.ps1 | ReadSecureString.ps1 | Set-StrictMode -Version Latest
function ReadSecureString([Parameter(Position=0,mandatory=$false)][String]$Prompt = 'Password:') {
[Boolean]$Done = $false
do {
$SecureString = Read-Host -Prompt $Prompt -AsSecureString
$ReSecureString = Read-Host -Prompt ('Re-type '+$Prompt) -AsSecureStri... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/Private/DecryptSecureString.ps1 | DecryptSecureString.ps1 | Set-StrictMode -Version Latest
function DecryptSecureString {
param(
[parameter(position=0,mandatory=$true)]
[System.Security.SecureString]
$SecureString
)
$BStr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString)
[System.Runtime.InteropServi... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/Public/New-AzureRmStartStopVmAutomation.ps1 | New-AzureRmStartStopVmAutomation.ps1 | using namespace Microsoft.Azure.Commands.Profile.Models
Set-StrictMode -Version Latest
$script:ErrorActionPreference = "Stop"
<#
.SYNOPSIS
Create a new Automation Account which includes two RunBooks. Them makes start/stop a virtual machine.
.DESCRIPTION
This function creates seven objects in a resource g... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/Public/Register-AzureRmStopVmScheduleRunbook.ps1 | Register-AzureRmStopVmScheduleRunbook.ps1 | Set-StrictMode -Version Latest
<#
.SYNOPSIS
Associate a schedule to the Stop virtual machine runbook.
.EXAMPLE
Register-AzureRmStopVmScheduleRunbook -ResourceGroupName rg01 -AutomationAccountName aa01 -VmName myvm -ScheduleName NineOclock
#>
function Register-AzureRmStopVmScheduleRunbook {
param(
... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/Public/Register-AzureRmStartVmScheduleRunbook.ps1 | Register-AzureRmStartVmScheduleRunbook.ps1 | Set-StrictMode -Version Latest
<#
.SYNOPSIS
Associate a schedule to the Start virtual machine runbook.
.EXAMPLE
Register-AzureRmStartVmScheduleRunbook -ResourceGroupName rg01 -AutomationAccountName aa01 -VmName myvm -ScheduleName NineOclock
#>
function Register-AzureRmStartVmScheduleRunbook {
param(
... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/RunBook/Stop-SingleAzureRmVm.ps1 | Stop-SingleAzureRmVm.ps1 | Workflow Stop-SingleAzureRmVm {
Param(
[parameter(mandatory=$false)]
[String]
$CredentialAssetName = "AzureCredential",
[parameter(mandatory=$false)]
[String]
$TenantIdAssetName = "TenantId",
[parameter(mandatory=$true)]
[String]
... |
PowerShellCorpus/PowerShellGallery/AzureRmMinus/0.3.0.0/RunBook/Start-SingleAzureRmVm.ps1 | Start-SingleAzureRmVm.ps1 | Workflow Start-SingleAzureRmVm {
Param(
[parameter(mandatory=$false)]
[String]
$CredentialAssetName = "AzureCredential",
[parameter(mandatory=$false)]
[String]
$TenantIdAssetName = "TenantId",
[parameter(mandatory=$true)]
[String]
... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Get-PercentagePerformanceCounter.ps1 | Get-PercentagePerformanceCounter.ps1 | function Get-PercentagePerformanceCounter
{
<#
.Synopsis
Gets performance counters that are percentages
.Description
Gets all performance counters on the system that are percentaged based values.
These counters will work well on a performance counter heatmap
When ru... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Get-HeatmapLevel.ps1 | Get-HeatmapLevel.ps1 | function Get-HeatmapLevel
{
<#
.Synopsis
Gets the different levels of heatmap colors
.Description
Gets the mapping of rendered color to heatmap percentage values
.Example
Get-HeatmapLevel
.Link
Set-HeatmapLevel
#>
param()
#region Get hea... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Watch-Heatmap.ps1 | Watch-Heatmap.ps1 | function Watch-Heatmap
{
<#
.Synopsis
Watches the performance heatmap
.Description
Watches the performance heatmap.
Performance counters that are at dangerous levels are in dangerous colors.
.Example
Watch-Heatmap
.Link
Add-HeatmapCounte... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Remove-HeatmapCounter.ps1 | Remove-HeatmapCounter.ps1 | None |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Set-HeatmapLevel.ps1 | Set-HeatmapLevel.ps1 | function Set-HeatmapLevel
{
<#
.Synopsis
Sets the color levels used on the heatmap
.Description
Sets the color levels used on the heatmap.
The key in the table is the color, and the value is the point at which to start using the color.
.Example
... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Get-HeatmapCounter.ps1 | Get-HeatmapCounter.ps1 | function Get-HeatmapCounter
{
<#
.Synopsis
Gets the performance counters registered in the heatmap
.Description
Gets the performance counters registered in the heatmap.
To add performance counters to the heatmap, use Add-PerformanceCounter.
To ... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Get-PerformanceCounterName.ps1 | Get-PerformanceCounterName.ps1 | function Get-PerformanceCounterName
{
<#
.Synopsis
Gets the names of all performance counters
.Description
Gets the names of all performance counters.
When run in Azure, this will list all performance counters available to an Azure instance.
.Example
Get-Perf... |
PowerShellCorpus/PowerShellGallery/Heatmap/1.0/Add-HeatmapCounter.ps1 | Add-HeatmapCounter.ps1 | function Add-HeatmapCounter
{
<#
.Synopsis
Adds a Performance counter to the heatmap
.Description
Adds a Performance counter to the heatmap.
.Example
Add-HeatmapCounter '\Processor(*)\% Processor Time'
Watch-Heatmap
.Link
Get-HeatmapCounter
... |
PowerShellCorpus/PowerShellGallery/xPowerShellExecutionPolicy/1.1.0.0/Examples/SetPowerShellExecutionPolicy.ps1 | SetPowerShellExecutionPolicy.ps1 | #---------------------------------------------------------------------------------
#The sample scripts are not supported under any Microsoft standard support
#program or service. The sample scripts are provided AS IS without warranty
#of any kind. Microsoft further disclaims all implied warranties including,
#wit... |
PowerShellCorpus/PowerShellGallery/xPowerShellExecutionPolicy/1.1.0.0/Tests/Unit/MSFT_xPowerShellExecutionpolicy.test.ps1 | MSFT_xPowerShellExecutionpolicy.test.ps1 | <#
.Synopsis
Unit test for PowerShellExecutionPolicy DSC Resource
#>
$Global:DSCModuleName = 'xPowerShellExecutionPolicy'
$Global:DSCResourceName = 'MSFT_xPowerShellExecutionPolicy'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResou... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Test-CmdletDocumentation.ps1 | Test-CmdletDocumentation.ps1 | function Test-CmdletDocumentation {
<#
.SYNOPSIS
Tests the documentation of a Cmdlet.
.DESCRIPTION
Tests the documentation of a Cmdlet.
This Cmdlet lets you test for the existence working of inline help and
documentation of a Cmdlet or advanced function.
.EXAMPLE
Test-CmdletDocumentation Get-C... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Format-IpAddress.ps1 | Format-IpAddress.ps1 | function Format-IPAddress {
<#
.SYNOPSIS
Formats a given string IPv4 address with either leading or non-leading zeros.
.DESCRIPTION
Formats a given string IPv4 address with either leading or non-leading zeros.
Optionally the given address is validated.
.INPUTS
Either an IPv4 address in string form... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Import-Module.ps1 | Import-Module.ps1 | # Import-Module.ps1
#
# Place any pre-initialisation script here
# Note:
# * When executed the module is not yet loaded
# * Everything you define here (e.g. a variable) is defined OUTSIDE the module scope.
# If this script is loaded via "ScriptsToProcess" it will incorrectly
# show up as loaded module, see ... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Get-DataType.ps1 | Get-DataType.ps1 | function Get-DataType {
<#
.SYNOPSIS
Retrieves information about a .NET data type.
.DESCRIPTION
Retrieves information about a .NET data type.
You can search for arbitrary data types that loaded in the current PowerShell
session via exact name or regex search patterns (default).
In addition you can also dis... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertTo-UrlEncoded.ps1 | ConvertTo-UrlEncoded.ps1 | Function ConvertTo-UrlEncoded {
[CmdletBinding(
HelpURI = 'http://dfch.biz/biz/dfch/PS/System/Utilities/ConvertTo-UrlEncoded/'
)]
[OutputType([string])]
PARAM
(
# Specifies the string to convert to UrlEncoded format
[ValidateNotNull()]
[Parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Set-ActivityProgress.ps1 | Set-ActivityProgress.ps1 | function Set-ActivityProgress {
[CmdletBinding(
HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/Set-ActivityProgress/'
)]
[OutputType([Boolean])]
Param (
[Parameter(Mandatory = $false, Position = 0)]
[string] $Activity
,
[Parameter(Mandatory = $false, Position = 1)]
[string] $Status
,
[Paramet... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Invoke-WithRetry.ps1 | Invoke-WithRetry.ps1 | Function Invoke-WithRetry {
<#
.SYNOPSIS
Invokes a given scriptblock and retries upon failure.
.DESCRIPTION
Invokes a given scriptblock and retries upon failure.
The specified scriptblock is executed via Invoke-Command. If the scriptblock
throws an error the scriptblock will be executed again until it succe... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/New-ActivityProgress.ps1 | New-ActivityProgress.ps1 | function New-ActivityProgress {
[CmdletBinding(
HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/New-ActivityProgress/'
)]
[OutputType([Int])]
Param (
[Parameter(Mandatory = $false, Position = 0)]
[string] $Activity = $MyInvocation.MyCommand.Name
,
[Parameter(Mandatory = $false, Position = 1)]
[str... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Set-SslSecurityPolicy.ps1 | Set-SslSecurityPolicy.ps1 | function Set-SslSecurityPolicy {
<#
.SYNOPSIS
Configures the certificate handling in ServicePointManager
.DESCRIPTION
Configures the certificate handling in ServicePointManager
You can set different options and modify how the .NET ServicePointManager
should handle validation and trusting X.509 SSL/TLS certi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.