full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Private/Get-VSCodeVsix.ps1 | Get-VSCodeVsix.ps1 | Function Get-VSCodeVsix
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[string[]]$FullName,
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[string[]]$Version,
[Parameter(Mandatory=$true,ValueFromPip... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Private/Get-VSCodeExtensionFolder.ps1 | Get-VSCodeExtensionFolder.ps1 | Function Get-VSCodeExtensionFolder
{
[CmdletBinding()]
[OutputType([String])]
param
(
[parameter(Position=0)]
[switch]$Insiders
)
Process
{
if ($Insiders)
{
$Folder = "$HOME\.vscode-insiders\extensions"
}
else
{
... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Private/Add-VSCodeMetadata.ps1 | Add-VSCodeMetadata.ps1 | Function Add-VSCodeMetadata
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true,ValueFromPipeline=$true,Position=0)]
[PSCustomObject]$Extension,
[Parameter(Position=1)]
[switch]$Insiders
)
Process
{
Try
{
$ExtensionFold... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Private/Expand-VSCodeVsix.ps1 | Expand-VSCodeVsix.ps1 | Function Expand-VSCodeVsix
{
[CmdletBinding()]
param
(
[Parameter(ParameterSetName="Name",Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
[string[]]$FullName,
[Parameter(ParameterSetName="Name",Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=1)]
... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Private/Get-VSCodeInstallation.ps1 | Get-VSCodeInstallation.ps1 | Function Get-VSCodeInstallation
{
[CmdletBinding()]
[OutputType([PSCustomObject])]
param
(
[parameter(Position=0)]
[switch]$Insiders
)
Process
{
if ($Insiders)
{
$DisplayName = 'Microsoft Visual Studio Code Insiders'
}
else
... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Private/Install-VSCodeVsix.ps1 | Install-VSCodeVsix.ps1 | Function Install-VSCodeVsix
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
[string[]]$FullName,
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=1)]
[string[]]$Version,
[Para... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Install-VSCodeExtension.ps1 | Install-VSCodeExtension.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Install-VSCodeExtension
{
[CmdletBinding(DefaultParameterSetName="ExtensionName",SupportsShouldProcess=$true)]
param
(
[Parameter(ParameterSetName="ExtensionName",Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
[string[]]$... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Uninstall-VSCodeExtension.ps1 | Uninstall-VSCodeExtension.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Uninstall-VSCodeExtension
{
[CmdletBinding(DefaultParameterSetName="ExtensionName",SupportsShouldProcess=$true)]
param
(
[Parameter(ParameterSetName="ExtensionName",Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
[string[]... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Find-VSCodeExtension.ps1 | Find-VSCodeExtension.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Find-VSCodeExtension
{
[CmdletBinding(DefaultParameterSetName="ExtensionName")]
[OutputType([PSCustomObject])]
param
(
[Parameter(ParameterSetName="ExtensionName",Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
[Suppor... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Update-VSCodeExtension.ps1 | Update-VSCodeExtension.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Update-VSCodeExtension
{
[CmdletBinding(SupportsShouldProcess=$true)]
[OutputType([PSCustomObject])]
param
(
[switch]$Insiders,
[switch]$Passthru
)
Begin {}
Process
{
$Install... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Get-VSCodeExtension.ps1 | Get-VSCodeExtension.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Get-VSCodeExtension
{
[CmdletBinding()]
[OutputType([PSCustomObject])]
param
(
[Parameter(Position=0)]
[switch]$Insiders
)
Begin {}
Process
{
#TODO: Make this searchable by Packages
$Exte... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Get-VSCodeExtensionStats.ps1 | Get-VSCodeExtensionStats.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Get-VSCodeExtensionStats
{
[CmdletBinding(DefaultParameterSetName="ExtensionName")]
[OutputType([PSCustomObject])]
param
(
[Parameter(ParameterSetName="ExtensionName",Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
[st... |
PowerShellCorpus/PowerShellGallery/vscodeextensions/0.1.2/Public/Get-VSCodePublisherStats.ps1 | Get-VSCodePublisherStats.ps1 | # .ExternalHelp VSCodeExtensions-Help.xml
function Get-VSCodePublisherStats
{
[CmdletBinding()]
[OutputType([PSCustomObject])]
param
(
[Parameter(Mandatory=$true)]
[string]$PublisherName
)
Begin
{
$Results = Invoke-RestMethod -Method Get -Uri 'https://vscode.blob... |
PowerShellCorpus/PowerShellGallery/PSCommonSql.Sqlite/1.0.37/New-SqliteConnectionString.Tests.ps1 | New-SqliteConnectionString.Tests.ps1 | [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText","")]
param()
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
#$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
Import-Module $here
Describe "New-SqliteConnectionString" {
... |
PowerShellCorpus/PowerShellGallery/PSCommonSql.Sqlite/1.0.37/New-SqliteConnection.ps1 | New-SqliteConnection.ps1 | function New-SQLiteConnection
{
<#
.SYNOPSIS
Creates a SQLiteConnection to a SQLite data source
.DESCRIPTION
Creates a SQLiteConnection to a SQLite data source
.PARAMETER DataSource
SQLite Data Source to connect to.
.PARAMETER Password
Speci... |
PowerShellCorpus/PowerShellGallery/PSCommonSql.Sqlite/1.0.37/Get-SqliteDbProviderFactory.ps1 | Get-SqliteDbProviderFactory.ps1 | function Get-SqliteDbProviderFactory {
PSCommonSql\Get-DbProviderFactory -DbProviderName "System.Data.Sqlite"
} |
PowerShellCorpus/PowerShellGallery/PSCommonSql.Sqlite/1.0.37/New-SqliteConnectionString.ps1 | New-SqliteConnectionString.ps1 | function New-SQLiteConnectionString {
[cmdletbinding()]
[OutputType([String])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions","")]
param(
[Parameter( Position=0,
Mandatory=$true,
ValueFromPipeline=$t... |
PowerShellCorpus/PowerShellGallery/AzureRM.BootStrapper/0.1.0/AzureRM.BootStrapper.Tests.ps1 | AzureRM.BootStrapper.Tests.ps1 | #Requires -Modules AzureRM.BootStrapper
$global:testProfileMap = "{`"Profile1`": { `"Module1`": [`"1.0`"], `"Module2`": [`"1.0`"] }, `"Profile2`": { `"Module1`": [`"2.0`", `"1.0`"], `"Module2`": [`"2.0`"] }}"
Describe "Get-ProfileCachePath" {
InModuleScope AzureRM.Bootstrapper {
Context "Windows OS A... |
PowerShellCorpus/PowerShellGallery/AzureRM.BootStrapper/0.1.0/Run-ScenarioTests.ps1 | Run-ScenarioTests.ps1 | #Requires -Modules AzureRM.Bootstrapper, Pester
$defaults = [System.IO.Path]::GetDirectoryName($PSCommandPath)
Set-Location $defaults
. .\AzureRM.Bootstrapper.ScenarioTests.ps1 |
PowerShellCorpus/PowerShellGallery/AzureRM.BootStrapper/0.1.0/AzureRM.Bootstrapper.ScenarioTests.ps1 | AzureRM.Bootstrapper.ScenarioTests.ps1 | Import-Module -Name AzureRM.Bootstrapper
$RollupModule = 'AzureRM'
InModuleScope AzureRM.Bootstrapper {
$ProfileMap = (Get-AzProfile)
$ProfileCachePath = Get-ProfileCachePath
# Helper function to uninstall all profiles
function Remove-InstalledProfile {
$installedProfiles = Get-Profiles... |
PowerShellCorpus/PowerShellGallery/AzureRM.BootStrapper/0.1.0/Run-UnitTests.ps1 | Run-UnitTests.ps1 | #Requires -Modules AzureRM.Bootstrapper, Pester
$defaults = [System.IO.Path]::GetDirectoryName($PSCommandPath)
Set-Location $defaults
Invoke-Pester -EnableExit
|
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Import-Silk.ps1 | Import-Silk.ps1 | <#
.SYNOPSIS
Imports the Silk module.
.DESCRIPTION
Imports the Silk module. If the Silk module is already loaded, it will remove it and then reloaded.
.EXAMPLE
Import-Silk.ps1
Imports the Silk module, re-loading it if its already loaded.
#>
# Copyright 2012 Aaron Jensen
#
# Licensed under the Apa... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Examples/Publish-Module.ps1 | Publish-Module.ps1 | <#
.SYNOPSIS
Packages and publishes Silk packages.
.DESCRIPTION
The `Publish-Silk.ps1` script packages and publishes a version of the Silk module. It uses the version defined in the Silk.psd1 file. Before publishing, it adds the current date to the version in the release notes, updates the module's website, then ... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Examples/Invoke-Build.ps1 | Invoke-Build.ps1 | <#
.SYNOPSIS
Sets the version number for the LibGit2 module.
#>
# 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
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Examples/New-Website.ps1 | New-Website.ps1 | <#
.SYNOPSIS
Creates the get-libgit2.org website.
.DESCRIPTION
The `New-Website.ps1` script generates the get-libgit2.org website. It uses the Silk module for Markdown to HTML conversion.
#>
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wit... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Set-ModuleNuspec.ps1 | Set-ModuleNuspec.ps1 |
function Set-ModuleNuspec
{
param(
[Parameter(Mandatory=$true)]
[string]
# Path to the module's manifest.
$ManifestPath,
[Parameter(Mandatory=$true)]
[string]
# Path to the module's Nuspec file.
$NuspecPath,
[Parameter(Mandator... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Set-ModuleVersion.ps1 | Set-ModuleVersion.ps1 |
function Set-ModuleVersion
{
<#
.SYNOPSIS
Updates a module's version.
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
# The path to the module's manifest.
$ManifestPath,
[string]
# The path to the module's manifes... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Get-TypeDocumentationLink.ps1 | Get-TypeDocumentationLink.ps1 |
function Get-TypeDocumentationLink
{
param(
[Parameter(Mandatory=$true)]
[string]
# The name of the command where the type was found.
$CommandName,
[Parameter(Mandatory=$true)]
[string]
# The name of the type whose documentation link to return.
... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Edit-HelpText.ps1 | Edit-HelpText.ps1 |
function Edit-HelpText
{
<#
.SYNOPSIS
Converts the command names in a block of text to links.
.DESCRIPTION
The `Edit-HelpText` function converts all a module's command names or help topic names into Markdown links. The command names or help topic names should be surrounded by backticks, e.... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Convert-HelpToHtml.ps1 | Convert-HelpToHtml.ps1 |
function Convert-HelpToHtml
{
<#
.SYNOPSIS
Converts a command's help topic to HTML.
.DESCRIPTION
The `Convert-HelpToHtml` function convert's a command's help topic to HTML. This HTML can then be used in a complete HTML page. It will output the following parts of a help topic, in the follo... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/New-ChocolateyPackage.ps1 | New-ChocolateyPackage.ps1 | # Copyright 2012 Aaron Jensen
#
# 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
#
# Unless required by applicable law or agreed to ... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Split-MarkdownTopic.ps1 | Split-MarkdownTopic.ps1 |
function Split-MarkdownTopic
{
<#
.SYNOPSIS
Parses a Markdown-formatted module help topic, e.g. about_Module.
.DESCRIPTION
A Markdown-formatted help topic should contain four sections, `Topic`, `Short Description`, `Long Description`, and `See Also`. These should all be formatted as level... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Out-HtmlString.ps1 | Out-HtmlString.ps1 |
filter Out-HtmlString
{
<#
.SYNOPSIS
Writes a string out to the pipeline, trimming whitespace.
#>
$_ |
Out-String -Width 9999 |
ForEach-Object { $_.Trim() } |
Where-Object { $_ }
}
|
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Get-ModuleVersion.ps1 | Get-ModuleVersion.ps1 |
function Get-ModuleVersion
{
param(
[Parameter(Mandatory=$true)]
[string]
# The path to the module's manifest.
$ManifestPath
)
Set-StrictMode -Version 'Latest'
} |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Use-CallerPreference.ps1 | Use-CallerPreference.ps1 | # 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Publish-ChocolateyPackage.ps1 | Publish-ChocolateyPackage.ps1 | # Copyright 2012 Aaron Jensen
#
# 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
#
# Unless required by applicable law or agreed to ... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Set-ReleaseNotesReleaseDate.ps1 | Set-ReleaseNotesReleaseDate.ps1 |
function Set-ReleaseNotesReleaseDate
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
# The path to the module manifest whose release notes to update.
$ManifestPath,
[Parameter(Mandatory=$true)]
[string]
# The path to the rele... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Test-ModuleVersion.ps1 | Test-ModuleVersion.ps1 |
function Assert-ModuleVersion
{
param(
[Parameter(Mandatory=$true)]
[string]
# The path to the module's manifest.
$ManifestPath,
[string[]]
# Path to any additional assemblies whose versions should get checked.
$AssemblyPath,
[string]
... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Convert-AboutTopicToHtml.ps1 | Convert-AboutTopicToHtml.ps1 | 4
function Convert-AboutTopicToHtml
{
<#
.SYNOPSIS
Converts an about topic into HTML.
.DESCRIPTION
The `Convert-AboutTopicToHtml` converts a PowerShell about topic into HTML. The about topic is expected to be [formatted like PowerShell's internal topics](https://msdn.microsoft.com/en-us/lib... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Format-ForHtml.ps1 | Format-ForHtml.ps1 |
filter Format-ForHtml
{
<#
.SYNOPSIS
Encodes text for HTML.
#>
if( $_ )
{
[Web.HttpUtility]::HtmlEncode($_)
}
}
|
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Get-Function.ps1 | Get-Function.ps1 |
filter Get-Function
{
<#
.SYNOPSIS
Gets all of a module's functions.
#>
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
# The file to parse for functions
$Path
)
Write-Verbose "Loading script '$Path'."
$scriptContent = Get-Content "... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/New-ModuleHelpIndex.ps1 | New-ModuleHelpIndex.ps1 |
function New-ModuleHelpIndex
{
<#
.SYNOPSIS
Creates an index page for a module's help.
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
# The name of the module whose index page to create.
$ModuleName,
[string[]]
#... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Publish-NuGetPackage.ps1 | Publish-NuGetPackage.ps1 | # Copyright 2012 Aaron Jensen
#
# 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
#
# Unless required by applicable law or agreed to ... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Convert-ModuleHelpToHtml.ps1 | Convert-ModuleHelpToHtml.ps1 |
function Convert-ModuleHelpToHtml
{
<#
.SYNOPSIS
Converts a module's help into HTML.
.DESCRIPTION
The `Convert-ModuleHelpToHtml` function converts a module's help into HTML. It returns an object for each command and about help topic in the module. The object
#>
[CmdletBinding()]... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Publish-PowerShellGalleryPackage.ps1 | Publish-PowerShellGalleryPackage.ps1 | #>
# Copyright 2012 Aaron Jensen
#
# 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
#
# Unless required by applicable law or agreed... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Publish-BitbucketDownload.ps1 | Publish-BitbucketDownload.ps1 | # Copyright 2012 Aaron Jensen
#
# 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
#
# Unless required by applicable law or agreed to ... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/New-NuGetPackage.ps1 | New-NuGetPackage.ps1 | # Copyright 2012 Aaron Jensen
#
# 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
#
# Unless required by applicable law or agreed to ... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Convert-RelatedLinkToHtml.ps1 | Convert-RelatedLinkToHtml.ps1 |
function Convert-RelatedLinkToHtml
{
<#
.SYNOPSIS
Converts a command's related link to HTML.
.DESCRIPTION
`Convert-RelatedLinkToHtml` converts a command's related links to HTML. If the related link is not a URL, the command name is converted to a link that poitns to a `CommandName.html` fi... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Set-ModuleManifestMetadata.ps1 | Set-ModuleManifestMetadata.ps1 |
function Set-ModuleManifestMetadata
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
# The path to the module.
$ManifestPath,
[string[]]
# Tags for the module.
$Tag,
[string]
# The path to the module's release notes.
... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Get-ModuleReleaseNotes.ps1 | Get-ModuleReleaseNotes.ps1 |
function Get-ModuleReleaseNotes
{
param(
[Parameter(Mandatory=$true)]
[string]
# Path to the module's manifest.
$ManifestPath,
[Parameter(Mandatory=$true)]
[string]
# Path to the releaes notes file.
$ReleaseNotesPath
)
Set-Str... |
PowerShellCorpus/PowerShellGallery/Silk/0.2.0/Functions/Convert-MarkdownToHtml.ps1 | Convert-MarkdownToHtml.ps1 |
filter Convert-MarkdownToHtml
{
if( $_ )
{
$markdown.Transform( $_ ).Trim()
}
} |
PowerShellCorpus/PowerShellGallery/MeasureScript/0.1.0.0/Measure-Script.ps1 | Measure-Script.ps1 | #region Profiler
class Profiler
{
[System.Diagnostics.Stopwatch[]]$StopWatches
Profiler([System.Management.Automation.Language.IScriptExtent]$extent)
{
$lines = $extent.EndLineNumber
$this.StopWatches = [System.Diagnostics.Stopwatch[]]::new($lines)
for ($i = 0; $i -lt $lines;... |
PowerShellCorpus/PowerShellGallery/SCOrchDev-PasswordVault/2.1.1/SCOrchDev-PasswordVault.tests.ps1 | SCOrchDev-PasswordVault.tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$manifestPath = "$here\SCOrchDev-PasswordVault.psd1"
Import-Module SCOrchDev-PasswordVault -Force
Describe -Tags 'VersionChecks' 'SCOrchDev-PasswordVault manifest' {
$script:manifest = $null
It 'has a valid manifest' {
{
$scr... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/3.7.0/AzureRmProfileStartup.ps1 | AzureRmProfileStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/3.7.0/AzureRmNetworkStartup.ps1 | AzureRmNetworkStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/3.7.0/ResourceManagerStartup.ps1 | ResourceManagerStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/4.1.0/AzureRmProfileStartup.ps1 | AzureRmProfileStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/4.1.0/AzureRmNetworkStartup.ps1 | AzureRmNetworkStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/4.1.0/ResourceManagerStartup.ps1 | ResourceManagerStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/3.4.0/AzureRmProfileStartup.ps1 | AzureRmProfileStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Network/3.4.0/ResourceManagerStartup.ps1 | ResourceManagerStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.apach... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/AlertMonitoring/OMS.ps1 | OMS.ps1 | Set-StrictMode -Version Latest
function Set-AzSDKOMSSettings
{
<#
.SYNOPSIS
This command would help in updating the OMS configuration settings under the current powershell session.
.DESCRIPTION
This command will update the OMS Settings under the current powershell session. This also remembers the current se... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/SVT/SVT.ps1 | SVT.ps1 | Set-StrictMode -Version Latest
function Get-AzSDKAzureServicesSecurityStatus
{
<#
.SYNOPSIS
This command would help in validating the security controls for the Azure resources meeting the specified input criteria.
.DESCRIPTION
This command will execute the security controls and will validate their status a... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Framework.ps1 | Framework.ps1 | Set-StrictMode -Version Latest
# Hack to load AI dlls
try {Get-AzureRmContext -ErrorAction SilentlyContinue | Out-Null}catch {}
#Constants
. $PSScriptRoot\Helpers\Constants.ps1
#Models
. $PSScriptRoot\Models\Enums.ps1
. $PSScriptRoot\Models\AzSdkGenericEvent.ps1
. $PSScriptRoot\Abstracts\EventBase.ps1
... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/ServicesSecurityStatus.ps1 | ServicesSecurityStatus.ps1 | Set-StrictMode -Version Latest
class ServicesSecurityStatus: SVTCommandBase
{
[SVTResourceResolver] $Resolver = $null;
ServicesSecurityStatus([string] $subscriptionId, [InvocationInfo] $invocationContext, [SVTResourceResolver] $resolver):
Base($subscriptionId, $invocationContext)
{
if(-not $... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/SVTIaasBase.ps1 | SVTIaasBase.ps1 | Set-StrictMode -Version Latest
class SVTIaasBase: SVTBase
{
hidden [PSObject] $ResourceObject;
hidden [PSObject[]] $vNetNics;
hidden [PSObject[]] $vNetNicsOutput;
SVTIaasBase([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $r... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/SubscriptionSecurityStatus.ps1 | SubscriptionSecurityStatus.ps1 | Set-StrictMode -Version Latest
class SubscriptionSecurityStatus: SVTCommandBase
{
SubscriptionSecurityStatus([string] $subscriptionId, [InvocationInfo] $invocationContext):
Base($subscriptionId, $invocationContext)
{ }
hidden [SVTEventContext[]] RunAllControls()
{
[SVTEventContext[]] $resul... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/SVTStatusReport.ps1 | SVTStatusReport.ps1 | Set-StrictMode -Version Latest
class SVTStatusReport : SVTCommandBase
{
[SVTResourceResolver] $ServicesResolver = $null;
SVTStatusReport([string] $subscriptionId, [InvocationInfo] $invocationContext, [SVTResourceResolver] $resolver):
Base($subscriptionId, $invocationContext)
{
if(-not $resol... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/SVTControlAttestation.ps1 | SVTControlAttestation.ps1 | Set-StrictMode -Version Latest
class SVTControlAttestation
{
[SVTEventContext[]] $ControlResults = $null
hidden [bool] $dirtyCommitState = $false;
hidden [bool] $abortProcess = $false;
hidden [ControlStateExtension] $controlStateExtension = $null;
hidden [AttestControls] $AttestControlsChoice;
SVTCon... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/SVTResourceResolver.ps1 | SVTResourceResolver.ps1 | Set-StrictMode -Version Latest
class SVTResourceResolver: AzSdkRoot
{
[string] $ResourceName = "";
[string] $ResourceType = "";
[ResourceTypeName] $ResourceTypeName = [ResourceTypeName]::All;
[Hashtable] $Tag = $null;
[string] $TagName = "";
[string] $TagValue = "";
hidd... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/SubscriptionCore/SubscriptionCore.ps1 | SubscriptionCore.ps1 | #using namespace Microsoft.Azure.Commands.Search.Models
Set-StrictMode -Version Latest
class SubscriptionCore: SVTBase
{
hidden [AzureSecurityCenter] $ASCSettings
hidden [ManagementCertificate[]] $ManagementCertificates
hidden [PSObject] $RoleAssignments
hidden [PSObject] $ApprovedAdmins;
hidden [... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/ServiceFabric.ps1 | ServiceFabric.ps1 | Set-StrictMode -Version Latest
class ServiceFabric : SVTBase
{
hidden [PSObject] $ResourceObject;
hidden [string] $ClusterTagValue;
hidden [PSObject] $ApplicationList;
hidden [string] $DefaultTagName = "clusterName"
hidden [string] $CertStoreLocation = "CurrentUser"
hidden [string] $CertS... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/AnalysisServices.ps1 | AnalysisServices.ps1 | Set-StrictMode -Version Latest
class AnalysisServices: SVTBase
{
hidden [PSObject] $ResourceObject;
AnalysisServices([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
$this.GetResourceObj... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/NotificationHub.ps1 | NotificationHub.ps1 | #using namespace Microsoft.Azure.Commands.KeyVault.Models
Set-StrictMode -Version Latest
class NotificationHub: SVTBase
{
hidden [PSObject] $ResourceObject;
hidden [PSObject] $NamespaceObject;
NotificationHub([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/Search.ps1 | Search.ps1 | #using namespace Microsoft.Azure.Commands.Search.Models
Set-StrictMode -Version Latest
class Search: SVTBase
{
hidden [PSObject] $ResourceObject;
Search([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceNam... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/EventHub.ps1 | EventHub.ps1 | #using namespace Microsoft.Azure.Commands.EventHub.Models
Set-StrictMode -Version Latest
class EventHub: SVTBase
{
hidden [PSObject[]] $NameSpacePolicies;
hidden [PSObject[]] $EventHubs;
EventHub([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscr... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/VirtualMachine.ps1 | VirtualMachine.ps1 | using namespace Microsoft.Azure.Commands.Network.Models
using namespace Microsoft.Azure.Commands.Compute.Models
Set-StrictMode -Version Latest
class VirtualMachine: SVTBase
{
hidden [PSVirtualMachine] $ResourceObject;
hidden [PSNetworkInterface[]] $VMNICs = $null;
VirtualMachine([string] ... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/RedisCache.ps1 | RedisCache.ps1 | Set-StrictMode -Version Latest
class RedisCache: SVTBase
{
hidden [PSObject] $ResourceObject;
RedisCache([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
$this.GetResourceOb... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/CDN.ps1 | CDN.ps1 | Set-StrictMode -Version Latest
class CDN: SVTBase
{
hidden [PSObject] $ResourceObject;
CDN([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
}
CDN([string] $subscriptionId, [SVTResource] ... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/CloudService.ps1 | CloudService.ps1 | #
# CloudServices.ps1
#
Set-StrictMode -Version Latest
class CloudService: SVTBase
{
hidden [PSCloudService] $ResourceObject;
CloudService([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
$thi... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/Storage.ps1 | Storage.ps1 | using namespace Microsoft.Azure.Management.Storage.Models
using namespace Microsoft.WindowsAzure.Storage.Shared.Protocol
Set-StrictMode -Version Latest
class Storage: SVTBase
{
hidden [PSObject] $ResourceObject;
Storage([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceNam... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/Batch.ps1 | Batch.ps1 | Set-StrictMode -Version Latest
class Batch: SVTBase
{
Batch([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{ }
Batch([string] $subscriptionId, [SVTResource] $svtResource):
Base($subscr... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/ODG.ps1 | ODG.ps1 | #using namespace Microsoft.Azure.Commands.EventHub.Models
Set-StrictMode -Version Latest
class ODG: SVTBase
{
ODG([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
}
ODG([string] $subscript... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/DataLakeAnalytics.ps1 | DataLakeAnalytics.ps1 | Set-StrictMode -Version Latest
class DataLakeAnalytics: SVTBase
{
hidden [PSObject] $ResourceObject;
DataLakeAnalytics([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
$this.GetResou... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/DataFactory.ps1 | DataFactory.ps1 | #using namespace Microsoft.Azure.Commands.DataFactory.Models
Set-StrictMode -Version Latest
class DataFactory: SVTBase
{
DataFactory([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
}
Data... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/KeyVault.ps1 | KeyVault.ps1 | using namespace Microsoft.Azure.Commands.KeyVault.Models
Set-StrictMode -Version Latest
class KeyVault: SVTBase
{
hidden [PSVault] $ResourceObject;
KeyVault([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourc... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/SQLDatabase.ps1 | SQLDatabase.ps1 | using namespace Microsoft.Azure.Commands.Sql.Auditing.Model
using namespace Microsoft.Azure.Commands.Sql.ServerUpgrade.Model
using namespace Microsoft.Azure.Commands.Sql.TransparentDataEncryption.Model
using namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Model
Set-StrictMode -Version Latest
class SQLDat... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/VirtualNetwork.ps1 | VirtualNetwork.ps1 | #using namespace Microsoft.Azure.Commands.VirtualNetwork.Models
Set-StrictMode -Version Latest
class VirtualNetwork: SVTIaasBase
{
VirtualNetwork([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
}
Vi... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/TrafficManager.ps1 | TrafficManager.ps1 | Set-StrictMode -Version Latest
class TrafficManager : SVTBase
{
hidden [PSObject] $ResourceObject;
TrafficManager([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
}
TrafficManager([string] $subscr... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/AppService.ps1 | AppService.ps1 | #using namespace Microsoft.Azure.Commands.AppService.Models
Set-StrictMode -Version Latest
class AppService: SVTBase
{
hidden [PSObject] $ResourceObject;
hidden [PSObject] $WebAppDetails;
hidden [PSObject] $AuthenticationSettings;
hidden [bool] $IsReaderRole;
AppService([string] $subscriptionId, [s... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/ERvNet.ps1 | ERvNet.ps1 | #using namespace Microsoft.Azure.Commands.ExpressRouteVirtualNetwork.Models
Set-StrictMode -Version Latest
class ERvNet : SVTIaasBase
{
ERvNet([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/ServiceBus.ps1 | ServiceBus.ps1 | #using namespace Microsoft.Azure.Commands.ServiceBus.Models
Set-StrictMode -Version Latest
class ServiceBus: SVTBase
{
hidden [PSObject[]] $NameSpacePolicies;
hidden [PSObject[]] $Queues;
hidden [PSObject[]] $Topics;
ServiceBus([string] $subscriptionId, [string] $resourceGroupName, [string] $res... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/DataLakeStore.ps1 | DataLakeStore.ps1 | Set-StrictMode -Version Latest
class DataLakeStore: SVTBase
{
hidden [PSObject] $ResourceObject;
DataLakeStore([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
$this.GetResourceObjec... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SVT/Services/LogicApps.ps1 | LogicApps.ps1 | Set-StrictMode -Version Latest
class LogicAppControl
{
[string] $Name = ""
[string] $Automated = ""
[string] $MethodName = ""
[string] $Remarks = ""
}
class LogicAppApprovedConnector
{
[string] $connectorName = ""
[LogicAppControl[]] $ApplicableControls = @()
[LogicAppControl[]] $NotApplicableContro... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/AzureMonitoring/OMSMonitoring.ps1 | OMSMonitoring.ps1 | Set-StrictMode -Version Latest
class OMSMonitoring: AzSdkRoot
{
[string] $OMSSubCCViewTemplateFilepath;
[string] $OMSAppCCViewTemplateFilepath;
OMSMonitoring([string] $subscriptionId):
Base([string] $subscriptionId)
{
#$this.PublishRunIdentifier();
$OMSSubCCViewTemplateFile = $this.L... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/ContinuousCompliance/CCAutomation.ps1 | CCAutomation.ps1 | using namespace System.Management.Automation
Set-StrictMode -Version Latest
class CCAutomation: CommandBase
{
hidden [AutomationAccount] $AutomationAccount
hidden [Runbook[]] $Runbooks = @()
hidden [string] $RunbookName = "Continuous_Assurance_Runbook"
hidden [RunbookSchedule[]] $RunbookSchedules = @()
h... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SubscriptionSecurity/ARMPolicy.ps1 | ARMPolicy.ps1 | using namespace System.Management.Automation
Set-StrictMode -Version Latest
# Class to implement Subscription ARM Policy controls
class ARMPolicy: CommandBase
{
hidden [PSObject[]] $Policy = $null;
hidden [PSObject[]] $ApplicableARMPolicies = $null;
#hidden [PSObject[]] $PolicyAssignments = $null;
... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SubscriptionSecurity/SecurityCenterStatus.ps1 | SecurityCenterStatus.ps1 | using namespace System.Management.Automation
Set-StrictMode -Version Latest
# The class serves as an intermediate class to call SecurityCenter class
# SecurityCenter class is being used in SubscriptionCore
class SecurityCenterStatus: CommandBase
{
SecurityCenterStatus([string] $subscriptionId, [Invocation... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SubscriptionSecurity/Alerts.ps1 | Alerts.ps1 | using namespace System.Management.Automation
Set-StrictMode -Version Latest
# Class to implement Subscription alert controls
class Alerts: CommandBase
{
hidden [PSObject[]] $Policy = $null;
hidden [PSObject[]] $ApplicableAlerts = $null;
hidden [string] $TargetResourceGroup;
hidden [string] $Re... |
PowerShellCorpus/PowerShellGallery/AzSDKPreview/2.2.0/Framework/Core/SubscriptionSecurity/SubscriptionSecurity.ps1 | SubscriptionSecurity.ps1 | using namespace System.Management.Automation
Set-StrictMode -Version Latest
# The class serves as an intermediate class to call multiple subscription security module classes
class SubscriptionSecurity: CommandBase
{
[string] $Tags
SubscriptionSecurity([string] $subscriptionId, [InvocationInfo] $invocat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.