full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/DSC_SampleScripts/Sample_PowerManagement.ps1 | Sample_PowerManagement.ps1 | #$pwwd=Get-Content "c:\temp\userpwd.txt"
Configuration PowerManagementConfiguration
{
Import-DscResource -ModuleName DellBIOSProvider
Node localhost {
PowerManagement PowerManagementSettings #resource name
{
Category = "PowerManagement"
BlockDefinition="1"
... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/DSC_SampleScripts/Sample_MultipleNodes_1.ps1 | Sample_MultipleNodes_1.ps1 | #$pwwd=Get-Content "c:\temp\userpwd.txt"
Configuration MultipleCatConfiguration
{
Import-DscResource -ModuleName DellBIOSProvider
Node $ComputerName {
POSTBehavior POSTBehaviorSettings #resource name
{
Category = "POSTBehavior"
Keypad = "EnabledByNumlo... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-POSTBehaviorSchema.ps1 | GenerateDCPP-POSTBehaviorSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$keypad = New-xDscResourceProperty -name Keypad -Type String -Attribute Write -ValidateSet @("Enabled... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-MiscellaneousDevicesSchema.ps1 | GenerateDCPP-MiscellaneousDevicesSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$microphone = New-xDscResourceProperty -name Microphone -Type String -Attribute Write -ValidateSet @(... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-TPMSecuritySchema.ps1 | GenerateDCPP-TPMSecuritySchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$tpmsecurity = New-xDscResourceProperty -name TPMSecurity -Type String -Attribute Write -ValidateSet ... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-SecuritySchema.ps1 | GenerateDCPP-SecuritySchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$strongPassword = New-xDscResourceProperty -name StrongPassword -Type String -Attribute Write -Valida... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-PerformanceSchema.ps1 | GenerateDCPP-PerformanceSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$multiCoreSupport = New-xDscResourceProperty -name MultiCoreSupport -Type String -Attribute Write -Va... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-VideoSchema.ps1 | GenerateDCPP-VideoSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$lcdBrightnessOnBattery = New-xDscResourceProperty -name LCDBrightnessOnBattery -Type Uint32 -Attribu... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-SystemInformationSchema.ps1 | GenerateDCPP-SystemInformationSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$assettag = New-xDscResourceProperty -name AssetTag -Type String -Attribute Write
$ownershiptag = ... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-WirelessSchema.ps1 | GenerateDCPP-WirelessSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$wirelessswitchwwancontrol = New-xDscResourceProperty -name WirelessSwitchWWANControl -Type String -A... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-VirtualizationSchema.ps1 | GenerateDCPP-VirtualizationSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$virtualization = New-xDscResourceProperty -name Virtualization -Type String -Attribute Write -Valida... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-AdvancedBootOptionsSchema.ps1 | GenerateDCPP-AdvancedBootOptionsSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$enablelegacyoptionroms = New-xDscResourceProperty -name EnableLegacyOptionROMs -Type String -Attribu... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-USBConfigurationSchema.ps1 | GenerateDCPP-USBConfigurationSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$externalusbport = New-xDscResourceProperty -name ExternalUSBPort -Type String -Attribute Write -Vali... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-BootSequenceSchema.ps1 | GenerateDCPP-BootSequenceSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$bootlistoption = New-xDscResourceProperty -name BootListOption -Type String -Attribute Write -Valida... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-SystemConfigurationSchema.ps1 | GenerateDCPP-SystemConfigurationSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$category = New-xDscResourceProperty -name Category -Type String -Attribute Key
$integratedNIC = New-xDscResourceProperty -name IntegratedNIC -Type String -Attribute Write -Validate... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/ResourceDesignerScripts/GenerateDCPP-PowerManagementSchema.ps1 | GenerateDCPP-PowerManagementSchema.ps1 | <#
This is a Resource designer script which generates a mof schema for DCPP_POSTBehavior resource in DellBIOSProvider module.
#>
$blockdefinition = New-xDscResourceProperty -name BlockDefinition -Type String -Attribute Key
$category = New-xDscResourceProperty -name Category -Type String -Attribute Write
$aut... |
PowerShellCorpus/PowerShellGallery/DellBIOSProviderX86/1.2/Tests/ResourceTests.ps1 | ResourceTests.ps1 | Test-xDscResource..\DSCResources\DCPP_POSTBehavior
Test-xDscSchema..\DSCResources\DCPP_POSTBehavior\DCPP_POSTBehavior.schema.mof
# SIG # Begin signature block
# MIIVSQYJKoZIhvcNAQcCoIIVOjCCFTYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIB... |
PowerShellCorpus/PowerShellGallery/gibbels-common/1.0.3/scripts/dotnet/Get-DotnetVersion.ps1 | Get-DotnetVersion.ps1 | class DotNetVersion
{
[string]$Name;
[string]$Profile;
[version]$Version;
[string]$ServicePack;
DotNetVersion([string]$name, [string]$profile, [version]$version, [string]$servicePack){
$this.Name = $name;
$this.Profile = $profile;
$this.Version = $version;
$th... |
PowerShellCorpus/PowerShellGallery/Pubxml/1.0.5.304/functions/update-pubprofile.ps1 | update-pubprofile.ps1 |
function update-profileproperty($profile, $propName, $propValue) {
write-verbose "setting $propName to '$propValue'"
if ($profile.Project.PropertyGroup."$propName" -eq $null) {
#$profile.Project.PropertyGroup | Add-Member -MemberType NoteProperty -Name $propName -Value $propValue
#$profile.Proj... |
PowerShellCorpus/PowerShellGallery/Pubxml/1.0.5.304/functions/empty-vnext-publish.ps1 | empty-vnext-publish.ps1 | [cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties, $packOutput, $nugetUrl)
# to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327
$publishModuleVersion = '1.0.1'
function Get-VisualStudio2015InstallPath{
[cmdletbinding()]
param()
process{
$keysToChec... |
PowerShellCorpus/PowerShellGallery/Pubxml/1.0.5.304/functions/generate-pubprofile.ps1 | generate-pubprofile.ps1 | function new-pubprofile {
param(
[parameter(mandatory = $true)]$machine,
$projectroot = ".",
[string]$profilename = "publish-default",
[switch][bool]$reset,
$appPath = $null,
$username = $null,
$customParams = @{}
)
$projectroot = (gi $projectroot).FullName
$profilename = $profilen... |
PowerShellCorpus/PowerShellGallery/cRegFile/1.2/SampleConfiguration/RemoteControlsConfig.ps1 | RemoteControlsConfig.ps1 | $DevEnvironment = @{
AllNodes =
@(
@{
NodeName = "Localhost"
RegFileFolder = "C:\DSCConfigs\Files\"
}
)
}
Configuration RemoteControls
{
param()
Import-DscResource -ModuleName "cRegFile"
Node $AllNodes.NodeName
{
cRegFile ... |
PowerShellCorpus/PowerShellGallery/cRegFile/1.2/DSCResources/cRegFile/ResourceDesignerScripts/GeneratecRegFileSchema.ps1 | GeneratecRegFileSchema.ps1 | $Key = New-xDscResourceProperty -Name Key -Type String -Attribute Key -Description "Name of the registry key to configure recursively"
$RegFilePath = New-xDscResourceProperty -Name RegFilePath -Type String -Attribute Write -Description "Path of the .reg file representing the desired state of the registry key"
New-xDsc... |
PowerShellCorpus/PowerShellGallery/ContainerImage/0.6.4.0/Test/ContainerProvider.Tests.ps1 | ContainerProvider.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.ps1", ".psm1")
. "$here\..\$sut"
Describe “Find-ContainerImage" {
BeforeAll {
#Find-Module ContainerProvider -Repository PSGallery | Install-Module -Force
Impo... |
PowerShellCorpus/PowerShellGallery/AppvProvider/0.6.2.8/AppvProvider.ps1 | AppvProvider.ps1 | <#
Copyright (c) Virtual Engine Limited. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
... |
PowerShellCorpus/PowerShellGallery/Add-HostFileEntry/1.0.1/Add-HostFileEntry.Tests.ps1 | Add-HostFileEntry.Tests.ps1 | Import-Module Add-HostFileEntry
Describe 'Add-HostFileEntry' {
BeforeEach { $env:windir = 'TestDrive:' }
Context 'No blank line at end of hosts file' {
Mock -ModuleName Add-HostFileEntry Assert-AdministratorRole {}
mkdir TestDrive:\System32\drivers\etc
cp fixtures... |
PowerShellCorpus/PowerShellGallery/Communary.Logger/1.1/Functions/Write-Log.ps1 | Write-Log.ps1 | function Write-Log {
<#
.SYNOPSIS
Write to the log.
.DESCRIPTION
The Write-Log function is used to write to the log. It is using the log object created by New-Log
to determine if it's going to write to a log file or to a Windows Event log.
.EXAMPLE
... |
PowerShellCorpus/PowerShellGallery/Communary.Logger/1.1/Functions/New-Log.ps1 | New-Log.ps1 | function New-Log {
<#
.SYNOPSIS
Create a new log.
.DESCRIPTION
The New-Log function is used to create a new log file or Windows Event log. A log object is also created
and either saved in the global PSLOG variable (default) or sent to the pipeline. The latte... |
PowerShellCorpus/PowerShellGallery/Communary.Logger/1.1/Functions/Invoke-LogRotation.ps1 | Invoke-LogRotation.ps1 | function Invoke-LogRotation {
<#
.SYNOPSIS
Handle log rotation.
.DESCRIPTION
Invoke-LogRotation handles log rotation, using the log parameters defined in the log object.
This function is called within the Write-Log function so that log rotation are invoked a... |
PowerShellCorpus/PowerShellGallery/WcfPS/1.0/New-WcfWsdlImporter.ps1 | New-WcfWsdlImporter.ps1 | # load Wcf assemblies
Add-Type -AssemblyName "System.ServiceModel"
Add-Type -AssemblyName "System.Runtime.Serialization"
. "$PSScriptRoot\Set-WcfBindingConfiguration.ps1"
function New-WcfWsdlImporter {
[CmdletBinding()]
[OutputType([System.ServiceModel.Description.WsdlImporter])]
Param (
... |
PowerShellCorpus/PowerShellGallery/WcfPS/1.0/New-WcfProxyType.ps1 | New-WcfProxyType.ps1 | # load Wcf assemblies
Add-Type -AssemblyName "System.ServiceModel"
Add-Type -AssemblyName "System.Runtime.Serialization"
function New-WcfProxyType {
[CmdletBinding()]
[OutputType([System.ServiceModel.Channels.Binding])]
Param (
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
... |
PowerShellCorpus/PowerShellGallery/WcfPS/1.0/New-WcfServiceEndpoint.ps1 | New-WcfServiceEndpoint.ps1 | # load Wcf assemblies
Add-Type -AssemblyName "System.ServiceModel"
Add-Type -AssemblyName "System.Runtime.Serialization"
function New-WcfServiceEndpoint {
[CmdletBinding()]
[OutputType([System.ServiceModel.Description.ServiceEndpoint])]
Param (
[Parameter(Mandatory=$true, ValueFromPipeline=... |
PowerShellCorpus/PowerShellGallery/WcfPS/1.0/New-SecurityToken.ps1 | New-SecurityToken.ps1 | # load Wcf assemblies
Add-Type -AssemblyName "System.ServiceModel"
Add-Type -AssemblyName "System.IdentityModel"
Add-Type -AssemblyName "System.Runtime.Serialization"
function New-SecurityToken {
Param (
[Parameter(Mandatory=$true)]
[System.ServiceModel.Description.ServiceEndpoint]$Endpoint... |
PowerShellCorpus/PowerShellGallery/WcfPS/1.0/Set-WcfBindingConfiguration.ps1 | Set-WcfBindingConfiguration.ps1 | # load Wcf assemblies
Add-Type -AssemblyName "System.ServiceModel"
Add-Type -AssemblyName "System.Runtime.Serialization"
function Set-WcfBindingConfiguration {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[System.ServiceModel.Channels.Binding]$Binding,... |
PowerShellCorpus/PowerShellGallery/WcfPS/1.0/New-WcfChannel.ps1 | New-WcfChannel.ps1 | # load Wcf assemblies
Add-Type -AssemblyName "System.ServiceModel"
Add-Type -AssemblyName "System.Runtime.Serialization"
. "$PSScriptRoot\New-WcfProxyType.ps1"
. "$PSScriptRoot\New-WcfServiceEndpoint.ps1"
function New-WcfChannel {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true, ValueFr... |
PowerShellCorpus/PowerShellGallery/GetFirmwareBIOSorUEFI/1.1/PublishPsGalleryModule.ps1 | PublishPsGalleryModule.ps1 | #requires -Modules PowerShellGet
$ReleaseNotes =@'
Get-FirmwareType
Chris Warwick, @cjwarwickps, November 2015
The function in this module determines the underlying system firmware (BIOS) type - either UEFI or Legacy BIOS.
Script Structure
----------------
This Get-FirmwareType function uses three tec... |
PowerShellCorpus/PowerShellGallery/GraphRunbook/1.2.1.0/GraphRunbook.Tests.ps1 | GraphRunbook.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.ps1$'
Get-Module -Name $sut -All | Remove-Module -Force -ErrorAction Ignore
Import-Module -Name "$here\$sut.psm1" -Force -ErrorAction Stop
InModuleScope $sut {
function WithRunb... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/TestSampleUsingAzure.ps1 | TestSampleUsingAzure.ps1 | # To Run this test create a Windows Server 2012 or 2012 R2 VM in Azure
# and run this script. It will prompt you to choose a VM, choose the VM.
# wait a while, RDP into the machine and manually verify that the DHCP Server
# is configured as specified in .\samples\SampleConfiguration.ps1
Write-Verbose -Message 'P... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Misc/New-DhcpServerOptionResource.ps1 | New-DhcpServerOptionResource.ps1 | $Properties = @{
DnsServer = New-xDscResourceProperty -Name DnsServerIPAddress -Type String[] -Attribute Required `
-Description 'IP address of DNS Servers'
Router = New-xDscResourceProperty -Name Router -Type String[] -Attribute Required `
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Misc/New-DhcpServerScopeResource.ps1 | New-DhcpServerScopeResource.ps1 | $Properties = @{
ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Read `
-Description 'ScopeId for which properties are set'
Name = New-xDscResourceProperty -Name Name -Type String -Attribute Required `
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Misc/New-DhcpServerReservationResource.ps1 | New-DhcpServerReservationResource.ps1 | $Properties = @{
ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Key `
-Description 'ScopeId for which reservations are set'
IPAddress = New-xDscResourceProperty -Name IPAddress -Type String -Attribute Required `
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Samples/SampleConfiguration.ps1 | SampleConfiguration.ps1 | configuration Sample_xDhcpsServerScope_NewScope
{
Import-DscResource -module xDHCpServer
WindowsFeature DHCP
{
Name = 'DHCP'
Ensure = 'Present'
}
xDhcpServerScope Scope
{
Ensure = 'Present'
IPStartRange = '192.168.1.1'
IPEndRang... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Tests/Unit/MSFT_xDhcpServerAuthorization.Tests.ps1 | MSFT_xDhcpServerAuthorization.Tests.ps1 | $Global:DSCModuleName = 'xDhcpServer'
$Global:DSCResourceName = 'MSFT_xDhcpServerAuthorization'
#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 'DSCRes... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Tests/Unit/MSFT_xDhcpServerScope.Tests.ps1 | MSFT_xDhcpServerScope.Tests.ps1 | $Global:DSCModuleName = 'xDhcpServer'
$Global:DSCResourceName = 'MSFT_xDhcpServerScope'
#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.Te... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDhcpServer/1.5.0.0/Tests/Unit/MSFT_xDhcpServerOption.tests.ps1 | MSFT_xDhcpServerOption.tests.ps1 | $Global:DSCModuleName = 'xDhcpServer' # Example xNetworking
$Global:DSCResourceName = 'MSFT_xDhcpServerOption' # Example 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-P... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xComputerManagement/1.8.0.0/Examples/Sample_xScheduledTask.ps1 | Sample_xScheduledTask.ps1 | configuration Sample_xScheduledTask
{
param
(
[string[]]$NodeName = 'localhost'
)
Import-DSCResource -ModuleName xComputerManagement
Node $NodeName
{
xScheduledTask MaintenanceScriptExample
{
TaskName = "Custom maintenance tasks"
Action... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xComputerManagement/1.8.0.0/Examples/Sample_xOfflineDomainJoin.ps1 | Sample_xOfflineDomainJoin.ps1 | configuration Sample_xOfflineDomainJoin
{
param
(
[string[]]$NodeName = 'localhost'
)
Import-DSCResource -ModuleName xComputerManagement
Node $NodeName
{
xOfflineDomainJoin ODJ
{
RequestFile = 'C:\ODJ\ODJBlob.txt'
IsSingleInstance = 'Ye... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xComputerManagement/1.8.0.0/Tests/Unit/MSFT_xScheduledTask.Tests.ps1 | MSFT_xScheduledTask.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")]
param(
)
$Global:DSCModuleName = 'xComputerManagement'
$Global:DSCResourceName = 'MSFT_xScheduledTask'
#region HEADER
# Unit Test Template Version: 1.1.0
[String] $moduleRoot = Split-Path -Parent... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xComputerManagement/1.8.0.0/Tests/Unit/MSFT_xComputer.Tests.ps1 | MSFT_xComputer.Tests.ps1 | $Global:DSCModuleName = 'xComputerManagement'
$Global:DSCResourceName = 'MSFT_xComputer'
#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/xComputerManagement/1.8.0.0/Tests/Unit/MSFT_xOfflineDomainJoin.tests.ps1 | MSFT_xOfflineDomainJoin.tests.ps1 | $Global:DSCModuleName = 'xComputerManagement'
$Global:DSCResourceName = 'MSFT_xOfflineDomainJoin'
#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 'DSCR... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xComputerManagement/1.8.0.0/Tests/Integration/MSFT_xScheduledTask.Integration.Tests.ps1 | MSFT_xScheduledTask.Integration.Tests.ps1 | #Requires -Version 5.0
$Global:DSCModuleName = 'xComputerManagement'
$Global:DSCResourceName = 'MSFT_xScheduledTask'
#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... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xComputerManagement/1.8.0.0/Tests/Integration/MSFT_xScheduledTask.Config.ps1 | MSFT_xScheduledTask.Config.ps1 | Configuration xScheduledTask_Add
{
Import-DscResource -ModuleName xComputerManagement
node "localhost" {
xScheduledTask xScheduledTask_Add {
TaskName = "Test task"
TaskPath = "\xComputerManagement\"
ActionExecutable = "C:\windows\system32\WindowsPowerShell\v1.0... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/Sample_xCertificateImport_MinimalUsage.ps1 | Sample_xCertificateImport_MinimalUsage.ps1 | # Import public key certificate into Trusted Root store.
Configuration Sample_xCertificateImport_MinimalUsage
{
Import-DscResource -ModuleName xCertificate
Node $AllNodes.NodeName
{
xCertificateImport MyTrustedRoot
{
Thumbprint = 'c81b94933420221a7ac004a90242d8b1d3e5070... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/Sample_xCertReq_RequestAltSSLCert.ps1 | Sample_xCertReq_RequestAltSSLCert.ps1 | <#
Request and Accept a certificate from an Active Directory Root Certificate Authority. This certificate
is issued using an subject alternate name with multiple DNS addresses.
This example is allowing storage of credentials in plain text by setting PSDscAllowPlainTextPassword to $true.
Storing passwords in p... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/Sample_xPfxImport_MinimalUsage.ps1 | Sample_xPfxImport_MinimalUsage.ps1 | # Import a PFX into the My store.
Configuration Sample_xPfxImport_MinimalUsage
{
param
(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String] $PfxThumbprint,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String] $PfxPath,
[PSCrede... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/DSCResourceDesigner_CreateScript.ps1 | DSCResourceDesigner_CreateScript.ps1 | $modules = 'C:\Program Files\WindowsPowerShell\Modules\'
$modulename = 'xCertificate'
$Description = 'This module includes DSC resources that simplify administration of certificates on a Windows Server'
if (!(test-path (join-path $modules $modulename))) {
$modulefolder = mkdir (join-path $modules $modulenam... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/Example.ps1 | Example.ps1 | <#
# This example is allowing storage of credentials in plain text by setting PSDscAllowPlainTextPassword to $true.
# Storing passwords in plain text is not a good practice and is presented only for simplicity and demonstration purposes.
# To learn how to securely store credentials through the use of certificates... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/Sample_xPfxImport_IIS_WebSite.ps1 | Sample_xPfxImport_IIS_WebSite.ps1 | # Import a PFX into the WebHosting store and bind it to an IIS Web Site.
Configuration Sample_xPfxImport_IIS_WebSite
{
param
(
[PSCredential]
$PfxPassword = (Get-Credential -Message 'Enter PFX extraction password.' -UserName 'Ignore')
)
Import-DscResource -ModuleName xCertifica... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Examples/Sample_xCertReq_RequestSSLCert.ps1 | Sample_xCertReq_RequestSSLCert.ps1 | <#
Request and Accept a certificate from an Active Directory Root Certificate Authority.
This example is allowing storage of credentials in plain text by setting PSDscAllowPlainTextPassword to $true.
Storing passwords in plain text is not a good practice and is presented only for simplicity and demonstration pu... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/MSFT_xCertificateImport.tests.ps1 | MSFT_xCertificateImport.tests.ps1 | <#
.Summary
Tests for xCertificateImport
#>
$moduleName = ($PSCommandPath | Split-Path -Leaf) -replace '\..*$',''
Import-Module ($PSScriptRoot | Split-Path -Parent | Join-Path -ChildPath DSCResources | Join-Path -ChildPath $moduleName | Join-Path -ChildPath "$moduleName.psm1") -DisableNameChecking -Force
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/MSFT_xPfxImport.tests.ps1 | MSFT_xPfxImport.tests.ps1 | <#
.Summary
Tests for xPfxImport
#>
$moduleName = ($PSCommandPath | Split-Path -Leaf) -replace '\..*$',''
Import-Module ($PSScriptRoot | Split-Path -Parent | Join-Path -ChildPath DSCResources | Join-Path -ChildPath $moduleName | Join-Path -ChildPath "$moduleName.psm1") -DisableNameChecking -Force
InModu... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Unit/CertificateCommon.tests.ps1 | CertificateCommon.tests.ps1 | $script:DSCModuleName = 'xCertificate'
$script:DSCResourceName = 'CertificateCommon'
#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 'DS... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Unit/MSFT_xCertReq.tests.ps1 | MSFT_xCertReq.tests.ps1 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$script:DSCModuleName = 'xCertificate'
$script:DSCResourceName = 'MSFT_xCertReq'
#region HEADER
# Integration Test Template Version: 1.1.0
[String] $script:moduleRoot = Split-Path ... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Unit/MSFT_xCertificateImport.tests.ps1 | MSFT_xCertificateImport.tests.ps1 | $script:DSCModuleName = 'xCertificate'
$script:DSCResourceName = 'MSFT_xCertificateImport'
#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 -ChildPa... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Unit/MSFT_xPfxImport.tests.ps1 | MSFT_xPfxImport.tests.ps1 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$script:DSCModuleName = 'xCertificate'
$script:DSCResourceName = 'MSFT_xPfxImport'
#region HEADER
# Integration Test Template Version: 1.1.0
[String] $script:moduleRoot = Split-Pat... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xPfxImport.Integration.Tests.ps1 | MSFT_xPfxImport.Integration.Tests.ps1 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param ()
$script:DSCModuleName = 'xCertificate'
$script:DSCResourceName = 'MSFT_xPfxImport'
#region HEADER
# Integration Test Template Version: 1.1.0
[String] $script:moduleRoot = Split-Path -Par... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xCertificateImport.Integration.Tests.ps1 | MSFT_xCertificateImport.Integration.Tests.ps1 | $script:DSCModuleName = 'xCertificate'
$script:DSCResourceName = 'MSFT_xCertificateImport'
#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 'DS... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xCertReq.config.ps1 | MSFT_xCertReq.config.ps1 | # This will fail if the machine does not have a CA Configured.
$CertUtilResult = & "$ENV:SystemRoot\system32\certutil.exe" @('-dump')
$CAServerFQDN = ([regex]::matches($CertUtilResult,'Server:[ \t]+`([A-Za-z0-9._-]+)''','IgnoreCase')).Groups[1].Value
$CARootName = ([regex]::matches($CertUtilR... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xPfxImport_add.config.ps1 | MSFT_xPfxImport_add.config.ps1 | Configuration MSFT_xPfxImport_Add_Config {
param
(
$Thumbprint,
$Path,
$Credential
)
Import-DscResource -ModuleName xCertificate
node localhost {
xPfxImport Integration_Test {
Thumbprint = $Thumbprint
Path = $Path
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xCertificateImport_add.config.ps1 | MSFT_xCertificateImport_add.config.ps1 | Configuration MSFT_xCertificateImport_Add_Config {
param
(
$Thumbprint,
$Path
)
Import-DscResource -ModuleName xCertificate
node localhost {
xCertificateImport Integration_Test {
Thumbprint = $Thumbprint
Path = $Path
Locati... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xCertReq.Integration.Tests.ps1 | MSFT_xCertReq.Integration.Tests.ps1 | <#
IMPORTANT INFORMATION:
Running these tests requires access to a AD CS Certificate Authority.
These integration tests are configured to use credentials to connect to the CA.
Therefore, automation of these tests shouldn't be performed using a production CA.
#>
$script:DSCModuleName = 'xCertificate'
$scr... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xPfxImport_remove.config.ps1 | MSFT_xPfxImport_remove.config.ps1 | Configuration MSFT_xPfxImport_Remove_Config {
param
(
$Thumbprint,
$Path
)
Import-DscResource -ModuleName xCertificate
node localhost {
xPfxImport Integration_Test {
Thumbprint = $Thumbprint
Path = $Path
Location = 'Local... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xCertificate/2.1.0.0/Tests/Integration/MSFT_xCertificateImport_remove.config.ps1 | MSFT_xCertificateImport_remove.config.ps1 | Configuration MSFT_xCertificateImport_Remove_Config {
param
(
$Thumbprint,
$Path
)
Import-DscResource -ModuleName xCertificate
node localhost {
xCertificateImport Integration_Test {
Thumbprint = $Thumbprint
Path = $Path
Loc... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDnsServer/1.7.0.0/Misc/New-DnsServerSecondaryZone.ps1 | New-DnsServerSecondaryZone.ps1 | $Properties = @{
Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key `
-Description 'Name of the secondary zone'
DnsServer = New-xDscResourceProperty -Name MasterServerIPAddress -Type String[] -Attribute Requ... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDnsServer/1.7.0.0/Misc/New-DnsServerZoneTransfer.ps1 | New-DnsServerZoneTransfer.ps1 | $Properties = @{
Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key `
-Description 'Name of the secondary zone'
Type = New-xDscResourceProperty -Name Type -Type String -Attribute Required -ValidateSet 'Any',... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDnsServer/1.7.0.0/Tests/Unit/MSFT_xDnsRecord.Tests.ps1 | MSFT_xDnsRecord.Tests.ps1 | $Global:DSCModuleName = 'xDnsServer' # Example xNetworking
$Global:DSCResourceName = 'MSFT_xDnsRecord' # Example 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 -Pat... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDnsServer/1.7.0.0/Tests/Unit/MSFT_xDnsServerForwarder.Tests.ps1 | MSFT_xDnsServerForwarder.Tests.ps1 | $Global:DSCModuleName = 'xDnsServer'
$Global:DSCResourceName = 'MSFT_xDnsServerForwarder'
#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.... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xDnsServer/1.7.0.0/Tests/Unit/MSFT_xDnsServerZoneTransfer.Tests.ps1 | MSFT_xDnsServerZoneTransfer.Tests.ps1 | $Global:DSCModuleName = 'xDnsServer'
$Global:DSCResourceName = 'MSFT_xDnsServerZoneTransfer'
#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/xDnsServer/1.7.0.0/Tests/Unit/MSFT_xDnsServerPrimaryZone.Tests.ps1 | MSFT_xDnsServerPrimaryZone.Tests.ps1 | $Global:DSCModuleName = 'xDnsServer'
$Global:DSCResourceName = 'MSFT_xDnsServerPrimaryZone'
#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/xDnsServer/1.7.0.0/Tests/Unit/MSFT_xDnsServerADZone.Tests.ps1 | MSFT_xDnsServerADZone.Tests.ps1 | $Global:DSCModuleName = 'xDnsServer'
$Global:DSCResourceName = 'MSFT_xDnsServerADZone'
#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.Tes... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Misc/VHDResourceGenerator.ps1 | VHDResourceGenerator.ps1 | $name = New-DscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the VHD File"
$path = New-DscResourceProperty -Name Path -Type String -Attribute Key -Description "Folder where the VHD will be created"
$parentPath = New-DscResourceProperty -Name ParentPath -Type String -Attribute Wri... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Misc/VMResourceGenerator.ps1 | VMResourceGenerator.ps1 | $name = New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the VM"
$vhdPath = New-xDscResourceProperty -Name VhdPath -Type String -Attribute Required -Description "VHD associated with the VM"
$switchName = New-xDscResourceProperty -Name SwitchName -Type String -Attribute Write... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Misc/VMSwitchGenerator.ps1 | VMSwitchGenerator.ps1 | $name = New-DscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the VM Switch"
$type = New-DscResourceProperty -Name Type -Type String -Attribute Key -ValidateSet "Internal","Private" -Description "Type of switch"
$netAdapter = New-DscResourceProperty -Name NetAdapterName -Type Stri... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVhdFileExamples.ps1 | Sample_xVhdFileExamples.ps1 | # sample values used for testing.
$vhdPath = "C:\test_vhds\RenameComputer.Vhd"
# sample text file that you want to copy in the VHD.
$sampletxt = "C:\sample.txt"
# This path is the relative path to mounted drive letter.
$sampleVhdDestinationPath = "xvhdFileExample\CopiedFile"
# A local folder that you want ... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVHD_AdditionalPropertyVHD.ps1 | Sample_xVHD_AdditionalPropertyVHD.ps1 | configuration Sample_xVHD_AdditionalPropertyVHD
{
param
(
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[string]$Path,
[Parameter(Mandatory)]
[string]$ParentPath,
[Parameter(Mandatory)]
[string]$Maxim... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVMSwitch_Internal.ps1 | Sample_xVMSwitch_Internal.ps1 | configuration Sample_xVMSwitch_Internal
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$SwitchName
)
Import-DscResource -module xHyper-V
Node $NodeName
{
# Install HyperV feature, if not installed - Server SKU only
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVMSwitch_External.ps1 | Sample_xVMSwitch_External.ps1 | configuration Sample_xVMSwitch_External
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$SwitchName,
[Parameter(Mandatory)]
[string]$NetAdapterName
)
Import-DscResource -module xHyper-V
Node $NodeN... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVMHyperV_DynamicMemory.ps1 | Sample_xVMHyperV_DynamicMemory.ps1 | configuration Sample_xVMHyperV_DynamicMemory
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$VMName,
[Parameter(Mandatory)]
[string]$VhdPath,
[Parameter(Mandatory)]
[Uint64]$StartupMemory,
[Pa... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVMHyperV_Simple.ps1 | Sample_xVMHyperV_Simple.ps1 | configuration Sample_xVMHyperV_Simple
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$VMName,
[Parameter(Mandatory)]
[string]$VhdPath
)
Import-DscResource -module xHyper-V
Node $NodeName
{
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVHD_DiffVHD.ps1 | Sample_xVHD_DiffVHD.ps1 | configuration Sample_xVhd_DiffVhd
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[string]$Path,
[Parameter(Mandatory)]
[string]$ParentPath,
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVHD_MissingPropertyVHD.ps1 | Sample_xVHD_MissingPropertyVHD.ps1 | configuration Sample_xVHD_MissingPropertyVHD
{
param
(
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[string]$Path,
[ValidateSet("Vhd","Vhdx")]
[string]$Generation = "Vhd",
[ValidateSet("Present","Abse... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVHD_NewVHD.ps1 | Sample_xVHD_NewVHD.ps1 | configuration Sample_xVHD_NewVhd
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[string]$Path,
[Parameter(Mandatory)]
[Uint64]$MaximumSizeBytes,
... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Examples/Sample_xVMHyperV_Complete.ps1 | Sample_xVMHyperV_Complete.ps1 | configuration Sample_xVMHyperV_Complete
{
param
(
[string[]]$NodeName = 'localhost',
[Parameter(Mandatory)]
[string]$VMName,
[Parameter(Mandatory)]
[string]$VhdPath,
[Parameter(Mandatory)]
[Uint64]$StartupMemory,
[Paramet... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Tests/MSFT_xVMSwitch/xVMSwitch_BandwidthReservationMode.Tests.ps1 | xVMSwitch_BandwidthReservationMode.Tests.ps1 | [CmdletBinding()]
Param (
)
if (!$PSScriptRoot) # $PSScriptRoot is not defined in 2.0
{
$PSScriptRoot = [System.IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Path)
}
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version latest
$RepoRoot = (Resolve-Path $PSScriptRoot\..\..).Path
$ModuleNam... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xHyper-V/3.5.0.0/Tests/MSFT_xVMHyper-V/xVMHyper-V.Tests.ps1 | xVMHyper-V.Tests.ps1 | [CmdletBinding()]
param()
if (!$PSScriptRoot) # $PSScriptRoot is not defined in 2.0
{
$PSScriptRoot = [System.IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Path)
}
$ErrorActionPreference = 'stop'
Set-StrictMode -Version latest
$RepoRoot = (Resolve-Path $PSScriptRoot\..\..).Path
$ModuleName = '... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Assert-HADC.ps1 | Assert-HADC.ps1 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingComputerNameHardcoded', '')]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param()
# A configuration to Create High Availability Domain Controller
$secpasswd = ConvertTo-Secure... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Assert-ParentChildDomains.ps1 | Assert-ParentChildDomains.ps1 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingComputerNameHardcoded', '')]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param()
$secpasswd = ConvertTo-SecureString "Adrumble@6" -AsPlainText -Force
$domainCred = New-Object... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/Misc/New-ADDomainTrust.ps1 | New-ADDomainTrust.ps1 | $Properties = @{
SourceDomain = New-xDscResourceProperty -Name SourceDomainName -Type String -Attribute Key `
-Description 'Name of the AD domain that is requesting the trust'
TargetDomain = New-xDscResourceProperty -Nam... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/DSCResources/MSFT_xADRecycleBin/Examples/xActiveDirectory_xADRecycleBin.ps1 | xActiveDirectory_xADRecycleBin.ps1 | Configuration Example_xADRecycleBin
{
Param(
[parameter(Mandatory = $true)]
[System.String]
$ForestFQDN,
[parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
$EACredential
)
Import-DscResource -Module xActiveDirectory
Node $AllNodes.NodeName
{... |
PowerShellCorpus/PowerShellGallery/LabinaBox/1.0/DSCResources/xActiveDirectory/2.14.0.0/DSCResources/MSFT_xADRecycleBin/ResourceDesignerScripts/GeneratexADRecycleBinSchema.ps1 | GeneratexADRecycleBinSchema.ps1 | New-xDscResource -Name MSFT_xADRecycleBin -FriendlyName xADRecycleBin -ModuleName xActiveDirectory -Path . -Force -Property @(
New-xDscResourceProperty -Name ForestFQDN -Type String -Attribute Key
New-xDscResourceProperty -Name EnterpriseAdministratorCredential -Type PSCredential -Attribute Required
New-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.