full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/DSCResources/MSFT_xADCommon/MSFT_xADCommon.ps1
MSFT_xADCommon.ps1
data localizedString { # culture="en-US" ConvertFrom-StringData @' RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed MembersAndIncludeExcludeError = The '{0}' and '{1}' and/or '{2}' parameters conflict. The '{0}' parameter should not be u...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADDomain.Tests.ps1
MSFT_xADDomain.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' # Example xNetworking $Global:DSCResourceName = 'MSFT_xADDomain' # Example MSFT_xFirewall #region HEADER [String] $moduleRoot = Split-Path ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xWaitForADDomain.Tests.ps1
MSFT_xWaitForADDomain.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' $Global:DSCResourceName = 'MSFT_xWaitForADDomain' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADCommon.Tests.ps1
MSFT_xADCommon.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' # Example xNetworking $Global:DSCResourceName = 'MSFT_xADCommon' # Example MSFT_xFirewall #region HEADER [String] $moduleRoot = Split-Path ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADComputer.Tests.ps1
MSFT_xADComputer.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' # Example xNetworking $Global:DSCResourceName = 'MSFT_xADComputer' # Example MSFT_xFirewall #region HEADER # Unit Test Template Version: 1....
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADDomainController.Tests.ps1
MSFT_xADDomainController.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Script:DSCModuleName = 'xActiveDirectory' $Script:DSCResourceName = 'MSFT_xADDomainController' #region HEADER [String] $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $P...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADOrganizationalUnit.Tests.ps1
MSFT_xADOrganizationalUnit.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' # Example xNetworking $Global:DSCResourceName = 'MSFT_xADOrganizationalUnit' # Example MSFT_xFirewall #region HEADER [String] $moduleRoot =...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADGroup.Tests.ps1
MSFT_xADGroup.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' # Example xNetworking $Global:DSCResourceName = 'MSFT_xADGroup' # Example MSFT_xFirewall #region HEADER [String] $moduleRoot = Split-Path -...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADUser.Tests.ps1
MSFT_xADUser.Tests.ps1
$Global:DSCModuleName = 'xActiveDirectory' $Global:DSCResourceName = 'MSFT_xADUser' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Tests/Unit/MSFT_xADDomainDefaultPasswordPolicy.Tests.ps1
MSFT_xADDomainDefaultPasswordPolicy.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() $Global:DSCModuleName = 'xActiveDirectory' # Example xNetworking $Global:DSCResourceName = 'MSFT_xADDomainDefaultPasswordPolicy' # Example MSFT_xFirewall #region HEADER [String] $mod...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xAdcsDeployment/1.0.0.0/Examples/Config-SetupActiveDirectory.ps1
Config-SetupActiveDirectory.ps1
#region Param param ( [String]$DomainName, [String]$DomainNetbiosName, [PSCredential]$Credential, [PSCredential]$DomainCredential, [PSCredential]$SafeModeAdministratorPassword, [String]$EncryptionCertificateThumbprint ) #endregion #region Decrypt function De...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xAdcsDeployment/1.0.0.0/Tests/Unit/MSFT_xAdcsOnlineResponder.Tests.ps1
MSFT_xAdcsOnlineResponder.Tests.ps1
$Global:DSCModuleName = 'xAdcsDeployment' $Global:DSCResourceName = 'MSFT_xAdcsOnlineResponder' #region HEADER # Unit Test Template Version: 1.0 [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xAdcsDeployment/1.0.0.0/Tests/Unit/MSFT_xAdcsWebEnrollment.Tests.ps1
MSFT_xAdcsWebEnrollment.Tests.ps1
$Global:DSCModuleName = 'xAdcsDeployment' $Global:DSCResourceName = 'MSFT_xAdcsWebEnrollment' #region HEADER # Unit Test Template Version: 1.0 [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $mo...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/DSC-data-driven-deployment/scripts/InputDSCConfigurationMetaData.ps1
InputDSCConfigurationMetaData.ps1
#Set Required Variables $OutputPath = 'C:\DSC_Mof' #Location where mof files will be stored $CentralDataStore = 'OHSQL9038' #Central location where metadata for DSC configurations are/will be stored $DSCCentralRoot = 'C:\DSC-data-driven-deployment' #DSCCentralRoot Call this something new $SQLServerBitsLocatio...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/DSC-data-driven-deployment/scripts/DSCExecutionTask.ps1
DSCExecutionTask.ps1
#Scheduled task or Enterprise scheduler calls this Script at whatever interval required #Set Required Variables $OutputPath = 'C:\DSC_Mof' $CentralDataStore = 'OHSQL9038' # Load Common Code Import-Module "C:\DSC-data-driven-deployment\Modules\ConfigurationHelper.psm1" -Verbose:$False -ErrorAction Stop #Get ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/DSC-data-driven-deployment/scripts/DSCSQLMetaBuild.ps1
DSCSQLMetaBuild.ps1
#requires -Version 5 Param([Hashtable]$ConfigurationData, [String]$OutputPath) $computers = $ConfigurationData.AllNodes.Nodename | Where-Object { $_ -ne "*" } if($computers){$cim = New-CimSession -ComputerName $computers} [DSCLocalConfigurationManager()] Configuration LCM_Push { Param( [...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/DSC-data-driven-deployment/scripts/DSCDataDrivenSQLConfiguration.ps1
DSCDataDrivenSQLConfiguration.ps1
#Set Required Variables $OutputPath = 'C:\DSC_Mof' #Location where mof files will be stored $ConfigurationHelperPath = 'C:\DSC-data-driven-deployment\' $SQLServerBitsLocation = '\\ohdc9000\SQLAutoBuilds' $DefaultSQLVersion = 'SQL2014' $NETLocation = '\\ohdc9000\SQLAutoBuilds\SQL2014\WindowsServer2012R2\sources...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/DSC-data-driven-deployment/scripts/DSCAlwaysOnMetaBuild.ps1
DSCAlwaysOnMetaBuild.ps1
#requires -Version 5 Param([Hashtable]$ConfigurationData, [String]$OutputPath) $computers = $ConfigurationData.AllNodes.Nodename | Where-Object { $_ -ne "*" } if($computers){$cim = New-CimSession -ComputerName $computers} $primaryReplica = $computers | Select-Object -First 1 [DSCLocalConfigurationMana...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xDnsClientGlobalSetting_SuffixSearchList.ps1
Sample_xDnsClientGlobalSetting_SuffixSearchList.ps1
configuration Sample_xDnsClientGlobalSetting_SuffixSearchList { param ( [string[]]$NodeName = 'localhost', [Parameter(Mandatory)] [string[]]$SuffixSearchList, [Parameter(Mandatory)] [boolean]$UseDevolution = $true, [Parameter(Mandatory)] [u...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xFirewall_AddFirewallRule_AllParameters.ps1
Sample_xFirewall_AddFirewallRule_AllParameters.ps1
# DSC configuration for Firewall # Note: This configuration sample uses all Firewall rule parameters. # It is only used to show example usage and should not be created. configuration Sample_xFirewall_AddFirewallRule_AllParameters { param ( [string[]]$NodeName = 'localhost' ) Import-...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xIPAddress_StaticIP_FixedValue.ps1
Sample_xIPAddress_StaticIP_FixedValue.ps1
configuration Sample_xIPAddress_FixedValue { param ( [string[]]$NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xDhcpClient DisabledDhcpClient { State = 'Disabled' InterfaceAlias = "Ethernet...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xHostsFile_RemoveEntry.ps1
Sample_xHostsFile_RemoveEntry.ps1
configuration Sample_xHostsFile_RemoveEntry { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xHostsFile HostEntry { HostName = 'Host01' IPAddress = '192.168.0.1' Ensur...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xDnsServerAddress.ps1
Sample_xDnsServerAddress.ps1
configuration Sample_xDnsServerAddress { param ( [string[]]$NodeName = 'localhost', [Parameter(Mandatory)] [string]$DnsServerAddress, [Parameter(Mandatory)] [string]$InterfaceAlias, [ValidateSet("IPv4","IPv6")] [string]$AddressFamily = 'IPv...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xFirewall_DisableAccessToApplication.ps1
Sample_xFirewall_DisableAccessToApplication.ps1
# DSC configuration for Firewall # configuration Sample_xFirewall_AddFirewallRuleToNewGroup { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewall Firewall { Name ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetworkTeamInterface_UpdateInterface.ps1
Sample_xNetworkTeamInterface_UpdateInterface.ps1
configuration Sample_xNetworkTeamInterface_UpdateInterface { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { Name = 'HostTeam' TeamingMode = 'SwitchIndepend...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xHostsFile_AddEntry.ps1
Sample_xHostsFile_AddEntry.ps1
configuration Sample_xHostsFile_AddEntry { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xHostsFile HostEntry { HostName = 'Host01' IPAddress = '192.168.0.1' Ensure ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xFirewall_AddFirewallRule.ps1
Sample_xFirewall_AddFirewallRule.ps1
# DSC configuration for Firewall configuration Sample_xFirewall_AddFirewallRule { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewall Firewall { Name = "NotePadFir...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetConnectionProfile.ps1
Sample_xNetConnectionProfile.ps1
configuration Sample_xNetConnectionProfile { param ( [parameter(Mandatory = $true)] [string] $InterfaceAlias, [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] [string] $IPv4Connectivity, [ValidateSet('Disconnected', 'NoTraffic',...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetAdapterBinding_DisableIPv6.ps1
Sample_xNetAdapterBinding_DisableIPv6.ps1
configuration Sample_xNetAdapterBinding_DisableIPv6 { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetAdapterBinding DisableIPv6 { InterfaceAlias = 'Ethernet' ComponentId ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xRoute_AddRoute.ps1
Sample_xRoute_AddRoute.ps1
configuration Sample_xRoute_AddRoute { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xRoute NetRoute1 { Ensure = 'Present' InterfaceAlias = 'Ethernet' AddressFam...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xFirewall_EnableBuiltInFirewallRule.ps1
Sample_xFirewall_EnableBuiltInFirewallRule.ps1
# DSC configuration that enables the built-in Firewall Rule # 'World Wide Web Services (HTTP Traffic-In)' configuration Sample_xFirewall_EnableBuiltInFirewallRule { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xFirewall_AddFirewallRuleToExistingGroup.ps1
Sample_xFirewall_AddFirewallRuleToExistingGroup.ps1
# DSC configuration for Firewall # configuration Sample_xFirewall_AddFirewallRuleToExistingGroup { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewall Firewall { Name ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xIPAddress_StaticIP_Parameterized.ps1
Sample_xIPAddress_StaticIP_Parameterized.ps1
configuration Sample_xIPAddress_StaticIP_Parameterized { param ( [string[]]$NodeName = 'localhost', [Parameter(Mandatory)] [string]$IPAddress, [Parameter(Mandatory)] [string]$InterfaceAlias, [int]$SubnetMask = 16, [ValidateSet("IPv4","I...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetworkTeamInterface_RemoveInterface.ps1
Sample_xNetworkTeamInterface_RemoveInterface.ps1
configuration Sample_xNetworkTeamInterface_RemoveInterface { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { Name = 'HostTeam' TeamingMode = 'SwitchIndepend...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xIPDefaultGatewayAddress_Remove.ps1
Sample_xIPDefaultGatewayAddress_Remove.ps1
Configuration Sample_xDefaultGatewayAddress_Remove { param ( [string[]]$NodeName = 'localhost', [Parameter(Mandatory)] [string]$InterfaceAlias, [ValidateSet("IPv4","IPv6")] [string]$AddressFamily = 'IPv4' ) Import-DscResource -Module xNetworking Nod...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetworkTeam_UpdateTeamMembers.ps1
Sample_xNetworkTeam_UpdateTeamMembers.ps1
configuration Sample_xNetworkTeam_UpdateTeamMembers { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { Name = 'HostTeam' TeamingMode = 'SwitchIndependent' ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xFirewall_AddFirewallRuleToNewGroup.ps1
Sample_xFirewall_AddFirewallRuleToNewGroup.ps1
# DSC configuration for Firewall configuration Sample_xFirewall_AddFirewallRuleToNewGroup { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewall Firewall { Name = "...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xDhcpClient_Enabled.ps1
Sample_xDhcpClient_Enabled.ps1
configuration Sample_xDhcpClient_Enabled { param ( [string[]]$NodeName = 'localhost', [Parameter(Mandatory)] [string]$InterfaceAlias, [Parameter(Mandatory)] [ValidateSet("IPv4","IPv6")] [string]$AddressFamily ) Import-DscResource -Module x...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xIPDefaultGatewayAddress_Set.ps1
Sample_xIPDefaultGatewayAddress_Set.ps1
Configuration Sample_xDefaultGatewayAddress { param ( [string[]]$NodeName = 'localhost', [Parameter(Mandatory)] [string]$DefaultGateway, [Parameter(Mandatory)] [string]$InterfaceAlias, [ValidateSet("IPv4","IPv6")] [string]$AddressFamily = 'IPv4' ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetBIOS_Disable.ps1
Sample_xNetBIOS_Disable.ps1
configuration Sample_xNetBIOS_Disabled { param ( [string[]]$NodeName = 'localhost' ) Import-DscResource -ModuleName xNetworking node $NodeName { xNetBIOS DisableNetBIOS { InterfaceAlias = 'Ethernet' Setting = 'Disable' ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetworkTeam_AddTeam.ps1
Sample_xNetworkTeam_AddTeam.ps1
configuration Sample_xNetworkTeam_AddTeam { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { Name = 'HostTeam' TeamingMode = 'SwitchIndependent' L...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetworkTeamInterface_AddInterface.ps1
Sample_xNetworkTeamInterface_AddInterface.ps1
configuration Sample_xNetworkTeamInterface_AddInterface { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { Name = 'HostTeam' TeamingMode = 'SwitchIndependent...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Examples/Sample_xNetworkTeam_RemoveTeam.ps1
Sample_xNetworkTeam_RemoveTeam.ps1
configuration Sample_xNetworkTeam_RemoveTeam { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { Name = 'HostTeam' Ensure = 'Absent' } } } ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xRoute.Tests.ps1
MSFT_xRoute.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xRoute' #region HEADER [String] $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'))) -or ` ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xDefaultGatewayAddress.Tests.ps1
MSFT_xDefaultGatewayAddress.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDefaultGatewayAddress' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResou...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xNetworkTeam.Tests.ps1
MSFT_xNetworkTeam.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetworkTeam' #region HEADER if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or ` (-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) ) { & git @('clone','https://github.com/PowerShell/DscResource.Tests.git') } e...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xFirewall.Tests.ps1
MSFT_xFirewall.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xFirewall' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xIPAddress.Tests.ps1
MSFT_xIPAddress.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xIPAddress' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xHostsFile.Tests.ps1
MSFT_xHostsFile.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xHostsFile' #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 -Path $module...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xDnsConnectionSuffix.Tests.ps1
MSFT_xDnsConnectionSuffix.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDnsConnectionSuffix' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResourc...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xNetworkTeamInterface.Tests.ps1
MSFT_xNetworkTeamInterface.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetworkTeamInterface' #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 -Path $m...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xDhcpClient.Tests.ps1
MSFT_xDhcpClient.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDhcpClient' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xDnsClientGlobalSetting.Tests.ps1
MSFT_xDnsClientGlobalSetting.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDnsClientGlobalSetting' #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 -Path ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xDNSServerAddress.Tests.ps1
MSFT_xDNSServerAddress.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDNSServerAddress' #region HEADER [String] $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.T...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xNetconnectionProfile.tests.ps1
MSFT_xNetconnectionProfile.tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetConnectionProfile' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResour...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xNetBIOS.Tests.ps1
MSFT_xNetBIOS.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetBIOS' #region HEADER [String] $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'))) -or ` ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/MSFT_xNetAdapterBinding.Tests.ps1
MSFT_xNetAdapterBinding.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetAdapterBinding' #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 -Path...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Unit/xNetworkAdapter.Tests.ps1
xNetworkAdapter.Tests.ps1
$Global:ModuleName = 'xNetworkAdapter' #region HEADER [String] $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'))) -or ` (-not (Test-Path -Path (Join-Path -Pat...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetBIOS.Integration.Tests.ps1
MSFT_xNetBIOS.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetBIOS' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xRoute_add.config.ps1
MSFT_xRoute_add.config.ps1
configuration MSFT_xRoute_Add_Config { Import-DscResource -ModuleName xNetworking node localhost { xRoute Integration_Test { InterfaceAlias = $TestRoute.InterfaceAlias AddressFamily = $TestRoute.AddressFamily DestinationPrefix = $TestRou...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDefaultGatewayAddress.Tests.ps1
MSFT_xDefaultGatewayAddress.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDefaultGatewayAddress' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResou...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDnsClientGlobalSetting.Integration.Tests.ps1
MSFT_xDnsClientGlobalSetting.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDnsClientGlobalSetting' #region HEADER # Integration 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...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDNSConnectionSuffix.config.ps1
MSFT_xDNSConnectionSuffix.config.ps1
$TestDnsConnectionSuffix = [PSObject]@{ InterfaceAlias = 'xNetworkingLBA' ConnectionSpecificSuffix = 'contoso.com' RegisterThisConnectionsAddress = $true UseSuffixWhenRegistering = $false Ensure = 'Present' } configuration MSFT_xDnsConnect...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetworkTeamInterface.config.ps1
MSFT_xNetworkTeamInterface.config.ps1
$TestTeam = [PSObject]@{ Name = 'TestTeam' Members = (Get-NetAdapter -Physical).Name loadBalancingAlgorithm = 'Dynamic' teamingMode = 'SwitchIndependent' Ensure = 'Present' } $TestInterface = [PSObject]@{ Name ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xIPAddress.config.ps1
MSFT_xIPAddress.config.ps1
$TestIPAddress = [PSObject]@{ InterfaceAlias = 'xNetworkingLBA' AddressFamily = 'IPv4' IPAddress = '10.11.12.13' SubnetMask = 16 } configuration MSFT_xIPAddress_Config { Import-DscResource -ModuleName xNetworking node localhost { x...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetworkTeam.config.ps1
MSFT_xNetworkTeam.config.ps1
$TestTeam = [PSObject]@{ Name = 'TestTeam' Members = (Get-NetAdapter -Physical).Name loadBalancingAlgorithm = 'Dynamic' teamingMode = 'SwitchIndependent' Ensure = 'Present' } configuration MSFT_xNetworkTeam_Config { par...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDhcpClient.Tests.ps1
MSFT_xDhcpClient.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDhcpClient' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetBIOS.config.ps1
MSFT_xNetBIOS.config.ps1
try { [void][reflection.assembly]::GetAssembly([NetBIOSSetting]) } catch { Add-Type -TypeDefinition @' public enum NetBiosSetting { Default, Enable, Disable } '@ } $adapter = ( Get-CimInstance -ClassName Win32_NetworkAdapter ` -Filter 'NetEnabled=...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xRoute_remove.config.ps1
MSFT_xRoute_remove.config.ps1
configuration MSFT_xRoute_Remove_Config { Import-DscResource -ModuleName xNetworking node localhost { xRoute Integration_Test { InterfaceAlias = $TestRoute.InterfaceAlias AddressFamily = $TestRoute.AddressFamily DestinationPrefix = $Test...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetworkAdapterName.config.ps1
MSFT_xNetworkAdapterName.config.ps1
$realAdapter = (Get-NetAdapter -Physical | Select-Object -First 1) $TestAdapter = [PSObject]@{ Name = $realAdapter.Name MacAddress = $realAdapter.MacAddress } configuration MSFT_xNetworkAdapterName_Config { Import-DscResource -ModuleName xNetworking node localh...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDhcpClient.config.ps1
MSFT_xDhcpClient.config.ps1
$TestDhcpClient = [PSObject]@{ InterfaceAlias = 'xNetworkingLBA' AddressFamily = 'IPv4' State = 'Enabled' } configuration MSFT_xDhcpClient_Config { Import-DscResource -ModuleName xNetworking node localhost { xDhcpClient Integration_Test { ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xFirewall.Integration.Tests.ps1
MSFT_xFirewall.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xFirewall' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xFirewall.config.ps1
MSFT_xFirewall.config.ps1
<# This file exists so we can load the test file without necessarily having xNetworking in the $env:PSModulePath. Otherwise PowerShell will throw an error when reading the Pester File #> $rule = @{ Name = 'b8df0af9-d0cc-4080-885b-6ed263aaed67' DisplayName = 'Test Rule' ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDnsClientGlobalSetting.config.ps1
MSFT_xDnsClientGlobalSetting.config.ps1
$DnsClientGlobalSetting = @{ SuffixSearchList = 'contoso.com' UseDevolution = $True DevolutionLevel = 2 } Configuration MSFT_xDnsClientGlobalSetting_Config { Import-DscResource -ModuleName xNetworking node localhost { xDnsClientGlobalSetting ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetAdapterBinding.Tests.ps1
MSFT_xNetAdapterBinding.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetAdapterBinding' #region HEADER # Integration 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-Pat...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetworkTeamInterface.Integration.Tests.ps1
MSFT_xNetworkTeamInterface.Integration.Tests.ps1
#Remove this following line before using this integration test script return $Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetworkTeamInterface' $Global:teamMembers = (Get-NetAdapter -Physical).Name #region HEADER # Integration Test Template Version: 1.1.0 [String] $mo...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xHostsFile.config.ps1
MSFT_xHostsFile.config.ps1
$HostEntry = [PSObject]@{ HostName = 'Host01' IPAddress = '192.168.0.1' Ensure = 'Present' } Configuration MSFT_xHostsFile_Config { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetConnectionProfile.config.ps1
MSFT_xNetConnectionProfile.config.ps1
$rule = Get-NetConnectionProfile | Select-Object -First 1 configuration MSFT_xNetConnectionProfile_Config { Import-DscResource -ModuleName xNetworking node localhost { xNetConnectionProfile Integration_Test { InterfaceAlias = $rule.InterfaceAlias NetworkCategory = $rul...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xIPAddress.Integration.Tests.ps1
MSFT_xIPAddress.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xIPAddress' #region HEADER [String] $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/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetworkTeam.Integration.Tests.ps1
MSFT_xNetworkTeam.Integration.Tests.ps1
#Remove this following line before using this integration test script return $Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetworkTeam' $Global:teamMembers = (Get-NetAdapter -Physical).Name #region HEADER if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or ` ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetAdapterBinding.config.ps1
MSFT_xNetAdapterBinding.config.ps1
$TestDisableIPv4 = [PSObject]@{ InterfaceAlias = 'xNetworkingLBA' ComponentId = 'ms_tcpip' State = 'Disabled' } configuration MSFT_xNetAdapterBinding_Config { Import-DscResource -ModuleName xNetworking node localhost { xNetAdapterBinding Integ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDNSServerAddress.Integration.Tests.ps1
MSFT_xDNSServerAddress.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDNSServerAddress' #region HEADER [String] $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.T...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDefaultGatewayAddress.config.ps1
MSFT_xDefaultGatewayAddress.config.ps1
$TestDefaultGatewayAddress = [PSObject]@{ InterfaceAlias = 'xNetworkingLBA' AddressFamily = 'IPv4' Address = '10.0.0.0' } configuration MSFT_xDefaultGatewayAddress_Config { Import-DscResource -ModuleName xNetworking node localhost { xDefaultGatewa...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDNSConnectionSuffix.Tests.ps1
MSFT_xDNSConnectionSuffix.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xDnsConnectionSuffix' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResourc...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xRoute.Integration.Tests.ps1
MSFT_xRoute.Integration.Tests.ps1
$script:DSCModuleName = 'xNetworking' $script:DSCResourceName = 'MSFT_xRoute' #region HEADER # Integration Test Template Version: 1.1.0 [String] $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResour...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xNetConnectionProfile.Integration.Tests.ps1
MSFT_xNetConnectionProfile.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xNetConnectionProfile' #region HEADER [String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)) if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResour...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xDNSServerAddress.config.ps1
MSFT_xDNSServerAddress.config.ps1
$TestDNSServerAddress = [PSObject]@{ InterfaceAlias = 'xNetworkingLBA' AddressFamily = 'IPv4' Address = '10.139.17.99' Validate = $False } configuration MSFT_xDNSServerAddress_Config { Import-DscResource -ModuleName xNetworking node loc...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/IntegrationHelper.ps1
IntegrationHelper.ps1
function New-IntegrationLoopbackAdapter { [cmdletbinding()] param ( [String] $AdapterName ) # Configure Loopback Adapter if ($env:APPVEYOR) { # Running in AppVeyor so force silent install of LoopbackAdapter $Splat = @{ Force = $true } } else {...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xNetworking/2.12.0.0/Tests/Integration/MSFT_xHostsFile.Integration.Tests.ps1
MSFT_xHostsFile.Integration.Tests.ps1
$Global:DSCModuleName = 'xNetworking' $Global:DSCResourceName = 'MSFT_xHostsFile' Copy-Item "${env:SystemRoot}\System32\Drivers\Etc\Hosts" "${env:Temp}\Hosts" -Force #region HEADER if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or ` (-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/xSQLServerAvailabilityGroupListener.ps1
xSQLServerAvailabilityGroupListener.ps1
$ConfigData = @{ AllNodes = @( @{ NodeName= "*" CertificateFile = "C:\Certificates\dsc-public.cer" Thumbprint = "D6F57B6BE46A7162138687FB74DBAA1D4EB1A59B" SqlInstanceName = "MSSQLSERVER" PSDscAllowDomainUser = $true }, ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/xSQLServerConfiguration.ps1
xSQLServerConfiguration.ps1
#this will configure 'show advanced options' option of default instance on local machine configuration SQLConfigSample { Import-DscResource -ModuleName xSQLServer Node 'localhost' { LocalConfigurationManager { #this option should only be used during testing, r...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/xSQLServerPermission.ps1
xSQLServerPermission.ps1
$ConfigData = @{ AllNodes = @( @{ NodeName= "*" CertificateFile = "C:\Certificates\dsc-public.cer" Thumbprint = "D6F57B6BE46A7162138687FB74DBAA1D4EB1A59B" SqlInstanceName = "MSSQLSERVER" PSDscAllowDomainUser = $true }, ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/DSCSqlBuild.ps1
DSCSqlBuild.ps1
#requires -Version 5 $StartTime = [System.Diagnostics.Stopwatch]::StartNew() $computers = 'OHSQL9015' $OutputPath = 'F:\DSCConfig' $cim = New-CimSession -ComputerName $computers Function check-even($num){[bool]!($num%2)} [DSCLocalConfigurationManager()] Configuration LCM_Push { Param( [s...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/xSQLServerEndpointState.ps1
xSQLServerEndpointState.ps1
$ConfigData = @{ AllNodes = @( @{ NodeName= "*" CertificateFile = "C:\Certificates\dsc-public.cer" Thumbprint = "D6F57B6BE46A7162138687FB74DBAA1D4EB1A59B" SqlInstanceName = "MSSQLSERVER" PSDscAllowDomainUser = $true }, ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/SQLServerScript.ps1
SQLServerScript.ps1
configuration SQLSettings { Import-DscResource -ModuleName 'xSQLServer' Node 'localhost' { xSQLServerScript SqlSettings { ServerInstance = "$env:COMPUTERNAME\SMA" SetFilePath = "C:\temp\Set-SQlsettings.sql" TestFilePath = "C:\temp\Test-SQlse...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/DSCFCISqlBuild.ps1
DSCFCISqlBuild.ps1
#requires -Version 5 $computers = 'OHSQL9034N1','OHSQL9034N2','OHSQL9034N3' $OutputPath = 'F:\DSCConfig' Configuration FCISQL { Import-DscResource –Module PSDesiredStateConfiguration Import-DscResource -Module xSQLServer Import-DscResource -Module xFailoverCluster Node $AllNodes.NodeName...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/SQLServerNetwork.ps1
SQLServerNetwork.ps1
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] param () Configuration SQLNetwork { Import-DscResource -Module xSQLServer # A Configuration expects at least one Node Node $AllNodes.NodeName { # Set DCM Settings for each Node ...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/xSQLServerReplication.ps1
xSQLServerReplication.ps1
#this example should be used on local machine where two sql instances are installed #DEFAULT instance will be configured as distributor #PUBLISHER instance will be configured as publisher with remote distributor as default instance $credentials = Get-Credential 'AdminLink' $runAsCredentials = Get-Credential co...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/SQL-ClusterDB.ps1
SQL-ClusterDB.ps1
#requires -Version 5 [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] param () Configuration SQL { Import-DscResource -Module xSQLServer Import-DscResource -Module xFailoverCluster Node $AllNodes.NodeName { # Set LCM to rebo...
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xSQLServer/2.0.0.0/Examples/SQL-Standalone.ps1
SQL-Standalone.ps1
#requires -Version 5 [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] param () Configuration SQLSA { Import-DscResource -Module xSQLServer # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role...