full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PoshCode/e9e42994-6ca4-4473-bf6b-148b56a46132.ps1 | e9e42994-6ca4-4473-bf6b-148b56a46132.ps1 | Coresponding to the Scripting Guy blog "How Can I Both Save Information in a File and Display It on the Screen?"
(http://blogs.technet.com/heyscriptingguy/archive/2009/07/07/hey-scripting-guy-how-can-i-both-save-information-in-a-file-and-display-it-on-the-screen.aspx):
My comment is:
All of the above is cool but can... |
PowerShellCorpus/PoshCode/CTP3_ Watch Folder.ps1 | CTP3_ Watch Folder.ps1 | #requires -version 2.0
# Example
#
# ps> . .\\watch-folder.ps1
# ps> watch-folder c:\\temp
# ps> "foo" > c:\\temp\\test.txt
# ps> $table
# ps> (shows changes)
function watch-folder {
param([string]$folder)
$fsw = new-object System.IO.FileSystemWatcher
$fsw.Path = $folder
# st... |
PowerShellCorpus/PoshCode/VMware Host Network Info_1.ps1 | VMware Host Network Info_1.ps1 | # Set the VI Server and Filename before running
Connect-VIServer MYVISERVER
$filename = "C:\\DetailedNetworkInfo.csv"
Write "Gathering VMHost objects"
$vmhosts = Get-VMHost | Sort Name | Where-Object {$_.State -eq "Connected"} | Get-View
$MyCol = @()
foreach ($vmhost in $vmhosts){
$ESXHost = $vmhost.Name
Wr... |
PowerShellCorpus/PoshCode/Set-Encoding_1.ps1 | Set-Encoding_1.ps1 | function Set-Encoding{
<#
.Synopsis
Takes a Script file or any other text file into memory and Re-Encodes it in the format specified.
.Parameter Source
The path to the file to be re-encoded.
.Parameter Destination
The path to write the corrected file to
.Parameter Encoding
The encoding to convert ... |
PowerShellCorpus/PoshCode/Split-TextToLines Demo.ps1 | Split-TextToLines Demo.ps1 | function Show-LineArrayStructure ($lines)
{
$len = $lines.length
"Type is: $($lines.gettype().Name)"
"Number of lines: $len"
for ($i = 0; $i -lt $len; $i++)
{
"$($i + 1). Line: length $($lines[$i].length) >$($lines[$i])<"
}
''
}
$text = "abc`r`nefg`... |
PowerShellCorpus/PoshCode/wget 1.0.ps1 | wget 1.0.ps1 | # ---------------------------------------------------------------------------
### <Script>
### <Author>
### Joel "Jaykul" Bennett
### </Author>
### <Description>
### Downloads a file from the web to the specified file path.
### </Description>
### <Usage>
### Get-URL http://huddledmasses.org/downloads/RunOnlyOn... |
PowerShellCorpus/PoshCode/Set-RDPSetting.ps1 | Set-RDPSetting.ps1 | ########################################################################################################################
# NAME
# Set-RDPSetting
#
# SYNOPSIS
# Adds or updates a named property to an existing RDP file.
#
# SYNTAX
# Edit-RDP [-Path] <string> [-Name] <string> [[-Value] <object>] [-Pass... |
PowerShellCorpus/PoshCode/Invoke-BPAModeling.ps1 | Invoke-BPAModeling.ps1 | <#
NAME: Invoke-BPAModeling.ps1
AUTHOR: Jan Egil Ring
EMAIL: jer@powershell.no
COMMENT: Script to invoke Best Practices Analyzer on remote computers.
Requires Windows Server 2008 R2 on target computers, and Windows PowerShell 2.0 on the computer running the script from.
F... |
PowerShellCorpus/PoshCode/List AD Attributes_1.ps1 | List AD Attributes_1.ps1 | $forest = [DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
$Schema = $forest.schema
$Properties = $Schema.FindAllProperties()
foreach($property in $Properties)
{
"#################################"
"Name: {0}" -f $property.Name
"Link: {0}" -f $property.link
"LinkID: {0}" -f $prope... |
PowerShellCorpus/PoshCode/MailChimp .ps1 | MailChimp .ps1 | #Author: Ant B 2012
#Purpose: Batch feed recipients to MailChimp
# Check for ActiveDirectory Module and load if it isn't already.
if ( (Get-Module -Name ActiveDirectory -ErrorAction SilentlyContinue) -eq $null )
{
Import-Module ActiveDirectory
}
$ie = new-object -com "InternetExplorer.Application"
# V... |
PowerShellCorpus/PoshCode/Reflection Module _1.5.ps1 | Reflection Module _1.5.ps1 | #requires -version 2.0
# ALSO REQUIRES Autoload for some functionality (Latest version: http://poshcode.org/3173)
# You should create a Reflection.psd1 with the contents:
# @{ ModuleToProcess="Reflection.psm1"; RequiredModules = @("Autoload"); GUID="64b5f609-970f-4e65-b02f-93ccf3e60cbb"; ModuleVersion="4.5.0.0" ... |
PowerShellCorpus/PoshCode/Search-CertificateStore..ps1 | Search-CertificateStore..ps1 | ##############################################################################\n##\n## Search-CertificateStore\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\n... |
PowerShellCorpus/PoshCode/Save-Credentials_4.ps1 | Save-Credentials_4.ps1 | <#
.SYNOPSIS
The script saves a username and password, encrypted with a custom key to to a file.
.DESCRIPTION
The script saves a username and password, encrypted with a custom key to to a file. The key is coded into the script but should be changed before use. The key allows the password to be decrypted ... |
PowerShellCorpus/PowerShellGallery/ServerOpsMenu/0.1.1/Private/New-Menu.ps1 | New-Menu.ps1 | $title = 'Server Operations Tasks'
$path = 'ServerOpsMenu.xml'
$hash = [ordered]@{
'Get Services' = {Get-CimInstance Win32_Service | Select-Object 'DisplayName','Name','StartMode','State','Status' | Format-Table -AutoSize}
'Restart Service' = {Get-Service (Read-Host 'Service Name') | Restart-Service -Conf... |
PowerShellCorpus/PowerShellGallery/ServerOpsMenu/0.1.1/Private/Get-MOTD.ps1 | Get-MOTD.ps1 | Function Get-MOTD {
<#
.NAME
Get-MOTD
.SYNOPSIS
Displays system information to a host.
.DESCRIPTION
The Get-MOTD cmdlet is a system information tool written in PowerShell.
.EXAMPLE
.VERSION
0.1.0
#>
[CmdletBinding()]
Param (
[Parameter(
Manda... |
PowerShellCorpus/PowerShellGallery/ServerOpsMenu/0.1.1/Public/Invoke-Menu.ps1 | Invoke-Menu.ps1 | Function Invoke-Menu {
<#
.SYNOPSIS
.DESCRIPTION
.PARAMETER Name
.EXAMPLE
.EXAMPLE
.VERSION
0.1.0
#>
[cmdletbinding()]
Param (
... |
PowerShellCorpus/PowerShellGallery/ServerOpsMenu/0.1.1/Tests/IHGServerOps.Tests.ps1 | IHGServerOps.Tests.ps1 | ̀ |
PowerShellCorpus/PowerShellGallery/OpenWeatherMap/2.1.0/Run-Tests.ps1 | Run-Tests.ps1 | $PesterVersion = '3.4.2'
# Save-module locally
Save-Module -Name Pester -Path '.modules\' -RequiredVersion $PesterVersion
# Copy custom assertions
Copy-Item -Path '.\Assertions\*.ps1' -Destination ".\.modules\Pester\$PesterVersion\Functions\Assertions"
# Import local Pester module so we can extend built-in a... |
PowerShellCorpus/PowerShellGallery/OpenWeatherMap/2.1.0/OpenWeatherMap.Tests.ps1 | OpenWeatherMap.Tests.ps1 | Import-Module OpenWeatherMap -Force
######## Test Values ##########
$TestUnixTimestamp = 1471017423
# TODO Replace with raw JSON from file
$RawWeatherMain = @{
temp = 60;
temp_min = 50;
temp_max = 70
}
$RawWeatherConditions = @(@{
id = 500;
description = 'light rain';
})
$RawWea... |
PowerShellCorpus/PowerShellGallery/OpenWeatherMap/2.1.0/profile.example.ps1 | profile.example.ps1 | # Import module from current folder
Import-Module .\OpenWeatherMap
# Import weather from global module path ($env:PSModulePath)
# Import-Module OpenWeatherMap
Function Write-LocalWeatherCurrent([switch]$Inline) {
# Replace city and API key
Write-WeatherCurrent -City Minneapolis -ApiKey xxx -Units impe... |
PowerShellCorpus/PowerShellGallery/OpenWeatherMap/2.1.0/Assertions/BeDate.ps1 | BeDate.ps1 | Function PesterBeDate($Value, $Expected) {
$Expected = [System.DateTime]::Parse($Expected)
$Value.Year | Should Be $Expected.Year
$Value.Month | Should Be $Expected.Month
$Value.Day | Should Be $Expected.Day
$Value.Hour | Should Be $Expected.Hour
$Value.Minute | Should Be $Expe... |
PowerShellCorpus/PowerShellGallery/posh-vpn/0.1.3/Get-VPNProfile.ps1 | Get-VPNProfile.ps1 | function Get-AnyConnectProfile() # {{{
{
[CmdletBinding()]
[OutputType([string[]])]
Param(
)
Write-Verbose "Starting the AnyConnect cli"
$vpncli = New-Object System.Diagnostics.Process
$vpncli.StartInfo = New-Object System.Diagnostics.ProcessStartInfo(Get-AnyConnect)
$vpncli.StartInfo.Arguments = "hosts... |
PowerShellCorpus/PowerShellGallery/posh-vpn/0.1.3/Install.ps1 | Install.ps1 | [CmdletBinding()]
Param(
[Parameter(Position=1, Mandatory=$false)]
$Path
)
$ModuleName = 'Posh-VPN'
$ModuleVersion = '0.1.3'
$GithubRoot = "https://raw.githubusercontent.com/gildas/posh-vpn/$ModuleVersion"
if ([string]::IsNullOrEmpty($Path))
{
$my_modules = Join-Path ([Environment]::GetFolde... |
PowerShellCorpus/PowerShellGallery/posh-vpn/0.1.3/Get-AnyConnect.ps1 | Get-AnyConnect.ps1 | function Get-AnyConnect() # {{{
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$false)]
[Alias('ui', 'graphics')]
[switch] $gui
)
$AnyConnectPath = Join-Path ${env:ProgramFiles(x86)} (Join-Path 'Cisco' 'Cisco AnyConnect Secure Mobility Client')
if (Test-Path $AnyConnectPath)
{
if ($gui) {... |
PowerShellCorpus/PowerShellGallery/posh-vpn/0.1.3/Get-VPNStatus.ps1 | Get-VPNStatus.ps1 | function Get-AnyConnectStatus() # {{{
{
[CmdletBinding()]
[OutputType([string])]
Param(
[Parameter(Mandatory=$false)]
[PSCustomObject] $VPNSession
)
Write-Verbose "Starting the AnyConnect cli"
$vpncli = New-Object System.Diagnostics.Process
$vpncli.StartInfo = New-Object System.Diagnostics.Process... |
PowerShellCorpus/PowerShellGallery/posh-vpn/0.1.3/Disconnect-VPN.ps1 | Disconnect-VPN.ps1 | function Disconnect-AnyConnect() # {{{
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$false)]
[PSCustomObject] $VPNSession
)
Write-Verbose "Starting the VPN cli"
$vpncli = New-Object System.Diagnostics.Process
$vpncli.StartInfo = New-Object System.Diagnostics.ProcessStartInfo(Get-AnyConnect)
$vp... |
PowerShellCorpus/PowerShellGallery/posh-vpn/0.1.3/Connect-VPN.ps1 | Connect-VPN.ps1 | function Connect-AnyConnect() # {{{
{
[CmdletBinding(DefaultParameterSetName='Credential')]
[OutputType([PSCustomObject])]
Param(
[Parameter(Position=1, Mandatory=$true)]
[Alias("Server")]
[string] $ComputerName,
[Parameter(Position=2, ParameterSetName='Credential', Mandatory=$true)]
[System.M... |
PowerShellCorpus/PowerShellGallery/Mdbc/4.8.9/Scripts/Update-MongoFiles.ps1 | Update-MongoFiles.ps1 |
<#
.Synopsis
Updates the file system snapshot database.
.Description
Server: local, database: test, collections: files, files_log
Module: Mdbc <https://github.com/nightroman/Mdbc>
The script scans the specified directory tree, updates file and directory
documents, and then removes orphan documents whi... |
PowerShellCorpus/PowerShellGallery/Mdbc/4.8.9/Scripts/Mdbc.ps1 | Mdbc.ps1 |
<#
.Synopsis
Mdbc module helpers.
.Description
NOTE: This script is a profile for interactive use, it reflects personal
preferences, features may not be suitable for all scenarios and they may
change. Consider this as the base for your own interactive profile.
The script imports the module, sets alias... |
PowerShellCorpus/PowerShellGallery/Mdbc/4.8.9/Scripts/Mdbc.ArgumentCompleters.ps1 | Mdbc.ArgumentCompleters.ps1 |
<#
.Synopsis
Argument completers for Mdbc commands.
.Description
The script registers Mdbc completers for command parameters:
Connect-Mdbc
-DatabaseName ..
-CollectionName ..
Add-MdbcData
New-MdbcData
Export-MdbcData
-Property .., ..
Completers can be used with:
* PowerShel... |
PowerShellCorpus/PowerShellGallery/Mdbc/4.8.9/Scripts/Get-MongoFile.ps1 | Get-MongoFile.ps1 |
<#
.Synopsis
Gets file paths from the file system snapshot database.
.Description
Requires: Mdbc module
Server: local
Database: test
Collection: files (default)
The script searches for file paths by a regular expression pattern or a
name. It works with data created by Update-MongoFiles.ps1.
.Pa... |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/build.ps1 | build.ps1 | param (
[string]$path = ".\",
[string]$type = "Debug"
)
#Registry Key path for .net framework 4.x.x
[string]$keyPath = "HKLM:\Software\Microsoft\NET Framework Setup\NDP\v4\Full"
#Release number for .net framework 4.6.x on windows 10 systems.
[string]$requiredVersion = "393295"
#Release numbers for .net... |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew.Tests/PSDropbin.Tests.ps1 | PSDropbin.Tests.ps1 |
if(!(Test-Path variable:PsDropbinTesting)) {
try {
$sessionName = "$PSCommandPath Session"
$testSession = New-PSSession -Name $sessionName -SessionOption (New-PSSessionOption -NoMachineProfile) -EnableNetworkAccess
Context "Invoking a new session" {
Invoke-Command -Sessi... |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew.Tests/CopyFileItem.Tests.ps1 | CopyFileItem.Tests.ps1 | |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew/Move-Item.ps1 | Move-Item.ps1 | None |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew/SetupProvider.ps1 | SetupProvider.ps1 | Import-Module "$psscriptroot\PSDropbin.psd1"
Set-DropboxCredential
Remove-Module PSDropbin
Import-Module "$psscriptroot\PSDropbin.psd1" |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew/Copy-Item.ps1 | Copy-Item.ps1 | None |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew/pushRelease.ps1 | pushRelease.ps1 | param(
[string]$version = "v1.0",
#[string]$prerelease = "false",
#[string]$draft= "false",
[string]$info = ""
)
#Paths & FileNames
[string]$choco = "Chocolatey\"
[string]$tools = "tools\"
[string]$installFile = "ChocolateyInstall.ps1"
[string]$uninstallFile = "ChocolateyUninstall.ps1"
[str... |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew/New-DropboxDrive.ps1 | New-DropboxDrive.ps1 | None |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/PSDropNew/packages/Newtonsoft.Json.6.0.6/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/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/bin/Move-Item.ps1 | Move-Item.ps1 | None |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/bin/PSDropbin.Tests.ps1 | PSDropbin.Tests.ps1 |
if(!(Test-Path variable:PsDropbinTesting)) {
try {
$sessionName = "$PSCommandPath Session"
$testSession = New-PSSession -Name $sessionName -SessionOption (New-PSSessionOption -NoMachineProfile) -EnableNetworkAccess
Context "Invoking a new session" {
Invoke-Command -Sessi... |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/bin/CopyFileItem.Tests.ps1 | CopyFileItem.Tests.ps1 | |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/bin/SetupProvider.ps1 | SetupProvider.ps1 | Import-Module "$psscriptroot\PSDropbin.psd1"
Set-DropboxCredential
Remove-Module PSDropbin
Import-Module "$psscriptroot\PSDropbin.psd1" |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/bin/Copy-Item.ps1 | Copy-Item.ps1 | None |
PowerShellCorpus/PowerShellGallery/IntelliTect.PSDropbin/0.7.1.0/bin/New-DropboxDrive.ps1 | New-DropboxDrive.ps1 | None |
PowerShellCorpus/PowerShellGallery/EnvironmentCheckToolkit/2.0/PackageInvoke-Sample.ps1 | PackageInvoke-Sample.ps1 | Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Write-Output "Nuget Installation done"
if(Test-Path "$PSScriptRoot\EnvironmentCheckToolkit\")
{
Remove-Item "$PSScriptRoot\EnvironmentCheckToolkit\*" -Recurse -Force
}
Save-Module -Name EnvironmentCheckToolkit -Path $PSScriptRoot
... |
PowerShellCorpus/PowerShellGallery/EnvironmentCheckToolkit/2.0/CheckEnvironment.ps1 | CheckEnvironment.ps1 | param(
[Parameter(Mandatory = $false)]
[String]
$FilePath,
[Parameter(Mandatory = $false)]
$ParamTable
)
function DbObjectValidation{
param
(
[Parameter(Mandatory = $true)]
$DbConnection,
[Parameter(Mandatory = $true)]
[String]
$Typ... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/valentia.ps1 | valentia.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Get ACL from selected source path.
.DESCRIPTION
You can get ACL information from selected source path.
This is same logic as gACLResource.
.NOTES
Author: guitarrapc
Created: 3/Sep/2014
.EXAMPLE
Get-ValentiaACL -Path c:\Deployment -Account Users
-----------------... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Type.ps1 | Type.ps1 | #Requires -Version 3.0
#-- Public Class load for Asynchronous execution (MultiThread) --#
Add-Type @'
public class AsyncPipeline
{
public System.Management.Automation.PowerShell Pipeline ;
public System.IAsyncResult AsyncResult ;
}
'@
#-- PublicEnum for CredRead/Write Type --#
Add-Type -TypeDefini... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Type/Type.ps1 | Type.ps1 | #Requires -Version 3.0
#-- Public Class load for Asynchronous execution (MultiThread) --#
Add-Type @'
public class AsyncPipeline
{
public System.Management.Automation.PowerShell Pipeline ;
public System.IAsyncResult AsyncResult ;
}
'@
#-- PublicEnum for CredRead/Write Type --#
Add-Type -TypeDefini... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Config/valentia-config.ps1 | valentia-config.ps1 | #-- Public Loading Module Parameters (Recommend to use ($valentia.defaultconfigurationfile) for customization) --#
# contains context for default.
$valentia.context.push(
@{
executedTasks = New-Object System.Collections.Stack;
callStack = New-Object System.... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Windows/Set-ValentiaHostName.ps1 | Set-ValentiaHostName.ps1 | #Requires -Version 3.0
#-- Prerequisite OS Setting Module Functions --#
# rename
<#
.SYNOPSIS
Change Computer name as specified usage.
.DESCRIPTION
To control hosts, set prefix for each client with IPAddress octets.
.NOTES
Author: guitarrapc
Created: 18/Jul/2013
.EXAMPLE
Set-valentiaHostName -H... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Windows/Get-ValentiaRebootRequiredStatus.ps1 | Get-ValentiaRebootRequiredStatus.ps1 | #Requires -Version 3.0
#-- Prerequisite OS Setting Module Functions --#
<#
.SYNOPSIS
Get reboot require status for client
.DESCRIPTION
When Windows Update or Change Hostname event is done, it will requires reboot to take change effect.
You can obtain reboot required status with this cmdlet.
.NOTES
Aut... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Windows/Private/Test-ValentiaPowerShellElevated.ps1 | Test-ValentiaPowerShellElevated.ps1 | #Requires -Version 3.0
#-- Helper function --#
#-- Check Current PowerShell session is elevated or not --#
<#
.SYNOPSIS
Retrieve elavated status of PowerShell Console.
.DESCRIPTION
Test-ValentiaPowerShellElevated will check shell was elevated is required for some operations access to system folde... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/CleanupVariables/Invoke-ValentiaClean.ps1 | Invoke-ValentiaClean.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
# clean
<#
.SYNOPSIS
Clean up valentia task variables.
.DESCRIPTION
Clear valentia variables for each task, and remove then.
valentia only keep default variables after this cmdlet has been run.
.NOTES
Author: guitarrapc
Created: 13/Jul/2013
.EXAM... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/CleanupVariables/Invoke-ValentiaCleanResult.ps1 | Invoke-ValentiaCleanResult.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
# cleanResult
<#
.SYNOPSIS
Clean up valentia task previous result.
.DESCRIPTION
Clear valentia last result.
.NOTES
Author: guitarrapc
Created: 13/Jul/2013
.EXAMPLE
Invoke-ValentiaCleanResult
#>
function Invoke-ValentiaCleanResult
{
[Cmdle... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Folder/New-ValentiaFolder.ps1 | New-ValentiaFolder.ps1 | #Requires -Version 3.0
#-- Prerequisite Deploy Setting Module Functions --#
<#
.SYNOPSIS
Configure Deployment Path
.DESCRIPTION
This cmdlet will create valentis deploy folders for each Branch path.
.NOTES
Author: guitarrapc
Created: 18/Jul/2013
.EXAMPLE
New-valentiaFolder
------------------------... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/DynamicParam/New-ValentiaDynamicParamMulti.ps1 | New-ValentiaDynamicParamMulti.ps1 | #Requires -Version 3.0
#-- function helper for Dynamic Param --#
<#
.SYNOPSIS
This cmdlet will return Dynamic param dictionary
.DESCRIPTION
You can use this cmdlet to define Dynamic Param
.NOTES
Author: guitrrapc
Created: 02/03/2014
.EXAMPLE
function Show-ValentiaDynamicParamMulti
{
[CmdletB... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Group/Get-ValentiaGroup.ps1 | Get-ValentiaGroup.ps1 | #Requires -Version 3.0
#-- Deploy Folder/File Module Functions --#
# target
<#
.SYNOPSIS
Get ipaddress or NetBIOS from DeployGroup File specified
.DESCRIPTION
This cmdlet will read Deploy Group path and set them into array of Deploygroups.
.NOTES
Author: guitarrapc
Created: 18/Jul/2013
.EXAMPLE
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Group/New-ValentiaGroup.ps1 | New-ValentiaGroup.ps1 | #Requires -Version 3.0
#-- Deploy Folder/File Module Functions --#
<#
.SYNOPSIS
Create new DeployGroup File written "target PC IP/hostname" for PS-RemoteSession
.DESCRIPTION
This cmdlet will create valentis deploy group file to specify deploy targets.
.NOTES
Author: guitarrapc
Created: 18/Jul/2013
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Group/Invoke-ValentiaDeployGroupUnremark.ps1 | Invoke-ValentiaDeployGroupUnremark.ps1 | #Requires -Version 3.0
#-- Deploy Folder/File Module Functions --#
# ipunremark
<#
.SYNOPSIS
Unremark Deploy ip from deploygroup file
.DESCRIPTION
This cmdlet unremark deploygroup ipaddresses from $valentia.root\$valentia.branch.deploygroup to refer the ipaddress.
.NOTES
Author: guitarrapc
Created:... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Group/Show-ValentiaGroup.ps1 | Show-ValentiaGroup.ps1 | #Requires -Version 3.0
#-- Deploy Folder/File Module Functions --#
<#
.SYNOPSIS
Show valentia deploygroup file (.ps1) list
.DESCRIPTION
This cmdlet will show files (extension = $valentia.deployextension = default is '.ps1') in [ValentiaBranchPath]::Deploygroup folder.
.NOTES
Author: guitarrapc
Created... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Group/Invoke-ValentiaDeployGroupRemark.ps1 | Invoke-ValentiaDeployGroupRemark.ps1 | #Requires -Version 3.0
#-- Deploy Folder/File Module Functions --#
# ipremark
<#
.SYNOPSIS
Remark Deploy ip from deploygroup file
.DESCRIPTION
This cmdlet remark deploygroup ipaddresses from $valentia.root\$valentia.branch.deploygroup not to refer the ipaddress
.NOTES
Author: guitarrapc
Created: 04... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/SymbolicLink/Remove-ValentiaSymbolicLink.ps1 | Remove-ValentiaSymbolicLink.ps1 | #Requires -Version 3.0
#-- SymbolicLink Functions --#
<#
.SYNOPSIS
This function will Remove only SymbolicLink items.
.DESCRIPTION
PowerShell SymbolicLink function. Alternative to mklink Symbolic Link.
This function detect where input file fullpath item is file/directory SymbolicLink, then only remove if ... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/SymbolicLink/Get-ValentiaSymbolicLink.ps1 | Get-ValentiaSymbolicLink.ps1 | #Requires -Version 3.0
#-- SymbolicLink Functions --#
<#
.SYNOPSIS
This function will detect only SymbolicLink items.
.DESCRIPTION
PowerShell SymbolicLink function. Alternative to mklink Symbolic Link.
This function detect where input file fullpath item is file/directory SymbolicLink, then only Ennumerate... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/SymbolicLink/Set-ValentiaSymbolicLink.ps1 | Set-ValentiaSymbolicLink.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
This function will Set SymbolicLink items for desired Path.
.DESCRIPTION
PowerShell SymbolicLink function. Alternative to mklink Symbolic Link.
This function will create Symbolic Link for input file fullpath.
Also it works as like LINQ Zip method for different number item... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/SymbolicLink/Test-ValentiaSymbolicLink.ps1 | Test-ValentiaSymbolicLink.ps1 | #Requires -Version 3.0
#-- SymbolicLink Functions --#
<#
.SYNOPSIS
This function will Test whether target path is Symbolic Link or not.
.DESCRIPTION
If target is Symbolic Link (reparse point), function will return $true.
Others, return $false.
.NOTES
Author: guitarrapc
Created: 12/Feb/2015
.EXAMPL... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Credential/Set-ValentiaCredential.ps1 | Set-ValentiaCredential.ps1 | #Requires -Version 3.0
function Set-ValentiaCredential
{
[OutputType([void])]
[CmdletBinding()]
param
(
[Parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$TargetName = $valentia.name,
[Parameter(mandatory = $false, position = 1... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Credential/Test-ValentiaCredential.ps1 | Test-ValentiaCredential.ps1 | #Requires -Version 3.0
function Test-ValentiaCredential
{
[OutputType([bool])]
[CmdletBinding()]
param
(
[Parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$TargetName = $valentia.name,
[Parameter(mandatory = $false, position = ... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Credential/Remove-ValentiaCredential.ps1 | Remove-ValentiaCredential.ps1 | #Requires -Version 3.0
function Remove-ValentiaCredential
{
[OutputType([void])]
[CmdletBinding()]
param
(
[Parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$TargetName = $valentia.name,
[Parameter(mandatory = $false, position ... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Credential/Get-ValentiaCredential.ps1 | Get-ValentiaCredential.ps1 | #Requires -Version 3.0
function Get-ValentiaCredential
{
[OutputType([PSCredential])]
[CmdletBinding()]
param
(
[Parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$TargetName = $valentia.name,
[Parameter(mandatory = $false, posi... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/HostOutput/Write-ValentiaVerboseDebug.ps1 | Write-ValentiaVerboseDebug.ps1 | #Requires -Version 3.0
#-- helper for write verbose and debug --#
<#
.SYNOPSIS
Pass to write-verbose / debug for input.
.DESCRIPTION
You can show same message for verbose and debug.
.NOTES
Author: guitarrapc
Created: 16/Feb/2014
.EXAMPLE
"hoge" | Write-ValentiaVerboseDebug
-----------------------... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Location/Set-ValentiaLocation.ps1 | Set-ValentiaLocation.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
# go
<#
.SYNOPSIS
Move location to valentia folder
.DESCRIPTION
You can specify branch path in configuration.
If you changed from default, then change validation set for BranchPath for intellisence.
.NOTES
Author: guitarrapc
Created: 13/Jul/2013
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/User/New-ValentiaOSUser.ps1 | New-ValentiaOSUser.ps1 | #Requires -Version 3.0
#-- Prerequisite OS Setting Module Functions --#
<#
.SYNOPSIS
Create New Local User for Deployment
.DESCRIPTION
Deployment will use deploy user account credential to avoid any change for administartor.
You must add all this user credential for each clients.
# User Flag Property S... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Log/New-ValentiaLog.ps1 | New-ValentiaLog.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
#-- Log Settings -- #
<#
.SYNOPSIS
Setup Valentia Log Folder
.DESCRIPTION
Check Valentia Log folder and return log full path
.NOTES
Author: guitarrapc
Created: 18/Sep/2013
.EXAMPLE
New-ValentiaLog -LogFolder c:\logs\deployment -LogFile "hoge.log"... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Log/Out-ValentiaResult.ps1 | Out-ValentiaResult.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
#-- End Result Execution -- #
function Out-ValentiaResult
{
[CmdletBinding()]
param
(
[parameter(mandatory = $true)]
[System.Diagnostics.Stopwatch]$StopWatch,
[parameter(mandatory = $true)]
[string]$Cmdlet,
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Log/Private/WriteValentiaResultHost.ps1 | WriteValentiaResultHost.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
#-- Log Output Result Settings -- #
function WriteValentiaResultHost
{
[CmdletBinding()]
param
(
[parameter(mandatory = $true)]
[bool]$quiet,
[parameter(mandatory = $true)]
[System.Collections.Specialized.Ord... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Log/Private/OutValentiaModuleLogHost.ps1 | OutValentiaModuleLogHost.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
# - Out Log and Host -#
filter OutValentiaModuleLogHost
{
[CmdletBinding(DefaultParameterSetName = "message")]
param
(
[parameter(mandatory = $false, position = 0, valuefromPipeline = 1, ValuefromPipelineByPropertyName = 1)]
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Log/Private/OutValentiaResultLog.ps1 | OutValentiaResultLog.ps1 | #Requires -Version 3.0
#-- Helper for valentia --#
#-- Log Output Result Settings -- #
function OutValentiaResultLog
{
[CmdletBinding()]
param
(
[parameter(mandatory = $true)]
[System.Collections.Specialized.OrderedDictionary]$CommandResult,
[parameter(mandatory = $fa... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Prerequisites/Private/Set-ValentiaInvokationPrerequisites.ps1 | Set-ValentiaInvokationPrerequisites.ps1 | #Requires -Version 3.0
#-- Helper for valentia Invokation Prerequisite setup--#
function Set-ValentiaInvokationPrerequisites
{
[CmdletBinding()]
param
(
[parameter(mandatory = $true)]
[System.Diagnostics.Stopwatch]$StopWatch,
[Parameter(Position = 0, mandatory = $true)... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Prerequisites/Private/Push-ValentiaCurrentContextToTask.ps1 | Push-ValentiaCurrentContextToTask.ps1 | #Requires -Version 3.0
#-- Public Module Functions to load Task --#
# Task
<#
.SYNOPSIS
Execute Task and push into CurrentContext
.NOTES
Author: guitarrapc
Created: 31/July/2014
.EXAMPLE
Push-ValentiaCurrentContextToTask -ScriptBlock $scriptBlock -TaskFileName $TaskFileName
#>
function Push-Valen... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/ACL/Test-ValentiaACL.ps1 | Test-ValentiaACL.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Test ACL from selected source path.
.DESCRIPTION
You can Test ACL information to selected source path.
This is same logic as gACLResource.
.NOTES
Author: guitarrapc
Created: 3/Sep/2014
.EXAMPLE
Test-ValentiaACL -Path c:\Deployment -Account Users -Rights Modify -E... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/ACL/Get-ValentiaACL.ps1 | Get-ValentiaACL.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Get ACL from selected source path.
.DESCRIPTION
You can get ACL information from selected source path.
This is same logic as gACLResource.
.NOTES
Author: guitarrapc
Created: 3/Sep/2014
.EXAMPLE
Get-ValentiaACL -Path c:\Deployment -Account Users
-----------------... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/ACL/Set-ValentiaACL.ps1 | Set-ValentiaACL.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Set ACL from selected source path.
.DESCRIPTION
You can Set ACL information to selected source path.
This is same logic as gACLResource.
.NOTES
Author: guitarrapc
Created: 3/Sep/2014
.EXAMPLE
Set-ValentiaACL -Path c:\Deployment -Account Users -Rights Modify -Ensu... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/ACL/Private/IsDesiredRuleAndCurrentRuleSame.ps1 | IsDesiredRuleAndCurrentRuleSame.ps1 | #Requires -Version 3.0
function IsDesiredRuleAndCurrentRuleSame
{
[OutputType([Bool])]
[CmdletBinding()]
param
(
[System.Security.AccessControl.FileSystemAccessRule]$DesiredRule,
[System.Security.AccessControl.AuthorizationRuleCollection]$CurrentRules,
[bool]$Strict
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/ACL/Private/GetDesiredRule.ps1 | GetDesiredRule.ps1 | #Requires -Version 3.0
function GetDesiredRule
{
[OutputType([System.Security.AccessControl.FileSystemAccessRule])]
[CmdletBinding()]
param
(
[Parameter(mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]$Path,
[Parameter(mandatory = $true)]
[Va... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Sed/Invoke-ValentiaSed.ps1 | Invoke-ValentiaSed.ps1 | #Requires -Version 3.0
#-- Deploy Folder/File Module Functions --#
<#
.SYNOPSIS
PowerShell Sed alternate function
.DESCRIPTION
This cmdlet replace string in the file as like as sed on linux
.NOTES
Author: guitarrapc
Created: 04/Oct/2013
.EXAMPLE
Invoke-ValentiaSed -path D:\Deploygroup\*.ps1 -searc... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/FireWall/Firewall/New-ValentiaPSRemotingFirewallRule.ps1 | New-ValentiaPSRemotingFirewallRule.ps1 | #Requires -Version 3.0
#-- Prerequisite OS Setting Module Functions --#
<#
.SYNOPSIS
Create New Firewall Rule for PowerShell Remoting
.DESCRIPTION
Will allow PowerShell Remoting port for firewall
.NOTES
Author: guitarrapc
Created: 18/Jul/2013
.EXAMPLE
Enable-PSRemotingFirewallRule
---------------... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Config/Backup-valentiaConfig.ps1 | Backup-valentiaConfig.ps1 | #requires -Version 3.0
function Backup-ValentiaConfig
{
<#
.Synopsis
Backup CurrentConfiguration with timestamp.
.DESCRIPTION
Backup configuration in $Valentia.appdataconfig.root
.EXAMPLE
Backup-ValentiaConfig
#>
[OutputType([void])]
[CmdletBinding()]
param
(
[paramet... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Config/Show-ValentiaConfig.ps1 | Show-ValentiaConfig.ps1 | #Requires -Version 3.0
<#
.Synopsis
Show Valentia Config in Console
.DESCRIPTION
Read config and show in the console
.EXAMPLE
Show-ValentiaConfig
#>
function Show-ValentiaConfig
{
[OutputType([string[]])]
[CmdletBinding()]
param
(
[parameter(mandatory = $false, position... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Config/Reset-ValentiaConfig.ps1 | Reset-ValentiaConfig.ps1 | #Requires -Version 3.0
<#
.Synopsis
Edit Valentia Config in Console
.DESCRIPTION
Read config and edit in the console
.EXAMPLE
Edit-ValentiaConfig
#>
function Reset-ValentiaConfig
{
[OutputType([void])]
[CmdletBinding()]
param
(
[parameter(mandatory = $false, position = ... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Config/Edit-ValentiaConfig.ps1 | Edit-ValentiaConfig.ps1 | #Requires -Version 3.0
<#
.Synopsis
Edit Valentia Config in Console
.DESCRIPTION
Read config and edit in the console
.EXAMPLE
Edit-ValentiaConfig
#>
function Edit-ValentiaConfig
{
[OutputType([void])]
[CmdletBinding()]
param
(
[parameter(mandatory = $false, position = 0... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Get-ValentiaCertificateFromCert.ps1 | Get-ValentiaCertificateFromCert.ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Get-ValentiaCertificateFromCert
{
[CmdletBinding()]
param
(
[parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$CN = $valentia.certificate.CN,
[parameter(manda... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Convert-ValentiaEncryptPassword .ps1 | Convert-ValentiaEncryptPassword .ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Convert-ValentiaEncryptPassword
{
param
(
[parameter(mandatory = $true, position = 0, ValueFromPipeline = 1, ValueFromPipelineByPropertyName = 1)]
[ValidateNotNullOrEmpty()]
[pscredential[]]$Credential,
... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Convert-ValentiaDecryptPassword .ps1 | Convert-ValentiaDecryptPassword .ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Convert-ValentiaDecryptPassword
{
param
(
[parameter(mandatory = $true, position = 0, ValueFromPipeline = 1, ValueFromPipelineByPropertyName = 1)]
[ValidateNotNullOrEmpty()]
[string]$EncryptedKey,
[p... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Export-ValentiaCertificatePFX.ps1 | Export-ValentiaCertificatePFX.ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Export-ValentiaCertificatePFX
{
[CmdletBinding()]
param
(
[parameter(mandatory = $true, position = 0, ValueFromPipeline = 1, ValueFromPipelineByPropertyName = 1)]
[ValidateNotNullOrEmpty()]
[System.Security.... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Remove-ValentiaCertificate.ps1 | Remove-ValentiaCertificate.ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Remove-ValentiaCertificate
{
[CmdletBinding()]
param
(
[parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$CN = $valentia.certificate.CN,
[parameter(mandatory = $fals... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Export-ValentiaCertificate.ps1 | Export-ValentiaCertificate.ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Export-ValentiaCertificate
{
[CmdletBinding()]
param
(
[parameter(mandatory = $true, position = 0, ValueFromPipeline = 1, ValueFromPipelineByPropertyName = 1)]
[ValidateNotNullOrEmpty()]
[System.Security.Cry... |
PowerShellCorpus/PowerShellGallery/valentia/0.5.2.3/Functions/Helper/Certificate/Show-ValentiaCertificate.ps1 | Show-ValentiaCertificate.ps1 | #Requires -Version 3.0
#-- Helper for certificate --#
function Show-ValentiaCertificate
{
[CmdletBinding()]
param
(
[parameter(mandatory = $false, position = 0)]
[ValidateNotNullOrEmpty()]
[string]$CN = $valentia.certificate.CN,
[parameter(mandatory = $false,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.