full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/NewPipeworksManifest.Icicle.ps1 | NewPipeworksManifest.Icicle.ps1 | @{
Command = (Get-Command New-PipeworksManifest)
#ShortcutKey = "CTRL + ALT + P"
}
|
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Clock.icicle.ps1 | Clock.icicle.ps1 | @{
Name = 'Clock'
Horizontal = $true
Screen = {
New-Border -Child {
New-Label "$(Get-Date | Out-String)" -FontSize 24 -FontFamily 'Lucida Console'
}
}
DataUpdate = {
Get-date
}
UiUpdate = {
$this.Content.Child.Content = $args | O... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/Navigation.Menu.ps1 | Navigation.Menu.ps1 | @{
"Push-CurrentFileLocation" = {Push-CurrentFileLocation} |
Add-Member NoteProperty ShortcutKey "CONTROL+ALT+D" -PassThru
"Close-AllOpenedFiles" = { Close-AllOpenedFiles } |
Add-Member NoteProperty ShortcutKey "CONTROL+SHIFT+F4" -PassThru
}
|
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/Invoke-History.ps1 | Invoke-History.ps1 | {
New-ListBox -MaxHeight 400 -MaxWidth 300 -ItemsSource @(Get-History) -On_MouseDoubleClick {
$window.Close()
} -ItemTemplate {
New-StackPanel -Orientation Horizontal {
$tbParams = @{MaxWidth=200;TextWrapping='Wrap'}
New-TextBlock @tbParams -Name 'Id'
New-Label " "
New-... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/QuickCode.ps1 | QuickCode.ps1 |
$myModule = Get-PSCallStack |
Where-Object { $_.InvocationInfo.MyCommand.Module } |
Select-Object -First 1 -ExpandProperty InvocationInfo |
Select-Object -ExpandProperty MyCommand |
Select-Object -ExpandProperty Module
@{
"Add-ForeachStatemnt" = {Add-ForeachStatement} |
Add-M... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/Add-InlineHelp.ps1 | Add-InlineHelp.ps1 | {
New-UniformGrid -MinWidth 250 -Columns 2 {
"Synopsis"
New-TextBox -Name Synopsis
"Description"
New-TextBox -Name Description
"Examples"
Edit-StringList -Name Examples
" "
New-Button "OK" -IsDefault -On_Click {
$parent | Set-UIValue -passThru
$parent.Tag = New-Object PSObject $pa... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/Show-Sparkplug.ps1 | Show-Sparkplug.ps1 | {
Start-SparkPlug
} |
Add-Member NoteProperty ShortcutKey "CONTROL+ALT+S" -PassThru |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/Show-AddOn.ps1 | Show-AddOn.ps1 | |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/IsePack.menu.ps1 | IsePack.menu.ps1 |
$myModule = Get-PSCallStack |
Where-Object { $_.InvocationInfo.MyCommand.Module } |
Select-Object -First 1 -ExpandProperty InvocationInfo |
Select-Object -ExpandProperty MyCommand |
Select-Object -ExpandProperty Module
$moduleRoot = Split-Path $myModule.Path
$iseMan= [ScriptBlock]::Cre... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Menus/Edit.Menu.ps1 | Edit.Menu.ps1 | $myModule = Get-PSCallStack |
Where-Object { $_.InvocationInfo.MyCommand.Module } |
Select-Object -First 1 -ExpandProperty InvocationInfo |
Select-Object -ExpandProperty MyCommand |
Select-Object -ExpandProperty Module
$moduleRoot = Split-Path $myModule.Path
$showHistoryIcicle= [ScriptBloc... |
PowerShellCorpus/PowerShellGallery/SCOrchDev-File/2.1.0/SCOrchDev-File.tests.ps1 | SCOrchDev-File.tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$manifestPath = "$here\SCOrchDev-File.psd1"
Import-Module $manifestPath -Force
Describe -Tags 'VersionChecks' 'SCOrchDev-File manifest' {
$script:manifest = $null
It 'has a valid manifest' {
{
$script:manifest = Test-ModuleMa... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/appveyor.build.ps1 | appveyor.build.ps1 | # Build script for AppVeyor
[System.Version]$buildNumber = $env:APPVEYOR_BUILD_NUMBER
[System.Version]$currentManifestVersion = (Import-LocalizedData -FileName Communary.PASM.psd1).ModuleVersion
if ($buildNumber -gt $currentManifestVersion) {
Update-ModuleManifest -Path .\Communary.PASM.psd1 -ModuleVersion $build... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-SorensenDiceDistance.ps1 | Get-SorensenDiceDistance.ps1 | function Get-SorensenDiceDistance {
<#
.SYNOPSIS
Get the Sorensen Dice Distance between two strings.
.DESCRIPTION
Uses the Sorensen Dice Coefficient to calculate the distance between two strings.
.EXAMPLE
Get-SorensenDiceDistance -String1 'night' -String2 ... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Select-FuzzyString.ps1 | Select-FuzzyString.ps1 | function Select-FuzzyString {
<#
.SYNOPSIS
Perform fuzzy string search.
.DESCRIPTION
This function lets you perform fuzzy string search, and will
calculate a score for each result found. This score can be used
to sort the results to get the most releva... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-LongestCommonSubsequence.ps1 | Get-LongestCommonSubsequence.ps1 | function Get-LongestCommonSubsequence {
<#
.SYNOPSIS
Get the longest common subsequence between two strings.
.DESCRIPTION
Get the longest common subsequence between two strings.
.EXAMPLE
Get-LongestCommonSubsequence -String1 'Pennsylvania' -String2 'pencil... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-OverlapCoefficient.ps1 | Get-OverlapCoefficient.ps1 | function Get-OverlapCoefficient {
<#
.SYNOPSIS
Get the Overlap Coefficient of two strings.
.DESCRIPTION
The overlap coefficient is a similarity measure related to the Jaccard index that measures the overlap between two sets,
and is defined as the size of the inter... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-LongestCommonSubstring.ps1 | Get-LongestCommonSubstring.ps1 | function Get-LongestCommonSubstring {
<#
.SYNOPSIS
Get the longest common substring of two strings.
.DESCRIPTION
Get the longest common substring of two strings.
.EXAMPLE
Get-LongestCommonSubstring 'Karolin' 'kathrin' -CaseSensitive
.LINK
... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-FuzzyMatchScore.ps1 | Get-FuzzyMatchScore.ps1 | <#
2016// Øyvind Kallstad (@okallstad)
#>
function Get-FuzzyMatchScore {
[CmdletBinding()]
param (
[Parameter(Position = 0)]
[string] $Search,
[Parameter(Position = 1)]
[string] $String
)
$score = 100
# Use approximate string matching to get some values needed ... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Compare-Soundex.ps1 | Compare-Soundex.ps1 | function Compare-Soundex {
<#
.SYNOPSIS
Compare two strings using Soundex to check for similarity.
.DESCRIPTION
This function will return true if two (english) words sound alike, and false otherwise.
.EXAMPLE
Compare-Soundex 'Johnny' 'Jonny'
Wi... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-JaroWinklerDistance.ps1 | Get-JaroWinklerDistance.ps1 | function Get-JaroWinklerDistance {
<#
.SYNOPSIS
Get the Jaro-Winkler distance between two strings.
.DESCRIPTION
The Jaro–Winkler distance (Winkler, 1990) is a measure of similarity between two strings.
It is a variant of the Jaro distance metric (Jaro, 1989, 1995)... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Compare-PasmAlgorithms.ps1 | Compare-PasmAlgorithms.ps1 | <#
2016// Øyvind Kallstad (@okallstad)
#>
function Compare-PasmAlgorithms {
[CmdletBinding()]
param (
[Parameter(Position = 0, Mandatory)]
[ValidateNotNullOrEmpty()]
[string] $String1,
[Parameter(Position = 1, Mandatory)]
[ValidateNotNullOrEmpty()]
[string] $... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-PasmScore.ps1 | Get-PasmScore.ps1 | <#
2016// Øyvind Kallstad (@okallstad)
#>
function Get-PasmScore {
[CmdletBinding()]
param (
[Parameter(Position = 0, Mandatory)]
[ValidateNotNullOrEmpty()]
[string] $String1,
[Parameter(Position = 1, Mandatory)]
[ValidateNotNullOrEmpty()]
[string] $String2,
... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-RatcliffObershelpSimilarity.ps1 | Get-RatcliffObershelpSimilarity.ps1 | function Get-RatcliffObershelpSimilarity {
<#
.SYNOPSIS
Get the Ratcliff/Obershelp Similarity between two strings.
.DESCRIPTION
The best way to describe the Ratcliff/Obershelp pattern-matching algorithm, in using conventional computer terminology,
is as a wild-car... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Select-SoundexString.ps1 | Select-SoundexString.ps1 | function Select-SoundexString {
<#
.SYNOPSIS
Perform soundex string matching.
.DESCRIPTION
This function lets you perform string matching using
the soundex algorithm. Note that this is only useful
for shorter strings.
.EXAMPLE
Selec... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-NGram.ps1 | Get-NGram.ps1 | function Get-NGram {
<#
.SYNOPSIS
Get the n-gram of a string.
.DESCRIPTION
An n-gram is a contiguous sequence of n items from a given sequence of text or speech.
.EXAMPLE
Get-NGram 'Pennsylvania'
.EXAMPLE
Get-NGram -String 'to be or not... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Select-ApproximateString.ps1 | Select-ApproximateString.ps1 | function Select-ApproximateString {
<#
.SYNOPSIS
Perform approximate string matching.
.DESCRIPTION
This function lets you perform string matching using
different approximate string matching algorithms.
.EXAMPLE
Select-ApproximateString -Search ... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-JaccardDistance.ps1 | Get-JaccardDistance.ps1 | function Get-JaccardDistance {
<#
.SYNOPSIS
Get the Jaccard Distance between two strings.
.DESCRIPTION
The Jaccard distance, which measures dissimilarity between sample sets, is complementary to the
Jaccard coefficient and is obtained by subtracting the Jaccard co... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-Union.ps1 | Get-Union.ps1 | function Get-Union {
<#
.SYNOPSIS
Get the union of two sets.
.DESCRIPTION
This function returns all distinct elements of two sets, also called the union of two sets.
.EXAMPLE
Get-Union (1,10,2,1) (1,2,3)
.EXAMPLE
Get-Union 'John' 'Ronny... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-TypeName.ps1 | Get-TypeName.ps1 | function Get-TypeName {
param ($InputObject)
Write-Output (($InputObject | Get-Member).TypeName | Select-Object -Unique)
} |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-SorensenDiceCoefficient.ps1 | Get-SorensenDiceCoefficient.ps1 | function Get-SorensenDiceCoefficient {
<#
.SYNOPSIS
Get the Sorensen Dice Coefficient of two strings.
.DESCRIPTION
The Sørensen–Dice index, is a statistic used for comparing the similarity of two samples.
.EXAMPLE
Get-SorensenDiceCoefficient -String1 'nigh... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-Soundex.ps1 | Get-Soundex.ps1 | function Get-Soundex {
<#
.SYNOPSIS
Get the soundex code of a string.
.DESCRIPTION
Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English.
The goal is for homophones to be encoded to the same representation so that they can be matche... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-LevenshteinDistance.ps1 | Get-LevenshteinDistance.ps1 | function Get-LevenshteinDistance {
<#
.SYNOPSIS
Get the Levenshtein distance between two strings.
.DESCRIPTION
The Levenshtein Distance is a way of quantifying how dissimilar two strings (e.g., words) are to one another by counting the minimum number of operations required to... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-Intersection.ps1 | Get-Intersection.ps1 | function Get-Intersection {
<#
.SYNOPSIS
Get the intersection of two sets.
.DESCRIPTION
In mathematics, the intersection A ∩ B of two sets A and B is the set that
contains all elements of A that also belong to B, but no other elements.
.EXAMPLE
... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-JaccardIndex.ps1 | Get-JaccardIndex.ps1 | function Get-JaccardIndex {
<#
.SYNOPSIS
Get the Jaccard Index of two strings.
.DESCRIPTION
The Jaccard index, also known as the Jaccard similarity coefficient, measures similarity between finite sample sets,
and is defined as the size of the intersection divided ... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-CommonPrefix.ps1 | Get-CommonPrefix.ps1 | function Get-CommonPrefix {
<#
.SYNOPSIS
Find the common prefix of two strings.
.DESCRIPTION
This function will get the common prefix of two strings; that is, all
the letters that they share, starting from the beginning of the strings.
.EXAMPLE
... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-HammingDistance.ps1 | Get-HammingDistance.ps1 | function Get-HammingDistance {
<#
.SYNOPSIS
Get the Hamming Distance between two strings or two positive integers.
.DESCRIPTION
The Hamming distance between two strings of equal length is the number of positions at which the
corresponding symbols are different. In... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Functions/Get-CommonSuffix.ps1 | Get-CommonSuffix.ps1 | function Get-CommonSuffix {
<#
.SYNOPSIS
Find the common suffix of two strings.
.DESCRIPTION
This function will get the common suffix of two strings; that is, all
the letters that they share, starting from the end of the strings.
.EXAMPLE
Get-C... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Tests/examples.ps1 | examples.ps1 | # Examples of use
$countries = Import-Csv .\countries.csv | Select-Object -ExpandProperty Name
$names = Get-Content .\names.txt
Write-Host ''
Write-Host '$countries | Select-FuzzyString uga' -ForegroundColor Green
$countries | Select-FuzzyString uga | Out-String
Write-Host '$countries | Select-FuzzyString uga | Sor... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Tests/PASM.Tests.ps1 | PASM.Tests.ps1 | Import-Module $PSScriptRoot\..\Communary.PASM.psd1 -Force
InModuleScope 'Communary.PASM' {
Describe 'Approximate String Matching algorithms' {
It 'Overlap Coefficient' {
[decimal](Get-OverlapCoefficient 'Pennsylvania' 'Pencilvaneya') | Should BeExactly ([decimal]0.666666666666667)
}
... |
PowerShellCorpus/PowerShellGallery/Communary.PASM/1.0.43/Tests/appveyor.pester.ps1 | appveyor.pester.ps1 | # https://github.com/RamblingCookieMonster/PSStackExchange/blob/master/Tests/appveyor.pester.ps1
# This script will invoke pester tests
# It should invoke on PowerShell v2 and later
# We serialize XML results and pull them in appveyor.yml
#If Finalize is specified, we collect XML output, upload tests, and indicate bu... |
PowerShellCorpus/PowerShellGallery/cComputerManagement/1.1.1/Examples/Sample_cComputer_WorkGroupToDomain.ps1 | Sample_cComputer_WorkGroupToDomain.ps1 | # A simple configuration to join a workgroup computer to a domain
Configuration Sample_cComputer_WorkgroupToDomain
{
param
(
[string[]]$NodeName="localhost",
[Parameter(Mandatory)]
[string]$MachineName,
[Parameter(Mandatory)]
[string]$Domain,
[Pa... |
PowerShellCorpus/PowerShellGallery/cComputerManagement/1.1.1/Examples/Sample_cComputer_ChangeNameInWorkGroup.ps1 | Sample_cComputer_ChangeNameInWorkGroup.ps1 | # A configuration to change the machine name within the same workgroup
configuration Sample_cComputer_ChangeNameInWorkgroup
{
param
(
[string[]]$NodeName="localhost",
[Parameter(Mandatory)]
[string]$MachineName
)
#Import the required DSC Resources
Import... |
PowerShellCorpus/PowerShellGallery/cComputerManagement/1.1.1/Examples/Sample_cComputer_ChangeNameAndWorkgroup.ps1 | Sample_cComputer_ChangeNameAndWorkgroup.ps1 | # A configuration to change the machine workgroup and its name
Configuration Sample_cComputer_ChangeNameAndWorkGroup
{
param
(
[string[]]$NodeName="localhost",
[Parameter(Mandatory)]
[string]$MachineName,
[Parameter(Mandatory)]
[string]$WorkGroupN... |
PowerShellCorpus/PowerShellGallery/cComputerManagement/1.1.1/Examples/Sample_cComputer_ChangeNameInDomain.ps1 | Sample_cComputer_ChangeNameInDomain.ps1 | # A configuration to change machine while in the same domain
Configuration Sample_cComputer_ChangeNameInDomain
{
param
(
[string[]]$NodeName="localhost",
[Parameter(Mandatory)]
[string]$MachineName,
[Parameter(Mandatory)]
[pscredential]$Credential
)
... |
PowerShellCorpus/PowerShellGallery/cComputerManagement/1.1.1/Examples/Sample_cComputer_DomainToWorkgroup.ps1 | Sample_cComputer_DomainToWorkgroup.ps1 | # A configuration to move a machine from a Domain to a WorkGroup -- note: a credential is required
Configuration Sample_cComputer_DomainToWorkgroup
{
param
(
[string[]]$NodeName="localhost",
[Parameter(Mandatory)]
[string]$MachineName,
[Parameter(Mandatory)]
... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/CreateModuleManifest.ps1 | CreateModuleManifest.ps1 | $FunctionsToExport = @(
'Get-VstsProject',
'New-VstsProject',
'Remove-VstsProject',
'Get-VstsWorkItem',
'New-VstsWorkItem',
'Get-VstsWorkItemQuery',
'Get-VstsCodePolicy',
'New-VstsCodePolicy',
'New-VstsGitRepository',
'Get-VstsGitRepository',
'New-VstsSession',
'Get-VstsProcess',
'Get-VstsBuild',
'Get-VstsBuildDefiniti... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/PublishModule.ps1 | PublishModule.ps1 | if ($env:APPVEYOR_REPO_BRANCH -eq 'master'-and $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)
{
choco install NuGet.CommandLine
Install-PackageProvider -Name NuGet -Force
Publish-Module -NuGetApiKey $env:ApiKey -Path C:\VSTS -Confirm:$False -Verbose
} |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/InvokeTests.ps1 | InvokeTests.ps1 | if ($PSVersionTable.PSVersion.Major -ge 5)
{
Write-Verbose -Verbose "Installing PSScriptAnalyzer"
$PSScriptAnalyzerModuleName = "PSScriptAnalyzer"
Install-PackageProvider -Name NuGet -Force
Install-Module -Name $PSScriptAnalyzerModuleName -Scope CurrentUser -Force
$PSScriptAnalyzerModule = get-mod... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/Tests/Code.tests.ps1 | Code.tests.ps1 | $userName = $env:VSTSPoshUserName
$token = $env:VSTSPoshToken
$account = $env:VSTSPoshAccount
function New-ProjectName {
[Guid]::NewGuid().ToString().Replace('-','').Substring(10)
}
Import-Module (Join-Path $PSScriptRoot '..\VSTS.psm1') -Force
Describe "Code" -Tags "Integration" {
$ProjectName = New-ProjectName
... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/Tests/Builds.tests.ps1 | Builds.tests.ps1 | $userName = $env:VSTSPoshUserName
$token = $env:VSTSPoshToken
$account = $env:VSTSPoshAccount
function New-ProjectName {
[Guid]::NewGuid().ToString().Replace('-','').Substring(10)
}
Import-Module (Join-Path $PSScriptRoot '..\VSTS.psm1') -Force
Describe "Builds" -Tags "Integration" {
$ProjectName = New-ProjectName... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/Tests/WorkItems.tests.ps1 | WorkItems.tests.ps1 | $userName = $env:VSTSPoshUserName
$token = $env:VSTSPoshToken
$account = $env:VSTSPoshAccount
function New-ProjectName {
[Guid]::NewGuid().ToString().Replace('-','').Substring(10)
}
Import-Module (Join-Path $PSScriptRoot '..\VSTS.psm1') -Force
Describe "Work items" -Tags "Integration" {
$ProjectName = New-Project... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/Tests/Unit.tests.ps1 | Unit.tests.ps1 | Describe "VSTS" -Tags Unit {
Context 'PSScriptAnalyzer' {
It "passes Invoke-ScriptAnalyzer" {
if ($PSVersionTable.PSVersion.Major -ge 5)
{
# Perform PSScriptAnalyzer scan.
# Using ErrorAction SilentlyContinue not to cause it to fail due to parse errors caused by unresolved resources.
# Ma... |
PowerShellCorpus/PowerShellGallery/VSTS/1.0.141/Tests/Projects.tests.ps1 | Projects.tests.ps1 | $userName = $env:VSTSPoshUserName
$token = $env:VSTSPoshToken
$account = $env:VSTSPoshAccount
function New-ProjectName {
[Guid]::NewGuid().ToString().Replace('-','').Substring(10)
}
Import-Module (Join-Path $PSScriptRoot '..\VSTS.psm1') -Force
Describe "Projects" -Tags Integration {
Context "Project doesn't exist... |
PowerShellCorpus/PowerShellGallery/UpdateInstalledModule/1.0/init.ps1 | init.ps1 |
# use this file to define global variables on module scope
# or perform other initialization procedures.
# this file will not be touched when new functions are exported to
# this module.
|
PowerShellCorpus/PowerShellGallery/UpdateInstalledModule/1.0/Update-InstalledModule.ps1 | Update-InstalledModule.ps1 | function Update-InstalledModule {
<#
.SYNOPSIS
This function updates one or more modules that were installed from the PowerShell gallery if newer versions are available. It accepts pipeline input for the module name as well as an array of names.
It wraps the PowerShellGet function Update-Modul... |
PowerShellCorpus/PowerShellGallery/UpdateInstalledModule/1.0/Get-PublishedModuleVersion.ps1 | Get-PublishedModuleVersion.ps1 | function Get-PublishedModuleVersion
{
<#
.SYNOPSIS
Takes a module name and searches the Powershell gallery for its current version number. It accepts pipeline input for the module name. Matches are returned as custom objects with a Name and a Version property.
.DESCRIPTION
When using G... |
PowerShellCorpus/PowerShellGallery/PFCore/0.1.22/PFCore-Text.ps1 | PFCore-Text.ps1 |
<#
.Synopsis
Convert an array or flat text with columns to an object with properties matching the column names.
.Description
Convert an array or flat text with columns to an object with properties matching the column names.
.Example
Example:
$data= @"
DRIVER VOLUME NAME
local ... |
PowerShellCorpus/PowerShellGallery/PFCore/0.1.22/PFCore-File.ps1 | PFCore-File.ps1 | <#
.Synopsis
Get a list of path segments from the top to the root folder.
.Description
Get a list of path segments from the top to the root folder.
.Example
Get-ParentPathSegments "c:\windows\system32"
#Should return
# c:\windows\system32
# c:\windows
# c:
#>
function Get-ParentP... |
PowerShellCorpus/PowerShellGallery/PFCore/0.1.22/PFCore-Hash.ps1 | PFCore-Hash.ps1 | <#
.Synopsis
Merge to hashtables together. Note: Second hash overrides the first.
.Description
Merge to hashtables together. Note: Second hash overrides the first.
.Example
$a = @{"key1"="value1";"key2"="fred"}
$b = @{"key1"="value2"}
Merge-Hash $a $b
#Should return key1=value2 & key2=f... |
PowerShellCorpus/PowerShellGallery/PFCore/0.1.22/PFCore-Object.ps1 | PFCore-Object.ps1 | <#
.Synopsis
Implement a Using / IDisposable statement from C# in PowerShell.
.Description
Implement a Using / IDisposable statement from C# in PowerShell.
http://weblogs.asp.net/adweigert/powershell-adding-the-using-statement
.Example
# Short example ...
Using ($user = $sr.GetDirectoryEnt... |
PowerShellCorpus/PowerShellGallery/PFCore/0.1.22/PFCore-Security.ps1 | PFCore-Security.ps1 | #($Directory, $Certificate, $Include)
function Invoke-SignChildren
{
Param(
[Parameter(Position=0)]
$Directory,
[Parameter(Position=1)]
$Certificate = $(throw "The parameter -Certificate is required."),
[Parameter(Position=2)]
$Include
)
Push-Location ... |
PowerShellCorpus/PowerShellGallery/WSManTrust/0.1.45.0/WSManTrust.Tests.ps1 | WSManTrust.Tests.ps1 | #Requires -Modules Pester
<#
.SYNOPSIS
Tests the WSMan Trust module
.EXAMPLE
Invoke-Pester
.NOTES
This script originated from work found here: https://github.com/kmarquette/PesterInAction
#>
# TODO Maybe the top of the file should have a hashtable of commands and their parameters?
$here = Split-Path -Pa... |
PowerShellCorpus/PowerShellGallery/PoshPctBar/0.2.1/Public/New-PercentBar.ps1 | New-PercentBar.ps1 | #requires -Version 2
function New-PercentBar
{
<#
.SYNOPSIS
Creates a new Percentage Bar.
.DESCRIPTION
The New-PercentBar cmdlet creates a new Percentage Bar, a visual representation of an quanity out of 100.
The percentage bar is returned as a string with a borde... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVApplicationObjectPropertyFromDelta.ps1 | Get-NAVApplicationObjectPropertyFromDelta.ps1 | <#
.Synopsis
Gets object properties from a Delta File
.DESCRIPTION
Get-NAVApplicationObject alternative for DELTA files.
.EXAMPLE
.EXAMPLE
$NAVObjects = get-item $Deltafiles | Get-NAVApplicationObjectPropertyFromDelta
#>
function Get-NAVApplicationObjectPropertyFromDelta
{
param
(
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Unlock-NAVApplicationObjects.ps1 | Unlock-NAVApplicationObjects.ps1 | function Unlock-NAVApplicationObjects
{
param(
[String] $ServerInstance
)
$ServerInstanceObject = Get-NAVServerInstanceDetails -ServerInstance $ServerInstance
$DatabaseServer = $ServerInstanceObject.DatabaseServer
if (!([string]::IsNullOrEmpty($ServerInstanceObject.DatabaseInstance))... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/New-NAVVersionJobManager.ps1 | New-NAVVersionJobManager.ps1 | function New-NAVVersionJobManager {
<#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
$cDef =
@"
using System.Collections.Generic;
public class NAVVersionJobManager
{
//public List<NAVVersionModule> NAVVersionModuleList = new List... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Release-NAVVersionList.ps1 | Release-NAVVersionList.ps1 | function Release-NAVVersionList
{
<#
.Synopsis
Arrange NAV VersionList and provide a new ProductVersion
.DESCRIPTION
<TODO: why would I need it?>
.NOTES
<TODO: Some tips>
.PREREQUISITES
<TODO: like positioning the prompt and such>
#>
param (
[... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Import-NAVModules.ps1 | Import-NAVModules.ps1 | function Import-NAVModules {
<#
.SYNOPSIS
Find and import NAV modules globally.
.DESCRIPTION
Find and import all NAV modules available in the predefined paths.
If multiple module versions present, non-GUI dialog will be shown to let a user select the desired desired v... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Backup-NAVDatabase.ps1 | Backup-NAVDatabase.ps1 | function Backup-NAVDatabase
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$True, ValueFromPipelineByPropertyname=$true)]
[System.String]
$ServerInstance,
[Parameter(Mandatory=$false)]
[int]
$TimeOut=0
)
begin {
$nul... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Copy-NAVTenant.ps1 | Copy-NAVTenant.ps1 | function Copy-NAVTenant
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=0)]
[System.String]
$ServerInstance,
[Parameter(Mandatory=$true, Position=1)]
[System.String]
$CopyFromTenantID,
[Parameter(Mandator... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVObjectFilter.ps1 | Get-NAVObjectFilter.ps1 | #included functions
function Get-NAVObjectFilter
{
[CmdletBinding()]
param (
[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[String]$ObjectType,
[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[Object]$ObjectCollection
)
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVFinStxHash.ps1 | Get-NAVFinStxHash.ps1 | Function Get-NAVFinStxHash{
if (!$NAVIde){
$finstx = (Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft Dynamics NAV" -Recurse | where Name -like fin.stx).FullName
if (!$finstx){
write-error 'Module "Microsoft.Dynamics.Nav.Model.Tools" has not been loaded. Please load this module.'
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/New-NAVEnvironment.ps1 | New-NAVEnvironment.ps1 | function New-NAVEnvironment {
[CmdletBinding()]
param(
[String]$ServerInstance,
[String]$DatabaseServer='.',
[String]$DatabaseInstance='',
[String]$Databasename='',
[String]$BackupFile,
[switch]$EnablePortSharing,
[Switch]$StartWindowsClient,
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVServerInstance3.ps1 | Get-NAVServerInstance3.ps1 | function Get-NAVServerInstance3
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$false, Position=0)]
[System.String]
$ServerInstance
)
process {
$ServerInstanceObjects = Get-NAVServerInstance -ServerInstance $ServerInstance
foreach ... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVServerConfiguration2.ps1 | Get-NAVServerConfiguration2.ps1 | function Get-NAVServerConfiguration2
{
[CmdletBinding()]
param (
[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[String]$ServerInstance
)
BEGIN
{
$ResultObjectArray = @()
}
PROCESS
{
$CurrentServerIn... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Add-NAVEnvironmentCurrentUser.ps1 | Add-NAVEnvironmentCurrentUser.ps1 | Function Add-NAVEnvironmentCurrentUser {
<#
.Synopsis
Adds the current user (PowerShell User) to a certain ServerInstance
.DESCRIPTION
Adds the current user (PowerShell User) to a certain ServerInstance
.NOTES
Default PermissionSetId is 'SUPER'
.EXAMPLE
Add-N... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Start-NAVWebClient.ps1 | Start-NAVWebClient.ps1 | function Start-NAVWebClient
{
[cmdletbinding()]
param(
[Parameter(Mandatory=$true)]
[String]$WebServerInstance,
[ValidateSet('Web','Tablet','Phone')]
[String]$WebClientType='Web'
)
$WebClientUri = (Get-NAVWebServerInstance -WebServerInstance $WebServerI... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Copy-NAVEnvironment.ps1 | Copy-NAVEnvironment.ps1 | function Copy-NAVEnvironment
{
<#
.SYNOPSIS
Copy a NAV Environment.
.DESCRIPTION
Copy a NAV Environment, based on ServerInstance
- Database Backup
- Database Restore
- Enable Port Sharing
- Set up new serverinstance
.EXAM... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Start-NAVTableInWindowsClient.ps1 | Start-NAVTableInWindowsClient.ps1 | function Start-NAVTableInWindowsClient
{
[cmdletbinding()]
param(
[string]$ServerName,
[int]$Port=7046,
[String]$ServerInstance,
[String]$Companyname,
[string]$tenant='default',
[String]$TableID
)
if ([string]::IsNullOrEmpty($Companyna... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Remove-NAVEnvironment.ps1 | Remove-NAVEnvironment.ps1 | function Remove-NAVEnvironment
{
[CmdletBinding()]
param
(
[Parameter(ValueFromPipelineByPropertyName=$true,Mandatory=$true, Position=0)]
[System.String]
$ServerInstance,
[Parameter(Mandatory=$false, Position=1)]
[Switch] $Force,
[Parameter(Man... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVServerInstance4.ps1 | Get-NAVServerInstance4.ps1 | #Source: a comment from "olivier" on my blog: http://www.waldo.be/2015/09/23/dynamics-nav-powershell-creating-an-enhanced-get-navserverinstance-function/
#Author: Olivier (from Christiaens (Belgium))
#Original function name: Get-NAVServerConfig
function Get-NAVServerInstance4
{
[CmdletBinding()]
Param
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Start-NAVApplicationObjectInWindowsClient.ps1 | Start-NAVApplicationObjectInWindowsClient.ps1 | function Start-NAVApplicationObjectInWindowsClient
{
[cmdletbinding()]
param(
[string]$ServerName=[net.dns]::Gethostname(),
[int]$Port=7046,
[String]$ServerInstance,
[String]$Companyname,
[string]$Tenant='default',
[ValidateSet('Table','Page','Report'... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Start-NAVVersionModuleSearch.ps1 | Start-NAVVersionModuleSearch.ps1 | function Start-NAVVersionModuleSearch {
<#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
$Scripts = @()
$Scripts += Get-NAVModuleVersionSearchJobTask 'Microsoft.Dynamics.Nav.Management.psm1' 'Microsoft.Dynamics.Nav.Management.dll' 'NAV Management'
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Add-NAVUsersFromAD.ps1 | Add-NAVUsersFromAD.ps1 | function Add-NAVUsersFromAD {
<#
.Synopsis
Adds user based on AD search to a certain ServerInstance
.DESCRIPTION
Adds user based on AD search to a certain ServerInstance. The function has two principal steps.
The first one will traverse through AD elements (OUs, containers, g... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Backup-NAVApplicationObjects.ps1 | Backup-NAVApplicationObjects.ps1 | function Backup-NAVApplicationObjects
{
<#
.Synopsis
Creates Delta's, fob, txt files by providing Original and Modified databases, and path
.DESCRIPTION
To create every single possible export of your developments
.NOTES
It creates:
- Deltas
- Reversed Del... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Select-NAVVersion.ps1 | Select-NAVVersion.ps1 | function Select-NAVVersion {
<#
.SYNOPSIS
Show non-GUI dialog and let the user select NAV version.
.DESCRIPTION
Show non-GUI dialog and let a user select NAV version (if multiple versions present).
.EXAMPLE
#>
[CmdletBinding()]
param (
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Start-NAVIdeClient.ps1 | Start-NAVIdeClient.ps1 | function Start-NAVIdeClient
{
[cmdletbinding()]
param(
[String]$ServerInstance,
[string]$ServerName=([net.dns]::GetHostName()),
[String]$Database
)
if ([string]::IsNullOrEmpty($NavIde)) {
Write-Error 'Please load the AMU (NavModelTools) to be able to u... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVServerInstanceDetails.ps1 | Get-NAVServerInstanceDetails.ps1 | <#
.Synopsis
Get all details from an NAV ServerInstance
.DESCRIPTION
Combination of the output of Get-NAVServerInstance and Get-NAVServerConfiguration
.NOTES
Use only when needed - slower as the original CmdLets
.PREREQUISITES
Use Microsoft.Dynamics.NAV.Management module
#>
function Get-NAVServe... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVModuleVersions.ps1 | Get-NAVModuleVersions.ps1 | function Get-NAVModuleVersions {
<#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[String]$navModuleName,
[parameter(Mandatory=$true)]
[Strin... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Unzip-NAVCumulativeUpdateDownload.ps1 | Unzip-NAVCumulativeUpdateDownload.ps1 | function Unzip-NAVCumulativeUpdateDownload
{
[CmdletBinding()]
Param
(
# The full source-filepath of the file that should be unzipped
[Parameter(Mandatory=$true)]
$SourcePath,
# The full Destionation-path where it should be unzipped
[String] $DestinationPa... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Enable-NAVServerInstancePortSharing.ps1 | Enable-NAVServerInstancePortSharing.ps1 | function Enable-NAVServerInstancePortSharing
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyname=$true)]
[System.String]
$ServerInstance
)
process {
$ServiceName = (get-navserverinstance -ServerInstance $ServerInstance).Se... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVServerInstance2.ps1 | Get-NAVServerInstance2.ps1 | function Get-NAVServerInstance2
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$false, Position=0)]
[System.String]
$ServerInstance
)
process {
$ServerInstanceObjects = Get-NAVServerInstance -ServerInstance $ServerInstance
foreach ... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Get-NAVModuleVersionSearchJobTask.ps1 | Get-NAVModuleVersionSearchJobTask.ps1 | function Get-NAVModuleVersionSearchJobTask {
<#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[String]$navModuleName,
[parameter(Mandatory=$true)]
[String]$nav... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/ConvertTo-NAVMultiTenantEnvironment.ps1 | ConvertTo-NAVMultiTenantEnvironment.ps1 | function ConvertTo-NAVMultiTenantEnvironment
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=0)]
[System.String]
$ServerInstance,
[Parameter(Mandatory=$false, Position=1)]
[System.String]
$MainTenantId,
[... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Set-NAVUidOffset.ps1 | Set-NAVUidOffset.ps1 | function Set-NAVUidOffset {
<#
.Synopsis
Set the UidOffSet of a certain database from a certain instance
.DESCRIPTION
The UIDOffSet is important to control the "controlids" of the controls you create during development. With this
.NOTES
<TODO: Some tips>
.PREREQUISI... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Start-NAVWindowsClient.ps1 | Start-NAVWindowsClient.ps1 | function Start-NAVWindowsClient
{
[cmdletbinding()]
param(
[Parameter(Mandatory=$true)]
[String]$ServerInstance,
[string]$ServerName=([net.dns]::gethostname()),
[int]$Port=7046,
[String]$Companyname,
[string]$tenant='default'
)
$Server... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/ManagementPortal/New-NAVManagedPortalTenant.ps1 | New-NAVManagedPortalTenant.ps1 | #Source: How Do I: Use Microsoft DYnamics NAV Management Portal Web Services with PowerShell
#https://mbspartner.microsoft.com/NAV/Videos/753
Function New-NAVManagedPortalTenant {
param(
[PSCredential] $Credential,
[String] $ApplicationServiceName,
[String] $Tenant,
[String]... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/ManagementPortal/New-NAVManagedPortalTenantUser.ps1 | New-NAVManagedPortalTenantUser.ps1 | #Source: How Do I: Use Microsoft DYnamics NAV Management Portal Web Services with PowerShell
#https://mbspartner.microsoft.com/NAV/Videos/753
Function New-NAVManagedPortalTenantUser {
param(
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyname=$true)]
[String] $Username,
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Apps/Deploy-NAVXPackage.ps1 | Deploy-NAVXPackage.ps1 | function Deploy-NAVXPackage
{
<#
.Synopsis
Easily deploy a navx file to a serverInstance
.DESCRIPTION
If the App already exist, it will uninstall it
.NOTES
.PREREQUISITES
#>
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true)]
... |
PowerShellCorpus/PowerShellGallery/Cloud.Ready.Software.NAV/1.0.0.8/Apps/New-NAVAppPermissionSet.ps1 | New-NAVAppPermissionSet.ps1 | function New-NAVAppPermissionSet
{
<#
.SYNOPSIS
To quickly create (and overwrite any existing) Permission Set.
.DESCRIPTION
This function is going to delete the existing Permission set, and overwrite it with the corresponding settings.
Usually used for automation the c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.