full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/Edit-File in Notepad++_1.ps1
Edit-File in Notepad++_1.ps1
<# .Synopsis Open a file for editing in notepad++ .Description Opens one or more files in Notepad++, passing all the switches each time. Accepts filenames on the pipeline .Notes I took the "no" off the parameters, because in PowerShell you only need to enter just enough of the parameter name to differ...
combined_dataset/train/non-malicious/sample_3_32.ps1
sample_3_32.ps1
if($Debug) { if($global:OffCommRun -eq $true) {return} } $global:OffCommRun = $true Import-LocalizedData -BindingVariable LocalsOfficeCommon -UICulture en-us -FileName OfficeCommon -ErrorAction SilentlyContinue Function Add-AsArray{ param($parentArrayObj, $valueToAdd) if($parentArrayObj -is [array]) { ...
combined_dataset/train/non-malicious/sample_56_95.ps1
sample_56_95.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll' # Version number of this module. ModuleVersion...
combined_dataset/train/non-malicious/Speech Recognition.ps1
Speech Recognition.ps1
$null = [Reflection.Assembly]::LoadWithPartialName("System.Speech") ## Create the two main objects we need for speech recognition and synthesis if(!$Global:SpeechModuleListener){ ## For XP's sake, don't create them twice... $Global:SpeechModuleSpeaker = new-object System.Speech.Synthesis.SpeechSynthesizer $...
combined_dataset/train/non-malicious/Send mail to BCC using P.ps1
Send mail to BCC using P.ps1
<# .SYNOPSIS Send mail to BCC using PowerShell .DESCRIPTION This script is a re-developed MSDN Sample using PowerShell. It creates an email message then sends it with a BCC. .NOTES File Name : Send-BCCMail.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell V2 CTP3 .LINK O...
combined_dataset/train/non-malicious/sample_36_20.ps1
sample_36_20.ps1
# # Module manifest for module 'OCI.PSModules.Ocvp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocvp.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/376.ps1
376.ps1
Describe "Get-PSFConfigValue Unit Tests" -Tag "CI", "Pipeline", "Unit" { BeforeAll { Get-PSFConfig -Module Get-PSFConfigValue -Force | ForEach-Object { $null = [PSFramework.Configuration.ConfigurationHost]::Configurations.Remove($_.FullName) } } AfterAll { Get-PSFConfig -Module Get-PSFConfigValue -Force | F...
combined_dataset/train/non-malicious/Invoke-NamedParameters.ps1
Invoke-NamedParameters.ps1
Function Invoke-NamedParameters { <# .SYNOPSIS Invokes a method using named parameters. .DESCRIPTION A function that simplifies calling methods with named parameters to make it easier to deal with long signatures and optional parameters. This is particularly helpful for COM objects. .PARAMETER Object ...
combined_dataset/train/non-malicious/MWE_UsageSample.psm1.ps1
MWE_UsageSample.psm1.ps1
# ModuleWriteErrorUsageExample.psm1 # To use this you need to have the ModuleWriteError module loaded. #Import-Module c:\\scripts\\ModuleWriteError # Also:: Using $ErrorView = "CategoryView" is useful too. function Get-Foo { [CmdletBinding()] param( [string]$name, [switch]$interrupt ) Process...
combined_dataset/train/non-malicious/sample_47_42.ps1
sample_47_42.ps1
# # Module manifest for module 'OCI.PSModules.Analytics' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Analytics.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_28_67.ps1
sample_28_67.ps1
/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/typescriptMode.nls.keys",[],{}); // SIG // Begin signature block // SIG // MIIkdQYJKoZIhvcNAQcCoIIkZj...
combined_dataset/train/non-malicious/sample_19_51.ps1
sample_19_51.ps1
ConvertFrom-StringData @' id_files=Collecting files id_filescab=Collecting CBS Cabs id_fileslogs=Collecting log files '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAI...
combined_dataset/train/non-malicious/1555.ps1
1555.ps1
function Test-MrIpAddress { [CmdletBinding()] param ( [Parameter(Mandatory=$true, ValueFromPipeLine=$true)] [string[]]$IpAddress, [switch]$Detailed ) PROCESS { foreach ($Ip in $IpAddress) { try { $Results = $Ip -m...
combined_dataset/train/non-malicious/sample_6_78.ps1
sample_6_78.ps1
# Copyright ? 2011, Microsoft Corporation. All rights reserved. # This script will collect the metabase.xml or applicationHost.config file, along with all web.config files # Collects Framework directory Configuration files # for the web sites passed into the script # Written By: Bret Bentzinger # Date: July 7,...
combined_dataset/train/non-malicious/sample_45_22.ps1
sample_45_22.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath common.psm1) -Force try { # Indicates if current project is a VB project $IsVbProject = ($project.CodeModel.Language -eq [EnvDTE.CodeModelLanguageConstants]::vsCMLanguageVB) if ($IsVbProject) { ...
combined_dataset/train/non-malicious/1866.ps1
1866.ps1
Describe "SSH Remoting Cmdlet Tests" -Tags "Feature" { It "Enter-PSSession HostName parameter set should throw error for invalid key path" { { Enter-PSSession -HostName localhost -UserName User -KeyFilePath NoKeyFile } | Should -Throw -ErrorId "PathNotFound,Microsoft.PowerShell.Commands.Enter...
combined_dataset/train/non-malicious/Log4Net_1.xslt.ps1
Log4Net_1.xslt.ps1
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://logging.apache.org/log4net/schemas/log4net-events-1.2" version="1.0"> <xsl:output method="html" indent="yes" encoding="UTF-8"/> <xsl:template match="events">...
combined_dataset/train/non-malicious/1257.ps1
1257.ps1
function ConvertTo-ProviderAccessControlRights { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [ValidateSet('FileSystem','Registry','CryptoKey')] [string] $ProviderName, [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string[]] ...
combined_dataset/train/non-malicious/647.ps1
647.ps1
function Get-TestUser() { if (-not $env:RsUser) { throw 'Environment variable RsUser is not defined!' } return $env:RsUser } function Get-RsSystemPolicies() { $rsProxy = New-RsWebServiceProxy return $rsProxy.GetSystemPolicies() } Describe "Grant and Revoke Access To Rs" { $user = Get-T...
combined_dataset/train/non-malicious/sample_43_1.ps1
sample_43_1.ps1
# Localized 06/28/2023 07:56 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Depanare Troubleshoot_DetectNetworkCache=Se verifică cache-ul rețelei Windows Media Player ... Resolution_Title=Rezoluție Resolution_ResetConfiguration=Se resetează toate setările de...
combined_dataset/train/non-malicious/26d9a40a-d77f-4500-a0b2-5d0d79606685.ps1
26d9a40a-d77f-4500-a0b2-5d0d79606685.ps1
$screen = " You see here a virtual switch. ------------ ------ #...........| |....| --------------- ###------------ |...(| |..%...........|########## ###-@...| ...
combined_dataset/train/non-malicious/sample_52_61.ps1
sample_52_61.ps1
# # Module manifest for module 'OCI.PSModules.Common' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Common.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Compatib...
combined_dataset/train/non-malicious/2186.ps1
2186.ps1
param( [parameter(Mandatory=$true)] $SiteServer, [parameter(Mandatory=$true)] $IPAddress ) function Get-CMSiteCode { $CMSiteCode = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $SiteServer | Select-Object -ExpandProperty SiteCode return $CMSiteCode } $Results = 0 $Boundary = Ge...
combined_dataset/train/non-malicious/sample_46_87.ps1
sample_46_87.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=ėī ėīëĶ„ 및 ėœ í˜•ė˜ 환ęē― ëģ€ėˆ˜ę°€ ėīëŊļ ėĄīėžŽí•Đ니ë‹Ī. EnvironmentErrorDoesNotExists=ėī ėīëĶ„ 및 ėœ í˜•ė˜ 환ęē― ëģ€ėˆ˜ę°€ ėĄīėžŽí•˜ė§€ ė•ŠėŠĩ니ë‹Ī. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFA...
combined_dataset/train/non-malicious/4272.ps1
4272.ps1
function Get-UserInfo { Get-WmiObject win32_operatingsystem | select csname, @{LABEL='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}} $arr = @() $Users = Get-WmiObject -Query "Select * from Win32_UserAccount Where LocalAccount = True" echo "" echo "====...
combined_dataset/train/non-malicious/sample_55_26.ps1
sample_55_26.ps1
# # Module manifest for module 'OCI.PSModules.Ailanguage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/sample_47_78.ps1
sample_47_78.ps1
#region C# code $FolderHashSource = @" using System; using System.Collections.Generic; using System.IO; using System.Runtime.Serialization.Formatters.Binary; namespace Microsoft.Solutions.IO { [Serializable] public class FolderHashEntry : IEquatable<FolderHashEntry> { public string Path...
combined_dataset/train/non-malicious/Backup-ModifiedGPOs_1.ps1
Backup-ModifiedGPOs_1.ps1
###########################################################################" # # NAME: Backup-ModifiedGPOs.ps1 # # AUTHOR: Jan Egil Ring # EMAIL: jan.egil.ring@powershell.no # # COMMENT: All Group Policy Objects modified in the specified timespan are backup up to the specified backup path. # For more d...
combined_dataset/train/non-malicious/Convert-ToMP_1.ps1
Convert-ToMP_1.ps1
param([String] $inputPath, [String] $wildcard, [String] $outputPath = $inputPath) gci -path $inputPath\\$wildcard | % { $outputFile = Join-Path $outputPath ($_.Name.Replace($_.Extension, '.mp3')) vlc -I dummy $_.FullName ":sout=#transcode{acodec=mp3,ab=128,channels=6}:standard{access=file,mux=asf,dst=$outp...
combined_dataset/train/non-malicious/e61c6c2a-be74-4a09-8b96-80d2469d4644.ps1
e61c6c2a-be74-4a09-8b96-80d2469d4644.ps1
CREATE LOGIN [vCenter_Owner] WITH PASSWORD=N'KVx$!|mhQ^', CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO --Modify Drive and size to match your environment CREATE DATABASE [vCenter] ON PRIMARY ( NAME = N'vCenter', FILENAME = N'S:\\Data\\vCenter.mdf' , SIZE = 100MB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) LOG ON (...
combined_dataset/train/non-malicious/sample_7_44.ps1
sample_7_44.ps1
# # Module manifest for module 'OCI.PSModules.Jms' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jms.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_64_72.ps1
sample_64_72.ps1
# # Module manifest for module 'OCI.PSModules.Vbsinst' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/Get-mDatastoreList.ps1
Get-mDatastoreList.ps1
Function Get-mDatastoreList { #Parameter- Name of the VMware cluster to choose a datastore from. param($Cluster) #get alphabetically last ESX host in the VMware cluster (it's likely the last host added to the cluster, so this might smoke out any problems) $VMH = get-vmhost -Location $cluster | Where-Object { ($_....
combined_dataset/train/non-malicious/Run-Defrag_2.ps1
Run-Defrag_2.ps1
# Run-Defrag # Defragments the targeted hard drives. # # Args: # $server: A target Server 2003 or 2008 system # $drive: An optional drive letter. If this is blank then all # drives are defragmented # $force: If this switch is set then a defrag will be forced # even if the drive is lo...
combined_dataset/train/non-malicious/sample_2_19.ps1
sample_2_19.ps1
#************************************************ # Version 1.0.0 # Date: 02-14-2012, 2021 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Runs Configuration Manager 2007 Diagnostics locally and/or remotely. # 0) Loads ConfigMgr Environment Information from Utils\utils_ConfigMgr07.ps1 # 1) Get...
combined_dataset/train/non-malicious/Set-IPAddress_7.ps1
Set-IPAddress_7.ps1
# corrected version - $mask variable corrected to match in both places function Set-IPAddress { param( [string]$networkinterface =$(read-host "Enter the name of the NIC (ie Local Area Connection)"), [string]$ip = $(read-host "Enter an IP Address (ie 10.10.10.10)"), [string]$mask = $(read-host "Enter the sub...
combined_dataset/train/non-malicious/sample_49_0.ps1
sample_49_0.ps1
# # Module manifest for module 'OCI.PSModules.Globallydistributeddatabase' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Globallydistributeddatabase.dll' # Version number of this module. ModuleVersion =...
combined_dataset/train/non-malicious/3118.ps1
3118.ps1
function Set-TrustedHost { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")] param( [Parameter( Position=0, Mandatory=$true)] [String[]]$TrustedHost ) Begin{ if(-not([Security.Principal.WindowsPrincipal][Security.Principal.Windo...
combined_dataset/train/non-malicious/sample_10_9.ps1
sample_10_9.ps1
# 2023-02-24 WalterE mod Trap #we# $startTime_AutoAdd = Get-Date trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" } Write-Host -Background...
combined_dataset/train/non-malicious/Add-Namespace v1.1.ps1
Add-Namespace v1.1.ps1
trap [System.Management.Automation.RuntimeException] { $entryException = $_ if ($_.CategoryInfo.Category -eq [System.Management.Automation.ErrorCategory]::InvalidOperation) { if ($_.FullyQualifiedErrorId -eq "TypeNotFound") { $targetName = $_.CategoryInfo.TargetName ...
combined_dataset/train/non-malicious/sample_62_53.ps1
sample_62_53.ps1
# # Module manifest for module 'OCI.PSModules.Loggingsearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingsearch.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/sample_7_57.ps1
sample_7_57.ps1
ConvertFrom-StringData @' id_ctsfirewallrunningcheck=Windows Firewall Running check id_ctsfirewallrunningcheckdescription=Verify the Windows Firewall service is running id_firewallrunningcheckdesc=The Windows Firewall service is not running id_firewallstartmodecheckdesc=The Windows Firewall start mode is not set to...
combined_dataset/train/non-malicious/3083.ps1
3083.ps1
When 'I (?:set|initialize) the variable (?<Name>[\w:]+) to "(?<Value>[^"]+)"' { param($Name, $Value) switch ($Name) { "One" { $One = $Value } "Two" { $Two = $Value } "Script:Two" { $Script:Two = $Value } } } Given 'I initi...
combined_dataset/train/non-malicious/sample_4_60.ps1
sample_4_60.ps1
ZНевозможно выполнить метод, если хранилище с несколькими моментальными снимками отключено.’Запрос был ограничен из-за слишком большого числа инициированных пользователем запросов на обновление источника данных за короткий период времени.gНедостаточно разрешений для обновления таблицы Direct Lake. Обратитесь к создател...
combined_dataset/train/non-malicious/3331.ps1
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] ...
combined_dataset/train/non-malicious/sample_48_9.ps1
sample_48_9.ps1
export function setControlAttribute(id, attrName, value) { const fieldElement = document.querySelector("#" + id)?.shadowRoot?.querySelector("#control"); if (!!fieldElement) { fieldElement?.setAttribute(attrName, value); } } export function setDataList(id, datalistid) { const fieldElem...
combined_dataset/train/non-malicious/Get-OUComputerNames.ps1
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...
combined_dataset/train/non-malicious/sample_46_49.ps1
sample_46_49.ps1
# escape=` # ----------------------------------------------------------------------------------------- # This file describes the standard way to build Docker in a container on Windows # Server 2016 or Windows 10. # # Maintainer: @jhowardmsft # ---------------------------------------------------------------------------...
combined_dataset/train/non-malicious/sample_42_47.ps1
sample_42_47.ps1
# # Module manifest for module 'OCI.PSModules.Ocicontrolcenter' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported...
combined_dataset/train/non-malicious/sample_58_27.ps1
sample_58_27.ps1
# # Module manifest for module 'OCI.PSModules.Oce' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oce.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_26_20.ps1
sample_26_20.ps1
# # Module manifest for module 'AsHciADArtifactsPreCreationTool' # # Generated by: Microsoft Corporation # # Generated on: 11/8/2022 # @{ # Script module or binary module file associated with this manifest. RootModule = 'AsHciADArtifactsPreCreationTool.psm1' # Version number of this module. ModuleVersi...
combined_dataset/train/non-malicious/sample_2_56.ps1
sample_2_56.ps1
ConvertFrom-StringData @' id_virtualization=Virtualization Information id_virtualizationobtaining=Obtaining Information about Virtualization Environment '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLC...
combined_dataset/train/non-malicious/TreeView Sample.ps1
TreeView Sample.ps1
Add-Type -AssemblyName presentationframework function view-TextFiles ($dir = '.') { # Create WPF Form from XAML file and bind Controls to variables $path = Resolve-Path $dir $Form=[Windows.Markup.XamlReader]::Load([IO.File]::OpenText('c:\\scripts\\window.xaml').basestream) $ListBox = $form.Fin...
combined_dataset/train/non-malicious/sample_39_40.ps1
sample_39_40.ps1
# # Module manifest for module 'OCI.PSModules.Apmtraces' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmtraces.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_40_24.ps1
sample_40_24.ps1
param([string] $AgentInstallDir) #Get the agent updater module path using intallation directory details $AgentInstallDir=$AgentInstallDir.Trim() $AgentUpdaterModulePath=Join-Path -Path $AgentInstallDir -ChildPath "Kailani.Afs.Updater.Cmdlets.dll" Write-Host "Running the agent updater action from $AgentUpdaterModu...
combined_dataset/train/non-malicious/hex2dec_1.ps1
hex2dec_1.ps1
@echo off ::unequal symbols for %%i in ("!", "x") do if "%1" equ "%%~i" goto:error ::display help information args for %%i in ("-h", "/h", "-help", "/help") do ( if "%1" equ "%%~i" goto:help ) if "%1" equ "-?" goto:help if "%1" equ "/?" goto:help ::interactive mode if "%1" equ "" ( if not defi...
combined_dataset/train/non-malicious/All Exchange 2003 Server.ps1
All Exchange 2003 Server.ps1
[Array]$ExchSrvs = @("") [String]$StrFilter = “(objectCategory=msExchExchangeServer)” $objRootDSE = [ADSI]“LDAP://RootDSE” [String]$strContainer = $objRootDSE.configurationNamingContext $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = New-object ` System.DirectoryServ...
combined_dataset/train/non-malicious/sample_64_52.ps1
sample_64_52.ps1
"use strict";(self.webpackChunk_ad_qx_lc_designer=self.webpackChunk_ad_qx_lc_designer||[]).push([[7319],{77319:function(w,i,n){n.r(i),n.d(i,{conf:function(){return y},language:function(){return k}});var l=n(75138);var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,u=Object.protot...
combined_dataset/train/non-malicious/3488.ps1
3488.ps1
function Test-ScriptActionRelatedCommands{ try { $cluster = Create-Cluster $scriptActionName = Generate-Name("scriptaction") $uri = "https://hdiconfigactions.blob.core.windows.net/linuxhueconfigactionv02/install-hue-uber-v02.sh" $nodeTypes = ("Worker") $script = Submit-AzHDIns...
combined_dataset/train/non-malicious/534.ps1
534.ps1
function Add-SPOPictureLibrary { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$listTitle ) Add-SPOList -listTitle $listTitle -templateType "PictureLibrary" }
combined_dataset/train/non-malicious/sample_66_21.ps1
sample_66_21.ps1
# # Module manifest for module 'OCI.PSModules.Ocicontrolcenter' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported...
combined_dataset/train/non-malicious/2662.ps1
2662.ps1
[CmdletBinding()] Param ( [Parameter(Mandatory=$false)] [ValidateSet('Install','Uninstall')] [string]$DeploymentType = 'Install', [Parameter(Mandatory=$false)] [ValidateSet('Interactive','Silent','NonInteractive')] [string]$DeployMode = 'Interactive', [Parameter(Mandatory=$false)] [switch]$AllowRebootPassThru ...
combined_dataset/train/non-malicious/sample_28_22.ps1
sample_28_22.ps1
let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl(); let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/webCore.eventHandlers.js"]; let currentScriptElement = document.querySelector("script[src='Scripts/webCore.plugin.js']"); if (currentScriptElement !== null) { scr...
combined_dataset/train/non-malicious/1412.ps1
1412.ps1
function Get-CPerformanceCounter { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $CategoryName ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( (Test-CPerformanceCo...
combined_dataset/train/non-malicious/Get-MyPublicIPAddress.ps1
Get-MyPublicIPAddress.ps1
<# .SYNOPSIS Gets the public IP address that represents your computer on the internet. .DESCRIPTION The Get-MyPublicIPAddress script uses DNS-O-Matic, an OpenDNS resource, to retreive the public IP address that represents your computer on the internet. .EXAMPLE Get-MyPublicIPAddress 1.1.1.1 ...
combined_dataset/train/non-malicious/1515.ps1
1515.ps1
function Test-NodeExists { [CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0)] [xml] $Xml, [Parameter(Mandatory=$true,Position=1)] [string] $XPath, [Parameter(Position=2)] [string] ...
combined_dataset/train/non-malicious/116.ps1
116.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...
combined_dataset/train/non-malicious/sample_15_90.ps1
sample_15_90.ps1
Manifest-Version: 1.0 Name: com/q1labs/sem/dsm/microsoft/windowsauth/rawxml/Event$RenderingI nfo$Keywords.class SHA-256-Digest: 4R+xG7pIQgYGr8jmselSrrW2NJcTbNqXmkOJviF0jWc= Name: com/q1labs/sem/dsm/microsoft/windowsauth/parser/util/EventDataMe ssageMapping.class SHA-256-Digest: QIwwt/AYn+iscrSSk8euaVxPI85Fp...
combined_dataset/train/non-malicious/sample_30_11.ps1
sample_30_11.ps1
param( [Parameter(Mandatory=$true)] [string]$ZipFilePath, [string]$DestinationFolder ) Add-Type -AssemblyName System.IO.Compression.FileSystem function Unzip { param([string]$zipfile, [string]$outpath) Write-Output ">>>>Unzipping file '$zipfile' to folder '$outpath'" [System.IO.Compres...
combined_dataset/train/non-malicious/sample_41_38.ps1
sample_41_38.ps1
# Include external modules $moduleName = "splunk-powershell-common.ps1" if ($psversiontable.psversion.Major -gt 5) { Set-StrictMode -Version 5 } else { Set-StrictMode -Version Latest } $ScriptDirectory = Split-Path $MyInvocation.MyCommand.Path . (Join-Path $ScriptDirectory $moduleName) # # Enabl...
combined_dataset/train/non-malicious/sample_19_17.ps1
sample_19_17.ps1
param( [Parameter(Mandatory=$true)] [string]$ZipFilePath, [string]$DestinationFolder ) Add-Type -AssemblyName System.IO.Compression.FileSystem function Unzip { param([string]$zipfile, [string]$outpath) Write-Output ">>>>Unzipping file '$zipfile' to folder '$outpath'" [System.IO.Compres...
combined_dataset/train/non-malicious/2146.ps1
2146.ps1
Describe "Type accelerators" -Tags "CI" { BeforeAll { $TypeAcceleratorsType = [psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators") $TypeAccelerators = $TypeAcceleratorsType::Get } Context 'BuiltIn Accelerators' { BeforeAll { $TypeAcceleratorTes...
combined_dataset/train/non-malicious/Get-OwnerReport_1.ps1
Get-OwnerReport_1.ps1
############################################################################## ## ## Get-OwnerReport ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## <# .SYNOPSIS Gets a l...
combined_dataset/train/non-malicious/sample_49_50.ps1
sample_49_50.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...
combined_dataset/train/non-malicious/429.ps1
429.ps1
Register-PSFTeppScriptblock -Name PSFramework-Input-ObjectProperty -ScriptBlock { function Get-Property { [CmdletBinding()] param ( $InputObject ) if (-not $InputObject) { return @{ } } $properties = @{ } switch ($InputObject.GetType().FullName) { 'System.Management.Automation.Language...
combined_dataset/train/non-malicious/3778.ps1
3778.ps1
function Test-StorageSync { Write-Verbose "RecordMode : $(Get-StorageTestMode)" Get-Command Invoke-AzStorageSyncCompatibilityCheck }
combined_dataset/train/non-malicious/sample_59_23.ps1
sample_59_23.ps1
# # Module manifest for module 'Az.FrontDoor' # # Generated by: Microsoft Corporation # # Generated on: 7/4/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.FrontDoor.psm1' # Version number of this module. ModuleVersion = '1.11.1' # Supported PSEditions...
combined_dataset/train/non-malicious/790.ps1
790.ps1
function ConvertFrom-ScriptExtent { [CmdletBinding()] [OutputType([Microsoft.PowerShell.EditorServices.BufferRange], ParameterSetName='BufferRange')] [OutputType([Microsoft.PowerShell.EditorServices.BufferPosition], ParameterSetName='BufferPosition')] param( [Parameter(Mandatory...
combined_dataset/train/non-malicious/sample_65_72.ps1
sample_65_72.ps1
# # Module manifest for module 'OCI.PSModules.Computeinstanceagent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computeinstanceagent.dll' # Version number of this module. ModuleVersion = '83.3.0' # S...
combined_dataset/train/non-malicious/2829.ps1
2829.ps1
$psake.run_by_psake_build_tester = $true $buildFiles = Get-ChildItem $PSScriptRoot/../../specs/*.ps1 $testResults = @() describe 'PSake specs' { BeforeAll { $oldPSPath = $env:PSModulePath $env:PSModulePath += "$([IO.Path]::PathSeparator)$PSScriptRoot/../../specs/SharedTaskModules" } ...
combined_dataset/train/non-malicious/sample_22_18.ps1
sample_22_18.ps1
# # Module manifest for module 'OCI.PSModules.Ailanguage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/sample_49_39.ps1
sample_49_39.ps1
ijSTF2QMV0d+rdP3fk8k5yC+/FrCMIpJUoN1l5Fbnhw7Vkxt5KmD6ZoLNJXVBHaydoOb+Q/DXrchqjLuHSeq4p7NhL1Bwhu4IYyu4AE00F5LH9VZaRLVDZaG/YY1h33CVmTaC8BjC1YzC+W+JUNuD8gBlj7eYQsc+bOYT45/1sD9U+Thho5O5vh9vVxnWOooAPHTGXXUTQYOQ/EDL3xX8YAKToro5T+hTrjP2Z17ahKkGOA+NhSGOr632TbScm/KKenAfYL4fJvGwEMIm74urfoQm5iT6hPN3tIUb3JTTjhI0dcHpc27dZ3d5dkyyes3...
combined_dataset/train/non-malicious/sample_57_13.ps1
sample_57_13.ps1
function Update-AzFunctionAppSetting { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20231201.IStringDictionary])] [Microsoft.Azure.PowerShell.Cmdlets.Functions.Description('Adds or updates app settings in a function app.')] [CmdletBinding(DefaultParameterSetName='ByName', SupportsS...
combined_dataset/train/non-malicious/3645.ps1
3645.ps1
function Get-SqlAuditingTestEnvironmentParameters ($testSuffix) { return @{ rgname = "sql-audit-cmdlet-test-rg" +$testSuffix; serverName = "sql-audit-cmdlet-server" +$testSuffix; databaseName = "sql-audit-cmdlet-db" + $testSuffix; storageAccount = "auditcmdlets" +$testSuffix } } funct...
combined_dataset/train/non-malicious/Test-UserCredential_5.ps1
Test-UserCredential_5.ps1
function Test-UserCredential { [CmdletBinding(DefaultParameterSetName = "set1")] [OutputType("set1", [System.Boolean])] [OutputType("PSCredential", [System.Boolean])] param( [Parameter(Mandatory=$true, ParameterSetName="set1", position=0)] [ValidateNotNullOrEmpty()] [String] $Username, [Parameter...
combined_dataset/train/non-malicious/sample_27_38.ps1
sample_27_38.ps1
# powershell completion for azcmagent -*- shell-script -*- function __azcmagent_debug { if ($env:BASH_COMP_DEBUG_FILE) { "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" } } filter __azcmagent_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$...
combined_dataset/train/non-malicious/sample_15_19.ps1
sample_15_19.ps1
# # Module manifest for module 'OperationsManagerV10CoreCmdlets' # # Generated by: Microsoft Corporation # # Generated on: 10/22/2008 # @{ # These modules will be processed when the module manifest is loaded. NestedModules = 'Microsoft.EnterpriseManagement.Core.Cmdlets.dll' # This GUID...
combined_dataset/train/non-malicious/sample_16_83.ps1
sample_16_83.ps1
ConvertFrom-StringData @' id_filever=Collecting critical file versions '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC5Phm1j+58Cc4T # lUIb...
combined_dataset/train/non-malicious/sample_37_86.ps1
sample_37_86.ps1
# # Module manifest for module 'OCI.PSModules.Opsi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opsi.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/526.ps1
526.ps1
function Move-SPWeb{ param( [Parameter(Mandatory=$true)] [String] $SourceUrl, [Parameter(Mandatory=$true)] [String] $DestUrl, [Switch] $NoFileCompression ) if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "...
combined_dataset/train/non-malicious/sample_65_70.ps1
sample_65_70.ps1
/*! For license information please see 4698.bundle.js.LICENSE.txt */ "use strict";(self.webpackChunkharness_aida_code_assistant_vsx=self.webpackChunkharness_aida_code_assistant_vsx||[]).push([[4698],{24698:(e,s,n)=>{n.r(s),n.d(s,{conf:()=>t,language:()=>o});var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\...
combined_dataset/train/non-malicious/sample_2_61.ps1
sample_2_61.ps1
ConvertFrom-StringData @' id_sbsl_dhcprelaykb2459530_sd=This machine may experience a three to five second delay in obtaining an IP address through Dynamic Host Configuration Protocol (DHCP) at restart due missing hotfix 2459530. '@ # SIG # Begin signature block # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZ...
combined_dataset/train/non-malicious/4443.ps1
4443.ps1
function Get-Feature { Write-Debug ($LocalizedData.ProviderApiDebugMessage -f ('Get-Feature')) Write-Output -InputObject (New-Feature $script:SupportsPSModulesFeatureName ) }
combined_dataset/train/non-malicious/1915.ps1
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 "...
combined_dataset/train/non-malicious/POC csharp expressions_2.ps1
POC csharp expressions_2.ps1
function run-csharpexpression([string] $expression ) { $global:ccounter = [int]$ccounter + 1 $local:name = [system.guid]::NewGuid().tostring().replace('-','_').insert(0,"csharpexpr") $local:ns = "ShellTools.DynamicCSharpExpression.N${ccounter}" $local:template = @" using System; using System.IO; using Syste...
combined_dataset/train/non-malicious/Add _ Get-Help -Full_1.ps1
Add _ Get-Help -Full_1.ps1
$executionContext.SessionState.InvokeCommand.PreCommandLookupAction = { param($CommandName, $CommandLookupEventArgs) if($CommandName.StartsWith("?")) { $RealCommandName = $CommandName.TrimStart("?") $CommandLookupEventArgs.CommandScriptBlock = { Get-Help $RealCommandName -Full...
combined_dataset/train/non-malicious/sample_33_83.ps1
sample_33_83.ps1
# # Module manifest for module 'OCI.PSModules.Tenantmanagercontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Tenantmanagercontrolplane.dll' # Version number of this module. ModuleVersion = '82...
combined_dataset/train/non-malicious/Send-Growl _1.1.ps1
Send-Growl _1.1.ps1
## This is the first version of a Growl module (just dot-source to use in PowerShell 1.0) ## v 1.0 supports a very simple notice, and no callbacks ## v 2.0 supports registering multiple message types ## supports callbacks ## v 2.1 redesigned to be a module used from apps, rather than it's own "PowerGrowler" a...
combined_dataset/train/non-malicious/1462.ps1
1462.ps1
function Install-CScheduledTask { [CmdletBinding()] [OutputType([Carbon.TaskScheduler.TaskInfo])] param( [Parameter(Mandatory=$true)] [ValidateLength(1,238)] [Alias('TaskName')] [string] $Name, [Parameter(Mandatory=$true,ParameterSetName='Minut...
combined_dataset/train/non-malicious/sample_53_98.ps1
sample_53_98.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...