filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
fc2365e4-98a7-4ee6-89b0-65c32dfbe01a.ps1
#You'll need admin perms on all the servers to run this... Write-Host "ComputerName in White, then Local Groups in Green, Local Groups' Members in White" #This feeds the script a list of server names (ServerList.txt, placed in the same directory) #for which I want the Local Groups and all those groups' Members. ...
0
Set-LocalUserAccount.ps1
function Set-LocalUserAccount { param ( [parameter(Mandatory=$true)] [string] $Username, [string] $Description, [string] $FullName, [string] $ComputerName = $env:COMPUTERNAME, [system.Security.SecureString] $Password, [switch] $PasswordChangeAtNextLogon, [switch] $CannotChangePassword, [swi...
0
Log4Net.xslt.ps1
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2" version="1.0"> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <xsl:temp...
0
sample_5_16.ps1
#************************************************ # TS_ProLiantDL385NMICrashDump.ps1 # Version 1.0.1 # Date: 5/16/2012 # Author: v-alyao # Description: [Idea ID 2753] [Windows] HP DL385 G5p machine cannot generate dump file # Rule number: 2753 # Rule URL: //sharepoint/sites/rules/Rule%20Submissions/Forms/Disp...
0
sample_31_26.ps1
# # Module manifest for module 'OCI.PSModules.Loadbalancer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loadbalancer.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditi...
0
1915.ps1
Describe "Write-Verbose" -Tags "CI" { It "Should be able to call cmdlet without error" { { Write-Verbose -Message "test" -ErrorAction SilentlyContinue } | Should -Not -Throw } It "Should not display verbose output by default" { $VerbosePreference | Should -Be SilentlyContinue Write-Verbose -Message "...
0
3209.ps1
param( $Configuration = 'Release', [Parameter(Mandatory)] $OutFile ) $errorActionPreference = "Stop" $RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path $ourAssembly = "$RepoRoot\PSReadLine\bin\$Configuration\Microsoft.PowerShell.PSReadLine2.dll" $t ='Microsoft.PowerShell.PSConsoleReadLine' -as [type] if...
0
sample_15_59.ps1
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'https://aka...
0
powertab patch_1.ps1
# Stick this anywhere filter convertTypeToTabCompletionName() { $typeToTabCompletion=@{ [Microsoft.Powershell.Commands.X509StoreLocation]={$_.Location}; [System.Security.Cryptography.X509Certificates.X509Store]={$_.Name}; [Microsoft.Win32.RegistryKey]={ $_.Name.Split("\\"...
0
sample_36_71.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditi...
0
VMWare Quick Migration.ps1
######################################### #Name: VMWare Quick Migration Function #Author: Justin Grote <jgrote NOSPAMAT enpointe DOT com> #Credit: Inspired by Mike DiPetrillo's Quick Migration Script: http://www.mikedipetrillo.com/mikedvirtualization/2008/10/quick-migration-for-vmware-the-power-of-powershell.html #...
0
Copy-MAGig.ps1
function Copy-MAGig { param( [string]$src, [string]$dest, $exclude, [int]$width = 100, # used with the -log switch to format the log, [int]$ident = 2, # dito [switch]$log, # if -verbose had a nice format and its output cou...
0
sample_31_67.ps1
# # Module manifest for module 'OCI.PSModules.Identity' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identity.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions Comp...
0
LetterDiamondOneliner v_2.ps1
&{param([char]$c)[int]$s=65;$p=$c-$s;$r=,(' '*$p+[char]$s);$r+=@(do{"{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p));$r;$r[-2..-99]}Z # trimmed 130 chars w/o arg &{param([char]$c)$p=$c-($s=65);$r=,(' '*$p+[char]$s);do{$r+="{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J
0
Get-WebFile _1.1.ps1
## Get-WebFile.ps1 (aka wget for PowerShell) ############################################################################################################## ## Downloads a file or page from the web ## History: ## v3.1 - Unwrap the filename when it has quotes around it ## v3 - rewritten completely using HttpWebReq...
0
4406.ps1
function Test-MicrosoftCertificate { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [System.Management.Automation.Signature] $AuthenticodeSignature ) $IsMicrosoftCertificate = $false if($AuthenticodeSignature.SignerCertificate -and ('Microsoft.PowerShell.Comma...
0
2671.ps1
Function Install-SharePointPnPPowerShellModule { param ( [Parameter(Mandatory=$true,HelpMessage='Online is for SharePoint Online, SP2013 for SharePoint 2013 and SP2016 for SharePoint 2016')] [ValidateSet('Online','SP2013','SP2016')] [string] $ModuleToInstall ) switch...
0
sample_21_84.ps1
########################################################### # # 'ExtensionService' module # ########################################################### $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest Import-Module "$PSScriptRoot\ServiceHelper.psm1" $script:GCInstallPath = "$PSScriptRoot\.....
0
sample_40_71.ps1
# # Module manifest for module 'OCI.PSModules.Workrequests' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Workrequests.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditi...
0
New-Zip.ps1
Function New-Zip { <# .SYNOPSIS Create a Zip File from any files piped in. .DESCRIPTION Requires that you have the SharpZipLib installed, which is available from http://www.icsharpcode.net/OpenSource/SharpZipLib/ .NOTES File Name : PowerZip.psm1 Author : Christophe CREMON (uxone) - http://powershel...
0
1848.ps1
$InternalGallery = "https://www.poshtestgallery.com/api/v2/" $InternalSource = 'OneGetTestSource' Describe "PackageManagement Acceptance Test" -Tags "Feature" { BeforeAll{ Register-PackageSource -Name Nugettest -provider NuGet -Location https://www.nuget.org/api/v2 -force Register-PackageSourc...
0
Get-ObservedIPRange.ps1
function Get-ObservedIPRange { param( [Parameter(Mandatory=$true,ValueFromPipeline=$true,HelpMessage="Physical NIC from Get-VMHostNetworkAdapter")] [VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.Nic.PhysicalNicImpl] $Nic ) process { $hostView = Get-VMHost -Id $Nic.VMHostId | Get-View -Property...
0
where-property.ps1
function where-property([string] $PropertyName,[string]$SubProperty , $is,$isnot,$contains,$in) { process { if ($is) { if ($_.$Propertyname -eq $is) { , $_ } } elseif ($isnot) { if ($_.$Propertyname -ne $is) { , $_ } } elseif($con...
0
1764.ps1
Describe "Windows Installer" -Tags "Scenario" { BeforeAll { $skipTest = -not $IsWindows $preRequisitesLink = 'https://aka.ms/pscore6-prereq' $linkCheckTestCases = @( @{ Name = "Universal C Runtime"; Url = $preRequisitesLink } @{ Name = "WMF 4.0"; Url = "https://ww...
0
Create VMKernel on vDS.ps1
@@ New-VMHostNetworkAdapter -VMHost $myHost -VirtualSwitch "myVDS"-PortGroup "vdPortGroup"
0
40.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory = $true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -N...
0
sample_37_13.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> $ErrorActionPreference = 'Stop' $observabilityNuget...
0
3457.ps1
function Test-Pipeline { $dfname = Get-DataFactoryName $rgname = Get-ResourceGroupName $rglocation = Get-ProviderLocation ResourceManagement $dflocation = Get-ProviderLocation DataFactoryManagement $endDate = [DateTime]::Parse("9/8/2014") $startDate = $endDate.AddHours(-1) ...
0
sample_3_82.ps1
#$debug = $false # Load Common Library: . ./utils_cts.ps1 # Load DSD Common Function Library . ./utils_DSD.ps1 trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo...
0
sample_32_31.ps1
# # Module manifest for module 'OCI.PSModules.Servicecatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicecatalog.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSE...
0
1972.ps1
Describe "Remove-PSBreakpoint" -Tags "CI" { $testScript = Join-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath assets) -ChildPath psbreakpointtestscript.ps1 $script = "`$var = 1 `$var2 = Get-Command Get-Date " $script > $testScript BeforeEach { $line = Set-PSBreakpoint -Line 1,2,...
0
sample_43_32.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\vite@5.0.12\node_modules\vite\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\vite@5.0.12\no...
0
sample_35_79.ps1
# # Module manifest for module 'OCI.PSModules.Disasterrecovery' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Disasterrecovery.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported...
0
get-SQLInstanceInfo_2.ps1
function get-SQLInstanceInfo2 { param ( [Parameter(Mandatory=$True)][string]$ComputerName ) $InstanceInfos = @() $Instances = (new-object 'microsoft.sqlserver.management.smo.Wmi.ManagedComputer' "$ComputerName").Services | where-object{$_.type -eq 'SqlServer'} foreach($Instance in $Instances )...
0
4045.ps1
param( [Parameter(HelpMessage="The version number for the generated MSI. This will be obtained from the Az module if not specified.")] [string]$version="0", [Parameter(HelpMessage="Prevent a build number from being tacked on the end of the version number.")] [Switch]$noBuildNumber, [Paramet...
0
243.ps1
function Get-NetFramework { [CmdletBinding()] PARAM ( [String[]]$ComputerName, $Credential = [System.Management.Automation.PSCredential]::Empty ) $Splatting = @{ ComputerName = $ComputerName } if ($PSBoundParameters['Credential']) { $Splatting.credential = $Credent...
0
Remove Special Char.ps1
gci 'c:\\test\\' -Recurse | % { Rename-Item $_.FullName $($_.Name -replace '[^\\w\\.]','') }
0
PS2WCF_1.ps1
# Call WCF Services With PowerShell V1.0 22.12.2008 # # by Christian Glessner # Blog: http://www.iLoveSharePoint.com # Twitter: http://twitter.com/cglessner # Codeplex: http://codeplex.com/iLoveSharePoint # # requires .NET 3.5 # load WCF assemblies [void][System.Reflection.Assembly]::LoadWithPartialName("Sy...
0
1988.ps1
Describe "GetDateFormatUpdates" -Tags "Feature" { It "Verifies that FileDate format works" { $date = Get-Date $expectedFormat = "{0:yyyyMMdd}" -f $date $actualFormat = Get-Date -Date $date -Format FileDate $actualFormat | Should -Be $expectedFormat } It "Verifies that Fi...
0
1237.ps1
[CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0)] [string] $Name ) Set-StrictMode -Version 'Latest' $Name = [Text.Encoding]::Unicode.GetString( [Convert]::FromBase64String($Name) ) Add-Type -AssemblyName System.Configuration $config = [Configuration.ConfigurationManager]::OpenM...
0
DHCP Failover Script.ps1
:: Purpose: DHCP server Watchdog & Failover script. Read notes below :: Requirements: 1. Domain administrator credentials & "Logon as a batch job" rights :: 2. Proper firewall configuration to allow connection :: 3. Proper permissions on the DHCP backup directory :: Auth...
0
2038.ps1
Describe "Assembly::LoadWithPartialName Validation Test" -Tags "CI" { $defaultErrorId = 'FileLoadException' $testcases = @( @{ Name = 'system.windows.forms' ErrorId = $defaultErrorId } @{ Name = 'System.Windows.F...
0
4221.ps1
Function Invoke-Pbind { Param ( [Parameter(Mandatory = $false)] [string]$target, [Parameter(Mandatory = $false)] [string]$domain, [Parameter(Mandatory = $false)] [string]$user, [Parameter(Mandatory = $false)] [string]$password, [Parameter(Mandatory = $false)] [string]$domain...
0
sample_66_18.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Node # are installed in the same directory $exe=".exe" } $ret=0 if (Test-Path "$basedir/node$exe") { # Suppor...
0
Am I a purist_.ps1
########### # PS1 script to launch gpupdate on all computers in domain, without some stupid QAD cmdlets, just pure PS1 and WMI # Made by pan_2@LJ (gunkan@yandex.ru) # Note: if by some reason RPC host was unavaible - there will be exception throwed, I didn't use trap so I can see real reason. ########### function P...
0
3023.ps1
Set-StrictMode -Version Latest function Invoke-PesterInJob ($ScriptBlock, [switch] $GenerateNUnitReport, [switch]$UseStrictPesterMode, [Switch]$Verbose) { if ($Verbose) { Write-Host "----------- This is running is a separate Pester scope (inside a PowerShell Job) -------------" -Foregro...
0
Get-FileTail 1.0.ps1
#.Synopsis # Show the last n lines of a text file #.Description # This is just a tail script for PowerShell, using seekable streams to avoid reading the whole file and using v2 eventing to detect changes and provide a -Continuous mode. #.Parameter Name # The file name to tail #.Parameter Lines # The number ...
0
sample_16_68.ps1
# # Module manifest for module 'OCI.PSModules.Vnmonitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vnmonitoring.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditi...
0
303.ps1
function Get-PSFRunspace { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Get-PSFRunspace')] Param ( [string] $Name = "*" ) [PSFramework.Runspace.RunspaceHost]::Runspaces.Values | Where-Object Name -Like $Name }
0
sample_34_26.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Det finns redan en miljövariabel med det här namnet och av den här typen. EnvironmentErrorDoesNotExists=Det finns ingen miljövariabel med det här namnet och av den här typen. '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkg...
0
2297.ps1
[CmdletBinding()] param( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [ValidateScript({ Test-Path -Path $_ -PathType Container })] [string]$FolderPath, [Parameter()] [ValidateNotNullOrEmpty()] [string[]]$CompanyReference ) $defaultCommandNames = (Get-Command -Module 'Microsoft.PowerS...
0
1009.ps1
$rgName1="MyResourceGroup1" $rgName2="MyResourceGroup2" $location1="eastus" $location2="westeurope" $webApp1="mywebapp$(Get-Random)" $webApp2="mywebapp$(Get-Random)" $webAppL1="MyWebAppL1" $webAppL2="MyWebAppL2" New-AzResourceGroup -Name $rgName1 -Location $location1 New-AzResourceGroup -Name $rgName2 -Location ...
0
sample_50_0.ps1
& $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLaunch.ps1 PinApp.ps1 & $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLaunch.ps1 AddTeamsFirewallRules.ps1 & $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLaunch.ps1 GenerateDeviceId.ps1 & $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLa...
0
sample_38_96.ps1
export function displayLastSelectedItem(id) { var item = document.getElementById(id); var scroll = document.getElementById(id + "-scroll"); if (!!item && !!scroll) { try { // To be optimized (how to detect the end of scroll container?) for (var i = 0; i < 10; i++) { ...
0
2127.ps1
Describe "Common parameters support for script cmdlets" -Tags "CI" { BeforeEach { $rs = [system.management.automation.runspaces.runspacefactory]::CreateRunspace() $rs.open() $ps = [System.Management.Automation.PowerShell]::Create() $ps.Runspace = $rs } AfterEach { ...
0
137.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ($Aad...
0
sample_34_80.ps1
# Localized 12/03/2020 06:20 PM (GMT) 303:4.80.0411 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Sim PromptNoString=&Não BundleFound=Encontrou o pacote: {0} PackageFound=Encontrado o pacote: {0} EncryptedBundleFound=Lote criptografado encontrado: {0} Encrypted...
0
sample_37_93.ps1
# # Module manifest for module 'OCI.PSModules.Marketplacepublisher' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplacepublisher.dll' # Version number of this module. ModuleVersion = '83.2.0' # S...
0
sample_60_93.ps1
# # Module manifest for module 'OCI.PSModules.Vnmonitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vnmonitoring.dll' # Version number of this module. ModuleVersion = '89.0.0' # Supported PSEditi...
0
Get-SvnInfo.ps1
Function Get-SvnInfo { [cmdletbinding()] Param( [ValidateScript({Test-Path $_})] [string]$rootDir = "C:\\Build\\", [ValidateScript({Test-Path $_})] [string]$buildDir = "C:\\Build\\build_dir\\", [ValidateScript({Test-Path $_})] [string]$outputDir = "C:\\Build\\output_dir\\", [ValidateScript({Test-Path $_})] ...
0
sample_65_98.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # # ModifyProxySettings.ps1 - To be used by the installer - Mo...
0
2031.ps1
Describe "BooleanParameterDCR Tests" -tags "CI" { BeforeAll { Function ParserTestSwitchCmdlet { [CmdletBinding()] param([switch]$switchParam) return $switchParam } Function ParserTestBoolCmdlet2 { [CmdletBinding()] param([b...
0
sample_5_36.ps1
ConvertFrom-StringData @' id_depdisabled4gbcheck=Checking if DEP settings id_depdisabled4gbcheckdesc=Checking if Data Execution Protection is enabled '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63...
0
New-CodeSigningCert_1.ps1
## New-CodeSigningCert.ps1 ######################################################################################################################## ## Does the setup needed to self-sign PowerShell scripts ... ## Generates a "test" self-signed root Certificate Authority ## And then generates a code-signing certific...
0
Get-ADNonExpPass.ps1
param ($LDAPPath = "", [switch]$Help) if ($Help) { "" Write-Host "Usage: .\\Get-ADNonExpPass.ps1 <LDAPPath>" -foregroundcolor Yellow Write-Host "Ex: .\\Get-ADNonExpPass.ps1 'LDAP://ou=users,dc=domain,dc=com'" -foregroundcolor Yellow "" break } #UAC Flag in Hex #http://support.microsoft.com/kb/30514...
0
sample_52_35.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> Import-Module $PSScriptRoot\HelperFiles\TestOb...
0
1082.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $user = $null $url = 'http://test-granthttpurlpermission:10383/' function Start-Test { $user = Resolve-Identity -Name $CarbonTestUser.UserName } function Stop-Test { netsh http delete urlacl url=$url } function Tes...
0
CertMgmt pack.ps1
##################################################################### # CertMgmtPack.ps1 # Version 0.51 # # Digital certificate management pack # # Vadims Podans (c) 2009 # http://www.sysadmins.lv/ ##################################################################### #requires -Version 2.0 function Import-C...
0
sample_8_25.ps1
# Sample diagnostic function # # Wrapped in a region same name as function name # Change the name and code as needed # # You can test your diagnostic function by running xray in developer mode, e.g.: # .\xray.ps1 -Diagnostic net_dnscli_KB4562541_sample -DevMode #region net_dnscli_KB4562541_sample <# Compone...
0
ConvertFrom-Property.ps1
<# .SYNOPSIS Converts data from flat or single-level property files into PSObjects .DESCRIPTION Converts delimited string data into objects .PARAMETER PropertyText The text to be parsed .PARAMETER Separator The value separator string used between name=value pairs. Allows regular expressions. Def...
0
2774.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$False,Position=0)] [String]$ModulePath="Modules\", [Parameter(Mandatory=$False,Position=1)] [String]$TargetList=$Null, [Parameter(Mandatory=$False,Position=2)] [String]$Target=$Null, [Parameter(Mandatory=$False,Position=3)] ...
0
3086.ps1
$VerbosePreference = 'Continue' $ErrorActionPreference = 'Stop' try { $baseDir = $PSScriptRoot $buildDir = "$baseDir\build\nuget" $nugetExe = "$baseDir\vendor\tools\nuget.exe" $targetBase = "tools" Write-Verbose "Running in $baseDir" Write-Verbose "Building to $buildDir" $version = git.ex...
0
294.ps1
function Get-PSFCallback { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseOutputTypeCorrectly", "")] [OutputType([PSFramework.FlowControl.Callback])] [CmdletBinding()] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [string[]] $Name = '*', [switch] $Al...
0
sample_45_9.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
0
AD Exch Users to Groups.ps1
##Purpose: Search Active Directory for all users, add them to specific groups based on homemta value, remove disabled users from same groups, and export all users to excel. ##Requires Excel 2003 or 2007 be installed on the local machine for exporting. ##Requires Quest ActiveRoles Management Shell for Active Direct...
0
sample_1_18.ps1
<# .SYNOPSIS DC_CM12BitlockerInfo.ps1 - Configuration Manager module for collecting bitlocker information .DESCRIPTION Leverages existing DND Module functionality to collect bitlocker information .NOTES Dev. Lead: sabieler Authors : lamosley Requires : PowerShell V4 (Supported from Windows 8.1...
0
Cisco-Inventory.ps1
#================================================================================================== # File Name : CiscoInventory.ps1 # Original Author : Kenneth C. Mazie (kcmjr) # Description : As written it will poll Cisco routers and switches and if the snmp OID's # ...
0
Export-PSCredential_2.ps1
# Author: Hal Rottenberg <hal@halr9000.com> # Url: http://halr9000.com/article/tag/lib-authentication.ps1 # Purpose: These functions allow one to easily save network credentials to disk in a relatively # secure manner. The resulting on-disk credential file can only [1] be decrypted # by the same user account...
0
1490.ps1
function Assert-FileExists { [CmdletBinding()] param( [Parameter(Position=0)] [string] $Path, [Parameter(Position=1)] [string] $Message ) Set-StrictMode -Version 'Latest' Write-Debug -Message "Testing if file '$P...
0
1203.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) Describe 'Carbon.Shell.Command.Split' { It 'simple split' { $path,$args = [Carbon.Shell.Command]::Split('test.exe arg1 arg2') $expectedPath = 'test.exe' $expectedArgs = @('arg1', 'arg2') ...
0
format-iislog for AWStat_1.ps1
param ( [Parameter( Mandatory=$true, Position = 0, ValueFromPipeline=$true, HelpMessage="Specifies the path to the IIS *.log file to import. You can also pipe a path to Import-Iss-Log." )] [ValidateNotNullOrEmpty()] [string] $Path, [Parameter( Mandatory=$true, Position = 1, Value...
0
sample_4_37.ps1
param( [string]$DataPath, [switch]$AcceptEula, [switch]$SkipLogs, [switch]$Trace, [switch]$Network, [switch]$RPC, [switch]$ProcMon, [switch]$PSR ) <# COM-COLLECT ALIAS : bpostaci, maporcol Date : 15/11/2023 Updates: v1.0 | Initial release v1.1 | 2023...
0
sample_42_68.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Support.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Support.internal.psm1' if(Test-Path $internalModulePath) { $nul...
0
sample_8_69.ps1
ConvertFrom-StringData @' id_dpm_dpmdb_activity=Gathering DPMDB id_dpm_dpmdb_status=Running DC_CollectDPMDB.ps1 id_dpm_notinstalled=CollectDPMLogs did not run due to missing registry key pointing to the DPM installation folder '@ # SIG # Begin signature block # MIIoOAYJKoZIhvcNAQcCoIIoKTCCKCUCAQExDzANBglghkgBZQ...
0
Write-Log_4.ps1
function Write-Log { #region Parameters [cmdletbinding()] Param( [Parameter(ValueFromPipeline=$true,Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Message, [Parameter()] [ValidateSet(ōErrorö, ōWarnö, ōInfoö)] [string] $Level = ōInfoö, [Parameter()] [Switch] $NoConsole...
0
sample_8_38.ps1
# diag_api.psm1 # by tdimli # March 2020 # API/helper functions # errors reported by these diagnostics won't be shown on screen to user # only saved to xray_ISSUES-FOUND_*.txt report file $Global:BETA_DIAGS = " net_802dot1x_KB4556307, net_firewall_KB4561854, net_wlan_KB4557342, net_dnscli_KB4562541, net_da...
0
sample_41_7.ps1
# Copyright Intel Corporation. # # This software and the related documents are Intel copyrighted materials, # and your use of them is governed by the express license under which they # were provided to you (License). Unless the License provides otherwise, # you may not use, modify, copy, publish, distribute, discl...
0
sample_47_65.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Out-CurrentFile { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding()] param( [Switch]$AsNewFile, [Parameter(ValueFromPipeline, Mandatory = $true)] $...
0
Convert Raw SID to SID.ps1
#For intel concerning how to convert raw hex SID to Standard SID got to #http://blogs.msdn.com/b/oldnewthing/archive/2004/03/15/89753.aspx #to convert Hex to Dec function Convert-HEXtoDEC { param($HEX) ForEach ($value in $HEX) { [string][Convert]::ToInt32($value,16) } } #to reassort decimal values to co...
0
sample_34_41.ps1
# # Module manifest for module 'OCI.PSModules.Networkfirewall' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Networkfirewall.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported P...
0
4245.ps1
$scriptblock = { param ($Payload) $PipeName = "PoshMSProxy" $p = [System.IO.Directory]::GetFiles("\\.\\pipe\\") $start = $true foreach ($i in $p) { if ($i -like "*PoshMSProxy") { $start = $false } } while ($start) { add-Type -assembly "System.Core" ...
0
ScriptMethod Example_1.ps1
$x = New-Object PSObject | Add-Member -MemberType ScriptMethod -Name Test -Value { .{ param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$Message ) "This is the message: $Message" } @args } -PassThru # You should now cal...
0
39.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ($Aa...
0
2110.ps1
Describe "ArrayExpression Tests" -Tags "CI" { It "@([object[]](1,2,3)) should return a 3-element array of object[]" { $result = @([object[]](1,2,3)) $result.GetType().FullName | Should -BeExactly "System.Object[]" $result.Length | Should -Be 3 } It "@([int[]](1,2,3)) should return...
0
Send-HTMLFormattedEmail.ps1
#------------------------------------------------- # Send-HTMLFormattedEmail #------------------------------------------------- # Usage: Used to display help information. # **Parameters are not for interactive execution.** #------------------------------------------------- function Send-HTMLFormattedEmail{ p...
0
3384.ps1
$excludedExtensions = @(".dll", ".zip", ".msi", ".exe") function Get-Transcript { param([string] $path) return Get-Content $path | Select-String -InputObject {$_} -Pattern "^Start Time\s*:.*" -NotMatch | Select-String -InputObject {$_} -Pattern "^End Time\s*:.*" -NotMatch | Select-St...
0
sample_24_92.ps1
# # Module manifest for module 'OCI.PSModules.Fleetsoftwareupdate' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Fleetsoftwareupdate.dll' # Version number of this module. ModuleVersion = '81.0.0' # Sup...
0
sample_42_76.ps1
# Localized 05/08/2024 05:10 AM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=예(&Y) PromptNoString=아니요(&N) BundleFound=찾은 번들: {0} PackageFound=찾은 패키지: {0} EncryptedBundleFound=암호화된 번들 찾음: {0} EncryptedPackageFound=암호화된 패키지 찾음: {0} Certificat...
0
3108.ps1
function Get-ConsoleColor { [CmdletBinding()] param( ) Begin{ } Process{ $Colors = [Enum]::GetValues([ConsoleColor]) foreach($Color in $Colors) { [pscustomobject] @{ ConsoleColor = $Color } } } ...
0
1283.ps1
function Resolve-CNetPath { [CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState Write-Warning ('Resolve-CNetPath is obsolete and will be removed in a future major version of Carbon. Do not use.') ...
0