full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/Carbon/2.4.1/Functions/Enable-IisSecurityAuthentication.ps1
Enable-IisSecurityAuthentication.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/Carbon/2.4.1/Functions/Set-ServiceAcl.ps1
Set-ServiceAcl.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/Carbon/2.4.1/Functions/Protect-String.ps1
Protect-String.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/Carbon/2.4.1/Functions/Invoke-PowerShell.ps1
Invoke-PowerShell.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/Carbon/2.4.1/Functions/Install-IisApplication.ps1
Install-IisApplication.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/Carbon/2.4.1/Functions/Test-IisAppPool.ps1
Test-IisAppPool.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/Carbon/2.4.1/Functions/Set-TrustedHost.ps1
Set-TrustedHost.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/Carbon/2.4.1/Functions/Test-SslCertificateBinding.ps1
Test-SslCertificateBinding.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/Carbon/2.4.1/Functions/Get-WmiLocalUserAccount.ps1
Get-WmiLocalUserAccount.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/Carbon/2.4.1/Functions/Clear-DscLocalResourceCache.ps1
Clear-DscLocalResourceCache.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/Carbon/2.4.1/Functions/Get-PowerShellModuleInstallPath.ps1
Get-PowerShellModuleInstallPath.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/Carbon/2.4.1/Functions/Get-MsmqMessageQueuePath.ps1
Get-MsmqMessageQueuePath.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/Carbon/2.4.1/Functions/Write-DscError.ps1
Write-DscError.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/Carbon/2.4.1/Functions/Install-FileShare.ps1
Install-FileShare.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/Carbon/2.4.1/Functions/Add-TrustedHost.ps1
Add-TrustedHost.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/Carbon/2.4.1/Functions/Remove-GroupMember.ps1
Remove-GroupMember.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/Carbon/2.4.1/Functions/Grant-ServiceControlPermission.ps1
Grant-ServiceControlPermission.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/Carbon/2.4.1/Functions/Test-User.ps1
Test-User.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/Carbon/2.4.1/Functions/Test-ZipFile.ps1
Test-ZipFile.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/Carbon/2.4.1/Functions/Get-Group.ps1
Get-Group.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/Carbon/2.4.1/Functions/Set-CryptoKeySecurity.ps1
Set-CryptoKeySecurity.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/Carbon/2.4.1/Functions/Install-IisWebsite.ps1
Install-IisWebsite.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/Carbon/2.4.1/Functions/Resolve-RelativePath.ps1
Resolve-RelativePath.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/Carbon/2.4.1/Functions/Assert-WindowsFeatureFunctionsSupported.ps1
Assert-WindowsFeatureFunctionsSupported.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/Carbon/2.4.1/Functions/Convert-XmlFile.ps1
Convert-XmlFile.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/Carbon/2.4.1/Functions/Install-User.ps1
Install-User.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/Carbon/2.4.1/Functions/Test-PerformanceCounter.ps1
Test-PerformanceCounter.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/Carbon/2.4.1/Functions/Install-Msi.ps1
Install-Msi.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/Carbon/2.4.1/Functions/Test-WindowsFeature.ps1
Test-WindowsFeature.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/Carbon/2.4.1/Functions/Test-GroupMember.ps1
Test-GroupMember.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/Carbon/2.4.1/Functions/Test-PathIsJunction.ps1
Test-PathIsJunction.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/Carbon/2.4.1/Functions/Revoke-Privilege.ps1
Revoke-Privilege.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/Carbon/2.4.1/Functions/Uninstall-ScheduledTask.ps1
Uninstall-ScheduledTask.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/Carbon/2.4.1/Functions/New-RsaKeyPair.ps1
New-RsaKeyPair.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/Carbon/2.4.1/Functions/Disable-FirewallStatefulFtp.ps1
Disable-FirewallStatefulFtp.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/Carbon/2.4.1/Functions/Remove-IisMimeMap.ps1
Remove-IisMimeMap.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/Carbon/2.4.1/Functions/ConvertTo-Base64.ps1
ConvertTo-Base64.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/Carbon/2.4.1/Functions/Get-IisHttpHeader.ps1
Get-IisHttpHeader.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/Carbon/2.4.1/Functions/Set-HostsEntry.ps1
Set-HostsEntry.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/Carbon/2.4.1/Functions/Complete-Job.ps1
Complete-Job.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/Carbon/2.4.1/Functions/Test-RegistryKeyValue.ps1
Test-RegistryKeyValue.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/Carbon/2.4.1/Functions/Grant-MsmqMessageQueuePermission.ps1
Grant-MsmqMessageQueuePermission.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/Carbon/2.4.1/bin/Remove-EnvironmentVariable.ps1
Remove-EnvironmentVariable.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/Carbon/2.4.1/bin/Set-EnvironmentVariable.ps1
Set-EnvironmentVariable.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/Carbon/2.4.1/bin/Remove-DotNetAppSetting.ps1
Remove-DotNetAppSetting.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/Carbon/2.4.1/bin/Set-DotNetAppSetting.ps1
Set-DotNetAppSetting.ps1
<# .SYNOPSIS *Internal*. Use `Set-DotNetAppSetting` function instead. .LINK Set-DotNetAppSetting #> # 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/l...
PowerShellCorpus/PowerShellGallery/Carbon/2.4.1/bin/Set-DotNetConnectionString.ps1
Set-DotNetConnectionString.ps1
<# .SYNOPSIS Internal. Use `Set-DotNetConnectionString` function instead. #> # 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 # ...
PowerShellCorpus/PowerShellGallery/Carbon/2.4.1/bin/Protect-String.ps1
Protect-String.ps1
<# .SYNOPSIS **INTERNAL. DO NOT USE** #> # 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 ...
PowerShellCorpus/PowerShellGallery/PoshTime/0.1.0/Private/New-TsInputForm.ps1
New-TsInputForm.ps1
function New-TsInputForm { param ( [string] $Title = 'TimeSheet', [string] $Message = 'What are you working on?', [string] $Default = '' ) [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void] [System.Reflection.Assembly]::LoadWithPartialName("Sys...
PowerShellCorpus/PowerShellGallery/PoshTime/0.1.0/Public/New-TsTimeout.ps1
New-TsTimeout.ps1
function New-TsTimeout { param ( [string] $Path = $Script:Config.TimesheetDirectory, [int] $Timeout = $Script:Config.Timeout ) $Command = "Import-Module PoshTime; New-TsEntry -Path $Path" $Process = Start-Process -FilePath powershell.exe -ArgumentList "-noprofile -Command $Command" -Pa...
PowerShellCorpus/PowerShellGallery/PoshTime/0.1.0/Public/New-TsEntry.ps1
New-TsEntry.ps1
function New-TsEntry { param ( [string] $Path = $Script:Config.TimesheetDirectory ) if (!(Test-Path -Path $Path)) { $null = New-Item -Path $Path -ItemType Directory } $Response = New-TsInputForm if ($Response -eq '' -or $Response -eq $null) { $Response = '** Canceled *...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Exports.ps1
Exports.ps1
<# This Script is used as an easy way to control and track what is exported from this module The PSM1 file calls this script. Each key has an array for its value that array is passed to the Export-ModuleMember argument that has the same name as the key. #> $Exports = @{} # Add Alias' To Export Here $Exports.Al...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-TestsScaffolding.ps1
Set-TestsScaffolding.ps1
function Set-TestsScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $Path = Join-Path -Path $Path -ChildPath 'Tests' Set-FolderScaffolding -Path $Path New-Item -ItemType File -Path $( Join-Path -Path $Path -ChildPath 'PEST...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-BinariesScaffolding.ps1
Set-BinariesScaffolding.ps1
function Set-BinariesScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $Path = Join-Path -Path $Path -ChildPath 'Binaries' Set-FolderScaffolding -Path $Path New-Item -ItemType File -Path $( Join-Path -Path $Path -ChildPath 'DLL AND EXE FILES USE...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-ModulesScaffolding.ps1
Set-ModulesScaffolding.ps1
function Set-ModulesScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $Path = Join-Path -Path $Path -ChildPath 'Modules' Set-FolderScaffolding -Path $Path New-Item -ItemType File -Path $( Join-Path -Path $Path -ChildPath '...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-FunctionsScaffolding.ps1
Set-FunctionsScaffolding.ps1
function Set-FunctionsScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $Path = Join-Path -Path $Path -ChildPath 'Functions' Set-FolderScaffolding -Path $Path New-Item -ItemType File -Path $( Join-Path -Path $Path -ChildP...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/New-ModuleScaffolding.ps1
New-ModuleScaffolding.ps1
<# .Synopsis Creates a directory structure for a powershell module .DESCRIPTION Creates a directory structure for a powershell module. It also includes the psd1 and psm1 files along with an simple way to define what is exported and what is kept internal for the module .PARAMETER ModuleName The name ...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-HelpScaffolding.ps1
Set-HelpScaffolding.ps1
function Set-HelpScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $ModuleName = Split-Path -Path $Path -Leaf $Path = Join-Path -Path $Path -ChildPath 'en-US' Set-FolderScaffolding -Path $Path New-Item -ItemType File -P...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-TypesScaffolding.ps1
Set-TypesScaffolding.ps1
function Set-TypesScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $Path = Join-Path -Path $Path -ChildPath 'Types' Set-FolderScaffolding -Path $Path New-Item -ItemType File -Path $( Join-Path -Path $Path -ChildPath 'POWE...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-ResourcesScaffolding.ps1
Set-ResourcesScaffolding.ps1
function Set-ResourcesScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) $Path = Join-Path -Path $Path -ChildPath 'Resources' Set-FolderScaffolding -Path $Path New-Item -ItemType File -Path $( Join-Path -Path $Path -ChildPa...
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Functions/Set-FolderScaffolding.ps1
Set-FolderScaffolding.ps1
function Set-FolderScaffolding { [CmdletBinding()] Param ( [Parameter(Mandatory)] [System.IO.DirectoryInfo] $Path ) if(-not (Test-Path -Path $Path)) { New-Item -Path $Path -ItemType Directory | Out-Null } }
PowerShellCorpus/PowerShellGallery/ModuleScaffolding/1.0/Resources/Exports.ps1
Exports.ps1
<# This Script is used as an easy way to control and track what is exported from this module The PSM1 file calls this script. Each key has an array for its value that array is passed to the Export-ModuleMember argument that has the same name as the key. #> $Exports = @{} # Add Alias' To Export Here $Exports.Al...
PowerShellCorpus/PowerShellGallery/PSZabbix/1.2.0/PSZabbix.Tests.ps1
PSZabbix.Tests.ps1
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] param() $here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".").Replace(".ps1", ".psm1") $global:baseUrl = "http://tools/zabbix...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Private/Check-WSAPICompatibility.ps1
Check-WSAPICompatibility.ps1
Function Check-WSAPICompatibility { [CmdletBinding()] Param ( [parameter(Mandatory = $true)] [version]$WSAPIVersion ) [version]$WSAPI = (Get-3PARWsapiConfiguration).version If ($WSAPI -le $WSAPIVersion) { Write-Warning 'The array does not support this functionnality' Write-Warning...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Private/Check-3PARConnection.ps1
Check-3PARConnection.ps1
Function Check-3PARConnection { [CmdletBinding()] Param() Write-Verbose 'Test if the session key exists' # Validate the 3PAR session key exists if (-not $global:3parKey) { throw 'You are not connected to a 3PAR array. Use Connect-3PAR.' } }
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Private/Show-RequestException.ps1
Show-RequestException.ps1
Function Show-RequestException { [CmdletBinding()] Param( [parameter(Mandatory = $true)] $Exception ) #Exception catch when there's a connectivity problem with the array If ($Exception.Exception.InnerException) { Write-Host "Please verify the connectivity with the array. Retry with the p...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Private/Send-3PARRequest.ps1
Send-3PARRequest.ps1
function Send-3PARRequest { [CmdletBinding()] Param ( [parameter(Position = 0, Mandatory = $true, HelpMessage = "Enter the resource URI (ex. /volumes)")] [ValidateScript({if ($_.startswith('/')) {$true} else {throw "-URI must begin with a '/' (eg. /volumes) in its value. Please correct the v...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Private/Format-Result.ps1
Format-Result.ps1
function Format-Result { [CmdletBinding()] Param ( [parameter(Mandatory = $true)] $dataPS, [parameter(Mandatory = $true)] [string]$TypeName ) Begin { $AlldataPS = @() } Process { # Add custom type to the resulting oject for formating purpose Foreach...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARVolumes.ps1
Get-3PARVolumes.ps1
Function Get-3PARVolumes { <# .SYNOPSIS Retrieve informations about Volumes .DESCRIPTION This function will retrieve informations about Volumes. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARWsapiConfiguration.ps1
Get-3PARWsapiConfiguration.ps1
Function Get-3PARWsapiConfiguration { <# .SYNOPSIS Retrieve informations about the configuration of WSAPI. .DESCRIPTION This function will retrieve informations about the configuration of WSAPI. You need to have an active session with the array. .NOTES Written by Erwan Que...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARCpgs.ps1
Get-3PARCpgs.ps1
Function Get-3PARCpgs { <# .SYNOPSIS Retrieve informations about CPGs .DESCRIPTION This function will retrieve informations about CPGs. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://github...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARHosts.ps1
Get-3PARHosts.ps1
Function Get-3PARHosts { <# .SYNOPSIS Retrieve informations about Hosts .DESCRIPTION This function will retrieve informations about hosts. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://git...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARAo.ps1
Get-3PARAo.ps1
Function Get-3PARAo { <# .SYNOPSIS Retrieve informations about the configuration of Adaptive optimization (AO). .DESCRIPTION This function will retrieve informations about the configuration of Adaptive optimization (AO). You need to have an active session with the array. .NOTES ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/New-3PARVolumes.ps1
New-3PARVolumes.ps1
Function New-3PARVolumes { <# .SYNOPSIS Create a new storage volume .DESCRIPTION This function will create a new storage volume. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://github.com/eq...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARHostSets.ps1
Get-3PARHostSets.ps1
Function Get-3PARHostSets { <# .SYNOPSIS Retrieve informations about Host Sets. .DESCRIPTION This function will retrieve informations about Host Sets. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Disconnect-3PAR.ps1
Disconnect-3PAR.ps1
Function Disconnect-3PAR { <# .SYNOPSIS Delete connection to the HP 3PAR StoreServ array .DESCRIPTION This function will delete the key session used for communicating with the HP 3PAR StoreServ array. .NOTES Written by Erwan Quelin under Apache licence .LINK ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARVolumeSets.ps1
Get-3PARVolumeSets.ps1
Function Get-3PARVolumeSets { <# .SYNOPSIS Retrieve informations about Volume Sets. .DESCRIPTION This function will retrieve informations about Volume Sets. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Connect-3PAR.ps1
Connect-3PAR.ps1
Function Connect-3PAR { <# .SYNOPSIS Establish connection to the HP 3PAR StoreServ array .DESCRIPTION This function will retrieve a key session from the HP 3PAR StoreServ array. This key will be used by the other functions. .NOTES Written by Erwan Quelin under Apache licen...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Set-3PARHosts.ps1
Set-3PARHosts.ps1
Function Set-3PARHosts { <# .SYNOPSIS Modify an existing host .DESCRIPTION This function will modify an existing host. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://github.com/equelin/3PAR...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARFlashCache.ps1
Get-3PARFlashCache.ps1
Function Get-3PARFlashCache { <# .SYNOPSIS Retrieve informations about the configuration of flash cache. .DESCRIPTION This function will retrieve informations about the configuration of flash cache. You need to have an active session with the array. .NOTES Written by Erwan...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARVLuns.ps1
Get-3PARVLuns.ps1
Function Get-3PARVLuns { <# .SYNOPSIS Retrieve informations about virtual luns .DESCRIPTION This function will retrieve informations about virtual luns. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARCapacity.ps1
Get-3PARCapacity.ps1
Function Get-3PARCapacity { <# .SYNOPSIS Retrieve informations about the space usage of the array. .DESCRIPTION This function will retrieve informations about the space usage of the array. You need to have an active session with the array. .NOTES Written by Erwan Quelin un...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARPorts.ps1
Get-3PARPorts.ps1
Function Get-3PARPorts { <# .SYNOPSIS Retrieve informations about ports. .DESCRIPTION This function will retrieve informations about ports. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://gi...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Remove-3PARHosts.ps1
Remove-3PARHosts.ps1
Function Remove-3PARHosts { <# .SYNOPSIS Delete a host .DESCRIPTION This function will delete a host. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://github.com/equelin/3PAR-Powershell ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Remove-3PARVolumes.ps1
Remove-3PARVolumes.ps1
Function Remove-3PARVolumes { <# .SYNOPSIS Remove a storage volume .DESCRIPTION This function will remove a storage volume. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://github.com/equelin...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Get-3PARSystems.ps1
Get-3PARSystems.ps1
Function Get-3PARSystems { <# .SYNOPSIS Retrieve informations about the array. .DESCRIPTION This function will retrieve informations about the array. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence. .LINK ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/New-3PARHosts.ps1
New-3PARHosts.ps1
Function New-3PARHosts { <# .SYNOPSIS Create a new host .DESCRIPTION This function will create a new host. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://github.com/equelin/3PAR-Powershell ...
PowerShellCorpus/PowerShellGallery/3PAR-Powershell/0.4.0/Public/Set-3PARVolumes.ps1
Set-3PARVolumes.ps1
Function Set-3PARVolumes { <# .SYNOPSIS Modify an existing storage volume. .DESCRIPTION This function will modify an existing storage volume. You need to have an active session with the array. .NOTES Written by Erwan Quelin under Apache licence .LINK https://...
PowerShellCorpus/PowerShellGallery/GithubFS/1.0.1/GithubFS.test.ps1
GithubFS.test.ps1
ipmo ./Module.psd1 -Force Describe "Out-Github" { Context "Overrides Out-File" { It "Enables redirection into the github fs" { } } }
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Connect-CCOnline.ps1
Connect-CCOnline.ps1
function Connect-CCOnline { [CmdletBinding()] param( [Parameter( ValueFromPipeline = $true, Mandatory = $true, HelpMessage = 'Credentials in Azure AD to access Office 365.' )] [System.Management.Automation.Credential()] [PSCredenti...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Disconnect-MsolServiceOnline.ps1
Disconnect-MsolServiceOnline.ps1
function Disconnect-MsolServiceOnline { [CmdletBinding( SupportsShouldProcess = $true )] param ( [switch]$CoockiesOnly ) try { $Cookies = ([Environment]::GetFolderPath('Cookies')) | Get-ChildItem -Recurse | Select-String -Pattern 'MicrosoftOnline' | Group-Ob...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Get-CCOnlineSession.ps1
Get-CCOnlineSession.ps1
function Get-CCOnlineSession { [CmdletBinding()] param () try { Get-PSSession -ErrorAction Stop | Get-OnlinePSSession -FilterComputerName Compliance -FilterConfigurationName Microsoft.Exchange -FilterSessionName CCOnline } catch { Write-Warning -Message ('Unable to get...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Connect-SPOnline.ps1
Connect-SPOnline.ps1
function Connect-SPOnline { [CmdletBinding()] param( [Parameter( Mandatory = $true, HelpMessage = 'Enter a valid Sharepoint Online Domain. Example: "Contoso"' )] [Alias('Domain','DomainHost','Customer')] [string]$SharepointDomain, [Par...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Disconnect-ExchangeOnline.ps1
Disconnect-ExchangeOnline.ps1
function Disconnect-ExchangeOnline { [CmdletBinding()] param () try { $EXOnline = Get-ExchangeOnlineSession if ($null -ne $EXOnline) { Remove-PSSession -Session ($EXOnline) -ErrorAction Stop Write-Verbose -Message 'The Exchange Online PSSessio...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Disconnect-CCOnline.ps1
Disconnect-CCOnline.ps1
function Disconnect-CCOnline { [CmdletBinding()] param () try { $CCOSession = Get-CCOnlineSession if ($null -ne $CCOSession) { Remove-PSSession -Session ($CCOSession) -ErrorAction Stop Write-Verbose -Message 'The Compliance Center Online PSSes...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Connect-MsolServiceOnline.ps1
Connect-MsolServiceOnline.ps1
function Connect-MsolServiceOnline { [CmdletBinding()] param( [Parameter( ValueFromPipeline = $true, Mandatory = $true, HelpMessage = 'Credentials in Azure AD to access Office 365.' )] [System.Management.Automation.Credentia...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Get-ExchangeOnlineProtSession.ps1
Get-ExchangeOnlineProtSession.ps1
function Get-ExchangeOnlineProtSession { [CmdletBinding()] param () try { Get-PSSession -ErrorAction Stop | Get-OnlinePSSession -FilterComputerName 'protection' -FilterConfigurationName 'Microsoft.Exchange' -FilterSessionName 'ExchangeOnlineProt' } catch { Writ...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Disconnect-ExchangeOnlineProt.ps1
Disconnect-ExchangeOnlineProt.ps1
function Disconnect-ExchangeOnlineProt { [CmdletBinding()] param () try { $EXOProtnline = Get-ExchangeOnlineProtSession if ($null -ne $EXOProtnline) { Remove-PSSession -Session ($EXOProtnline) -ErrorAction Stop Write-Verbose -Message 'The Exch...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Get-AzureADCredential.ps1
Get-AzureADCredential.ps1
function Get-AzureADCredential { [OutputType([bool], [PSCredential])] [CmdletBinding()] param ( # Maximum amount of Azure Credential tries. [uint16]$MaxTry = 3 ) $Regex = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0...
PowerShellCorpus/PowerShellGallery/Office365Connect/1.5.0/Disconnect-SPOnline.ps1
Disconnect-SPOnline.ps1
function Disconnect-SPOnline { [CmdletBinding()] param () try { $null = Disconnect-SPOService -ErrorAction Stop Remove-Module -Name 'Microsoft.Online.SharePoint.PowerShell' -Force -ErrorAction Stop Write-Verbose -Message 'The Sharepoint Online Session is now closed.' -Ver...