full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/Tests/Unit/MSFT_xPackageResource.Tests.ps1 | MSFT_xPackageResource.Tests.ps1 | Import-Module "$PSScriptRoot\..\CommonTestHelper.psm1" -Force
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xPackageResource' `
-TestType 'Unit'
try
{
InModuleScope 'MSFT_xPackageResource' {
... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/Tests/Unit/MSFT_xArchive.Tests.ps1 | MSFT_xArchive.Tests.ps1 |
Import-Module "$PSScriptRoot\..\CommonTestHelper.psm1" -Force
$script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceModuleName 'xPSDesiredStateConfiguration' `
-DscResourceName 'MSFT_xArchive' `
-TestType 'Unit'
try
{
InModuleScope 'MSFT_xArchive' {
Describe 'x... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/Tests/Integration/MSFT_xPackageResource.Tests.ps1 | MSFT_xPackageResource.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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xPSDesiredStateConfiguration/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/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Examples/Sample_InitializeDataDisk.ps1 | Sample_InitializeDataDisk.ps1 | # This configuration will wait for disk 2 to become available, and then make the disk available as
# two new formatted volumes, 'G' and 'J', with 'J' using all available space after 'G' has been
# created. It also creates a new ReFS formated volume on Disk 3 attached as drive letter 'S'.
Configuration Sample_DataDis... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Examples/Sample_xMountImage_MountVHD.ps1 | Sample_xMountImage_MountVHD.ps1 | # This configuration will mount a VHD file and wait for it to become available.
configuration Sample_xMountImage_MountVHD
{
Import-DscResource -ModuleName xStorage
xMountImage MountVHD
{
ImagePath = 'd:\Data\Disk1.vhd'
DriveLetter = 'V'
}
xWaitForVolume WaitForVHD
{... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Examples/Sample_InitializeDataDiskWithAccessPath.ps1 | Sample_InitializeDataDiskWithAccessPath.ps1 | # This configuration will wait for disk 2 to become available, and then make the disk available as
# two new formatted volumes mounted to folders c:\SQLData and c:\SQLLog, with c:\SQLLog using all
# available space after c:\SQLData has been created.
Configuration Sample_DataDiskwithAccessPath
{
Import-DSCRes... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Examples/Sample_xMountImage_MountISO.ps1 | Sample_xMountImage_MountISO.ps1 | # This configuration will mount an ISO file as drive S:.
configuration Sample_xMountImage_MountISO
{
Import-DscResource -ModuleName xStorage
xMountImage ISO
{
ImagePath = 'c:\Sources\SQL.iso'
DriveLetter = 'S'
}
xWaitForVolume WaitForISO
{
DriveLetter ... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Examples/Sample_xMountImage_DismountISO.ps1 | Sample_xMountImage_DismountISO.ps1 | # This configuration will unmount an ISO file that is mounted in S:.
configuration Sample_xMountImage_DismountISO
{
Import-DscResource -ModuleName xStorage
xMountImage ISO
{
ImagePath = 'c:\Sources\SQL.iso'
DriveLetter = 'S'
Ensure = 'Absent'
}
}
Sample_xMountImage_D... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Unit/MSFT_xDiskAssignPath.tests.ps1 | MSFT_xDiskAssignPath.tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xDiskAccessPath'
Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1')
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $script:... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Unit/MSFT_xWaitForDisk.tests.ps1 | MSFT_xWaitForDisk.tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xWaitForDisk'
Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1')
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $script:mod... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Unit/MSFT_xMountImage.tests.ps1 | MSFT_xMountImage.tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xMountImage'
Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1')
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $script:modu... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Unit/MSFT_xWaitForVolume.tests.ps1 | MSFT_xWaitForVolume.tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xWaitForVolume'
Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1')
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $script:m... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Unit/StorageCommon.tests.ps1 | StorageCommon.tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'StorageCommon'
Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1')
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $script:moduleR... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Unit/MSFT_xDisk.tests.ps1 | MSFT_xDisk.tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xDisk'
Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1')
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $script:moduleRoot... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xWaitForDisk.config.ps1 | MSFT_xWaitForDisk.config.ps1 | $TestWaitForDisk = @{
DiskNumber = 0
RetryIntervalSec = 1
RetryCount = 2
}
configuration MSFT_xWaitForDisk_Config {
Import-DscResource -ModuleName xStorage
node localhost {
xWaitForDisk Integration_Test {
DiskNumber = $TestWaitForDisk.DiskNumber
... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xDisk.config.ps1 | MSFT_xDisk.config.ps1 | configuration MSFT_xDisk_Config {
Import-DscResource -ModuleName xStorage
node localhost {
xDisk Integration_Test {
DiskNumber = $Node.DiskNumber
DriveLetter = $Node.DriveLetter
FSLabel = $Node.FSLabel
}
}
}
|
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xDisk.Integration.Tests.ps1 | MSFT_xDisk.Integration.Tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xDisk'
#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 -ChildPath 'DSCResource.T... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xMountImage_dismount.config.ps1 | MSFT_xMountImage_dismount.config.ps1 | configuration MSFT_xMountImage_Dismount_Config {
Import-DscResource -ModuleName xStorage
node localhost {
xMountImage Integration_Test {
ImagePath = $Node.ImagePath
Ensure = 'Absent'
}
}
}
|
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xDiskAccessPath.config.ps1 | MSFT_xDiskAccessPath.config.ps1 | configuration MSFT_xDiskAccessPath_Config {
Import-DscResource -ModuleName xStorage
node localhost {
xDiskAccessPath Integration_Test {
DiskNumber = $Node.DiskNumber
AccessPath = $Node.AccessPath
FSLabel = $Node.FSLabel
}
... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xMountImage_mount.config.ps1 | MSFT_xMountImage_mount.config.ps1 | configuration MSFT_xMountImage_Mount_Config {
Import-DscResource -ModuleName xStorage
node localhost {
xMountImage Integration_Test {
ImagePath = $Node.ImagePath
DriveLetter = $Node.DriveLetter
Ensure = 'Present'
}
}... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xWaitForDisk.Integration.Tests.ps1 | MSFT_xWaitForDisk.Integration.Tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xWaitForDisk'
#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 -ChildPath 'DSCRes... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xDiskAccessPath.Integration.Tests.ps1 | MSFT_xDiskAccessPath.Integration.Tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xDiskAccessPath'
#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 -ChildPath 'DSC... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xMountImage_VHD.Integration.Tests.ps1 | MSFT_xMountImage_VHD.Integration.Tests.ps1 | # In order to run these tests, Hyper-V must be installed on the testing computer.
# If it is not installed these tests will not be run. This does prevent these tests
# from being run on AppVeyor.
$script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xMountImage'
#region HEADER
# Integrati... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xWaitForVolume.config.ps1 | MSFT_xWaitForVolume.config.ps1 | $TestWaitForVolume = @{
DriveLetter = 'C'
RetryIntervalSec = 1
RetryCount = 2
}
configuration MSFT_xWaitForVolume_Config {
Import-DscResource -ModuleName xStorage
node localhost {
xWaitForVolume Integration_Test {
DriveLetter = $TestWaitForVolume.DriveL... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xMountImage_ISO.Integration.Tests.ps1 | MSFT_xMountImage_ISO.Integration.Tests.ps1 | # In order to run these tests, a basic ISO file called 'test.iso' must be put
# in the same folder as this file. The ISO file must be a valid ISO file that can
# normally be mounted. If the test.iso file is not found the tests will not run.
# The ISO is not included with this repository because of size contstraints.... |
PowerShellCorpus/Github/jamesbannan_storage-iops-latency-throughput-demo/dsc/xStorage/Tests/Integration/MSFT_xWaitForVolume.Integration.Tests.ps1 | MSFT_xWaitForVolume.Integration.Tests.ps1 | $script:DSCModuleName = 'xStorage'
$script:DSCResourceName = 'MSFT_xWaitForVolume'
#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 -ChildPath 'DSCR... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_3_30_20_5_36/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/connectvigneshbabu_powershell/adduserrdp.ps1 | adduserrdp.ps1 | $user = Read-Host "enter domain user id"
$pc = Read-Host "enter pc number"
$objUser = [ADSI]("WinNT://DOMAIN/$user")
$objGroup = [ADSI]("WinNT://$pc/Remote Desktop Users")
$objGroup.PSBase.Invoke("Add",$objUser.PSBase.Path) |
PowerShellCorpus/Github/connectvigneshbabu_powershell/remote_add_users.ps1 | remote_add_users.ps1 | $group = Read-Host "Enter the group you want a user to add in"
$user = Read-Host "enter domain user id"
$pc = Read-Host "enter pc number"
$objUser = [ADSI]("WinNT://DOMAIN/$user")
$objGroup = [ADSI]("WinNT://$pc/$group")
$objGroup.PSBase.Invoke("Add",$objUser.PSBase.Path)
|
PowerShellCorpus/Github/connectvigneshbabu_powershell/rajsekar_remodified.ps1 | rajsekar_remodified.ps1 |
$PATH = "D:\Powershell\test\"
$InputFile = "$PATH\ipaddress.txt"
$OUTFile = "$PATH\out.csv"
$UserName = Read-Host "Enter User Name "
$Password = Read-Host -AsSecureString "Enter Your Password "
$ComputerName = Get-Content -Path $InputFile
$Obj=@()
Foreach($Computer in $ComputerName)
{
Write... |
PowerShellCorpus/Github/connectvigneshbabu_powershell/Get-DNSServers.ps1 | Get-DNSServers.ps1 | <#
.Synopsis
Get the DNS servers list of each IP enabled network connection
.Description
This script displays DNS servers list of each IP enabled network connection in local or remote computer.
.Parameter ComputerName
Computer Name(s) from which you want to qu... |
PowerShellCorpus/Github/connectvigneshbabu_powershell/FileSystemWatcher.ps1 | FileSystemWatcher.ps1 | <#
Name: FileSystemwatcher.ps1
Author: Vigneshbabu
DateCreated: 14-04-2016
Project : Corporate Data center
Version: 1.1
To stop the monitoring, run the following commands:
Unregister-Event FileDeleted
Unregister-Event FileCreated
Unregister-Event FileChanged
#>
<#
function module Get-Name for... |
PowerShellCorpus/Github/connectvigneshbabu_powershell/patchtest.ps1 | patchtest.ps1 | $computer = Get-Content d:\powershell\ipaddress.txt
get-wmiobject -ComputerName $computer -Namespace root\ccm\ClientSDK -Class CCM_SoftwareUpdate | `
Select-Object PSComputername,ArticleID,BulletinID,Name,EvaluationState | Export-Csv -NoType d:\powershell\output.csv |
PowerShellCorpus/Github/connectvigneshbabu_powershell/getlocaluser.ps1 | getlocaluser.ps1 | [CmdletBinding()]
Param(
[Parameter( ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true
)]
[string[]]
$ComputerName = $env:ComputerName,
[Parameter()]
[string]
$LocalGroupName = "Administrators",
[Parameter()]
[string]
$OutputDir = "D:\Powershell\"
)
Begin {
$OutputFile = Jo... |
PowerShellCorpus/Github/connectvigneshbabu_powershell/check3389port.ps1 | check3389port.ps1 | #check telnet ports of various hosts
$hosts=get-content -Path "<Enter the path where the list of files >"
foreach ($h in $hosts)
{
#Write-Host $h
Write-Host "Trying to connect on $h on port 3389"
try{
if($sock=New-Object System.Net.Sockets.TcpClient($h,3389)){
Write-Host "Connect... |
PowerShellCorpus/Github/connectvigneshbabu_powershell/set-htmlcolor.ps1 | set-htmlcolor.ps1 | Function Set-CellColor
{ <#
.SYNOPSIS
Function that allows you to set individual cell colors in an HTML table
.DESCRIPTION
To be used inconjunction with ConvertTo-HTML this simple function allows you
to set particular colors for cells in an HTML table. You provide the criteria
... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/AnalyzeScript.ps1 | AnalyzeScript.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.PARAMETER ProjectPath
.EXAMPLE
.NOTES
Author: Zachary Loeber
Site: http://www.the-little-things.net/
Requires: Powershell 5.0
Version History
1.0.0 - Initial release
#>
[CmdletBinding(... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/CreateRepo.ps1 | CreateRepo.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.PARAMETER ProjectPath
.PARAMETER GithubAuthor
.PARAMETER AuthorWebsite
.PARAMETER GithubTitle
.PARAMETER GithubDesc
.PARAMETER GithubIntro
.PARAMETER GithubRepo
.EXAMPLE
... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/GuidedDeployment.ps1 | GuidedDeployment.ps1 | function Get-ScriptPath {
$scriptDir = Get-Variable PSScriptRoot -ErrorAction SilentlyContinue | ForEach-Object { $_.Value }
if (-not $scriptDir) {
if ($MyInvocation.MyCommand.Path) {
$scriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent
}
}
if (-not $scriptDir) {
if ($ExecutionContext.Sessi... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/New-CommentBasedHelp.ps1 | New-CommentBasedHelp.ps1 | function New-CommentBasedHelp {
<#
.SYNOPSIS
Create comment based help for a function.
.DESCRIPTION
Create comment based help for a function.
.PARAMETER Code
Multi-line or piped lines of code to process.
.PARAMETER Advanced
The default CBH result is good for ... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/UploadToPowershellGallery.ps1 | UploadToPowershellGallery.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.PARAMETER ModulePath
.PARAMETER APIKey
.PARAMETER Tags
.PARAMETER ProjectURI
.EXAMPLE
.NOTES
Author: Zachary Loeber
Site: http://www.the-little-things.net/
Requires: Powershel... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/CreatePSModule.ps1 | CreatePSModule.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.PARAMETER ModulePath
.PARAMETER ModuleName
.PARAMETER ModuleDescription
.PARAMETER ModuleAuthor
.EXAMPLE
.NOTES
Author: Zachary Loeber
Site: http://www.the-little-things.net/
... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/src/private/Get-FunctionParameters.ps1 | Get-FunctionParameters.ps1 | function Get-FunctionParameters {
<#
.SYNOPSIS
Return all parameters for each function found in a code block.
.DESCRIPTION
Return all parameters for each function found in a code block.
.PARAMETER Code
Multi-line or piped lines of code to process.
.EXAMPLE
PS ... |
PowerShellCorpus/Github/zloeber_GithubRepoUploadTemplate/templates/InstallModule.ps1 | InstallModule.ps1 | # Run this file to install the %%ModuleName%% PowerShell module with the following
# in an administrative PowerShell prompt:
#
# iex (New-Object Net.WebClient).DownloadString("%%GithubURL%%/raw/master/Install.ps1")
# Some general variables
$ModuleName = '%%ModuleName%%' # Example: mymodule
$GithubURL = '%%Git... |
PowerShellCorpus/Github/vergl4s_pentesting-dump/net/Windows/PowerTools-master/PowerUp/PowerUp.ps1 | PowerUp.ps1 | <#
PowerUp v1.3
Various methods to abuse local services to assist
with escalation on Windows systems.
See README.md for more information.
by: @harmj0y
#>
function Get-ServiceUnquoted {
<#
.SYNOPSIS
Returns the name and binary path for services with unquoted paths
that also have ... |
PowerShellCorpus/Github/vergl4s_pentesting-dump/net/Windows/PowerTools-master/PowerView/powerview.ps1 | powerview.ps1 | #requires -version 2
<#
Veil-PowerView v1.8
See README.md for more information.
by @harmj0y
#>
# PSReflect code for Windows API access
# Author: @mattifestation
# https://raw.githubusercontent.com/mattifestation/PSReflect/master/PSReflect.psm1
function New-InMemoryModule
{
<#
.SYNOPSIS
Crea... |
PowerShellCorpus/Github/vergl4s_pentesting-dump/net/Windows/PowerTools-master/PowerView/functions/Get-Net.ps1 | Get-Net.ps1 | #requires -version 2
<#
The Get-Net* funtions from PowerView.
by @harmj0y
#>
function New-InMemoryModule
{
<#
.SYNOPSIS
Creates an in-memory assembly and module
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependenci... |
PowerShellCorpus/Github/vergl4s_pentesting-dump/net/Windows/PowerTools-master/PowerView/functions/Get-NetShare.ps1 | Get-NetShare.ps1 | #requires -version 2
<#
Implementation of NetShareEnum that utilizes
https://github.com/mattifestation/psreflect to
stay off of disk.
by @harmj0y
#>
function New-InMemoryModule
{
<#
.SYNOPSIS
Creates an in-memory assembly and module
Author: Mat... |
PowerShellCorpus/Github/vergl4s_pentesting-dump/net/Windows/PowerTools-master/PowerView/functions/Invoke-UserHunter.ps1 | Invoke-UserHunter.ps1 | #requires -version 2
<#
Implementation of UserHunter that utilizes
https://github.com/mattifestation/psreflect to
stay off of disk.
By @harmj0y
#>
function New-InMemoryModule
{
<#
.SYNOPSIS
Creates an in-memory assembly and module
Author: Matthew... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.