full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/sample_34_9.ps1
sample_34_9.ps1
# # Module manifest for module 'OCI.PSModules.Email' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Email.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_16_94.ps1
sample_16_94.ps1
. $PSScriptRoot\PathProcessingNonExistingPaths.ps1 . $PSScriptRoot\PathProcessingNoWildcards.ps1 . $PSScriptRoot\PathProcessingWildcards.ps1 # SIG # Begin signature block # MIIr5wYJKoZIhvcNAQcCoIIr2DCCK9QCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7...
combined_dataset/train/non-malicious/1083.ps1
1083.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) Describe 'Remove-DotNetAppSetting' { $appSettingName = "TEST_APP_SETTING_NAME" $appSettingValue = "TEST_APP_SETTING_VALUE" function Assert-AppSetting($Name, $value, [Switch]$Framework, [Switch]$Framework64, [Swit...
combined_dataset/train/non-malicious/1936.ps1
1936.ps1
Describe "Out-File DRT Unit Tests" -Tags "CI" { It "Should be able to write the contents into a file with -pspath" { $tempFile = Join-Path -Path $TestDrive -ChildPath "ExposeBug928965" { 1 | Out-File -PSPath $tempFile } | Should -Not -Throw $fileContents = Get-Content $tempFile $fi...
combined_dataset/train/non-malicious/PoshCode ISE Addon_1.ps1
PoshCode ISE Addon_1.ps1
\nif (!(Get-Module WPK)) {Import-Module -global WPK} if (!(Get-Module PoshCode)) {Import-Module -global PoshCode} Function Get-PoshCodePreferences { if (Get-Item $global:xmlPath -ErrorAction SilentlyContinue) { try { $pcPreferences = Import-Clixml -Path $global:xmlPath $globa...
combined_dataset/train/non-malicious/1863.ps1
1863.ps1
Describe "Get-Module -ListAvailable" -Tags "CI" { BeforeAll { $originalPSModulePath = $env:PSModulePath New-Item -ItemType Directory -Path "$testdrive\Modules\Foo\1.1" -Force > $null New-Item -ItemType Directory -Path "$testdrive\Modules\Foo\2.0" -Force > $null New-Item -ItemTyp...
combined_dataset/train/non-malicious/Ping-Subnet.ps1
Ping-Subnet.ps1
#requires -Version 2.0 Function Ping-Subnet { #.Synopsis # Ping a subnet returning all alive hosts. #.Example # Ping-Subnet -IP 192.168.1.0 -Netmask /24 #.Example # Ping-Subnet -IP 192.168.1.128 -Netmask 255.255.255.128 Param( [string] $IP, [string] ...
combined_dataset/train/non-malicious/sample_9_41.ps1
sample_9_41.ps1
# Localized 10/16/2024 05:34 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=예(&Y) PromptNoString=아니요(&N) BundleFound=찾은 번들: {0} PackageFound=찾은 패키지: {0} EncryptedBundleFound=암호화된 번들 찾음: {0} EncryptedPackageFound=암호화된 패키지 찾음: {0} Certificat...
combined_dataset/train/non-malicious/199.ps1
199.ps1
Function Get-VMhostHbaInfo { [CmdletBinding()] PARAM ( [Parameter( Mandatory = $true, ValueFromPipeline = $true)] [String] $VMhost, [Parameter()] [ValidateScript({ Test-path -Path $_ -PathType Leaf })] [string] $PlinkPath = "C:\Program Files (x86)\PuTTY\plink.exe", [Parameter( Help...
combined_dataset/train/non-malicious/4347.ps1
4347.ps1
function Get-InstalledModuleDetails { [CmdletBinding()] param ( [Parameter()] [string] $Name, [Parameter()] [string] $RequiredVersion, [Parameter()] [string] $MinimumVersion, [Parameter()] [string] $MaximumVer...
combined_dataset/train/non-malicious/2948.ps1
2948.ps1
Framework '4.8' task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) {} else { $output = &msbuild /version /nologo 2>&1 Assert ($output -NotLike '15.0') '$output should contain 15.0' } }
combined_dataset/train/non-malicious/2089.ps1
2089.ps1
Describe "Handle ByRef-like types gracefully" -Tags "CI" { BeforeAll { $code = @' using System; using System.Management.Automation; namespace DotNetInterop { public class Test { public Span<int> this[int i] { get { return default(Span<int>); } set { DoNoth...
combined_dataset/train/non-malicious/4055.ps1
4055.ps1
param([string]$refPath=$(throw 'You must provide a path to a reference XML file'), [string]$diffPath=$(throw 'You must provide a path to a second XML file - duh')) $ref = Import-CliXml $refPath | Sort Name $diff = Import-CliXml $diffPath | sort Name Compare-Object $ref $diff -property Name,CommandType -sync ...
combined_dataset/train/non-malicious/sample_39_67.ps1
sample_39_67.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_47_12.ps1
sample_47_12.ps1
주제 about_IntelEthernetCmdlets 짧은 설명 IntelEthernetCmdlets 모듈을 사용하여 정보를 가져오거나 구성 설정 또는 인텔(R) 이더넷 장치를 지원해 디버그 문제에 대해 설명합니다. 긴 설명 IntelEthernetCmdlets 모듈은 시스템 내 인텔(R) 이더넷 장치에 대한 정보를 가져오거나 설정을 구성할 수 있는 cmdlet이 포함됩니다. 펌웨어 로그를 지원하는 장치에는 문제를 디버그하는 데 도움이 되는 로그를 구성하고 생성할 수 있습니다. ...
combined_dataset/train/non-malicious/sample_28_24.ps1
sample_28_24.ps1
# # Module manifest for module 'OCI.PSModules.Certificatesmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificatesmanagement.dll' # Version number of this module. ModuleVersion = '82.0.0' ...
combined_dataset/train/non-malicious/sample_65_38.ps1
sample_65_38.ps1
# # Module manifest for module 'OCI.PSModules.Apmcontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmcontrolplane.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported P...
combined_dataset/train/non-malicious/sample_60_93.ps1
sample_60_93.ps1
# # Module manifest for module 'OCI.PSModules.Vnmonitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vnmonitoring.dll' # Version number of this module. ModuleVersion = '89.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/sample_41_90.ps1
sample_41_90.ps1
/////////////////////////////////////////////////////////////////////////////// // Helper to set a designer prop /////////////////////////////////////////////////////////////////////////////// function setDesignerProp(tname, ttype, tvalue) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)...
combined_dataset/train/non-malicious/sample_50_3.ps1
sample_50_3.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
combined_dataset/train/non-malicious/sample_9_30.ps1
sample_9_30.ps1
# Localized 10/16/2024 05:34 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=예(&Y) PromptNoString=아니요(&N) BundleFound=찾은 번들: {0} PackageFound=찾은 패키지: {0} EncryptedBundleFound=암호화된 번들 찾음: {0} EncryptedPackageFound=암호화된 패키지 찾음: {0} Certificat...
combined_dataset/train/non-malicious/Set-SolarizedHostColor.ps1
Set-SolarizedHostColor.ps1
# function Set-HostColor { param( [Switch]$Light = $( ## Based on whether we're elevated or not, switch between DARK and LIGHT versions of Solarized: $([System.Environment]::OSVersion.Version.Major -gt 5) -and ( # Vista or higher and ... new-object ...
combined_dataset/train/non-malicious/sample_8_79.ps1
sample_8_79.ps1
ConvertFrom-StringData @' id_ctsdnsclient=DNS Client id_ctsdnsclientdescription=Collects information about DNS Client. id_ctstcpip=TCPIP '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7z...
combined_dataset/train/non-malicious/a39ded79-9953-4554-99ac-98c97462bfb8.ps1
a39ded79-9953-4554-99ac-98c97462bfb8.ps1
function Get-Help { <# .ForwardHelpTargetName Get-Help .ForwardHelpCategory Cmdlet #> [CmdletBinding(DefaultParameterSetName='AllUsersView')] param( [Parameter(Position=0, ValueFromPipelineByPropertyName=$true)] [System.String] ${Name}, [System.String] ${Path}, [System.String[]...
combined_dataset/train/non-malicious/3319.ps1
3319.ps1
function Approve-PendingCommand { [PoshBot.BotCommand( Aliases = ('ack', 'approve', 'approvecommand') )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string]$Id ) $context = $Bot.DeferredCommandExecuti...
combined_dataset/train/non-malicious/sample_9_9.ps1
sample_9_9.ps1
#************************************************ # DC_DfsrInfo.ps1 # Version 1.2.0 # Date: 4/19/2010 # By Craig Landis (clandis@microsoft.com) #************************************************ # 2019-03-17 WalterE added Trap #_# nneds check for DFSrDiag.exe / OSversion? # 2023-02-08 fix 'CHOICE /T 20 /C 123q' ...
combined_dataset/train/non-malicious/Get-ParameterAlias.ps1
Get-ParameterAlias.ps1
##############################################################################\n##\n## Get-ParameterAlias\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\nLooks...
combined_dataset/train/non-malicious/3929.ps1
3929.ps1
function Test-AzureIotDpsCertificateLifeCycle { $Location = Get-Location "Microsoft.Devices" "Device Provisioning Service" $IotDpsName = getAssetName $ResourceGroupName = getAssetName $TestOutputRoot = [System.AppDomain]::CurrentDomain.BaseDirectory; $certificatePath = "$TestOutputRoot\r...
combined_dataset/train/non-malicious/3405.ps1
3405.ps1
function Test-Disk { $rgname = Get-ComputeTestResourceName; $diskname = 'disk' + $rgname; try { $loc = Get-ComputeVMLocation; New-AzureRmResourceGroup -Name $rgname -Location $loc -Force; $subId = Get-SubscriptionIdFromResourceGroup $rgname; ...
combined_dataset/train/non-malicious/2903.ps1
2903.ps1
Framework '3.5' task default -depends AspNetCompiler task AspNetCompiler { if ( $IsMacOS -OR $IsLinux ) {} else { aspnet_compiler if ($LastExitCode -ne 1) { throw 'Error: Could not execute aspnet_compiler' } $global:LastExitCode = 0 } }
combined_dataset/train/non-malicious/sample_58_93.ps1
sample_58_93.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> <# .DESCRIPTION Ensure XML is signed by Mi...
combined_dataset/train/non-malicious/sample_22_44.ps1
sample_22_44.ps1
# # Module manifest for module 'OCI.PSModules.Marketplacepublisher' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplacepublisher.dll' # Version number of this module. ModuleVersion = '83.1.0' # S...
combined_dataset/train/non-malicious/Get-ADGroupMembers.ps1
Get-ADGroupMembers.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/2000.ps1
2000.ps1
Describe "Configuration file locations" -tags "CI","Slow" { BeforeAll { $powershell = Join-Path -Path $PsHome -ChildPath "pwsh" $profileName = "Microsoft.PowerShell_profile.ps1" } Context "Default configuration file locations" { BeforeAll { if ($IsWindows) { ...
combined_dataset/train/non-malicious/POC csharp expressions_1.ps1
POC csharp expressions_1.ps1
function run-csharpexpression([string] $expression ) { $local:name = [system.guid]::NewGuid().tostring().replace('-','_').insert(0,"csharpexpr") $local:template = @" using System; using System.IO; using System.Collections.Generic; using System.Linq; namespace ShellTools.DynamicCSharpExpression.N[[COUNTER]] {...
combined_dataset/train/non-malicious/sample_47_38.ps1
sample_47_38.ps1
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.Force = void 0; const switch_1 = require("../switch"); class Force extends switch_1.Switch { switch = 'force'; } exports.Force = Force; //# sourceMappingURL...
combined_dataset/train/non-malicious/2997.ps1
2997.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe 'It - Implementation' { $testState = New-PesterState -Path $TestDrive It 'Throws an error if you fail to pass in a test block' { $scriptBlock = { ItImpl -Pester $testState 'Some Name' } $scriptBlock | Should -T...
combined_dataset/train/non-malicious/sample_63_78.ps1
sample_63_78.ps1
# # Module manifest for module 'OCI.PSModules.Waf' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waf.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_48_51.ps1
sample_48_51.ps1
=캐시를 실제로 업데이트하지 못하도록 캐시 유지 관리 작업을 사용하지 않도록 설정합니다. 대신 즉시 반환됩니다.빠른 검사 중에 제외된 파일 및 디렉터리를 검사합니다.ScanRtpExclusions스캔 스레드 수에 대한 상한값을 제거합니다.¤이 옵션을 사용하도록 설정하면 핵심 서비스에서 ECS(실험 및 구성 서비스) 사용을 중지하여 Microsoft Defender 바이러스 백신 및 기타 Defender 소프트웨어에 대한 중요한 조직별 수정 사항을 신속하게 제공합니다. 수정 사항은 보안 인텔리전스 업데이트를 통해 계속 제공됩니다.¿사용하도록 설정하면 핵심 서비스가...
combined_dataset/train/non-malicious/sample_64_7.ps1
sample_64_7.ps1
Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility #Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
combined_dataset/train/non-malicious/sample_4_34.ps1
sample_4_34.ps1
<# .SYNOPSIS MSRD-Collect 'data collection' specific functions .DESCRIPTION Module for the MSRD-Collect local 'data collection' functions .NOTES Author : Robert Klemencz Requires : At least PowerShell 5.1 (This module is not for stand-alone use. It is used automatically from within the main...
combined_dataset/train/non-malicious/sample_48_65.ps1
sample_48_65.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_54_21.ps1
sample_54_21.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/2101.ps1
2101.ps1
Describe 'Testing of script internationalization' -Tags "CI" { BeforeAll { $dir=$PSScriptRoot $defaultParamValues = $PSDefaultParameterValues.Clone() if ($PSUICulture -ne 'en-US' -and $PSUICulture -ne 'fr-FR') { $PSDefaultParameterValues["It:Skip"] = $true ...
combined_dataset/train/non-malicious/sample_60_35.ps1
sample_60_35.ps1
# --------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------------------------...
combined_dataset/train/non-malicious/Add SSL Cert to IIS.ps1
Add SSL Cert to IIS.ps1
function Add-SSLCertificate{ param([string]$pfxPath,[string]$pfxPassword,[string]$hostHeader,[string]$siteName) $certMgr = New-Object -ComObject IIS.CertObj -ErrorAction SilentlyContinue $certMgr.ImportToCertStore($pfxPath,$pfxPassword,$true,$true) Import-Module WebAdministration; New-W...
combined_dataset/train/non-malicious/sample_37_51.ps1
sample_37_51.ps1
# # Module manifest for module 'OCI.PSModules.Servicemesh' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicemesh.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEdition...
combined_dataset/train/non-malicious/DriveUtilization.ps1
DriveUtilization.ps1
Function Get-Utilization { Param([string]$computername=$env:computername, [string]$ID="C:" ) #suppress errors messages $errorActionPreference="silentlycontinue" $drive=Get-WmiObject Win32_Logicaldisk -filter "DeviceID='$ID'" ` -computerna...
combined_dataset/train/non-malicious/test_2.ps1
test_2.ps1
[CmdletBinding()] param() "This file is in the $PSScriptRoot folder." # SIG # Begin signature block # MIIPGwYJKoZIhvcNAQcCoIIPDDCCDwgCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUtq5NTq7Q77yPgrtRePzRWHVn # THuggg...
combined_dataset/train/non-malicious/sample_53_11.ps1
sample_53_11.ps1
param ( [Parameter(Mandatory)][string]$projectContext, [Parameter(Mandatory)][string]$projectModels, [Parameter(Mandatory)][string]$provider, [Parameter(Mandatory)][string]$projectWeb, [Parameter(Mandatory)][string]$nameContext, [Parameter(Mandatory)][string]$connection, [Parameter(Mandatory)][string]$ProjectCRA...
combined_dataset/train/non-malicious/USB Script backup_2.ps1
USB Script backup_2.ps1
<# .SYNOPSIS Backup-ToUSB.ps1 (Version 2.2, 9 Jan 2012) .DESCRIPTION This script will backup recently changed *.ps1,*.psm1,*.psd1 files from any selected folder (default is $pwd) to any number of inserted USB devices, on which an archive folder 'PSarchive' will be created if it does not already exist. As a U...
combined_dataset/train/non-malicious/sample_42_70.ps1
sample_42_70.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=De vereiste PowerShell-module (FailoverClusters) is niet gevonden. Gebruik het hulpprogramma Functies en onderdelen om het volgende te installeren: Remote Server Administration Tools | Beheerprogramma's voor onderdelen | Hulpprogramma's voor failoverclustering |...
combined_dataset/train/non-malicious/270.ps1
270.ps1
function Get-Uptime { [CmdletBinding()] PARAM ( [Parameter( ParameterSetName = "Main", ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)] [Alias("CN", "__SERVER", "PSComputerName")] [String[]]$ComputerName=$env:C...
combined_dataset/train/non-malicious/sample_64_41.ps1
sample_64_41.ps1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit" xmlns:layoutPrimitivesToolkit="clr-namespace:System.Windows.Contro...
combined_dataset/train/non-malicious/sample_42_7.ps1
sample_42_7.ps1
# Downloading specified vulkan sdk and vulkan runtime # Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG # This file needs run in administrator mode $env:VULKAN_SDK_VERSION="1.3.275.0" $ProgressPreference = "SilentlyContinue" # Save environment VULKAN_SDK_VERSION to system [System.Environ...
combined_dataset/train/non-malicious/3842.ps1
3842.ps1
function Get-RandomRegistryName { return 'reg' + (getAssetName) } function Get-RandomResourceGroupName { return 'rg' + (getAssetName) } function Get-RandomReplicationName { return 'rep' + (getAssetName) } function Get-RandomWebhookName { return 'wh' + (getAssetName) } function Get-Provi...
combined_dataset/train/non-malicious/sample_11_36.ps1
sample_11_36.ps1
ConvertFrom-StringData @' id_dcdiag=Directory Server Diagnosis (DCDiag) id_dcdiagobtaining=Running DCDIAG.EXE tool to gather domain controller status information. id_dcdiagdnsobtaining=Running DCDIAG.EXE tool to gather domain controller DNS health information. id_dcdiagtopologyobtaining=Running DCDIAG.EXE tool to g...
combined_dataset/train/non-malicious/3603.ps1
3603.ps1
function Get-AzureRmSecurityWorkspaceSetting-SubscriptionScope { Set-AzureRmSecurityWorkspaceSetting-SubscriptionLevelResource $workspaceSettings = Get-AzSecurityWorkspaceSetting Validate-WorkspaceSettings $workspaceSettings } function Get-AzureRmSecurityWorkspaceSetting-SubscriptionLevelResourc...
combined_dataset/train/non-malicious/sample_65_95.ps1
sample_65_95.ps1
# # Module manifest for module 'OCI.PSModules.Databasemigration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Databasemigration.dll' # Version number of this module. ModuleVersion = '85.2.0' # Support...
combined_dataset/train/non-malicious/1466.ps1
1466.ps1
function Set-ReleaseNotesReleaseDate { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $ManifestPath, [Parameter(Mandatory=$true)] [string] $ReleaseNotesPath ) Set-StrictMode -Version 'Latest' $manifest = Test-Modul...
combined_dataset/train/non-malicious/sample_20_71.ps1
sample_20_71.ps1
# # Module manifest for module 'OCI.PSModules.Opensearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opensearch.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/3505.ps1
3505.ps1
function Test-GetApplicationInsightsContinuousExport { $rgname = Get-ApplicationInsightsTestResourceName; try { $appName = "app" + $rgname; $loc = Get-ProviderLocation ResourceManagement; $kind = "web"; New-AzResourceGroup -Name $rgname -Location $loc; ...
combined_dataset/train/non-malicious/1900.ps1
1900.ps1
if(-not ("netDumbster.smtp.SimpleSmtpServer" -as [type])) { Register-PackageSource -Name nuget.org -Location https://api.nuget.org/v3/index.json -ProviderName NuGet -ErrorAction SilentlyContinue $nugetPackage = "netDumbster" Install-Package -Name $nugetPackage -ProviderName NuGet -Scope CurrentUser -For...
combined_dataset/train/non-malicious/Receive-Stream_1.ps1
Receive-Stream_1.ps1
function Receive-Stream { #.Synopsis # Read a stream to the end and close it #.Description # Will read from a byte stream and output a string or a file #.Param reader # The stream to read from #.Param fileName # A file to write to. If this parameter is provided, the function will output to file #.Param enc...
combined_dataset/train/non-malicious/ONTAPI Module.ps1
ONTAPI Module.ps1
# Requires Version 2.0 # Requires ManageOntap.Dll # Plenty of room left for documentation # Andy Schneider - http://get-powershell.com # 3/10/2009 $OnTapDll = (resolve-path $PSScriptRoot\\ManageOntap.dll).Path [System.Reflection.Assembly]::LoadFile($onTapDll) function New-NTAPServer { param ( [Paramet...
combined_dataset/train/non-malicious/sample_11_92.ps1
sample_11_92.ps1
# Load Common Library # Load Reporting Utilities #_#$debug = $false . ./utils_cts.ps1 #_#. ./TS_RemoteSetup.ps1 $FirstTimeExecution = FirstTimeExecution trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_....
combined_dataset/train/non-malicious/New-LinkedClone.ps1
New-LinkedClone.ps1
#Requires -version 2 # TITLE: New-LinkedClone.ps1 # AUTHOR: Hal Rottenberg # Adapted from a technique published originally by Keshav Attrey http://www.vmdev.info/?p=40 # Also see William Lam's Perl script: http://engineering.ucsb.edu/~duonglt/vmware/vGhettoLinkedClone.html # And Leo's manual version for ESX 3.5...
combined_dataset/train/non-malicious/sample_9_91.ps1
sample_9_91.ps1
#************************************************ # TS_DellPowerEdgeBiosCheck.ps1 # Version 1.0.1 # Date: 5/9/2012 # Author: v-alyao # Description: [Idea ID 2842] [Windows] Alert Engineers if they are working on a Dell machine models R910, R810 and M910 # Rule number: 2842 # Rule URL: //sharepoint/sites/rules...
combined_dataset/train/non-malicious/sample_29_9.ps1
sample_29_9.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_Mp...
combined_dataset/train/non-malicious/sample_64_50.ps1
sample_64_50.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.StackHCI.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.StackHCI.internal.psm1' if(Test-Path $internalModulePath) { $n...
combined_dataset/train/non-malicious/sample_29_62.ps1
sample_29_62.ps1
# # Module manifest for module 'OCI.PSModules.Datasafe' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datasafe.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/sample_22_31.ps1
sample_22_31.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("embedMedia", "bool", true); } else { command.get...
combined_dataset/train/non-malicious/sample_13_94.ps1
sample_13_94.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Start-AMTUserConsent { <# .Synopsis Starts the Intel Active Management Technology user consent process .Description This CmdLet starts the user consent process on clients that have Intel Active Management Technology (AMT) ...
combined_dataset/train/non-malicious/93.ps1
93.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ($Aad...
combined_dataset/train/non-malicious/sample_30_48.ps1
sample_30_48.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Переменная среды с этим именем и типом уже существует. EnvironmentErrorDoesNotExists=Переменной среды с этим именем и типом не существует. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGs...
combined_dataset/train/non-malicious/4364.ps1
4364.ps1
function ValidateAndGet-ScriptDependencies { param( [Parameter(Mandatory=$true)] [string] $Repository, [Parameter(Mandatory=$true)] [PSCustomObject] $DependentScriptInfo, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.Manag...
combined_dataset/train/non-malicious/sample_52_72.ps1
sample_52_72.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Test-ScriptExtent { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [OutputType([bool], ParameterSetName='__AllParameterSets')] [OutputType([System.Management.Automation.Language.IScriptExten...
combined_dataset/train/non-malicious/1394.ps1
1394.ps1
function Get-CFileShare { [CmdletBinding()] param( [string] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $filter = '(Type = 0 or Type = 2147483648)' $wildcardSearch = [Management.Auto...
combined_dataset/train/non-malicious/Console Function Run_1.ps1
Console Function Run_1.ps1
function Run ([String]$scriptName = '-BLANK-') { <# The next function records any running scripts started in the console session (from $pwd) in the Scripts Event Log. It should be placed in the Console $profile. Scripts should be started by typing 'Run example' to capture example.ps1, for example. The...
combined_dataset/train/non-malicious/sample_14_39.ps1
sample_14_39.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_55_31.ps1
sample_55_31.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_Mp...
combined_dataset/train/non-malicious/sample_59_65.ps1
sample_59_65.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...
combined_dataset/train/non-malicious/Get-Netstat _1.2.ps1
Get-Netstat _1.2.ps1
Function Get-Netstat { $null, $null, $null, $null, $netstat = netstat -a -n -o [regex]$regexTCP = '(?<Protocol>\\S+)\\s+((?<LAddress>(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.(2[0-4]\\d|25[0-5]|[01]?\\d\\d?))|(?<LAddress>\\[?[0-9a-fA-f]{0,4}(\\:([...
combined_dataset/train/non-malicious/sample_48_49.ps1
sample_48_49.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 = '73.1.0' # Supported...
combined_dataset/train/non-malicious/1075.ps1
1075.ps1
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'CarbonDscTest' -Resolve) -Force $UserName = 'CarbonDscTestUser' $Password = [Guid]::NewGuid().ToString() $tempDir = $null Install-User -Credential (New-Credential -UserName $UserName -Password $Password) function New-MockDir { $path = (Joi...
combined_dataset/train/non-malicious/2809.ps1
2809.ps1
if (Get-Command logparser.exe) { $lpquery = @" SELECT COUNT(ServiceName, CmdLine, FailAction1, FailAction2, FailAction3) as ct, ServiceName, CmdLine, FailAction1, FailAction2, FailAction3 FROM *SvcFail.tsv GRO...
combined_dataset/train/non-malicious/Kill Outlook + CopyPST.ps1
Kill Outlook + CopyPST.ps1
$rep_du_user = $env:userprofile $repertoire_pst = ($rep_du_user+"\\AppData\\Local\\Microsoft\\Outlook") $repertoire_sauvegarde = "directory" #Kill de outlook Get-Process | Where { $_.Name -Eq "outlook" } | Kill #wait and see :) sleep 10 #copy des pst xcopy $repertoire_pst $repertoire_sauvegarde /D /E /C /...
combined_dataset/train/non-malicious/sample_24_21.ps1
sample_24_21.ps1
#!powershell # -*- coding: utf-8 -*- # (c) 2022, John McCall (@lowlydba) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #AnsibleRequires -CSharpUtil Ansible.Basic #AnsibleRequires -PowerShell ansible_collections.lowlydba.sqlserver.plugins.module_utils._SqlServerUtils #Req...
combined_dataset/train/non-malicious/Out-Balloon_1.ps1
Out-Balloon_1.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/sample_49_57.ps1
sample_49_57.ps1
# # Module manifest for module 'OCI.PSModules.Aispeech' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aispeech.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/sample_3_42.ps1
sample_3_42.ps1
#************************************************ # TS_EventLogStoppedGPPCheck.ps1 # Version 1.0.1 # Date: 4/3/2013 # Author: v-blchen # Description: [Idea ID 7018] [Windows] Event Log Service won't start # Rule number: 7018 # Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.aspx?ID=701...
combined_dataset/train/non-malicious/sample_4_43.ps1
sample_4_43.ps1
<# .SYNOPSIS Simplify data collection and diagnostics for troubleshooting Microsoft Remote Desktop (RDP/RDS/AVD/W365) related issues and a convenient method for submitting and following quick & easy action plans. .DESCRIPTION This script is designed to gather information to assist Microsoft Customer Suppo...
combined_dataset/train/non-malicious/sample_46_32.ps1
sample_46_32.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=No se encontró el módulo de PowerShell (FailoverClusters) necesario. Usa la herramienta Roles y características para instalar: Herramientas de administración remota del servidor | Herramientas de administración de las características | Herramientas de clústeres ...
combined_dataset/train/non-malicious/sample_35_96.ps1
sample_35_96.ps1
# # Module manifest for module 'OCI.PSModules.Appmgmtcontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Appmgmtcontrol.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSE...
combined_dataset/train/non-malicious/Join-Collections_1.ps1
Join-Collections_1.ps1
#requires -version 2.0 ## Version 1.0 First post http://poshcode.org/1459 ## Version 1.1 Fixed column uniqueness bug #.Note # Depends on ConvertFrom-HashTable http://poshcode.org/1118 #.Synopsis # Performs a inner join on two collections of objects based on a common key column. #.Description # Takes two ...
combined_dataset/train/non-malicious/sample_12_95.ps1
sample_12_95.ps1
# # Module manifest for module 'OCI.PSModules.Keymanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Keymanagement.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/145.ps1
145.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/4216.ps1
4216.ps1
$scriptblock = { param ($Payload) $PipeName = "PoshMS" $p = [System.IO.Directory]::GetFiles("\\.\\pipe\\") $start = $true foreach ($i in $p) { if ($i -like "*PoshMS") { $start = $false } } while ($start) { add-Type -assembly "System.Core" $PipeS...
combined_dataset/train/non-malicious/1498.ps1
1498.ps1
function Export-RunResultXml { [CmdletBinding()] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [Blade.RunResult] $RunResult, [Parameter(Mandatory=$true)] [string] $FilePath ) begin { Set-Stri...
combined_dataset/train/non-malicious/Set-UserCannotChangePass_1.ps1
Set-UserCannotChangePass_1.ps1
#########1#########2#########3#########4#########5#########6#########7#########8#########9#########1 #########0#########0#########0#########0#########0#########0#########0#########0#########0#########0 # # Author: Erik McCarty # # Description: Set the "user Cannot Change Password" property on an active # director...