full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/sample_37_21.ps1
sample_37_21.ps1
--- parameters: - name: agent_pool type: string - name: country type: string - name: devops_security_alerts_packages_source_exclusion_paths type: object default: [] - name: environment type: string - name: gh_token type: string - name: job_name type: string - name: protect_environment type: stri...
combined_dataset/train/non-malicious/sample_64_59.ps1
sample_64_59.ps1
# # Module manifest for module 'OCI.PSModules.Cloudbridge' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/1919.ps1
1919.ps1
Describe "Invoke-Expression" -Tags "CI" { Context "Should execute the invoked command validly" { It "Should return the echoed text" { (Invoke-Expression -command "echo pestertest1") | Should -BeExactly "pestertest1" } It "Should return the echoed text from a script" { $testfile = Join-Path -Path (...
combined_dataset/train/non-malicious/sample_43_68.ps1
sample_43_68.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may c...
combined_dataset/train/non-malicious/sample_42_95.ps1
sample_42_95.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=Необходимый модуль PowerShell (FailoverClusters) не найден. Используйте инструмент "Роли и компоненты", чтобы установить следующие элементы: средства удаленного администрирования сервера | Средства администрирования компонентов | Средства отказоустойчивой класте...
combined_dataset/train/non-malicious/Set-OutlookSignature_2.ps1
Set-OutlookSignature_2.ps1
###########################################################################¡± # # NAME: Set-OutlookSignature.ps1 # # AUTHOR: Jan Egil Ring # Modifications by Darren Kattan # # COMMENT: Script to create an Outlook signature based on user information from Active Directory. # Adjust the variables in the ¡°Custom v...
combined_dataset/train/non-malicious/sample_34_36.ps1
sample_34_36.ps1
# # Module manifest for module 'GCArcService' # # Generated by: Microsoft # # Generated on: 08/09/2020 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'GCArcService.psm1' # Version number of this module. ModuleVersion = '1.0' # ID used to uniquely identify...
combined_dataset/train/non-malicious/sample_4_76.ps1
sample_4_76.ps1
#************************************************ # DC_SystemCollect.ps1 # Version 1.1 # Date: 2009-2019 # Author: Walter Eder (waltere@microsoft.com) # Description: Collects additional System information and ETL Logs (tbd). # Called from: TS_AutoAddCommands_Apps.ps1 #********************************************...
combined_dataset/train/non-malicious/Start-Verify.ps1
Start-Verify.ps1
# Author: Steven Murawski http://www.mindofroot.com # This script creates two functions (and a helper function). One starts logging all commands entered, # and the second removes the logging. # This script is similar to the Start-Transcript, but only logs the command line and not the output. function New-Scr...
combined_dataset/train/non-malicious/3165.ps1
3165.ps1
function Test-Credential { [cmdletbinding(DefaultParameterSetName = 'Domain')] param( [parameter(ValueFromPipeline=$true)] [System.Management.Automation.PSCredential]$Credential = $( Get-Credential -Message "Please provide credentials to test" ), [validateset('Domain','Machine', '...
combined_dataset/train/non-malicious/Get-ADGroupMembers_4.ps1
Get-ADGroupMembers_4.ps1
Function Get-ADGroupMembers { <# .SYNOPSIS Return a collection of users in an ActiveDirectory group. .DESCRIPTION This function returns an object that contains all the properties of a user object. This function works for small groups as well as groups in ex...
combined_dataset/train/non-malicious/sample_33_98.ps1
sample_33_98.ps1
# Copyright (c) 2019-2024, The Khronos Group Inc. # SPDX-License-Identifier: Apache-2.0 if (-not $env:VULKAN_SDK_VERSION) { $env:VULKAN_SDK_VERSION = "1.1.114.0" } $SDK_VER = $env:VULKAN_SDK_VERSION if (-not (Test-Path env:VULKAN_SDK)) { if ($env:SYSTEM_DEFAULTWORKINGDIRECTORY) { $env:VULKAN_SDK = "$...
combined_dataset/train/non-malicious/sample_43_84.ps1
sample_43_84.ps1
# # Module manifest for module 'OCI.PSModules.Integration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Integration.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEdition...
combined_dataset/train/non-malicious/LibraryDirectory.ps1
LibraryDirectory.ps1
## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n\nSet-StrictMode -Version Latest\n\n## Get the size of all the items in the current directory\nfunction Get-DirectorySize\n{\n <#\n\n .EXAMPLE\n\n PS > $DebugPreference = "Continue"\n PS > Get-DirectorySize\n ...
combined_dataset/train/non-malicious/sample_30_98.ps1
sample_30_98.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_55_22.ps1
sample_55_22.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEdition...
combined_dataset/train/non-malicious/Import Group Policies.ps1
Import Group Policies.ps1
############################################## ##Import group policies from a folder to a Domain Controller ##Author: Adam Liquorish ## ##*Currently will only run on Server 2008 R2 ##*Script is based on the Microsoft Visual Basic Script for importing group policies. ##*Server doesnt need to be defined as PDC emul...
combined_dataset/train/non-malicious/finddupe_18.ps1
finddupe_18.ps1
# new version has more error handling, "-delete" and "-noprompt" options. function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvider]; $hashAlgorithm = new-object $cryp...
combined_dataset/train/non-malicious/WhoIs_1.ps1
WhoIs_1.ps1
param([String] $DomainName = '192.168.0.1') $socket = New-Object System.Net.Sockets.Socket ([System.Net.Sockets.AddressFamily]::InterNetwork, [System.Net.Sockets.SocketType]::Stream, [System.Net.Sockets.ProtocolType]::Tcp) $Socket.Connect('whois.arin.net', 43) | out-null $bytes = [System.Text.Encoding]::ASCII.GetB...
combined_dataset/train/non-malicious/Enable_Configure SNMP.ps1
Enable_Configure SNMP.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...
combined_dataset/train/non-malicious/2771.ps1
2771.ps1
if (Test-Path "$env:SystemRoot\sigcheck.exe") { $rootpath = Get-Random -Minimum 1 -Maximum 6 switch ($rootpath) { 1 { $rootpath = "$env:temp\" } 2 { $rootpath = "$env:systemroot\" } 3 { $rootpath = "$env:allusersprofile\" } 4 { $rootpath = "$env:ProgramFiles\" } 5...
combined_dataset/train/non-malicious/sample_12_47.ps1
sample_12_47.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Find-Ast { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding(PositionalBinding=$false, DefaultParameterSetName='FilterScript')] param( [Parameter(Position=0, ParameterSe...
combined_dataset/train/non-malicious/Out-Balloon_3.ps1
Out-Balloon_3.ps1
<# .Synopsis Makes a baloon tip in the notification area .Description With just a few arguments, it is easy to make some text appear in a little balloon. You can specify an icon file (*.ico) with the -icon argument, if you don't then the first icon of the host is used. out-balloo...
combined_dataset/train/non-malicious/2211.ps1
2211.ps1
param( [parameter(Mandatory=$true)] $SiteServer, [parameter(Mandatory=$true)] $SiteCode, [parameter(Mandatory=$true)] $ApplicationName ) if (Get-WmiObject -Namespace "root\sms\site_$($SiteCode)" -Class "SMS_Application" -ComputerName $SiteServer -ErrorAction SilentlyContinue | Where-Object { $_.LocalizedDisplayN...
combined_dataset/train/non-malicious/sample_63_19.ps1
sample_63_19.ps1
$global:VerbosePreference = 'Continue' Function Write-Custom-Output { Param([string]$message) $date = Get-Date $newMessage = '[{0}] {1}' -f $date, $message Write-Output $newMessage } trap [Exception] { Write-Custom-Output "WARN: Terminating error encountered on line $($_.Invoc...
combined_dataset/train/non-malicious/test connectivity.ps1
test connectivity.ps1
$ping = new-object System.Net.NetworkInformation.Ping $isbad = $true; do { try { $Reply = $ping.send('www.yahoo.com') if ($Reply.status –ne “Success”) { $txt = "$(get-date) problem" ; write-Host $txt ; $txt | out-File -append c:\\downloads\\jetstreamlog.txt} else { if ($isbad) {$isbad ...
combined_dataset/train/non-malicious/sample_67_68.ps1
sample_67_68.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_16_45.ps1
sample_16_45.ps1
# # Module manifest for module 'OCI.PSModules.Nosql' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Nosql.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_15_30.ps1
sample_15_30.ps1
# # Module manifest for module 'OCI.PSModules.Dashboardservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dashboardservice.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported...
combined_dataset/train/non-malicious/4291.ps1
4291.ps1
function Invoke-SqliteQuery { [CmdletBinding( DefaultParameterSetName='Src-Que' )] [OutputType([System.Management.Automation.PSCustomObject],[System.Data.DataRow],[System.Data.DataTable],[System.Data.DataTableCollection],[System.Data.DataSet])] param( [Parameter( ParameterSetName='Src-Que', ...
combined_dataset/train/non-malicious/4452.ps1
4452.ps1
function Update-PSResource { [OutputType([void])] [cmdletbinding(SupportsShouldProcess = $true)] Param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Position = 0)] [ValidateNotNullOrEmpty()] [String[]] $...
combined_dataset/train/non-malicious/sample_26_21.ps1
sample_26_21.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Security.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Security.internal.psm1' if(Test-Path $internalModulePath) { $n...
combined_dataset/train/non-malicious/sample_48_93.ps1
sample_48_93.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=Impossibile trovare il modulo di PowerShell richiesto (FailoverClusters). Utilizza lo strumento Ruoli e funzionalità per installare: Strumenti di amministrazione remota del server | Strumenti di amministrazione funzionalità | Strumenti per clustering di failover...
combined_dataset/train/non-malicious/2148.ps1
2148.ps1
using Namespace System.Management.Automation.Language Describe "The SafeGetValue method on AST returns safe values" -Tags "CI" { It "A hashtable is returned from a HashtableAst" { $HashtableAstType = [HashtableAst] $HtAst = { @{ one = 1 } }.ast.Find({$args[0] -is $Hashtable...
combined_dataset/train/non-malicious/LNK file testing_1.ps1
LNK file testing_1.ps1
param( $Path = (Split-Path $PSHOME -Qualifier) ) if($lnks -eq $null) { $lnks = ls $Path -Recurse -Filter "*.lnk" } $wsh = New-Object -ComObject WScript.Shell; foreach($lnk in $lnks) { $lnko = $wsh.CreateShortcut($lnk.fullname); $rtn = New-Object psobject -Property @{ "FilePath...
combined_dataset/train/non-malicious/sample_4_5.ps1
sample_4_5.ps1
ConvertFrom-StringData @' id_ssas_collectssasregkeys=Analysis Services Registy Keys id_ssas_collectssasregkeysdesc=Collecting SQL Server Analysis Services registry keys '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC...
combined_dataset/train/non-malicious/2944.ps1
2944.ps1
task default -depends test task test { Push-Location 'legacy_build_file' $result = invoke-psake -Docs | Out-String -Width 120 Pop-Location Assert ($result -match 'alegacydefaulttask') 'Default build file should a task called alegacydefaulttask' }
combined_dataset/train/non-malicious/sample_62_31.ps1
sample_62_31.ps1
# # Module manifest for module 'OCI.PSModules.Audit' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Audit.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/DefaultParameterValues_3.ps1
DefaultParameterValues_3.ps1
# DefaultParameters Module # 1.4 - removed extra parameter set to get parameter binding working better # - added default aliases (sdp/gdp/rmdp) #requires -version 3.0 # 1.3 - fixed denable/disable, added get and remove, and improved import and set # 1.2 - added help and commands to enable/disable the defaults ...
combined_dataset/train/non-malicious/sample_60_14.ps1
sample_60_14.ps1
param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $ChannelId, [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '...
combined_dataset/train/non-malicious/sample_31_15.ps1
sample_31_15.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\cssesc@3.0.0\node_modules\cssesc\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\cssesc@3.0....
combined_dataset/train/non-malicious/4bbeb588-aa6d-475c-861b-05a432703d58.ps1
4bbeb588-aa6d-475c-861b-05a432703d58.ps1
function CreateVDS( $dvsName, $datacenter, $vmHost, $physicalNic, $portGroupType = "earlyBinding", ` [array]$portGroupNameList = @(),[array]$uplinkList = @() ) { # ------- Create vDS ------- # $dvsCreateSpec = New-Object VMware.Vim.DVSCreateSpec $dvsCreateSpec.configSpec = New-Object VMware.V...
combined_dataset/train/non-malicious/Join-Collections 2.0.ps1
Join-Collections 2.0.ps1
#requires -version 2.0 #################################################################################################### ## Version History: ## ## Version 2.0 Added Join-Object and removed dependency on ConvertFrom-Hashtable ## Now works on DataTables! ## Version 1.1 Fixed column uniqueness bug ...
combined_dataset/train/non-malicious/sample_61_16.ps1
sample_61_16.ps1
# # Module manifest for module 'OCI.PSModules.Marketplace' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplace.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported PSEdition...
combined_dataset/train/non-malicious/3064.ps1
3064.ps1
function Should-BeNullOrEmpty([object[]] $ActualValue, [switch] $Negate, [string] $Because) { if ($null -eq $ActualValue -or $ActualValue.Count -eq 0) { $succeeded = $true } elseif ($ActualValue.Count -eq 1) { $expandedValue = $ActualValue[0] if ($expandedValue -is [hashtable])...
combined_dataset/train/non-malicious/LoadModuleConfig.ps1
LoadModuleConfig.ps1
################################################################################ ## Script Name: LoadModuleConfig ## Created On: 01/21/2010 ## Author: Thell Fowler ## File: LoadModuleConfig.ps1 ## Usage: Called from the NestedModules value from a module manifest. ## Version:...
combined_dataset/train/non-malicious/2376.ps1
2376.ps1
param( [Parameter()] [ValidateNotNullOrEmpty()] [string[]]$Section ) $sections = @( 'Active Setup Temp Folders', 'BranchCache', 'Content Indexer Cleaner', 'Device Driver Packages', 'Downloaded Program Files', 'GameNewsFiles', 'GameStatisticsFiles', 'GameUpdateFiles', 'Internet Cache Files', 'Memory...
combined_dataset/train/non-malicious/Get # of Web Connections.ps1
Get # of Web Connections.ps1
function Get-WebServiceConnections() { $results = @{} $perfmon = new-object System.Diagnostics.PerformanceCounter $perfmon.CategoryName = "Web Service" $perfmon.CounterName = "Current Connections" $cat = new-object System.Diagnostics.PerformanceCounterCategory("Web Service") $instances = $cat.GetIn...
combined_dataset/train/non-malicious/Enable_Configure SNMP_1.ps1
Enable_Configure SNMP_1.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...
combined_dataset/train/non-malicious/262.ps1
262.ps1
function ConvertTo-Base64 { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true)] [ValidateScript({ Test-Path -Path $_ })] [String]$Path ) Write-Verbose -Message "[ConvertTo-Base64] Converting image to Base64 $Path" [System.convert]::ToBase64String((Get-Content -Path $...
combined_dataset/train/non-malicious/sample_57_70.ps1
sample_57_70.ps1
import{m as s}from"./index-C8Scyk8z.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-edit...
combined_dataset/train/non-malicious/Security group monitor_3.ps1
Security group monitor_3.ps1
#Get group membership for a list of security #groups and export to an XML for comparison #against baseline. # $script:WorkingDirectory = split-path $myinvocation.Mycommand.Definition -parent Function Re-Baseline { #First, declare array and hashtable. $securitygroups = @() $table = @{} #Import Security...
combined_dataset/train/non-malicious/1329.ps1
1329.ps1
function Disable-CAclInheritance { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [Alias('PSPath')] [string] $Path, [Switch] $Preserve ...
combined_dataset/train/non-malicious/sample_48_88.ps1
sample_48_88.ps1
@{ GUID = '3af1699d-cc54-4e54-81cf-28d2df5cce0a' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." HelpInfoUri="https://aka.ms/winsvr-2022-pshelp" NestedModules = @('SmbShare.cdxml', 'SmbSes...
combined_dataset/train/non-malicious/sample_50_30.ps1
sample_50_30.ps1
# # Module manifest for module 'OCI.PSModules.Ons' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ons.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/2655.ps1
2655.ps1
[CmdletBinding()] Param ( [switch]$RelaunchToolkitAsUser = $false ) [string]$appDeployToolkitExtName = 'PSAppDeployToolkitExt' [string]$appDeployExtScriptFriendlyName = 'App Deploy Toolkit Extensions' [version]$appDeployExtScriptVersion = [version]'1.5.0' [string]$appDeployExtScriptDate = '11/02/2014' [hasht...
combined_dataset/train/non-malicious/ErrorLogstoHTML.ps1
ErrorLogstoHTML.ps1
$a="<style>" $a=$a+"BODY{background-color :#FFFFF}" $a=$a+"TABLE{Border-width:thin;border-style: solid;border-color:Black;border-collapse: collapse;}" $a=$a+"TH{border-width: 0px;padding: 0px;border-style: solid;border-color: black;background-color: ThreeDShadow}" $a=$a+"TD{border-width: 1px;padding: 0px;border-sty...
combined_dataset/train/non-malicious/2743.ps1
2743.ps1
if (Get-Command Get-SmbSession -ErrorAction SilentlyContinue) { Get-SmbSession }
combined_dataset/train/non-malicious/Find-GeoCode_1.ps1
Find-GeoCode_1.ps1
$mappoint = New-WebServiceProxy http://staging.mappoint.net/standard-30/mappoint.wsdl -Namespace MapPoint $FindService = new-object MapPoint.FindServiceSoap # You need an account, sign up here: https://mappoint-css.live.com/mwssignup $FindService.Credentials = Get-Credential function Find-ReverseGeoCode( [double...
combined_dataset/train/non-malicious/sample_53_16.ps1
sample_53_16.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 ...
combined_dataset/train/non-malicious/2565.ps1
2565.ps1
$names = Get-Content e:\dexma\temp\tempserver.txt foreach($name in $names) { $svc = Get-WmiObject Win32_Service -ComputerName $name -Filter "name='DexFileImpExp2'" if ($svc.Started -eq $true) { Stop-Service -InputObject (get-Service -ComputerName PAPP10 -Name DexFileImpExp2) Write-Host "Stopped ser...
combined_dataset/train/non-malicious/4356.ps1
4356.ps1
function Validate-VersionParameters { [CmdletBinding()] Param( [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.Management.Automation.PSCmdlet] $CallerPSCmdlet, [Parameter()] [String[]] $Name, [Parameter()] [string] ...
combined_dataset/train/non-malicious/sample_57_62.ps1
sample_57_62.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...
combined_dataset/train/non-malicious/sample_29_90.ps1
sample_29_90.ps1
# # Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker' # # Generated by: Microsoft Corporation # # Generated on: 19/01/2022 # @{ # Script module or binary module file associated with this manifest. RootModule = '' # Version number of this module. ModuleVersion = '1.2100.25...
combined_dataset/train/non-malicious/sample_20_13.ps1
sample_20_13.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '81.0.0' # Sup...
combined_dataset/train/non-malicious/sample_64_85.ps1
sample_64_85.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # # ModifyProxySettings.ps1 - To be used by the installer - Mo...
combined_dataset/train/non-malicious/Get KB-articles of SP_1.ps1
Get KB-articles of SP_1.ps1
function Get-Sp1Articles() { $web = New-Object System.Net.WebClient # Microsoft XLS-Datei über google herunterladen, damit kommt die XLS-Datei als in HTML konvertierte Datei $html = $web.DownloadString(‘http://webcache.googleusercontent.com/search?q=cache:trZowCK8jvcJ:download.microsoft.com/download/...
combined_dataset/train/non-malicious/Get-ObservedIPRange.ps1
Get-ObservedIPRange.ps1
function Get-ObservedIPRange { param( [Parameter(Mandatory=$true,ValueFromPipeline=$true,HelpMessage="Physical NIC from Get-VMHostNetworkAdapter")] [VMware.VimAutomation.ViCore.Impl.V1.Host.Networking.Nic.PhysicalNicImpl] $Nic ) process { $hostView = Get-VMHost -Id $Nic.VMHostId | Get-View -Property...
combined_dataset/train/non-malicious/sample_17_54.ps1
sample_17_54.ps1
#************************************************ # TS_ETLTraceCollector.ps1 # Version 1.2.2 # Date: 10-31-2010 # Author: Andre Teixeira - andret@microsoft.com # Description: This script is a universal ETL Trace collector. Caller has to inform a Data Collector Set XML for the ETL and additional data. # ...
combined_dataset/train/non-malicious/4133.ps1
4133.ps1
[CmdletBinding()] param ( [Switch]$SCCM, [switch]$TextFile, [string]$TextFileLocation ) function Find-RegistryKey { [CmdletBinding()][OutputType([string])] param ( [ValidateNotNullOrEmpty()][string]$Value, [ValidateNotNullOrEmpty()][string]$SID ) $Version = Get-OfficeVersion switch ($Version) { "O...
combined_dataset/train/non-malicious/2285.ps1
2285.ps1
[CmdletBinding()] param( [parameter(Mandatory=$true)] [string]$SiteServer, [parameter(Mandatory=$true)] [string]$MDTServer, [parameter(Mandatory=$true)] [string]$MDTDatabase ) function Load-Window { if ((Connect-CMSiteServer -CMSiteServer $SiteServer) -eq $true) { Connect-MDTDataba...
combined_dataset/train/non-malicious/Send-HTMLFormattedEmail.ps1
Send-HTMLFormattedEmail.ps1
#------------------------------------------------- # Send-HTMLFormattedEmail #------------------------------------------------- # Usage: Used to display help information. # **Parameters are not for interactive execution.** #------------------------------------------------- function Send-HTMLFormattedEmail{ p...
combined_dataset/train/non-malicious/sample_24_43.ps1
sample_24_43.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 = '74.1.0' #...
combined_dataset/train/non-malicious/sample_38_18.ps1
sample_38_18.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 ...
combined_dataset/train/non-malicious/usr mailbox in exch 07.ps1
usr mailbox in exch 07.ps1
#Generamos los usuarios por buzon y comprimimos el resultado #Autor: Pedro Genil #Fecha: 2012/11/21 #Version: 1.0 # Aþadimos modulo If ((Get-PSSnapin | where {$_.Name -match "Exchange.Management"}) -eq $null) { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin } # Creamos el alias para el 7zip if (...
combined_dataset/train/non-malicious/sample_12_99.ps1
sample_12_99.ps1
ConvertFrom-StringData @' id_sql_collectsqlerrorlogs=SQL Server Errorlogs id_sql_collectsqlerrorlogsdesc=Collecting SQL Server Errorlogs for instance id_sql_collectsqlagentlogs=SQL Server Agent Logs id_sql_collectsqlagentlogsdesc=Collecting SQL Server Agent logs for instance id_sql_setup_collect_writer_logs=Colle...
combined_dataset/train/non-malicious/sample_5_12.ps1
sample_5_12.ps1
#************************************************ # TS_DetectWeakKeys.ps1 # Version 1.0.1 # Date: 8/6/2012 # Author: tspring # Description: [Idea ID 5009] [Windows] Weak Key Block Detection # Rule number: 5009 # Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.aspx?ID=5009 # This rule ...
combined_dataset/train/non-malicious/sample_9_84.ps1
sample_9_84.ps1
ConvertFrom-StringData @' id_hpz12servicecheck=Checking the presence of HPZ12 id_hpz12servicecheckdesc=Checking if Net Driver HPZ12 or Pml Driver HPZ12 services are installed '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgE...
combined_dataset/train/non-malicious/sample_8_3.ps1
sample_8_3.ps1
# # Module manifest for module 'OCI.PSModules.Cloudbridge' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/sample_19_36.ps1
sample_19_36.ps1
# # Module manifest for module 'OCI.PSModules.Mysql' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mysql.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_11_35.ps1
sample_11_35.ps1
data _system_translations { ConvertFrom-StringData @' # Fallback text # Copy all the strings in the psd1 file here msg_ad_forest = SMB Delegation cmdlets require the Active Directory forest to be in Windows Server 2012 forest functional level. msg_ad_cmdlets = SMB Delegation cmdlets r...
combined_dataset/train/non-malicious/BinaryClock V_1.0.ps1
BinaryClock V_1.0.ps1
Function Start-BinaryClock { <# .SYNOPSIS This is a binary clock that lists the time in hours, minutes and seconds .DESCRIPTION This is a binary clock that lists the time in hours, minutes and seconds. Key Input Tips: r: Toggles the resize mode of the clock so you can adjust the size....
combined_dataset/train/non-malicious/872.ps1
872.ps1
function Start-PythonExample { $ErrorActionPreference = "Stop" Connect-AzAccount $clusterName = Read-Host -Prompt "Enter the HDInsight cluster name" $creds=Get-Credential -Message "Enter the login for the cluster" -UserName "admin" $clusterInfo = Get-AzHDInsightCluster...
combined_dataset/train/non-malicious/3632.ps1
3632.ps1
function Test-CreateSyncAgent { $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg "West US 2" $databaseName = Get-DatabaseName $db = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName try {...
combined_dataset/train/non-malicious/sample_67_82.ps1
sample_67_82.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ [CmdletBinding(DefaultParamet...
combined_dataset/train/non-malicious/sample_32_57.ps1
sample_32_57.ps1
# # Module manifest for module 'OCI.PSModules.Genericartifactscontent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Genericartifactscontent.dll' # Version number of this module. ModuleVersion = '83.1.0...
combined_dataset/train/non-malicious/sample_61_85.ps1
sample_61_85.ps1
# # Copyright 2018-2024 HP Development Company, L.P. # All Rights Reserved. # # NOTICE: All information contained herein is, and remains the property of HP Development Company, L.P. # # The intellectual and technical concepts contained herein are proprietary to HP Development Company, L.P # and may be cove...
combined_dataset/train/non-malicious/sample_55_58.ps1
sample_55_58.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="E:\艺施胡\alova-devtools\node_modules\.pnpm\typescript@5.5.3\node_modules\typescript\bin\node_modules;E:\艺施胡\alova-devtools\node_modules\.pnpm\typescript@5.5.3\node_modules...
combined_dataset/train/non-malicious/sample_0_90.ps1
sample_0_90.ps1
#************************************************ # DC_WinHTTP-Component.ps1 # Version 1.0 # Version 1.1: Moved $sectionDescription to the correct location. # Date: 2009-2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about WinHTTP. # Called from: Main Networking Diag, PKI ...
combined_dataset/train/non-malicious/sample_2_50.ps1
sample_2_50.ps1
#************************************************ # DC_KIR-RBC-RegEntries.ps1 # Version 1.0 # Date: 2020 # Author: + Walter Eder (waltere@microsoft.com) # Description: Collects KIR (for 2019) and RBC (for 2016) Registry Entries # Called from: TS_AutoAddCommands_*.ps1 #*******************************************...
combined_dataset/train/non-malicious/541.ps1
541.ps1
function Get-SPOGroup { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$name ) $web = $clientContext.Web if ($web -ne $null) { $groups = $web.SiteGroups $clientContext.Load($groups) $clientContext.ExecuteQuery() $group = $groups | where {$_.Title -eq $name} return $...
combined_dataset/train/non-malicious/133.ps1
133.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_53_67.ps1
sample_53_67.ps1
param( [string]$DataPath, ` [switch]$AcceptEula, ` [switch]$Trace, ` [switch]$Logs, ` [switch]$Activity, ` [switch]$Fwd, ` [switch]$FwdCli, ` [switch]$RemShell, ` [switch]$HTTPSYS, ` [switch]$WinHTTP, ` [switch]$CAPI, ` [switch]$Ker...
combined_dataset/train/non-malicious/8796ba7c-730c-45aa-ac56-3b561a1149d2.ps1
8796ba7c-730c-45aa-ac56-3b561a1149d2.ps1
# Copyright (c) 2011 Code Owls LLC, All Rights Reserved. # # 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, mod...
combined_dataset/train/non-malicious/2540.ps1
2540.ps1
[String] $folder = "E:\Dexma\SQLIOTesting\"; [int] $runTimeSec = 60; [int] $fileSizeMb = 1000; [String[]] $stripFct = @("random", "sequential"); [int[]] $threads = @(1, 4, 16); [Char[]] $ioTypes = @("R", "W"); [int[]] $ioSizesKb = @(8, 64, 256, 512); [bool] $createHtml = $true; ...
combined_dataset/train/non-malicious/sample_62_21.ps1
sample_62_21.ps1
# diag_ads.psm1 # Created by tdimli # March 2020 # # Diagnostic functions for ADS area # version $ADS_version = "1.0.240326.0" # Area and Area/Component arrays $ADS = @("xray_ADS_Auth", "xray_ADS_gpo") #Component/Diagnostic Function arrays $xray_ADS_Auth = @("net_rpc_KB2506972") $xray_ADS_gpo = @("ads_...
combined_dataset/train/non-malicious/sample_54_50.ps1
sample_54_50.ps1
# # Module manifest for module 'OCI.PSModules.Adm' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Adm.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_29_50.ps1
sample_29_50.ps1
let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl(); let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/docker.webCore.eventHandlers.js"]; let currentScriptElement = document.querySelector("script[src='Scripts/docker.webCore.plugin.js']"); if (currentScriptElement !== nu...
combined_dataset/train/non-malicious/sample_55_85.ps1
sample_55_85.ps1
Import-LocalizedData -BindingVariable lswTxt -FileName AzStackHci.Software.Strings.psd1 function Test-OSVersion { <# .SYNOPSIS Test OS Version is correct .DESCRIPTION Get OS Version from local machine to use as minimum core count Expecting data from PsSessions to include lo...
combined_dataset/train/non-malicious/sample_46_13.ps1
sample_46_13.ps1
# region Generated # ---------------------------------------------------------------------------------- # 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 obt...