full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/sample_34_80.ps1 | 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... |
combined_dataset/train/non-malicious/2939.ps1 | 2939.ps1 | task default -depends Test
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
Assert $false "This fails."
} -PostAction {"Post-Test"}
task Compile -depends Clean {
"Compile"
}
task Clean {
"Clean"
}
|
combined_dataset/train/non-malicious/4410.ps1 | 4410.ps1 | function Set-ModuleSourcesVariable
{
[CmdletBinding()]
param(
[switch]
$Force,
$Proxy,
$ProxyCredential
)
if(-not $script:PSGetModuleSources -or $Force)
{
$isPersistRequired = $false
if(Microsoft.PowerShell.Management\Test-Path $script:PSGetModuleSo... |
combined_dataset/train/non-malicious/sample_25_83.ps1 | sample_25_83.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... |
combined_dataset/train/non-malicious/sample_42_86.ps1 | sample_42_86.ps1 | #
# Module manifest for module 'OCI.PSModules.Containerinstances'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Suppo... |
combined_dataset/train/non-malicious/sample_67_77.ps1 | sample_67_77.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... |
combined_dataset/train/non-malicious/1266.ps1 | 1266.ps1 |
filter Protect-CString
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, Position=0, ValueFromPipeline = $true)]
[object]
$String,
[Parameter(Mandatory=$true,ParameterSetName='DPAPICurrentUser')]
[Switch]
$... |
combined_dataset/train/non-malicious/2076.ps1 | 2076.ps1 |
Describe 'enums' -Tags "CI" {
Context 'basic enums' {
enum E1
{
e0
e1
e2
}
It "has correct value 0" { [E1]::e0 | Should -Be ([E1]0) }
It "has correct value 1" { [E1]::e1 | Should -Be ([E1]1) }
It "has correct value 2" { [E1]::e2... |
combined_dataset/train/non-malicious/1769.ps1 | 1769.ps1 |
Import-Module HelpersSecurity
try
{
$defaultParamValues = $PSDefaultParameterValues.Clone()
$PSDefaultParameterValues["it:Skip"] = !$IsWindows
Describe "Local script debugger is disabled in system lock down mode" -Tags 'CI','RequireAdminOnWindows' {
BeforeAll {
... |
combined_dataset/train/non-malicious/New-NamedPipe.ps1 | New-NamedPipe.ps1 | # .NET 3.5 is required to use the System.IO.Pipes namespace
[reflection.Assembly]::LoadWithPartialName("system.core") | Out-Null
$pipeName = "pipename"
$pipeDir = [System.IO.Pipes.PipeDirection]::InOut
$pipe = New-Object system.IO.Pipes.NamedPipeServerStream( $pipeName, $pipeDir )
|
combined_dataset/train/non-malicious/615.ps1 | 615.ps1 | param(
[string]$Version,
[string]$Path,
[switch]$Force,
$Update,
[switch]$Uninstall
)
$Configs = @{
Url = "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=sharepointpowershell&DownloadId=807591&FileTime=130378986116670000&Build=20885"
Path = "$((Get-Location).Path)\"
}
$Configs | ForE... |
combined_dataset/train/non-malicious/Get-OLEDBData.ps1 | Get-OLEDBData.ps1 | ###########################################################################
# Get-OLEDBData
# --------------------------------------------
# Description: This function is used to retrieve data via an OLEDB data
# connection.
#
# Inputs: $connectstring - Connection String.
# $sql ... |
combined_dataset/train/non-malicious/sample_52_30.ps1 | sample_52_30.ps1 | #
# Module manifest for module 'OCI.PSModules.Goldengate'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Goldengate.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_53_46.ps1 | sample_53_46.ps1 |
@{
# This file should have the product name, else powershell module will not work please read "Use the correct Module Directory Name" section here https://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx
# Script module or binary module file associated with this manifest
RootModule = '..\..\AIP.dll'
# Ve... |
combined_dataset/train/non-malicious/sample_13_53.ps1 | sample_13_53.ps1 | #===========================================================================
#DVApp.ps1
#----------------------------------------------------------------------------
#Copyright (C) 2021 Intel Corporation
#SPDX-License-Identifier: MIT
#--------------------------------------------------------------------------*/
... |
combined_dataset/train/non-malicious/Colorize Subversion SVN_4.ps1 | Colorize Subversion SVN_4.ps1 | # detect source control management software
function findscm {
$scm = ''
:selectscm foreach ($_ in @('svn', 'hg')) {
$dir = (Get-Location).Path
while ($dir.Length -gt 3) {
if (Test-Path ([IO.Path]::combine($dir, ".$_"))) {
$scm = $_
break selectscm
}
$dir = $dir -Replace '\\\\[^\\\\]+$'... |
combined_dataset/train/non-malicious/830.ps1 | 830.ps1 |
$cred = Get-Credential
New-AzVmss `
-ResourceGroupName "myResourceGroup" `
-VMScaleSetName "myScaleSet" `
-Location "EastUS2" `
-VirtualNetworkName "myVnet" `
-SubnetName "mySubnet" `
-PublicIpAddressName "myPublicIPAddress" `
-LoadBalancerName "myLoadBalancer" `
-UpgradePolicyMode "Automatic" `
... |
combined_dataset/train/non-malicious/sample_4_46.ps1 | sample_4_46.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/sample_40_7.ps1 | sample_40_7.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function get-AMTMPSStatus {
<#
.Synopsis
Returns the status of the Intel Fast Call for Help Management Presence Server (MPS) interface settings
.Description
Returns the status of the Intel Fast Call for Help Management Presence Se... |
combined_dataset/train/non-malicious/1455.ps1 | 1455.ps1 |
function Grant-CServiceControlPermission
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string]
$ServiceName,
[Parameter(Mandatory=$true)]
[string]
$Identity
)
Set-StrictMode -Versio... |
combined_dataset/train/non-malicious/sample_4_13.ps1 | sample_4_13.ps1 | #************************************************
# TS_Win7PrintUpdateRollupCheck.ps1
# Version 1.0.1
# Date: 6/8/2012
# Author: v-alyao
# Description: [Idea ID 4168] [Windows] Check for existence of 2647753 for printing issues
# Rule number: 4168
# Rule URL: http://sharepoint/sites/rules/Rule Submissions/Fo... |
combined_dataset/train/non-malicious/Get-AliasSuggestion.ps1 | Get-AliasSuggestion.ps1 | ##############################################################################\n##\n## Get-AliasSuggestion\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\nGet ... |
combined_dataset/train/non-malicious/3121.ps1 | 3121.ps1 |
function Find-StringInFile
{
[CmdletBinding()]
param(
[Parameter(
Position=0,
Mandatory=$true,
HelpMessage="String to find")]
[String]$Search,
[Parameter(
Position=1,
HelpMessage="Folder where the files are stored (search is recursive)")]
[ValidateScript({
if(Test-Path -Path $_)
... |
combined_dataset/train/non-malicious/7.ps1 | 7.ps1 | enum BranchBehindAndAheadDisplayOptions { Full; Compact; Minimal }
enum UntrackedFilesMode { Default; No; Normal; All }
class PoshGitCellColor {
[psobject]$BackgroundColor
[psobject]$ForegroundColor
PoshGitCellColor() {
$this.ForegroundColor = $null
$this.BackgroundColor = $null
}
... |
combined_dataset/train/non-malicious/1922.ps1 | 1922.ps1 |
Describe "Get-TraceSource" -Tags "Feature" {
It "Should output data sorted by name" {
$expected = (Get-TraceSource | Sort-Object Name)
Get-TraceSource | Should -Be $expected
}
}
|
combined_dataset/train/non-malicious/sample_34_33.ps1 | sample_34_33.ps1 | using module ..\..\Config.psm1
Param(
[Parameter(Mandatory=$False)]
[switch]$Launch=$false,
[Parameter(Mandatory=$False)]
[switch]$TestStatus=$false
)
Import-Module (Join-Path $PSScriptRoot "..\..\Events.psm1")
if ($TestStatus) {
return [string]([ApplyResult]::Success)
}
if (!$Launch) {
... |
combined_dataset/train/non-malicious/sample_8_42.ps1 | sample_8_42.ps1 | #************************************************
# TS_AppCompatDisabledCheck.ps1
# Version 1.0.1
# Date: 6/8/2012
# Author: v-blchen
# Description: [Idea ID 3317] [Windows] DisableEngine reg entry can cause app install or registration failure
# Rule number: 3317
# Rule URL: http://sharepoint/sites/rules/Rule... |
combined_dataset/train/non-malicious/sample_15_4.ps1 | sample_15_4.ps1 | #region 'Old Code'
<#
if ($OSVersion.Major -eq 5)
{
# Disabling running on Win2K3 x64 due some reports of crashes for specific controllers
"[San.exe] - Skipping running san.exe on Windows prior to Server 2008" | WriteTo-StdOut
}
else
{
Import-LocalizedData -BindingVariable SanStorageInfoStrings
Write-Diag... |
combined_dataset/train/non-malicious/sample_24_68.ps1 | sample_24_68.ps1 | TOPIC
about_poshsvntarget
Short description
Description de la façon de spécifier la cible d'une cmdlet.
Long description
Certaines opérations Subversion prennent en charge la spécification d'un
chemin local vers une copie de travail ou d'une URL distante vers un dépôt
en tant que cible.
... |
combined_dataset/train/non-malicious/sample_57_68.ps1 | sample_57_68.ps1 | parameters:
configuration: 'Debug'
# Optional: condition for the job to run
condition: ''
# Optional: 'true' if future jobs should run even if this job fails
continueOnError: false
# Optional: dependencies of the job
dependsOn: ''
# Optional: Include PublishBuildArtifacts task
enablePublishBuildAr... |
combined_dataset/train/non-malicious/sample_31_21.ps1 | sample_31_21.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\he@1.2.0\node_modules\he\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\he@1.2.0\node_modul... |
combined_dataset/train/non-malicious/sample_43_50.ps1 | sample_43_50.ps1 | #
# Module manifest for module 'Az.NetworkCloud'
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.NetworkCloud.psm1'
# Version number of this module.
ModuleVersion = '1.0.1'
# Supported PSE... |
combined_dataset/train/non-malicious/sample_59_16.ps1 | sample_59_16.ps1 | #
# Module manifest for module 'OCI.PSModules.Generativeai'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Generativeai.dll'
# Version number of this module.
ModuleVersion = '87.0.0'
# Supported PSEditi... |
combined_dataset/train/non-malicious/Get-PrinterInfo_1.ps1 | Get-PrinterInfo_1.ps1 | $strComputer = "PrinterName"
$Ports = get-wmiobject -class "win32_tcpipprinterport" -namespace "root\\CIMV2" -computername $strComputer
$Printers = get-wmiobject -class "Win32_Printer" -namespace "root\\CIMV2" -computername $strComputer
$ports | Select-Object Name,Hostaddress | Set-Variable port
$Printers | Select-... |
combined_dataset/train/non-malicious/sample_10_70.ps1 | sample_10_70.ps1 | ConvertFrom-StringData @'
id_clusterdependencyreport=Cluster resource dependency report
id_clusterdependencyreportdesc1=Obtaining cluster resource dependency report
id_clusterdependencyreportdesc=Obtaining cluster resource dependency report from group %GroupName%
'@
# SIG # Begin signature block
# MIIoUgYJKoZIh... |
combined_dataset/train/non-malicious/sample_59_67.ps1 | sample_59_67.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.3.0'
# Supported PSEditions
CompatiblePS... |
combined_dataset/train/non-malicious/Get VMware Information.ps1 | Get VMware Information.ps1 | Get-VIServer YOURSERVER
$Excel = New-Object -Com Excel.Application
$Excel.visible = $True
$Excel = $Excel.Workbooks.Add()
$Addsheet = $Excel.sheets.Add()
$Sheet = $Excel.WorkSheets.Item(1)
$Sheet.Cells.Item(1,1) = "Name"
$Sheet.Cells.Item(1,2) = "Power State"
$Sheet.Cells.Item(1,3) = "Description"
$Sheet.Ce... |
combined_dataset/train/non-malicious/sample_39_57.ps1 | sample_39_57.ps1 | #Volumetric soil moisture content
'Proportion' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 9 ;
}
#Upper layer soil temperature
'K' = {
discipline = 2 ;
parameterCategory = 3 ;
parameterNumber = 1 ;
}
#Upper layer soil moisture
'kg m**-3' = {
discipline = 2 ;
parameterCategory = 3 ;
... |
combined_dataset/train/non-malicious/3347.ps1 | 3347.ps1 |
function New-ScheduledCommand {
[PoshBot.BotCommand(
Aliases = ('newschedule', 'new-schedule'),
Permissions = 'manage-schedules'
)]
[cmdletbinding(DefaultParameterSetName = 'repeat')]
param(
[parameter(Mandatory, ParameterSetName = 'repeat')]
[parameter(Mandatory, P... |
combined_dataset/train/non-malicious/1905.ps1 | 1905.ps1 |
Describe "Get-FormatData" -Tags "CI" {
Context "Check return type of Get-FormatData" {
It "Should return an object[] as the return type" {
$result = Get-FormatData
,$result | Should -BeOfType "System.Object[]"
}
}
It "Can get format data requiring '-PowerShellVer... |
combined_dataset/train/non-malicious/3981.ps1 | 3981.ps1 |
function Assert-NotNullOrEmpty
{
param([string]$value)
Assert-False { [string]::IsNullOrEmpty($value) }
}
function Assert-IsInstance
{
param([object] $obj, [Type] $type)
Assert-AreEqual $obj.GetType() $type
}
function Assert-PropertiesCount
{
param([PSCustomObject] $obj, [int] $count)
$prope... |
combined_dataset/train/non-malicious/Script-Proc_1.sql.ps1 | Script-Proc_1.sql.ps1 | #Copyright (c) 2011 Justin Dearing
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, dist... |
combined_dataset/train/non-malicious/sample_17_25.ps1 | sample_17_25.ps1 | ConvertFrom-StringData @'
id_hypervkb2263829check=Checking for KB2263829
id_hypervkb2263829checkdesc=Checking version of Hvax64.exe and other binaries
'@
# SIG # Begin signature block
# MIIoVAYJKoZIhvcNAQcCoIIoRTCCKEECAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE6... |
combined_dataset/train/non-malicious/sample_26_55.ps1 | sample_26_55.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\he@1.2.0\node_modules\he\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\he@1.2.0\node_modul... |
combined_dataset/train/non-malicious/995.ps1 | 995.ps1 | Param(
[parameter(Mandatory=$true)]
$CsvFilePath
)
$ErrorActionPreference = "Stop"
$scriptsPath = $PSScriptRoot
if ($PSScriptRoot -eq "") {
$scriptsPath = "."
}
. "$scriptsPath\asr_logger.ps1"
. "$scriptsPath\asr_common.ps1"
. "$scriptsPath\asr_csv_processor.ps1"
Function ProcessItemImpl($processor, $cs... |
combined_dataset/train/non-malicious/1777.ps1 | 1777.ps1 |
function Wait-ForJobRunning
{
param (
$job
)
$iteration = 10
Do
{
Start-Sleep -Milliseconds 100
}
Until (($job.State -match "Running|Completed|Failed") -or (--$iteration -eq 0))
if ($job.State -notmatch "Running|Completed|Failed")
{
throw ("Cannot star... |
combined_dataset/train/non-malicious/2597.ps1 | 2597.ps1 |
function global:Script-DBObjectsIntoFolders([string]$server, [string]$dbname){
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null
$SMOserver = New-Object (’Microsoft.SqlServer.Management.Smo.Server’) -argumentlist $server
$db = $SMOserver.databases[$dbname]
$Objects = $db.Ta... |
combined_dataset/train/non-malicious/sample_20_76.ps1 | sample_20_76.ps1 | 'This script has been deprecated. Please use the PowerShell version TS_Virtualization.ps1
'' SIG '' Begin signature block
'' SIG '' MIIoUAYJKoZIhvcNAQcCoIIoQTCCKD0CAQExDzANBglg
'' SIG '' hkgBZQMEAgEFADB3BgorBgEEAYI3AgEEoGkwZzAyBgor
'' SIG '' BgEEAYI3AgEeMCQCAQEEEE7wKRaZJ7VNj+Ws4Q8X66sC
'' SIG '' AQACAQACAQACAQAC... |
combined_dataset/train/non-malicious/2884.ps1 | 2884.ps1 | Task default -depends Test
Task Test {
[string]$currentPath = Get-Location
[string]$parentPath = Split-Path $currentPath -Parent
[string[]]$global:locations = @()
[string[]]$expected = "$currentPath,$parentPath,$parentPath,$parentPath,$currentPath"
[scriptblock]$cmd = {
$global:locations +=... |
combined_dataset/train/non-malicious/Get-ProcessCount.ps1 | Get-ProcessCount.ps1 | # Get-ProcessCount uses 2 main variables, server and process name.
# Process name is typically the end exe, such as "svchost.exe"
# Will accept unnamed args (Get-ProcessCount servername processname)
# or named args (Get-ProcessCount -Computer servername -Process processname)
Function Get-ProcessCount([string]$proce... |
combined_dataset/train/non-malicious/sample_62_52.ps1 | sample_62_52.ps1 | #
# Module manifest for module 'PowerShellProTools'
#
# Generated by: Ironman Software, LLC
#
# Generated on: 7/11/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'PowerShellProTools.psm1'
# Version number of this module.
ModuleVersion = '2024.7.0'
# Suppo... |
combined_dataset/train/non-malicious/Get-Sysinternals_2.ps1 | Get-Sysinternals_2.ps1 |
function Get-SysInternals {
param ( $sysIntDir=(join-path $env:systemroot "\\Sysinternals\\") )
if(!(Test-Path -Path $sysIntDir -PathType Container))
{
$null = New-Item -Type Directory -Path $sysIntDir -Force
}
$log = join-path $sysIntDir "changes.log"
Add-Content ... |
combined_dataset/train/non-malicious/sample_49_22.ps1 | sample_49_22.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... |
combined_dataset/train/non-malicious/sample_18_31.ps1 | sample_18_31.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 = '79.0.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/sample_22_69.ps1 | sample_22_69.ps1 | <#
.SYNOPSIS
Finds the repositories registered with PowerShellGet and registers them for PSResourceGet.
#>
function Import-PSGetRepository {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
# Use the -Force switch to overwrite existing repositories.
[switch... |
combined_dataset/train/non-malicious/Get-NTStatusException.ps1 | Get-NTStatusException.ps1 | function Get-NTStatusException
{
<#
.SYNOPSIS
Resolves an NTSTATUS error code.
Author: Matthew Graeber (@mattifestation)
.DESCRIPTION
Get-NTStatusException returns a friendly error message based on the NTSTATUS code passed in. This function is useful when interacting with Windows Native API functions wit... |
combined_dataset/train/non-malicious/Install-Solarized_1.ps1 | Install-Solarized_1.ps1 | [CmdletBinding()]
param($Path = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Accessories\\Windows PowerShell\\Windows PowerShell.lnk" )
# SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
# --------- ------- ---- ------- ----------- ---------- ----------- -----------
... |
combined_dataset/train/non-malicious/PSTUtility_2.psm1.ps1 | PSTUtility_2.psm1.ps1 | #=============================================================================
#
# PST Utilities - For Discovery, Import, Removal
#
# Dan Thompson
# dethompson71 at live dot com
#
# This collection of tools for importing PSTs has been pieced together
# over many months of trial and error.
#
# Goal is to get ... |
combined_dataset/train/non-malicious/sample_40_31.ps1 | sample_40_31.ps1 | #
# Module manifest for module 'OCI.PSModules.Dns'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dns.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/sample_15_43.ps1 | sample_15_43.ps1 |
function setName(element, newValue) {
this._element = element;
this._oldValue = this._element.name;
this._newValue = newValue;
onDo();
}
function getName() {
return "element renamed";
}
function onDo() {
this._element.name = this._newValue;
document.elementModified(this._e... |
combined_dataset/train/non-malicious/Windows Startup Script_1.ps1 | Windows Startup Script_1.ps1 | <#======================================================================================
File Name : Startup.ps1
Original Author : Kenneth C. Mazie
:
Description : This is a Windows startup script with pop-up notification and checks to
: assure things are no... |
combined_dataset/train/non-malicious/Logoff all users_2.ps1 | Logoff all users_2.ps1 | function RemoveSpace([string]$text) {
$private:array = $text.Split(" ", `
[StringSplitOptions]::RemoveEmptyEntries)
[string]::Join(" ", $array) }
$quser = quser
foreach ($sessionString in $quser) {
$sessionString = RemoveSpace($sessionString)
$session = $sessionString.split()
i... |
combined_dataset/train/non-malicious/sample_37_49.ps1 | sample_37_49.ps1 | let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl();
let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/aspire.eventHandlers.js"];
let currentScriptElement = document.querySelector("script[src='Scripts/aspire.plugin.js']");
if (currentScriptElement !== null) {
scrip... |
combined_dataset/train/non-malicious/sample_9_74.ps1 | sample_9_74.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... |
combined_dataset/train/non-malicious/sample_33_43.ps1 | sample_33_43.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... |
combined_dataset/train/non-malicious/Call WSPBuilder.ps1 | Call WSPBuilder.ps1 | function Run-DosCommand($program, [string[]]$programArgs)
{
write-host "Running command: $program";
write-host " Args:"
0..($programArgs.Count-1) | foreach { Write-Host " $($programArgs[$_])" }
& $program $programArgs
}
#Get-FullPath function defined elsewhere, refers to a "base directory" which allows me... |
combined_dataset/train/non-malicious/ESX host NTP Settings.ps1 | ESX host NTP Settings.ps1 | <#======================================================================================
File Name : ESX-NTP.ps1
Original Author : Kenneth C. Mazie
:
Description : This is a VMware PowerCLI script for synchronizing NTP settings across
: all ESX hosts in a Vi... |
combined_dataset/train/non-malicious/sample_8_93.ps1 | sample_8_93.ps1 | #************************************************
# TS_DisablePagingExecutiveCheck.ps1
# Version 1.0.1
# Date: 7/16/2013
# Author: v-maam
# Description: [Idea ID 8012] [Windows] SDP-UDE check for reg key DisablePagingExecutive
# Rule number: a0827633-6742-40cf-be40-e6de772a4e2f
# Rule URL: https://kse.microso... |
combined_dataset/train/non-malicious/sample_25_1.ps1 | sample_25_1.ps1 | #
# Module manifest for module 'OCI.PSModules.Apigateway'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apigateway.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_24_61.ps1 | sample_24_61.ps1 | $env:CONFIG_PATH = ".\config/config.test.json"
$serviceConfig = Get-Content -Raw -Path $env:CONFIG_PATH | ConvertFrom-Json
Write-Host "Set variables for monitoring agent..."
$env:MONITORING_BUILD_VERSION = "0.0.0"
$env:MONITORING_CONFIG_VERSION = $serviceConfig.'Geneva:ConfigVersion'
$env:MONITORING_GCS_ACCOUNT ... |
combined_dataset/train/non-malicious/ModuleWriteError_1.psm1.ps1 | ModuleWriteError_1.psm1.ps1 | ################################################################################
## Script Name: Module Write Error
## Created On: 1/7/2010
## Author: Thell Fowler
## Tribute: Joel 'Jaykul' Bennet
## File: ModuleWriteError.psm1
## Usage: import-module \\Path\\to\\module\\M... |
combined_dataset/train/non-malicious/sample_21_99.ps1 | sample_21_99.ps1 | #
# Module manifest for module 'OCI.PSModules.Secrets'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Secrets.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
Compat... |
combined_dataset/train/non-malicious/sample_62_63.ps1 | sample_62_63.ps1 | #
# Module manifest for module 'OCI.PSModules.Licensemanager'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Licensemanager.dll'
# Version number of this module.
ModuleVersion = '86.0.0'
# Supported PSE... |
combined_dataset/train/non-malicious/sample_44_58.ps1 | sample_44_58.ps1 |
> lint
> eslint . --ext .ts
C:\Users\pfwobcke\.vscode\extensions\vscode-vdf\apps\extension\desktop\servers\HUDAnimations\src\server.ts
6:7 error 'server' is assigned a value but never used @typescript-eslint/no-unused-vars
C:\Users\pfwobcke\.vscode\extensions\vscode-vdf\apps\extension\desktop\servers\Popfile\s... |
combined_dataset/train/non-malicious/LibraryChart_1.ps1 | 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... |
combined_dataset/train/non-malicious/440.ps1 | 440.ps1 | Register-PSFConfigSchema -Name Default -Schema {
param (
[string]
$Resource,
[System.Collections.Hashtable]
$Settings
)
$Peek = $Settings["Peek"]
$ExcludeFilter = $Settings["ExcludeFilter"]
$IncludeFilter = $Settings["IncludeFilter"]
$AllowDelete = $Settings["AllowDelete"]
$EnableException = $Sett... |
combined_dataset/train/non-malicious/Get-HttpResponseUri.ps1 | Get-HttpResponseUri.ps1 | function Get-HttpResponseUri {
#.Synopsis
# Fetch the HEAD for a url and return the ResponseUri.
#.Description
# Does a HEAD request for a URL, and returns the ResponseUri. This is useful for resolving (in a service-independent way) shortened urls.
#.Parameter ShortUrl
# A (possibly) shortened URL to be res... |
combined_dataset/train/non-malicious/377.ps1 | 377.ps1 | Describe "Import-PSFConfig Unit Tests" -Tag "CI", "Pipeline", "Unit" {
BeforeAll {
Get-PSFConfig -Module Import-PSFConfig -Force | ForEach-Object {
$null = [PSFramework.Configuration.ConfigurationHost]::Configurations.Remove($_.FullName)
}
Get-PSFConfig -FullName config.import.test | ForEach-Object {
$null... |
combined_dataset/train/non-malicious/sample_45_32.ps1 | sample_45_32.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function Export-CertForAMT {
<#
.Synopsis
Exports certificates from the Windows Certificate Store for use by the IntelvPro PowerShell Module
.Description
Exports certificates from the Windows Certificate Store for use by the Intelv... |
combined_dataset/train/non-malicious/2549.ps1 | 2549.ps1 | cls
$people = Import-Csv .\people.csv |
select Dept, Name, @{
n="Salary"
e={[double]$_.Salary}
}, @{
n="YearsEmployeed"
e={[int]$_.yearsEmployeed}
}
$people | .\Out-ExcelPivotTable
$people | .\Out-ExcelPivotTable name dept salary
$people | .\Ou... |
combined_dataset/train/non-malicious/8097adfd-db82-4ae1-8996-c504851508d5.ps1 | 8097adfd-db82-4ae1-8996-c504851508d5.ps1 | #==========================================================================
# NAME: getunknownsids.ps1
#
# AUTHOR: Stephen Wheet
# Version: 4.0
# Date: 6/11/10
#
# COMMENT:
# This script was created to find unknown SIDs or old domain permissions
# on folders. It ignores folders where inheirtance is turned ... |
combined_dataset/train/non-malicious/Easy Migration Tool v_2.1.ps1 | Easy Migration Tool v_2.1.ps1 | #Generated Form Function
function GenerateForm {
########################################################################
# Code Generated By: Richard Yaw
# Generated On: 07/12/2011
#
# Easy Migration Script for VMware (Version 2.0)
# - Added a "Reload Tasks" feature.
# - Fixed issue with the Undo feature for S... |
combined_dataset/train/non-malicious/Deleted-Objects.ps1 | Deleted-Objects.ps1 | param (
$Computer,
[String[]]$ObjectsDeleted
)
$Info = $null
$Disks = $null
trap {Write-Host "Error WmiObject $Computer";Continue}
$Disks += Get-WmiObject win32_logicaldisk -ComputerName $Computer |
Where-Object {$_.Size -ne $null}
foreach ($Disk in $Disks){
if ($Disk.Name -like "*:*") {
$Dis... |
combined_dataset/train/non-malicious/sample_59_93.ps1 | sample_59_93.ps1 | #
# Module manifest for module 'OCI.PSModules.Loganalytics'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Loganalytics.dll'
# Version number of this module.
ModuleVersion = '85.1.0'
# Supported PSEditi... |
combined_dataset/train/non-malicious/sample_10_4.ps1 | sample_10_4.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-ExecutionPolicy", "Set-E... |
combined_dataset/train/non-malicious/sample_3_9.ps1 | sample_3_9.ps1 | #************************************************
# DC_RDSPowerInfo.ps1
# Version 1.0.1
# Date: 21-01-2012
# Author: Daniel Grund - dgrund@microsoft.com
# Description:
# This script gets the RDP config and
# checks vital signs to inform user.
# 1.0.0 Beta release
#*******************************************... |
combined_dataset/train/non-malicious/sample_32_0.ps1 | sample_32_0.ps1 | %이 설정은 네트워크 보호에 대한 DNS 구문 분석을 비활성화합니다.)이 설정은 네트워크 보호에 대한 DNS TCP 구문 분석을 비활성화합니다.%이 설정은 네트워크 보호에 대한 SSH 구문 분석을 비활성화합니다.i관리자가 특정 채널(링)에서 Microsoft Defender 플랫폼 업데이트를 수신하도록 장치를 구성할 수 있도록 허용 - 고객이 점진적 릴리스 프로세스를 일부 제어할 수 있도록 합니다.베타미리 보기준비됨넓은지연됨h관리자가 특정 채널(링)에서 Microsoft Defender 엔진 업데이트를 수신하도록 장치를 구성할 수 있도록 허용 - 고객이 점진... |
combined_dataset/train/non-malicious/2112.ps1 | 2112.ps1 |
using namespace System.Management.Automation.Internal
Describe 'Null Representatives' -Tags 'CI' {
Context 'Comparisons with $null' {
BeforeAll {
$TestValues = @(
@{ Value = { [AutomationNull]::Value } }
@{ Value = { [DBNull]::Value } }
@{ Val... |
combined_dataset/train/non-malicious/1007.ps1 | 1007.ps1 |
$myTopic = "<your-custom-topic-name>"
$myEndpoint = "<your-endpoint-URL>"
$myResourceGroup = "<resource-group-name>"
New-AzResourceGroup -Name $myResourceGroup -Location westus2
$topicID = (New-AzEventGridTopic -ResourceGroupName $myResourceGroup -Name $myTopic -Location westus2).Id
New-AzEventGridSubsc... |
combined_dataset/train/non-malicious/sample_25_81.ps1 | sample_25_81.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 = '83.1.0'
# Supported P... |
combined_dataset/train/non-malicious/sample_26_78.ps1 | sample_26_78.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... |
combined_dataset/train/non-malicious/sample_18_98.ps1 | sample_18_98.ps1 | #************************************************
# DC_ClusterLogs.PS1
# Version 2.3.5
# Date: 02-09-2012
# Author: Andre Teixeira - andret@microsoft.com
# Description: This script is used to obtain cluster logs from both nodes (Windows Server 2008 R2) or from the local machine (pre-2K8R2)
#**********************... |
combined_dataset/train/non-malicious/1590.ps1 | 1590.ps1 |
.{
$one = @((1320,500),(990,250),(1056,250),(1188,250),(1320,125),(1188,125),(1056,250),(990,250),(880,500),(880,250),(1056,250),(1320,500),(1188,250),(1056,250),(990,750),(1056,250),(1188,500),(1320,500),(1056,500),(880,500),(880,500))
$two = @((1188,500),(1408,250),(1760,500),(1584,250),(1408,250),(1320,750),(105... |
combined_dataset/train/non-malicious/4288.ps1 | 4288.ps1 |
function Implant-Handler
{
[CmdletBinding(DefaultParameterSetName = "FolderPath")]
Param
(
[Parameter(ParameterSetName = "FolderPath", Mandatory = $false)]
[string]
$FolderPath,
[string]
$PoshPath
)
if (!$FolderPath) {
$FolderPath = Read-Host -Prompt... |
combined_dataset/train/non-malicious/sample_14_18.ps1 | sample_14_18.ps1 | #
# Module manifest for module 'OCI.PSModules.Resourcesearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Resourcesearch.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSE... |
combined_dataset/train/non-malicious/sample_65_45.ps1 | sample_65_45.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... |
combined_dataset/train/non-malicious/New-AdUser.ps1 | New-AdUser.ps1 | function New-AdUser {
param (
[string] $Username = $(throw "Parameter -Username [System.String] is required."),
[string] $Password = $(throw "Parameter -Password [System.String] is required."),
[string] $OrganizationalUnit = "Users",
[string] $DisplayName,
[string] $Fir... |
combined_dataset/train/non-malicious/3962.ps1 | 3962.ps1 |
function Test-ApplicationSecurityGroupCRUD
{
$rgLocation = Get-ProviderLocation ResourceManagement
$resourceTypeParent = "Microsoft.Network/ApplicationSecurityGroups"
$location = Get-ProviderLocation $resourceTypeParent
$rgName = Get-ResourceGroupName
$asgName = Get-ResourceName
... |
combined_dataset/train/non-malicious/2248.ps1 | 2248.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site Server where the SMS Provider is installed.")]
[ValidateNotNullOrEmpty()]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[string]$SiteServer,
[parameter(Mandatory=$true, HelpMess... |
combined_dataset/train/non-malicious/sample_45_65.ps1 | sample_45_65.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 License... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.