full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-MultiInstance.ps1 | SCSMA-MultiInstance.ps1 | #requires -Version 5
Configuration SMA
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSMA
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-SingleServer.ps1 | SCSMA-SingleServer.ps1 | #requires -Version 5
Configuration SMA
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSMA
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-MultiInstance-TP.ps1 | SCSMA-MultiInstance-TP.ps1 | #requires -Version 5
Configuration SMA
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSMA
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xFirefox/Example/Sample_xFirefox.ps1 | Sample_xFirefox.ps1 | #Installs the specified version of Firefox in the specified language.
Configuration Sample_InstallFirefoxBrowser
{
param
(
[Parameter(Mandatory)]
$VersionNumber,
[Parameter(Mandatory)]
$Language,
[Parameter(Mandatory)]
$OS,
[Parameter(Mandatory)]
$LocalPath
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xChrome/Example/Sample_xChrome.ps1 | Sample_xChrome.ps1 | #Installs the latest version of Chrome in the language specified in the parameter Language.
Configuration Sample_InstallChromeBrowser
{
param
(
[Parameter(Mandatory)]
$Language,
[Parameter(Mandatory)]
$LocalPath
)
Import-DscResource -module xChrome
MSFT_xChrome chrome
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPhp/Samples/InstallRequiredModules.ps1 | InstallRequiredModules.ps1 | # This Script installs the required modules for the Php Sample
# It uses the PowerShell Resource Gallery, see https://msconfiggallery.cloudapp.net/
# This requires WMF 5. If you don't have WMF 5, Please install the modules manually.
Write-Host "Installing required modules..."
Install-Module xWebAdministration -M... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPhp/Samples/UsingxPhpCompositeConfiguration.ps1 | UsingxPhpCompositeConfiguration.ps1 | # This configuration will, via the xPHP composite configuration:
# 1) Make sure IIS is installed
# 2) Make sure PHP is present
# 3) Make sure that PHP is registered with IIS
# 4) Make sure PHP is in the path
#
# ********* NOTE ***********
# PHP changes their download URLs frequently. Please verify the URL.
# t... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SingleServer.ps1 | SCSR-SingleServer.ps1 | #requires -Version 5
Configuration SR
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSR
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SeperateSQL.ps1 | SCSR-SeperateSQL.ps1 | #requires -Version 5
Configuration SR
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSR
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SingleServer-TP.ps1 | SCSR-SingleServer-TP.ps1 | #requires -Version 5
Configuration SR
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSR
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SeperateSQL-TP.ps1 | SCSR-SeperateSQL-TP.ps1 | #requires -Version 5
Configuration SR
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCSR
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/Demo1.ps1 | Demo1.ps1 | cls
configuration Demo1
{
Import-DscResource -module xjea
xJeaToolKit Process
{
Name = 'Process'
CommandSpecs = @"
Name,Parameter,ValidateSet,ValidatePattern
Get-Process
Get-Service
Stop-Process,Name,calc;notepad
Restart-Service,Name,,^A
"@
}
xJeaEndPoint D... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/SetupJea.ps1 | SetupJea.ps1 | Configuration SetupJea
{
Import-DscResource -module xjea
Node localhost
{
xJeaEndPoint CleanAll
{
Name = 'CleanALL'
CleanAll = $true
}
LocalConfigurationManager
{
RefreshFrequencyMins = 30
Configuratio... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/Demo2.ps1 | Demo2.ps1 | cls
configuration Demo2
{
Import-DscResource -module xjea
xJeaToolKit SMBGet
{
Name = 'SMBGet'
CommandSpecs = @"
Module,Name,Parameter,ValidateSet,ValidatePattern
SMBShare,get-*
"@
}
xJeaEndPoint Demo2EP
{
Name = 'Demo2EP'
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/Demo3.ps1 | Demo3.ps1 | cls
configuration Demo3
{
Import-DscResource -module xjea
xJeaToolKit FileSystem
{
Name = 'FileSystem'
CommandSpecs = @"
Module,name,Parameter,ValidateSet,ValidatePattern
,Get-ChildItem
,Get-Item
,Copy-Item
,Move-Item
,Rename-Item
,Remove-Item
,Copy-ItemProperty
,Clea... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Util/Initialize-ToolKit.ps1 | Initialize-ToolKit.ps1 | # Copyright ゥ 2014, Microsoft Corporation. All rights reserved.
#InitializeToolKit
param(
[ValidateNotNullOrEmpty()]
$ToolkitName
)
ipmo (Join-Path $env:ProgramFiles 'Jea\Util\SafeProxy.psm1') -DisableNameChecking
function Write-ActivityRecord
{
$JeaDir = Join-Path $env:ProgramFiles 'Je... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-MultiInstance.ps1 | SCSPF-MultiInstance.ps1 | #requires -Version 5
Configuration SPF
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCVMM
Import-DscResource -Module xSCSPF
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SeperateSQL.ps1 | SCSPF-SeperateSQL.ps1 | #requires -Version 5
Configuration SPF
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCVMM
Import-DscResource -Module xSCSPF
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-MultiInstance-TP.ps1 | SCSPF-MultiInstance-TP.ps1 | #requires -Version 5
Configuration SPF
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCVMM
Import-DscResource -Module xSCSPF
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SeperateSQL-TP.ps1 | SCSPF-SeperateSQL-TP.ps1 | #requires -Version 5
Configuration SPF
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCVMM
Import-DscResource -Module xSCSPF
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SingleServer-TP.ps1 | SCSPF-SingleServer-TP.ps1 | #requires -Version 5
Configuration SPF
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCVMM
Import-DscResource -Module xSCSPF
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SingleServer.ps1 | SCSPF-SingleServer.ps1 | #requires -Version 5
Configuration SPF
{
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCVMM
Import-DscResource -Module xSCSPF
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallMSI_xPackage.ps1 | Sample_InstallMSI_xPackage.ps1 | <#
Simple installer for an msi package that matches via the Name.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $PackageName,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $SourcePath
)
Conf... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_DeleteService.ps1 | Sample_xService_DeleteService.ps1 | Configuration Sample_xService_DeleteService
{
param
(
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType,
[System.String]
[Validate... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_CreateService.ps1 | Sample_xService_CreateService.ps1 | Configuration Sample_xService_CreateService
{
param
(
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType="Automatic",
[System.String]
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressMultipleDirs.ps1 | Test_Sample_xArchive_CompressMultipleDirs.ps1 | $zipFilePath = "$pwd\Target.zip"
del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue
del "$pwd\SourceDir-2" -Force -Recurse -ErrorAction SilentlyContinue
New-Item $pwd\SourceDir-1 -Type Directory | Out-Null
New-Item $pwd\SourceDir-1\Sample-1.txt -Type File | Out-Null
New-Item $pwd\SourceDir-... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_ExpandArchive.ps1 | Test_Sample_xArchive_ExpandArchive.ps1 |
$zipFilePath = "$pwd\SampleArchive.zip"
$expandedZipDir = "$pwd\TargetExpanded"
del "$pwd\SourceDir" -Force -Recurse -ErrorAction SilentlyContinue
del "$zipFilePath" -Force -Recurse -ErrorAction SilentlyContinue
New-Item $pwd\SourceDir -Type Directory | Out-Null
New-Item $pwd\SourceDir\Sample-1.txt -Type Fil... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_DeleteService.ps1 | Sample_xService_DeleteService.ps1 | Configuration Sample_xService_DeleteService
{
param
(
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType,
[System.String]
[Validate... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressArchive.ps1 | Sample_xArchive_CompressArchive.ps1 |
Configuration Sample_xArchive_CompressArchive
{
param
(
[parameter(mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string[]] $Path,
[parameter (mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string] $Destination,
[parameter (mandatory=$false... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1 | Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1 | Configuration Sample_xWindowsProcess_EnsureAbsentWithCredential
{
param
(
[pscredential]$cred = (Get-Credential)
)
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
Node localhost
{
xWindowsProcess Notepad
{
Path = "C:\Windows\System32\Not... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xRemoteFile.ps1 | Sample_xRemoteFile.ps1 | configuration Sample_xRemoteFile_DownloadFile
{
param
(
[string[]] $nodeName = 'localhost',
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $destinationPath,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_ServiceWithCredential.ps1 | Sample_xService_ServiceWithCredential.ps1 | Configuration Sample_xService_ServiceWithCredential
{
param
(
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType="Automatic",
[System.String... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_ArgumentsWithCredential.ps1 | Sample_xWindowsProcess_ArgumentsWithCredential.ps1 | Configuration Sample_xWindowsProcess_ArgumentsWithCredential
{
param
(
[pscredential]$cred = (Get-Credential)
)
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
Node localhost
{
xWindowsProcess powershell
{
Path = "C:\Windows\System32\Win... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_CreateService.ps1 | Sample_xService_CreateService.ps1 | Configuration Sample_xService_CreateService
{
param
(
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType="Automatic",
[System.String]
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xDscWebService.ps1 | Sample_xDscWebService.ps1 | # DSC configuration for Pull Server and Compliance Server
# Prerequisite: Certificate "CN=PSDSCPullServerCert" in "CERT:\LocalMachine\MY\" store
# Note: A Certificate may be generated using MakeCert.exe: http://msdn.microsoft.com/en-us/library/windows/desktop/aa386968%28v=vs.85%29.aspx
configuration Sample_xDscWeb... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_WithCredential.ps1 | Sample_xWindowsProcess_WithCredential.ps1 | Configuration Sample_xWindowsProcess_WithCredential
{
param
(
[pscredential]$cred = (Get-Credential)
)
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
Node localhost
{
xWindowsProcess Notepad
{
Path = "C:\Windows\System32\Notepad.exe"
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressMultipleDirs.ps1 | Sample_xArchive_CompressMultipleDirs.ps1 |
Configuration Sample_xArchive_CompressMultipleDirs
{
param
(
[parameter(mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string[]] $Path,
[parameter (mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string] $Destination,
[parameter (mandatory=$... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_ExpandArchive.ps1 | Sample_xArchive_ExpandArchive.ps1 |
Configuration Sample_xArchive_ExpandArchive
{
param
(
[parameter(mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string[]] $Path,
[parameter (mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string] $Destination,
[parameter (mandatory=$false)]... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xPSSessionConfiguration.ps1 | Sample_xPSSessionConfiguration.ps1 | configuration Sample_xPSEndpoint_NewWithDefaults
{
param
(
[Parameter(Mandatory)]
[String]$Name
)
Import-DscResource -module xPSDesiredStateConfiguration
xPSEndpoint PSSessionConfiguration
{
Name = $Name
Ensure = 'Present'
}
}
configuration... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressArchive.ps1 | Test_Sample_xArchive_CompressArchive.ps1 |
$zipFilePath = "$pwd\Target.zip"
del "$pwd\Sample-1.txt" -Force -Recurse -ErrorAction SilentlyContinue
del "$pwd\Sample-2.txt" -Force -Recurse -ErrorAction SilentlyContinue
del "$pwd\Sample-3.txt" -Force -Recurse -ErrorAction SilentlyContinue
del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xFileUpload.ps1 | Sample_xFileUpload.ps1 | Configuration FileUploadConfiguration
{
param (
[parameter(Mandatory = $true)]
[String] $destinationPath,
[parameter(Mandatory = $true)]
[String] $sourcePath,
[PSCredential] $credential,
[String] $certificateThumbprint
)
Import-DscResource -modulename xPSDesiredStateConfiguration
node localhost
{
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1 | New-PSSessionConfigurationResource.ps1 | ipmo xDSCResourceDesigner
$resProperties = @{
Name = New-xDscResourceProperty -Description 'Name of the PS Remoting Endpoint' `
-Name Name -Type String -Attribute Key
RunAsCred = New-xDscResourceProperty -Description 'Credential for Running under d... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1 | GenerateXRemoteFileSchema.ps1 | $DestinationPath = New-xDscResourceProperty -Name DestinationPath -Type String -Attribute Key -Description 'Path under which downloaded or copied file should be accessible after operation.'
$Uri = New-xDscResourceProperty -Name Uri -Type String -Attribute Required -Description 'Uri of a file which should be copied or ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xWinEventLog/Examples/Demo1.ps1 | Demo1.ps1 | cls
$before = Get-WinEvent -ListLog "Microsoft-Windows-MSPaint/Admin"
configuration Demo1
{
Import-DscResource -module xWinEventLog
xWinEventLog Demo1
{
LogName = "Microsoft-Windows-MSPaint/Admin"
IsEnabled = $true
LogMode = "AutoBackup"
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xPowerShellExecutionPolicy/Examples/SetPowerShellExecutionPolicy.ps1 | SetPowerShellExecutionPolicy.ps1 | #---------------------------------------------------------------------------------
#The sample scripts are not supported under any Microsoft standard support
#program or service. The sample scripts are provided AS IS without warranty
#of any kind. Microsoft further disclaims all implied warranties including,
#wit... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xBitlocker/Test/Test-xBitlocker.ps1 | Test-xBitlocker.ps1 | $showVerbose = $true
#Define the parameters that can be passed into individual tests
$blParams1 = @{
MountPoint = "C:"
PrimaryProtector = "RecoveryPasswordProtector"
StartupKeyProtector = $true
StartupKeyPath = "A:"
RecoveryPasswordProtector = $true
AllowImmediateReboot = $false
U... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xBitlocker/Examples/ConfigureBitlockerOnOSDrive/ConfigureBitlockerOnOSDrive.ps1 | ConfigureBitlockerOnOSDrive.ps1 | Configuration ConfigureBitlockerOnOSDrive
{
Import-DscResource -Module xBitlocker
Node "E15-1"
{
#First install the required Bitlocker features
WindowsFeature BitlockerFeature
{
Name = 'Bitlocker'
Ensure = 'Present'
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xBitlocker/Examples/ConfigureBitlockerAndAutoBitlocker/ConfigureBitlockerAndAutoBitlocker.ps1 | ConfigureBitlockerAndAutoBitlocker.ps1 | Configuration ConfigureBitlockerAndAutoBitlocker
{
Import-DscResource -Module xBitlocker
Node 'E15-1'
{
#First install the required Bitlocker features
WindowsFeature BitlockerFeature
{
Name = 'Bitlocker'
Ensure = 'Prese... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/DscResources/MSFT_xMySqlDatabase/xMySqlDatabaseDesigner.ps1 | xMySqlDatabaseDesigner.ps1 | # a Powershell script to create MySqlDatabase resource using xDSCResourceDesigner tool
$friendlyName = "xMySqlDatabase"
$resourceName = "MSFT_$friendlyName"
$classVersion = "1.0.0"
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path
$originalModuleRoot = join-Path $scriptroot "..\.."
$originalModuleRootPath =... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/DscResources/MSFT_xMySqlUser/xMySqlUserDesigner.ps1 | xMySqlUserDesigner.ps1 | # a Powershell script to create MySqlDatabase resource using xDSCResourceDesigner tool
$friendlyName = "xMySqlGrant"
$resourceName = "MSFT_$friendlyName"
$classVersion = "1.0.0"
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path
$originalModuleRoot = join-Path $scriptroot "..\.."
$originalModuleRootPath = Re... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/DscResources/MSFT_xMySqlGrant/xMySqlGrantDesigner.ps1 | xMySqlGrantDesigner.ps1 | # a Powershell script to create MySqlDatabase resource using xDSCResourceDesigner tool
$friendlyName = "xMySqlGrant"
$resourceName = "MSFT_$friendlyName"
$classVersion = "1.0.0"
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path
$originalModuleRoot = join-Path $scriptroot "..\.."
$originalModuleRootPath = Re... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/Sample_InstallMySQL_Default.ps1 | Sample_InstallMySQL_Default.ps1 |
configuration SQLInstanceInstallationConfiguration
{
param
(
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $MySQLInstancePackagePath,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $MySQLInstancePackageName
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/Sample_InstallMySQLInstanceAndDatabase.ps1 | Sample_InstallMySQLInstanceAndDatabase.ps1 | configuration SQLInstanceAndDatabaseInstallationConfiguration
{
param
(
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $MySQLInstancePackagePath,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $MySQLInstancePackag... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/InstallRequiredModules.ps1 | InstallRequiredModules.ps1 | # This Script installs the required modules for the MySql Sample
# It uses the PowerShell Resource Gallery, see https://msconfiggallery.cloudapp.net/
# This requires WMF 5. If you don't have WMF 5, Please install the modules manually.
Write-Host "Installing required modules..."
Install-Module xMySql -MinimumVers... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/GrantMySqlDatabaseAccess.ps1 | GrantMySqlDatabaseAccess.ps1 | ###################
# Configuration script to grant full access to given my sql database for given my sql user.
# It assumes that mySql is installed on local machine with root user $RootUser and root password $global:pwd
###################
configuration MySQLGrantConfiguration
{
param
(
[par... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/Sample_RemoveMySQL_Default.ps1 | Sample_RemoveMySQL_Default.ps1 |
configuration SQLInstanceRemovalConfiguration
{
Import-DscResource -Module xMySql
node $AllNodes.NodeName
{
xMySqlServer MySQLInstance
{
Ensure = "Absent"
RootPassword = $global:cred
ServiceName = "MySQLInstanceServiceName"... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/CreateMySQLUser.ps1 | CreateMySQLUser.ps1 | ###################
# Configuration script to create my sql user. It assumes that mySql is installed on local machine with root user $RootUser and root password $global:pwd
###################
configuration CreateMySQLUserConfiguration
{
param
(
[parameter(Mandatory = $true)]
[Validate... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xMySql/Examples/Sample_RemoveMySQLAndDatabase.ps1 | Sample_RemoveMySQLAndDatabase.ps1 | configuration SQLRemoveInstanceAndDatabaseInstallationConfiguration
{
param
(
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $MySQLInstancePackagePath,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $MySQLInstance... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xActiveDirectory/Assert-HADC.ps1 | Assert-HADC.ps1 | # A configuration to Create High Availability Domain Controller
$secpasswd = ConvertTo-SecureString "Adrumble@6" -AsPlainText -Force
$domainCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd)
$safemodeAdministratorCred = New-Object System.Management.Automation.PSCr... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xActiveDirectory/Assert-ParentChildDomains.ps1 | Assert-ParentChildDomains.ps1 | $secpasswd = ConvertTo-SecureString "Adrumble@6" -AsPlainText -Force
$domainCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd)
$safemodeAdministratorCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd)
$localcred = New-... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xActiveDirectory/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/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAdcsDeployment/xCertificateServices/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/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/Status.ps1 | Status.ps1 | ############################################################
# DSC Azure Test Example - Status
#
# This script will show the detailed status of the Virtual
# Machine in Azure.
#
# Before running this script, do the following:
# * Open PowerShell and run Get-AzurePublishSettingsFile
# * Download the .publishsetting... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/CreateWithDSCExtension.ps1 | CreateWithDSCExtension.ps1 | ############################################################
# DSC Azure Test Example - CREATEwithDSCExtension
#
# This script will create a test Virtual Machine in Azure,
# including the prerequisites - Affinity Group, Storage,
# and Cloud Service.
#
# This example also loads PowerShell Just Enough Administration
# in... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/LCM.ps1 | LCM.ps1 | ############################################################
# DSC Azure Test Example - LCM Apply Only
#
# This script configures your local machine to apply DSC
# configurations 'only' which means not to include
# DSC automatically monitoring for drift or
# re-applying the configuration automationally.
#
# Set the... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/Create_SqlDatabase.ps1 | Create_SqlDatabase.ps1 | <#
Configuration creates Azure SQL Database
#>
configuration CreateSqlDatabase
{
param
(
$workingDirectory,
$name,
$serverCredential,
$serverName,
$ruleName,
$startIPAddress,
$endIPAddress,
$azureSubscriptionName,
$azure... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/SetupSubscription.ps1 | SetupSubscription.ps1 | ############################################################
# DSC Azure Test Example - SETUP SUBSCRIPTION
#
# Before running this script, do the following:
# * Open PowerShell and run Get-AzurePublishSettingsFile
# * Download the .publishsettings file in to $workingdir
#
# Set the folder where your files will liv... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/Destroy.ps1 | Destroy.ps1 | ############################################################
# DSC Azure Test Example - DESTROY
#
# NOTES - this script removes everything in the test environment
# from Azure and then makes sure the subscription is no longer
# set as Current for the LocalSystem.
#
# This script is DESTRUCTIVE without a method of resto... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/RemoveVMs.ps1 | RemoveVMs.ps1 | ############################################################
# DSC Azure Test Example - REMOVE VMS
#
# This script removes specific VMs from Azure
#
# This script is DESTRUCTIVE without a method of restoration
#
# The subscription must be in place in order to access Azure
# and do work, so if this is being run in a new... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/PublishConfigurationArchiveToStorage.ps1 | PublishConfigurationArchiveToStorage.ps1 | # Sample configuration to Publish Configuration Archive to Storage
Configuration PublishToStorage
{
Import-DscResource -Module xAzure
xAzureVMDscConfiguration Publish
{
StorageAccountName = 'dscazext'
Ensure = 'Present'
ContainerName ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/Create.ps1 | Create.ps1 | ############################################################
# DSC Azure Test Example - CREATE
#
# This script will create a test Virtual Machine in Azure,
# including the prerequisites - Affinity Group, Storage,
# and Cloud Service.
#
# This example also loads PowerShell Just Enough Administration
# inside the VM via ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/Create_FirewallRule.ps1 | Create_FirewallRule.ps1 | <#
Configuration creates Azure SQL Database Server Firewall Rule
#>
configuration CreateSqlDatabaseServerFirewallRule
{
param
(
$workingDirectory,
$ruleName,
$serverName,
$startIPAddress,
$endIPAddress,
$azureSubscriptionName,
$azurePubli... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/scriptextensionfiles/InstallJEA.ps1 | InstallJEA.ps1 | Invoke-WebRequest -Uri 'http://nuget.org/nuget.exe' -OutFile "$env:TEMP\NuGet.exe"
&"$env:TEMP\NuGet.exe" install xJea -NoCache -Source http://msconfiggallery.cloudapp.net/api/v2/ -ExcludeVersion -PackageSaveMode "nuspec" -OutputDirectory "$env:ProgramFiles\WindowsPowerShell\Modules"
&'winrm' quickconfig -quiet
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/Examples/ServerCoreTest/ServerCoreTest.ps1 | ServerCoreTest.ps1 | configuration ServerCoreTest
{
WindowsFeature NoGUI
{
Ensure = 'Absent'
Name = 'Server-Gui-Mgmt-Infra'
}
LocalConfigurationManager
{
ConfigurationMode = 'ApplyOnly'
RebootNodeIfNeeded = 'True'
}
} |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabase.ps1 | GenerateXAzureSqlDatabase.ps1 | $Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description 'Name of the database'
$ServerName = New-xDscResourceProperty -Name ServerName -Type String -Attribute Key -Description 'Name of the database server in which database should be created'
$MaximumSizeInGB = New-xDscResourceProperty -N... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabaseServerFirewallRule.ps1 | GenerateXAzureSqlDatabaseServerFirewallRule.ps1 | $Name = New-xDscResourceProperty -Name RuleName -Type String -Attribute Key -Description 'Name of the firewall rule'
$ServerName = New-xDscResourceProperty -Name ServerName -Type String -Attribute Key -Description 'Name of the database server for which firewall rule should be created'
$StartIPAddress = New-xDscResour... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-SeperateSQL-TP.ps1 | SCOM-SeperateSQL-TP.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-SeperateSQL.ps1 | SCOM-SeperateSQL.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-SeperateSQLInstances-TP.ps1 | SCOM-SeperateSQLInstances-TP.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-MultiInstance-TP.ps1 | SCOM-MultiInstance-TP.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-SingleServer-TP.ps1 | SCOM-SingleServer-TP.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-MultiInstance.ps1 | SCOM-MultiInstance.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-SeperateSQLInstances.ps1 | SCOM-SeperateSQLInstances.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCOM/Examples/SCOM-SingleServer.ps1 | SCOM-SingleServer.ps1 | #requires -Version 5
Configuration OM
{
Import-DscResource -Module xCredSSP
Import-DscResource -Module xSQLServer
Import-DscResource -Module xSCOM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers = @($A... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xRemoteDesktopAdmin/Examples/ExampleConfiguration-RemoteDesktopAdmin.ps1 | ExampleConfiguration-RemoteDesktopAdmin.ps1 | Configuration AllowRemoteDesktopAdminConnections
{
Import-DscResource -Module xRemoteDesktopAdmin, xNetworking
Node ('localhost')
{
xRemoteDesktopAdmin RemoteDesktopSettings
{
Ensure = 'Present'
UserAuthentication = 'Secure'
}
xFire... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xRemoteDesktopAdmin/Examples/ExampleConfiguration-RemoteDesktopAdminWithEncryptedPassword.ps1 | ExampleConfiguration-RemoteDesktopAdminWithEncryptedPassword.ps1 | # The configuration data section specifies which certificate and thumbprint to use for encrypting the password
$ConfigData = @{
AllNodes = @(
@{
NodeName="DSCnode1";
CertificateFile = "C:\Certificates\DSCnode1.cer"
Thumbprint = "E36D15C59BDBABB8525E48568844DD7079C1... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xRemoteDesktopAdmin/Examples/ExampleConfiguration-RemoteDesktopAdminWithUnEncryptedPassword.ps1 | ExampleConfiguration-RemoteDesktopAdminWithUnEncryptedPassword.ps1 | # The configuration data section specifies to allow using a plain text stored password
$ConfigData = @{
AllNodes = @(
@{
NodeName="DSCnode1";
PSDscAllowPlainTextPassword = $true
}
)}
Configuration AllowRemoteDesktopAdminConnections
{
$password... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/cFileShare/Examples/Sample - CreateMultipleShares.ps1 | Sample - CreateMultipleShares.ps1 | Configuration CreateMultipleShares
{
Import-DscResource -ModuleName cFileShare
node [target server name]
{
cCreateFileShare CreateShare
{
ShareName = '[share name]'
Path = '[folder path]'
Ensure = 'Present'
}
cCreateF... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/cFileShare/Examples/Sample - CreateDropShare.ps1 | Sample - CreateDropShare.ps1 | Configuration CreateDropShare
{
Import-DscResource -ModuleName cFileShare
node [target server name]
{
cCreateFileShare CreateShare
{
ShareName = '[share name]'
Path = '[folder path]'
Ensure = 'Present'
}
cSetSharePerm... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/cFileShare/Examples/Sample - AlterPermissions.ps1 | Sample - AlterPermissions.ps1 | Configuration AlterPermissions
{
Import-DscResource -ModuleName cFileShare
node [target server name]
{
cSetSharePermissions SetPermissions
{
ShareName = '[Share name]'
Ensure = 'Absent'
FullAccessUsers = @('[user 1]')
... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/cFileShare/ResourceDesignerScripts/Generate_VSAR_cFileShare_Schema.ps1 | Generate_VSAR_cFileShare_Schema.ps1 | #This creates the definition for the resource
#The share to create
$ShareName = New-xDscResourceProperty -Name ShareName -Type String -Attribute Key
#The path where the folder that maps to the share should be created
$Path = New-xDscResourceProperty -Name Path -Type String -Attribute Required
#Identify ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/cFileShare/Unit Tests/VSAR_cSetSharePermissions_UnitTests.ps1 | VSAR_cSetSharePermissions_UnitTests.ps1 | #Unit tests for VSAR_cSetSharePermissions
Import-Module "C:\Program Files\WindowsPowerShell\Modules\cFileShare\DSCResources\VSAR_cSetSharePermissions"
#Variable Declarations
$ShareName = "TestShare"
$Users = @("[domain]\[user1]", "[domain]\[user2]")
$Path = "C:\Test"
$User1 = "[domain]\[user1]"
$User2 = "[doma... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/cFileShare/Unit Tests/VSAR_cCreateFileShare_UnitTests.ps1 | VSAR_cCreateFileShare_UnitTests.ps1 | #Unit tests for VSAR_cCreateFileShare
Import-Module "C:\Program Files\WindowsPowerShell\Modules\cFileShare\DSCResources\VSAR_cCreateFileShare"
#Variable Declarations
$ShareName = "TestShare"
$Path = "C:\Test"
$PassCounter = 0
$FailCounter = 0
##############################
#
# Tests for Get-TargetResourc... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCDPM/Examples/SCDPM-MultiInstance.ps1 | SCDPM-MultiInstance.ps1 | #requires -Version 5
Configuration DPM
{
Import-DscResource -Module xDismFeature
Import-DscResource -Module xSqlServer
Import-DscResource -Module xSCDPM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCDPM/Examples/SCDPM-SingleServer-TP.ps1 | SCDPM-SingleServer-TP.ps1 | #requires -Version 5
Configuration DPM
{
Import-DscResource -Module xDismFeature
Import-DscResource -Module xSqlServer
Import-DscResource -Module xSCDPM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCDPM/Examples/SCDPM-SingleServer.ps1 | SCDPM-SingleServer.ps1 | #requires -Version 5
Configuration DPM
{
Import-DscResource -Module xDismFeature
Import-DscResource -Module xSqlServer
Import-DscResource -Module xSCDPM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCDPM/Examples/SCDPM-SeperateSQL-TP.ps1 | SCDPM-SeperateSQL-TP.ps1 | #requires -Version 5
Configuration DPM
{
Import-DscResource -Module xDismFeature
Import-DscResource -Module xSqlServer
Import-DscResource -Module xSCDPM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCDPM/Examples/SCDPM-MultiInstance-TP.ps1 | SCDPM-MultiInstance-TP.ps1 | #requires -Version 5
Configuration DPM
{
Import-DscResource -Module xDismFeature
Import-DscResource -Module xSqlServer
Import-DscResource -Module xSCDPM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xSCDPM/Examples/SCDPM-SeperateSQL.ps1 | SCDPM-SeperateSQL.ps1 | #requires -Version 5
Configuration DPM
{
Import-DscResource -Module xDismFeature
Import-DscResource -Module xSqlServer
Import-DscResource -Module xSCDPM
# Set role and instance variables
$Roles = $AllNodes.Roles | Sort-Object -Unique
foreach($Role in $Roles)
{
$Servers ... |
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/0.0.0.2/Scripts/Reskit9/All Resources/xInternetExplorerHomePage/Examples/SetIEhomePage.ps1 | SetIEhomePage.ps1 | #---------------------------------------------------------------------------------
#The sample scripts are not supported under any Microsoft standard support
#program or service. The sample scripts are provided AS IS without warranty
#of any kind. Microsoft further disclaims all implied warranties including,
#wit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.