filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_59_63.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="$basedir\..\..\..\..\..\browserslist@4.23.0\node_modules" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds o...
0
sample_22_61.ps1
# # Module manifest for module 'OCI.PSModules.Databasemanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Databasemanagement.dll' # Version number of this module. ModuleVersion = '81.0.0' # Suppo...
0
674.ps1
Function Create-PSCredential { param( [Parameter(Mandatory = $True)] [string]$UserName, [Parameter(Mandatory = $True)] [string]$Password ) $SecurePassword = ConvertTo-SecureString $Password -AsPlainText -Force $ps_credential = New-Object Syste...
0
3449.ps1
function Test-GetNonExistingDataFactoryGateway { $dfname = Get-DataFactoryName $rgname = Get-ResourceGroupName $rglocation = Get-ProviderLocation ResourceManagement New-AzResourceGroup -Name $rgname -Location $rglocation -Force New-AzDataFactory -Name $dfname -Location $rglocati...
0
Findup_20.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : I...
0
sample_66_31.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # 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 Licen...
0
2013.ps1
. "$psscriptroot/TestRunner.ps1" $AssemblyName = "Microsoft.PowerShell.Commands.Management" $excludeList = "EventlogResources.resx", "TransactionResources.resx", "WebServiceResources.resx", "HotFixResources.resx", "ControlPanelResources.resx", "WmiResources.resx", "ManagementMshSnapInResour...
0
212.ps1
function Get-ADFSMORole { [CmdletBinding()] PARAM ( [Alias("RunAs")] [System.Management.Automation.Credential()] [pscredential] $Credential = [System.Management.Automation.PSCredential]::Empty ) TRY { IF (-not (Get-Module -Name ActiveDirectory)) { Im...
0
3451.ps1
function Test-GetNonExistingDataFactory { $dfname = Get-DataFactoryName $rgname = Get-ResourceGroupName $rglocation = Get-ProviderLocation ResourceManagement New-AzResourceGroup -Name $rgname -Location $rglocation -Force Assert-ThrowsContains { Get-AzDataFactory -Resou...
0
1660.ps1
function Check-Flags ($sam = $env:USERNAME) { $uac = [int](([adsisearcher]"samaccountname=$sam").FindOne().Properties.useraccountcontrol | Out-String).Trim() if ($uac -eq 0) { throw 'UAC is 0' } $flags = @{ SCRIPT = 1 ACCOUNTDISABLE = 2 HOMEDIR_REQUIRED = 8 ...
0
Set-Computername_12.ps1
function Set-ComputerName { param( [switch]$help, [string]$originalPCName=$(read-host "Please specify the current name of the computer"), [string]$computerName=$(read-host "Please specify the new name of the computer")) $usage = "set-ComputerName -originalPCname CurrentName -computername AnewName" if (...
0
Set-Domain_2.ps1
function Set-Domain { param( [switch]$help, [string]$domain=$(read-host "Please specify the domain to join"), [System.Management.Automation.PSCredential]$credential = $(Get-Crdential) ) $usage = "`$cred = get-credential `n" $usage += "Set-AvaDomain -domain corp.avanade.org -credential `$cred`n" ...
0
sample_40_53.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # 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 Licen...
0
sample_63_79.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ param ( [Parameter(Manda...
0
sample_18_23.ps1
##------------------------------------------------------------------ ## <copyright file="GMATenantJson.psm1" company="Microsoft"> ## Copyright (C) Microsoft. All rights reserved. ## </copyright> ##------------------------------------------------------------------ $azureStackNugetPath = Get-ASArtifactPath -N...
0
958.ps1
$uniqueId=$(-join ((97..122) + (48..57) | Get-Random -Count 15 | % {[char]$_})) $apiVersion = "2015-04-08" $location = "West US 2" $resourceGroupName = "MyResourceGroup" $accountName = "mycosmosaccount-$uniqueId" $apiType = "MongoDB" $accountResourceType = "Microsoft.DocumentDb/databaseAccounts" $databaseName = "...
0
sample_18_73.ps1
# File: DC_WindowsUpdateLog.ps1 # Date: 2009-2019 # Author: + Walter Eder (waltere@microsoft.com) # Description: Collects additional WindowsUpdate information. #******************************************************* PARAM([string]$MachineName = $ComputerName,[string]$Path= $null) Function CopyWindowsupdateLo...
0
sample_0_87.ps1
// Copyright (c) 2008 DMTF. All rights reserved. [Abstract, Association, Version ( "2.18.0" ), UMLPackagePath ( "CIM::Core::Collection" ), Description ( "OwningCollectionElement represents an association between a " "Collection and the ManagedElement responsible for the control " ...
0
sample_58_21.ps1
# diag_sha.psm1 # Created by tdimli # March 2020 # # Diagnostic functions for SHA area # version $SHA_version = "1.0.200425.0" # Area and Area/Component arrays # Example: $AREA = @("Component1", "Component2") $SHA = @() #Component/Diagnostic Function arrays # Example: $Component1 = @("Diag_Func1", "Dia...
0
sample_32_41.ps1
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise.msi'; if ([Environment]::Is64BitProcess) { $url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise64.msi' } Write-Host "Downloading Google Chrome Beta" $wc = New-Object net.webcl...
0
2557.ps1
param( $SQLServer, $BAKFile = '\\xsqlutil18\e$\MSSQL10.MSSQLSERVER\MSSQL\dbamaint_empty_11_26_2012.bak', $FilePrefix = 'Log', [switch]$Log ) if (!$SQLServer ) { $SQLServer = Get-Content "E:\Dexma\data\ServerList.txt" } function Run-Query() { param ( $SqlQuery , $SqlServer , $SqlCatalog , $SqlUs...
0
pscp & spaces.ps1
Script set-psdebug -trace 2 $sftp = "c:\\bin\\pscp.exe" $sftpusername = "username" $sftppassword = "password" $sftphost = "sftp.host.com" $sftpdestination = "`"`/Test Test`/`"" [Array]$sftpArgs = "-sftp", "-v", "-l", "$sftpusername", "-pw", "$sftppassword", "c:\\calinstall.log", "$sftphost`:$sftpdestination"; ...
0
2564.ps1
param ( [string]$serverInstance = "(local)", [string]$tempDir = "C:\Dexma\TEMP\", [switch]$verbose, [switch]$debug ) function main() { if ($verbose) {$VerbosePreference = "Continue"} if ($debug) {$DebugPreference = "Continue"} Get-MSSQL-ServerAttrib-Html $serverInstance $tempDir } function G...
0
sample_10_17.ps1
#************************************************ # Function.ps1 # Version 1.0.0 # Date: 03-01-2012 # Author: Wilson Souza - wsouza@microsoft.com # Description: This script contains functions used by others ps1 files #************************************************ Import-LocalizedData -BindingVariable ScriptSt...
0
2201.ps1
[CmdletBinding(SupportsShouldProcess)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")] [ValidateScript({Test-Connection -ComputerName $_ -Count 2})] [string]$SiteServer, [parameter(Mandatory=$true, HelpMessage="Value in WQL query statement to look for"...
0
494.ps1
function Get-FileEncoding{ [CmdletBinding()] param( [Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [string] $Path ) [byte[]]$byte = get-content -Encoding byte -ReadCount 4 -TotalCount 4 -Path $Path if($byte[0] -eq 0xef -and $byte[1] -e...
0
sample_39_76.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
4239.ps1
function New-IPv4Range { param( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $StartIP, [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=2)] ...
0
2626.ps1
’╗┐ param([parameter(Mandatory=$true)][string] $newdata, [parameter(Mandatory=$true)][string] $newlog, [string] $instance="localhost", [string] $outputfile=([Environment]::GetFolderPath("MyDocuments"))+"`\FileMover.ps1") [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out...
0
180.ps1
function Get-LocalAdministratorBuiltin { [CmdletBinding()] param ( [Parameter()] $ComputerName = $env:computername ) Process { Foreach ($Computer in $ComputerName) { Try { Add-Type -AssemblyName System.DirectoryServices.Accoun...
0
sample_61_80.ps1
########################################################################## # DELL PROPRIETARY INFORMATION # # This software is confidential. Dell Inc., or one of its subsidiaries, has supplied this # software to you under the terms of a license agreement,nondisclosure agreement or both. # You may not copy, disclose, o...
0
sample_64_47.ps1
# # Module manifest for module 'OCI.PSModules.Dataintegration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dataintegration.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported P...
0
1903.ps1
Describe "New-TimeSpan DRT Unit Tests" -Tags "CI" { It "Should works proper with new-timespan"{ $results = New-TimeSpan -Days 10 -Hours 10 -Minutes 10 -Seconds 10 $results | Should -BeOfType "System.Timespan" $results.Days | Should -Be 10 $results.Hours | Should -Be 10 ...
0
sample_67_53.ps1
# # Module manifest for module 'OCI.PSModules.Containerengine' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerengine.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported P...
0
sample_5_51.ps1
ConvertFrom-StringData @' progressbar_id_registrydatatypecheck=Verifying Microsoft Dynamics CRM registry key data types progressbar_id_registrydatatypecheckdesc=Verifying Microsoft Dynamics CRM registry key data types '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5...
0
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...
0
Get-StrictMode.psm1.ps1
<# .SYNOPSIS A very simple module to retrieve the Set-StrictMode setting of the session. .DESCRIPTION This procedure is necessary as there is, apparently, no PowerShell variable for this and enables the user setting to be returned to its original state after possibly being changed within a script. The various...
0
sample_11_63.ps1
@{ GUID = "A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author = "PowerShell" CompanyName = "Microsoft Corporation" Copyright = "Copyright (c) Microsoft Corporation." ModuleVersion = "7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion = "3.0" FunctionsToExport = @() CmdletsToExport = "Get-Credential", "Get-ExecutionP...
0
45.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
70ca48ee-7e54-4a00-bf91-3c77792224ad.ps1
[void][system.reflection.Assembly]::LoadWithPartialName("MySql.Data") # Open Connection $connStr = "server=127.0.0.1;port=3306;uid=root;pwd=password;database=test;Pooling=False" $conn = New-Object MySql.Data.MySqlClient.MySqlConnection($connStr) $conn.Open() # write the info $sql = "INSERT INTO table1 (n...
0
sample_26_66.ps1
# virtualenv activation module # Activate with `overlay use activate.nu` # Deactivate with `deactivate`, as usual # # To customize the overlay name, you can call `overlay use activate.nu as foo`, # but then simply `deactivate` won't work because it is just an alias to hide # the "activate" overlay. You'd need to call `...
0
sample_64_17.ps1
<# .SYNOPSIS UninstallSyncServiceIIS.ps1 script file This is a place-holder file only fofr agent patch build purposes #> Write-Host "This file functionality is deprecated and is place-holder only" # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # ...
0
sample_29_15.ps1
if ( (Test-Path .web\bufferSource.ts) -and (Test-Path .web\fetchSource.ts) -and (Test-Path .web\extension.ts) -and (Test-Path .web\package-lock.json) -and (Test-Path .web\package.json) -and (Test-Path .web\.vscode\extensions.json) -and (Test-Path .web\.vscode\launch.json) -and (T...
0
sample_10_1.ps1
#************************************************ # DC_PStat.PS1 # Version 1.0.1 # Date: 07-10-2009 # Author: Andre Teixeira - andret@microsoft.com # Description: PStat.exe tool, saving output to a file named $ComputerName_PStat.txt #************************************************ if($debug -eq $true){[void]$...
0
2556.ps1
param ( [string]$tfsServer = "TFSServerName", [string]$tfsLocation = "$/TFS/Project", [string]$localFolder ="c:\scripts", [string]$file, [string]$checkInComments = "Checked in from PowerShell" ) $clientDll = "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft....
0
594.ps1
function Delete-ObsoleteLogFiles{ $Features = @() Get-ChildItem -Path $PSconfigs.Path -Filter $PSconfigs.Profile.Filter -Recurse | %{ [xml]$(Get-Content $_.fullname) | %{ $Features += $_.Content.Feature | where{$_.Name -eq "Log File Retention"} } } $Features | %{$Days += $_.Days};...
0
Out-HTMLTable.ps1
<# .SYNOPSIS Takes input objects, and outputs a sortable HTML table .DESCRIPTION The function requires at least 2 parameters, an input object and a path where the result is to be output to. The function will output 3 files, a css file that determines the way the result is formatted, a javascript file ...
0
3498.ps1
function Write-InstallationCheckToFile { Param($installationchecks) if (Get-Module Az.Profile -ListAvailable -ErrorAction Ignore) { Write-Warning "Both Az and AzureRM modules were detected on your machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or ru...
0
117.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 ...
0
sample_52_4.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function ConvertFrom-ScriptExtent { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding()] [OutputType([Microsoft.PowerShell.EditorServices.Extensions.IFileRange, Microsoft.PowerShell.Edito...
0
BufferBox 3.5.ps1
#################################################################################################### ## This script is just a demonstration of some of the things you can do with the buffer ## in the default PowerShell host... it serves as a reminder of how much work remains on ## PoshConsole, and as an inspiration t...
0
3060.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "Should -FileContentMatchExactly" { Context "when testing file contents" { Setup -File "test.txt" "this is line 1$([System.Environment]::NewLine)Pester is awesome$([System.Environment]::NewLine)And this is Unicode: ☺" It...
0
Export top n SQLPlans_1.ps1
<# ALZDBA SQLServer_Export_SQLPlans_SMO.ps1 Export top n consuming sqlplans via avg_worker_time (=cpu) for all databases of a given SQLServer (SQL2005+) Instance results in a number of .SQLPlan files and the consumption overview .CSV file #> #requires -version 2 #SQLServer instance $SQLInstance = 'uabe0db97\\ua...
0
3d3bbfa8-777b-4374-9eac-5350569d2cba.ps1
param($Issue, $Credentials = $(Get-Credential), $BaseURI = "https://your.jira.server/jira") function ConvertTo-UnsecureString( [System.Security.SecureString][parameter(mandatory=$true)]$SecurePassword) { $unmanagedString = [System.IntPtr]::Zero; try { $unmanagedString = [Runtime.Interop...
0
sample_61_75.ps1
<# .Synopsis Activate a Python virtual environment for the current PowerShell session. .Description Pushes the python executable for a virtual environment to the front of the $Env:PATH environment variable and sets the prompt to signify that you are in a Python virtual environment. Makes use of the command line...
0
Invoke-V2Script.ps1
# Function may be useful for people who want to play with CTP1 for PowerShell 3 but need to use v2 scripts. function Invoke-V2Script { <# .Synopsis Will run script currently edited in ISE using powershell V2. .Description Will run script currently edited ISE. If it's not saved - it wil...
0
Enable_Configure SNMP_3.ps1
#Powershell Script To Install SNMP Services (SNMP Service, SNMP WMI Provider) #Variables :) $pmanagers = "ADD YOUR MANAGER(s)" $commstring = "ADD YOUR COMM STRING" #Import ServerManger Module Import-Module ServerManager #Check If SNMP Services Are Already Installed $check = Get-WindowsFeature | Where-Objec...
0
Add-SqlClientAlias.ps1
####################### <# .SYNOPSIS Adds a SQL Server Client Alias by setting registry key. .DESCRIPTION Provides same functionality as cliconfg.exe GUI. Although there is a WMI provider to add client network aliases, the differences between SQL version make it diffult to use. This method creates the registry ke...
0
New-PemFile.ps1
function New-PemFile { <# .SYNOPSIS Creates a new PEM file from one or more certificate files. .DESCRIPTION The New-PemFile function creates a new PEM file by using the content from certificate files. CER, CRT, and KEY files are the most common certificate file types. .PARAMETER Path The path or ...
0
Get-RecentLogons.ps1
Add-PSSnapin -Name Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue # Location of the CSV file created. $fileLocation = "C:\\temp\\logon.csv" # Get the Current Date $CURRENTDATE=GET-DATE # Number of days to check $COMPAREDATE = $CURRENTDATE.AddDays(-30) # Your AD Domain $server = "ad.domai...
0
3331.ps1
function Deny-PendingCommand { [PoshBot.BotCommand( Aliases = ('deny', 'denycommand') )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string]$Id ) $context = $Bot.DeferredCommandExecutionContexts[$Id] ...
0
sample_7_94.ps1
# Load Common Library # Load Reporting Utilities #$debug = $false . ./utils_cts.ps1 . ./TS_RemoteSetup.ps1 # 2023-02-20 WalterE mod Trap #we# trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo...
0
sample_23_59.ps1
[CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline,ValueFromPipelineByPropertyName)] [Alias("Fullname")] [String]$FileName ) return git log -n 1 --pretty=format:%H -- $filename # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgo...
0
sample_63_60.ps1
com.microsoft.azure.toolkit.lib.appservice com.microsoft.azure.toolkit.lib.appservice.config com.microsoft.azure.toolkit.lib.appservice.deploy com.microsoft.azure.toolkit.lib.appservice.entity com.microsoft.azure.toolkit.lib.appservice.file com.microsoft.azure.toolkit.lib.appservice.function com.microsoft.azure.t...
0
sample_24_66.ps1
# # Module manifest for module 'OCI.PSModules.Vault' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vault.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions Compatible...
0
1802.ps1
Describe "Control Service cmdlet tests" -Tags "Feature","RequireAdminOnWindows" { BeforeAll { $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() if ( -not $IsWindows ) { $PSDefaultParameterValues["it:skip"] = $true } } AfterAll { $global:PSDefaultParameterValues = $origi...
0
Get-OUComputerNames.ps1
param( [switch]$Help, [string] $OU ) $usage = @' Get-OUComputerNames usage : .\\Get-OUComputerNames.ps1 "OU=TESTOU,dc=domain,dc=com" returns : the names of computers in Active Directory (AD) that recursively match a given LDAP query author : Nathan Hartley '@ if ($help) {Write-Host $usage;br...
0
520.ps1
function Import-SPList{ param( [Parameter(Mandatory=$true)] [String] $WebUrl, [Parameter(Mandatory=$true)] [String] $Path, [Switch] $NoFileCompression ) if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Mic...
0
sample_27_58.ps1
param ( [Parameter(Mandatory = $true)] [string] $TargetPath, $prerelease, $alLanguageVersion ) Set-Variable LinterCopFileName -Option ReadOnly -Value "BusinessCentral.LinterCop.dll" -Scope "Script" $ErrorActionPreference = 'Stop' # Parameter $prerelease can be a string (true/false) or a boolean ($true...
0
sample_24_30.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\sucrase@3.35.0\node_modules\sucrase\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\sucrase@...
0
4270.ps1
function Brute-Ad { [cmdletbinding()] Param ( [string[]]$list, $domain ) Write-Output "" Write-Output "[+] Brute-ad module started" Write-Output "" if ($list) { $allpasswords = $list Write-Output 'The provided list will be used: '$allpasswords`n } else { ...
0
2080.ps1
Describe 'NestedModules' -Tags "CI" { function New-TestModule { param( [string]$Name, [string]$Content, [string[]]$NestedContents ) new-item -type directory -Force "TestDrive:\$Name" > $null $manifestParams = @{ Path = "TestDrive:\$...
0
Set-KeepAliveTime.ps1
<# .SYNOPSIS Change the setting for TCPIP KeepAliveTime on a server or several servers. .DESCRIPTION Change the setting for TCPIP KeepAliveTime on a server or several servers. When moving mailboxes with lar...
0
sample_37_0.ps1
# MIDDLEWARE SERVICES USER_API_URL = 'https://t2c-user-service.qxlabai.com' MIDDLEWARE_API_URL = 'https://t2c-middleware-service.qxlabai.com' # USER_API_URL = 'http://localhost:3007' # MIDDLEWARE_API_URL = 'http://localhost:3005' # OPENLAB_AI OPEN_LAB_AI_BASE_URL = https://13.248.139.177 OPEN_LAB_AI_KEY = '0546a8c6-12...
0
SqlProxy_3.psm1.ps1
# --------------------------------------------------------------------------- ### <Author> ### Chad Miller ### </Author> ### <Description> ### Based on functions in SQLPSX. SqlProxy.psm1 module is used for administering ### SQL Server logins, users, and roles. Designed to be used with PS Remoting. ### All actio...
0
LibraryChart_1.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Chad Miller ### </Author> ### <Description> ### Defines functions for wokring with Microsoft Chart Control for .NET 3.5 Framework ### Pipe output of Powershell command to Out-Chart function and specify c...
0
New-CodeSigningCertifica.ps1
##################################################################### # New-CodeSigningCertificate.ps1 # Version 1.0 # # Creates new self-signed code signing certificate and installs it to # current user's personal store. Supports Windows XP and higher. # # Initially script was developed for Quest PowerGUI Scrip...
0
sample_17_62.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
0
350.ps1
function Set-PSFFeature { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [PsfValidateSet(TabCompletion = 'PSFramework.Feature.Name'...
0
sample_9_23.ps1
ConvertFrom-StringData @' id_ctsaddons=Setup App Compat Component id_ctsaddonsdescription=Collects Setup App Compat information. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIB...
0
4396.ps1
function Copy-ScriptFile { [CmdletBinding(PositionalBinding=$false)] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $SourcePath, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $DestinationPath, ...
0
sample_18_70.ps1
[CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [Alias("FullName")] [string]$path, [Parameter()] [int]$GoBack = 0, [Parameter()] [string]$After, [Parameter()] [string]$NewStart="", [Parameter()] [string...
0
sample_4_62.ps1
#************************************************ # TS_KB2655998_InactiveTSPorts.ps1 # Version 1.0.1 # Date: 03/21/2012 11:19:10 # Author: jasonf # Description: Checks for inactive ts ports described in http://blogs.technet.com/b/askperf/archive/2012/03/06/performance-issues-due-to-inactive-terminal-server-ports....
0
sample_44_68.ps1
pipeline { agent { kubernetes { inheritFrom 'docker-node' } } environment{ PROJECT = "vscode-plugin-for-sf" PUBLISHER = "QualityClouds" VS_PUBLISH_TOKEN = credentials("vs-publish-token") } stages { stage ('Install Dependencies')...
0
2871.ps1
Framework '4.7.2' task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) {} else { $output = &msbuild /version /nologo 2>&1 Assert ($output -NotLike '15.0') '$output should contain 15.0' } }
0
sample_32_25.ps1
# # Module manifest for module 'OCI.PSModules.Database' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Database.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Comp...
0
Findup_6.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; namespace Findup { public class FileInfoExt { public FileInfoExt(FileInfo fi) ...
0
sample_9_61.ps1
#************************************************ # DC_IPsec-Component.ps1 # Version 1.0 # Version 1.1: Altered the runPS function correctly a column width issue. # Date: 2009-2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about the IPsec component. # Called from: Main Net...
0
3120.ps1
function Update-StringInFile { [CmdletBinding(SupportsShouldProcess=$true)] Param( [Parameter( Position=0, HelpMessage="Folder where the files are stored (will search recursive)")] [ValidateScript({ if(Test-Path -Path $_) { return $true } else { throw "Enter a valid path!" ...
0
3587.ps1
function Get-ResourceGroupName { return getAssetName } function Get-ResourceName { return getAssetName } function Get-ProviderLocation($provider) { if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { ...
0
sample_12_40.ps1
ConvertFrom-StringData @' id_dcdiag=Directory Server Diagnosis (DCDiag) id_dcdiagobtaining=Running DCDIAG.EXE tool to gather domain controller status information. id_dcdiagdnsobtaining=Running DCDIAG.EXE tool to gather domain controller DNS health information. id_dcdiagtopologyobtaining=Running DCDIAG.EXE tool to g...
0
Get-DiskUsage_1.ps1
##############################################################################\n##\n## Get-DiskUsage\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\nRetrieve i...
0
SQL-Select.ps1
<# .SYNOPSIS Author:...Vidrine Date:.....2012/04/08 .DESCRIPTION Function uses the Microsoft SQL cmdlets 'Invoke-SQLcmd' to connect to a SQL database and run a SELECT statement. Results of the query are returned. Store returned results in a variable to be able to interact with them as an object. .PARAM s...
0
2722.ps1
if (Test-Path "$env:SystemRoot\clrver.exe") { $counter = 0 & $env:SystemRoot\clrver.exe -all 2> $null | ` ConvertFrom-Csv -Delimiter `t -Header "PID","ProcessName","CLR Version" | ` ForEach-Object { if ($counter -gt 1) { $_ } $counter += 1 ...
0
1916.ps1
Describe "Register-ObjectEvent" -Tags "CI" { BeforeEach { $pesterobject = (New-Object System.Collections.ObjectModel.ObservableCollection[object]) } AfterEach { Unregister-Event -SourceIdentifier PesterTestRegister -ErrorAction SilentlyContinue } Context "Check return type of Register-ObjectE...
0
sample_61_14.ps1
# # Module manifest for module 'OCI.PSModules.Vulnerabilityscanning' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vulnerabilityscanning.dll' # Version number of this module. ModuleVersion = '90.0.0' #...
0
sample_32_42.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apa...
0
4139.ps1
[CmdletBinding()] param () Remove-Item -Path ($env:windir + '\temp\ActivityLog.xml') -ErrorAction SilentlyContinue -Force Remove-Item -Path ($env:windir + '\temp\inventory.xml') -ErrorAction SilentlyContinue -Force $ErrCode = (Start-Process -FilePath ((Get-ChildItem -Path $env:ProgramFiles, ${env:ProgramFiles(x86)} ...
0
3572.ps1
function Get-ResourceGroupName { return getAssetName } function Clean-ResourceGroup($rgname) { Remove-AzResourceGroup -Name $rgname -Force } function Create-ResourceGroup { $resourceGroupName = Get-ResourceGroupName return New-AzResourceGroup -Name $resourceGroupName -Location WestUS }
0
859.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests', '' . "$here\$sut" $clusterName = $ENV:ClusterName $httpUserPassword = $ENV:HttpPassword $securePassword = ConvertTo-SecureString $httpUserPassword -AsPlainText -Force $creds = New-Object -...
0