full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/sample_13_1.ps1
sample_13_1.ps1
#************************************************ # DC_ClusterResourcesProperties.ps1 # Version 1.1.1 # Date: 11-22-2011 # Author: Andre Teixeira - andret@microsoft.com # Description: This script writes cluster resources properties # on a text file called COMPUTERNAME_ClusterProperties.txt #*******...
combined_dataset/train/non-malicious/3c9c5d54-adf5-44bb-bf12-ab18d089e443.ps1
3c9c5d54-adf5-44bb-bf12-ab18d089e443.ps1
#requires -version 2.0 # Improves over the built-in Select-XML by leveraging Remove-XmlNamespace http`://poshcode.org/1492 # to provide a -RemoveNamespace parameter -- if it's supplied, all of the namespace declarations # and prefixes are removed from all XML nodes (by an XSL transform) before searching. # IMP...
combined_dataset/train/non-malicious/Get-Constructor_3.ps1
Get-Constructor_3.ps1
function Get-Constructor { PARAM( [Type]$type, [Switch]$Simple) if($Simple) { $type.GetConstructors() | Select @{ l="$($type.Name) Constructor" e={ "New-Object $($type.FullName) $(($_.GetParameters() | ForEach { "[{0}]`${1}" -f $_.ParameterType.FullName, $_.Name }) -Join ", ")" } ...
combined_dataset/train/non-malicious/sample_16_19.ps1
sample_16_19.ps1
# # Module manifest for module 'Az.SignalR' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.SignalR.psm1' # Version number of this module. ModuleVersion = '2.0.1' # Supported PSEditions C...
combined_dataset/train/non-malicious/sample_40_18.ps1
sample_40_18.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_88.ps1
sample_59_88.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/Send mail to BCC.ps1
Send mail to BCC.ps1
<# .SYNOPSIS Send mail to BCC using PowerShell .DESCRIPTION This script is a re-developed MSDN Sample using PowerShell. It creates an email message then sends it with a BCC. .NOTES File Name : Send-BCCMail.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell V2 CTP3 .LINK ...
combined_dataset/train/non-malicious/sample_2_69.ps1
sample_2_69.ps1
ConvertFrom-StringData @' id_sccm_activity_cm07serverinfo=Gathering Site Server Information id_sccm_cm07serverinfo_serverinfo=Obtaining Site Server Information id_sccm_cm07serverinfo_hierarchy=Obtaining Site Hierarchy id_sccm_cm07serverinfo_filever=Obtaining File Versions '@ # SIG # Begin signature block # MII...
combined_dataset/train/non-malicious/2907.ps1
2907.ps1
TaskSetup { "executing task setup" } Task default -depends Compile, Test, Deploy Task Compile { "Compiling" } Task Test -depends Compile { "Testing" } Task Deploy -depends Test { "Deploying" }
combined_dataset/train/non-malicious/4386.ps1
4386.ps1
function Test-ItemPrereleaseVersionRequirements { [CmdletBinding()] param( [ValidateNotNullOrEmpty()] [string] $Version, [string] $RequiredVersion, [string] $MinimumVersion, [string] $MaximumVersion ) $result = ValidateAndGet-...
combined_dataset/train/non-malicious/3357.ps1
3357.ps1
param( [ValidateNotNull()] [String[]]$Modules = @( "Azs.AzureBridge.Admin", "Azs.Backup.Admin", "Azs.Commerce.Admin", "Azs.Compute.Admin", "Azs.Fabric.Admin", "Azs.Gallery.Admin", "Azs.InfrastructureInsights.Admin", "Azs.KeyVault.A...
combined_dataset/train/non-malicious/Get-Application 2.1.ps1
Get-Application 2.1.ps1
function Find-Application { [CmdletBinding()] param( [string]$Name ) begin { [String[]]$Path = (Get-Content Env:Path).Split(";") | ForEach-Object { if($_ -match "%.*?%"){ $expansion = Get-Content ($_ -replace '.*%(.*?)%.*','Env:$1') ...
combined_dataset/train/non-malicious/sample_3_96.ps1
sample_3_96.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/Exchange07 Mbox Report.ps1
Exchange07 Mbox Report.ps1
#This script is designed to grab mailbox statistics for every user and give a more detailed #level of output about mailbox statistics in .html format param( [string] $SFileWDir ) # If there is no optional argument then make a filename for it. if (!$SFileWDir) { Write-Host "You didn't specify a filename w/...
combined_dataset/train/non-malicious/1226.ps1
1226.ps1
Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1') describe 'Get-PowerShellModuleInstallPath' { $programFilesModulePath = Join-Path -Path $env:ProgramFiles -ChildPath 'WindowsPowerShell\Modules' if( (Test-Path -Path 'Env:\ProgramW6432') ) ...
combined_dataset/train/non-malicious/sample_13_20.ps1
sample_13_20.ps1
ConvertFrom-StringData @' id_printcsrbloatingcheck_st=Possible client size rendering registry bloat detected '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCW...
combined_dataset/train/non-malicious/2045.ps1
2045.ps1
Describe "Command Discovery tests" -Tags "CI" { BeforeAll { setup -f testscript.ps1 -content "'This script should not run. Running from testscript.ps1'" setup -f testscripp.ps1 -content "'This script should not run. Running from testscripp.ps1'" $TestCasesCommandNotFound = @( ...
combined_dataset/train/non-malicious/Get-DiskUsage.ps1
Get-DiskUsage.ps1
## du.ps1 Get-DiskUsage ############################### ## Note: $unit can be: kb, mb, gb, or an empty string (to get bytes) ############################### ## -Force causes du to include System ReparsePoints ## This means including folders like Vista's ~\\Documents\\My Pictures (which is a symlink to ~\\Pictur...
combined_dataset/train/non-malicious/sample_0_4.ps1
sample_0_4.ps1
ConvertFrom-StringData @' id_repadmin=RepAdmin Log Files id_repadminobtaining=Running RepAdmin tool and obtaining output '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBA...
combined_dataset/train/non-malicious/sample_20_78.ps1
sample_20_78.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 = '81.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/sample_4_12.ps1
sample_4_12.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/sample_58_47.ps1
sample_58_47.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ ## ## TODO: Refactor the cer...
combined_dataset/train/non-malicious/14.ps1
14.ps1
param ($Remote = 'origin', [switch]$Force) Push-Location $PSScriptRoot $nuspec = [xml](Get-Content poshgit.nuspec) $version = $nuspec.package.metadata.version $tag = "v$version" if ($Force) { git tag -f $tag git push -f $Remote $tag } elseif (!$(git ls-remote $Remote $tag)) { Write-Warning "'$Remote/$tag'...
combined_dataset/train/non-malicious/sample_53_32.ps1
sample_53_32.ps1
# # Module manifest for module 'OCI.PSModules.Mediaservices' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/Get-LatestChromium.ps1
Get-LatestChromium.ps1
$sevenz = 'D:\\u\\7-Zip\\current\\7z.exe' $drops = 'D:\\chromium\\drops' $VerbosePreference = 'Continue' $wc = New-Object Net.WebClient $url = 'http://build.chromium.org/buildbot/snapshots/chromium-rel-xp' Write-Verbose 'Finding the latest build...' $latest = [Int32]$wc.DownloadString("$url/LATEST") if (...
combined_dataset/train/non-malicious/2394.ps1
2394.ps1
[OutputType('void')] [CmdletBinding(SupportsShouldProcess)] param ( [Parameter()] [ValidateNotNullOrEmpty()] [string[]]$ComputerName, [Parameter()] [ValidateNotNullOrEmpty()] [string]$UserName ) $ErrorActionPreference = 'Stop' if (-not $PSBoundParameters.ContainsKey('ComputerName')) { $ComputerName = 'l...
combined_dataset/train/non-malicious/628.ps1
628.ps1
param( [string]$Version, [string]$Path, [switch]$Force, $Update, [switch]$Uninstall ) $Configs = @{ Url = "http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.63-installer.exe" Path = "$(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)\" } $Configs | ForEach-Object{ try{ $_....
combined_dataset/train/non-malicious/sample_22_81.ps1
sample_22_81.ps1
# Localized 05/08/2024 05:10 AM (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=暗号化されたパッ...
combined_dataset/train/non-malicious/sample_20_92.ps1
sample_20_92.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_59_38.ps1
sample_59_38.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/sample_44_3.ps1
sample_44_3.ps1
/* eslint-disable no-undef */ var plugin = require("plugin-vs-v2"); if (typeof plugin != "undefined") { plugin.Messaging.addEventListener("pluginready", function () { setHtmlText(); }); } function setHtmlText() { // resource strings used by docker.web.default.html setTextContent("#dockerWebCor...
combined_dataset/train/non-malicious/sample_5_78.ps1
sample_5_78.ps1
. ./utils_cts.ps1 SkipSecondExecution if($debug -eq $true){[void]$shell.popup("Run RS_PrintInfo.ps1")} $PrintInfoAlertXMLFileName = $Computername + "_PrintInfoAlerts.XML" if (Test-Path $PrintInfoAlertXMLFileName) { if($debug -eq $true){[void]$shell.popup($PrintInfoAlertXMLFileName)} [xml] $XMLResu...
combined_dataset/train/non-malicious/2160.ps1
2160.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Select desired architecture to install Visual C++ applications on. You can specify both x86 and x64 as a string array.")] [ValidateNotNullOrEmpty()] [ValidateSet("x86","x64")] [string[]]$Architecture = "x86, x6...
combined_dataset/train/non-malicious/ConvertTo-ASCII_1.ps1
ConvertTo-ASCII_1.ps1
#requires �version 2.0 #region Help <# .SYNOPSIS Automation script for file character set format conversion to ASCII encoding. .DESCRIPTION Script for automating the conversion of files to ASCII format. Good for if you've used Out-File without specifying the encoding. Which would make a Unicode formatt...
combined_dataset/train/non-malicious/sample_25_91.ps1
sample_25_91.ps1
# # Module manifest for module 'OCI.PSModules.Computecloudatcustomer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computecloudatcustomer.dll' # Version number of this module. ModuleVersion = '75.1.0' ...
combined_dataset/train/non-malicious/sample_37_76.ps1
sample_37_76.ps1
# # Module manifest for module 'OCI.PSModules.Budget' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Budget.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Compatib...
combined_dataset/train/non-malicious/Remove broken NTFS perm.ps1
Remove broken NTFS perm.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/4336.ps1
4336.ps1
function Save-ModuleSources { if($script:PSGetModuleSources) { if(-not (Microsoft.PowerShell.Management\Test-Path $script:PSGetAppLocalPath)) { $null = Microsoft.PowerShell.Management\New-Item -Path $script:PSGetAppLocalPath ` ...
combined_dataset/train/non-malicious/130.ps1
130.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/2945.ps1
2945.ps1
Framework '4.0x86' task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) {} else { exec { msbuild /version } } }
combined_dataset/train/non-malicious/sample_39_38.ps1
sample_39_38.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 = '74.1.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/sample_51_15.ps1
sample_51_15.ps1
# # Module manifest for module 'OCI.PSModules.Monitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Monitoring.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/Get-LocalGroupMember_2.ps1
Get-LocalGroupMember_2.ps1
function Get-LocalGroupMember { param( # The name of the local group to retrieve members of [Parameter(Position=0,Mandatory=$true)] [String]$GroupName = "administrators", # A filter for the user name(s) [Parameter(Position=1)] [String]$UserName = "*", # The computer to query (defaults ...
combined_dataset/train/non-malicious/2193.ps1
2193.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=$false, HelpMessa...
combined_dataset/train/non-malicious/sample_18_36.ps1
sample_18_36.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Register-EditorCommand ` -Name 'PowerShellEditorServices.OpenEditorProfile' ` -DisplayName 'Open Editor Profile' ` -SuppressOutput ` -ScriptBlock { param([Microsoft.PowerShell.EditorServices.Extensions.EditorContex...
combined_dataset/train/non-malicious/1238.ps1
1238.ps1
[CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Name ) Set-StrictMode -Version 'Latest' $Name = [Text.Encoding]::Unicode.GetString( [Convert]::FromBase64String($Name) ) [Environment]::SetEnvironmentVariable( $Name, $null, [EnvironmentVariableTarget]::User )
combined_dataset/train/non-malicious/1356.ps1
1356.ps1
function Get-CFileSharePermission { [CmdletBinding()] [OutputType([Carbon.Security.ShareAccessRule])] param( [Parameter(Mandatory=$true)] [string] $Name, [string] $Identity ) Set-StrictMode -Version 'Latest' Use-CallerPreference ...
combined_dataset/train/non-malicious/vProfile-ClusterAudit.ps1
vProfile-ClusterAudit.ps1
# vProfile-ClusterAudit.ps1 : vSphere cluster node auditing script # This script will compare all VI/vSphere cluster nodes against a reference node # Parameters: # $xmlFile : XML profile file, created by the vProfile.ps1 script # $csvFile : CSV file that will conatin the discovered differences # $referenceHost : h...
combined_dataset/train/non-malicious/sample_54_65.ps1
sample_54_65.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
combined_dataset/train/non-malicious/4293.ps1
4293.ps1
function Out-DataTable { [CmdletBinding()] [OutputType([System.Data.DataTable])] param( [Parameter( Position=0, Mandatory=$true, ValueFromPipeline = $true)] [PSObject[]]$InputObject, [string[]]$NonNullable = @() ) Begin { ...
combined_dataset/train/non-malicious/sample_55_41.ps1
sample_55_41.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....
combined_dataset/train/non-malicious/2167.ps1
2167.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Specify Primary Site server")] [string]$SiteServer = "$($env:COMPUTERNAME)", [parameter(Mandatory=$true, HelpMessage="Path to text file")] [ValidateScript({Test-Path -Path $_ -Include *.txt})] [string]$File...
combined_dataset/train/non-malicious/sample_22_20.ps1
sample_22_20.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\jiti@1.21.0\node_modules\jiti\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\jiti@1.21.0\no...
combined_dataset/train/non-malicious/sample_54_64.ps1
sample_54_64.ps1
# Helper functions to be used across resources Function New-DellEventLog{ [CmdletBinding()] param( [Parameter (Mandatory=$false)][System.string] $LogName="DellClientBIOS PowerShell", [Parameter (Mandatory=$false)][System.string] $SourceName="DellBIOSProvider DSC" ) $Cust...
combined_dataset/train/non-malicious/sample_46_31.ps1
sample_46_31.ps1
@{ RootModule = 'PSModule.psm1' ModuleVersion = '2.2.5' GUID = '1d73a601-4a6c-43c5-ba3f-619b18bbb404' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' D...
combined_dataset/train/non-malicious/sample_36_96.ps1
sample_36_96.ps1
# # Module manifest for module 'OCI.PSModules.Managementdashboard' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Managementdashboard.dll' # Version number of this module. ModuleVersion = '75.1.0' # Sup...
combined_dataset/train/non-malicious/Findup_19.ps1
Findup_19.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : I...
combined_dataset/train/non-malicious/sample_11_57.ps1
sample_11_57.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/3301.ps1
3301.ps1
function New-PoshBotFileUpload { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Scope='Function', Target='*')] [cmdletbinding(DefaultParameterSetName = 'Path')] param( [parameter( Mandatory, ParameterSetName = 'Pat...
combined_dataset/train/non-malicious/325.ps1
325.ps1
function Write-PSFMessageProxy { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Write-PSFMessageProxy')] param ( [Parameter(Position = 0)] [Alias('Object', 'MessageData')] [string] $Message, [switch] $NoNewline, $Separator, [System.ConsoleColor] $Foreg...
combined_dataset/train/non-malicious/Set-Wallpaper (CTP3).ps1
Set-Wallpaper (CTP3).ps1
#requires -version 2.0 ## Set-Wallpaper - set your windows desktop wallpaper ################################################################################################### ## Usage: ## Set-Wallpaper "C:\\Users\\Joel\\Pictures\\Wallpaper\\Dual Monitor\\mandolux-tiger.jpg" "Tile" ## ls *.jpg | get-random ...
combined_dataset/train/non-malicious/sample_66_84.ps1
sample_66_84.ps1
# dot-source all function files Get-ChildItem -Path $PSScriptRoot | Unblock-File Get-ChildItem -Path $PSScriptRoot\*.ps1 -Exclude ServiceFabricSDK.ps1 | Foreach-Object{ . $_.FullName } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI...
combined_dataset/train/non-malicious/1433.ps1
1433.ps1
function Set-CryptoKeySecurity { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [Security.Cryptography.X509Certificates.X509Certificate2] $Certificate, [Parameter(Mandatory=$true)] [Security.AccessControl.CryptoKeySecurity] $CryptoKeySecurity, [P...
combined_dataset/train/non-malicious/sample_26_18.ps1
sample_26_18.ps1
TOPIC about_poshsvntarget Short description Describes how to specify cmdlet target. Long description Some Subversion operations support specifying either a local Path to a working copy or a remote Url to a repository as a target. You can specify target of the operation by setting the `-Ta...
combined_dataset/train/non-malicious/Portgroup NIC Team.ps1
Portgroup NIC Team.ps1
# PG-duplex.ps1 : NIC Teaming with failover set on duplexity # This script will configure the portgroup to use NIC Teaming where the failover is # depending on the duplexity of the Active NIC. # # Parameters: # $esxName : name of the ESX server # $vSwitch : name of the vSwitch # $portgroup : name of the portgrou...
combined_dataset/train/non-malicious/sample_15_55.ps1
sample_15_55.ps1
ConvertFrom-StringData @' id_PoolMon=PoolMon information id_PoolMonrunning=Gathering PoolMon information (PoolMon.exe) id_PoolMonoutput=PoolMon Output id_PoolMonoutputdesc=PoolMon Snaps information '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3Ag...
combined_dataset/train/non-malicious/sample_26_15.ps1
sample_26_15.ps1
# # Module manifest for module 'OCI.PSModules.Globallydistributeddatabase' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Globallydistributeddatabase.dll' # Version number of this module. ModuleVersion =...
combined_dataset/train/non-malicious/1000.ps1
1000.ps1
$myEndpoint = "<your-endpoint-URL>" $subID = (Get-AzureRmSubscription -SubscriptionName "<subscription-name>").Id New-AzureRmEventGridSubscription -ResourceId "/subscriptions/$subID" -Endpoint $myEndpoint -EventSubscriptionName demoSubscriptionToAzureSub
combined_dataset/train/non-malicious/sample_1_2.ps1
sample_1_2.ps1
ConvertFrom-StringData @' id_ctsnetworkstoreinterface=Network Store Interface id_ctsnetworkstoreinterfacedescription=Collects information about the Network Store Interface component. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgE...
combined_dataset/train/non-malicious/sample_4_62.ps1
sample_4_62.ps1
#************************************************ # TS_KB2655998_InactiveTSPorts.ps1 # Version 1.0.1 # Date: 03/21/2012 11:19:10 # Author: jasonf # Description: Checks for inactive ts ports described in http://blogs.technet.com/b/askperf/archive/2012/03/06/performance-issues-due-to-inactive-terminal-server-ports....
combined_dataset/train/non-malicious/2525.ps1
2525.ps1
$ENV = $args[0] if ($ENV -eq $null){ $ENV = "PROD" } switch ($ENV) { "PROD"{ $DBServer = "status.db.prod.dexma.com"; $DB = "status"; $SQLQuery = "SELECT s.server_name FROM dbo.t_server AS s INNER JOIN dbo.t_monitoring AS m ON s.server_id =...
combined_dataset/train/non-malicious/2726.ps1
2726.ps1
[CmdletBinding()] Param( ) If (Get-Command Get-SmbShare -ErrorAction SilentlyContinue) { foreach ($share in (Get-SmbShare)) { $shareName = $share.Name Write-Verbose "Grabbing share rights for $shareName" $shareOwner = (Get-Acl -Path $share.Path).Owner $o = "" | Select-Obj...
combined_dataset/train/non-malicious/e5112c21-82dc-44c8-8fa5-616b1b16b004.ps1
e5112c21-82dc-44c8-8fa5-616b1b16b004.ps1
#region Function: Get-DTWFileEncoding <# .SYNOPSIS Returns the encoding type of the file .DESCRIPTION Returns the encoding type of the file. It first attempts to determine the encoding by detecting the Byte Order Marker using Lee Holmes' algorithm (http://poshcode.org/2153). However, if the file does not ...
combined_dataset/train/non-malicious/sample_36_55.ps1
sample_36_55.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
combined_dataset/train/non-malicious/sample_59_81.ps1
sample_59_81.ps1
param ( [string]$Workspace ) $TranslationSources = @() $TranslationSources += "Language" $TranslationFunctions = Join-Path $PSScriptRoot "Get-TranslationFunctions.ps1" .$TranslationFunctions $Languages = Set-Languages $Workspace = $Workspace | Split-Path -Parent | Split-Path -Parent $ProjectDir = S...
combined_dataset/train/non-malicious/sample_33_55.ps1
sample_33_55.ps1
# # Module manifest for module 'OCI.PSModules.Ospgateway' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ospgateway.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/Create-Sequence.ps1
Create-Sequence.ps1
# Create-Sequence.ps1 # requires -version 1 # # Create a sequence object similar to an Oracle sequence. # # see : http://www.acs.ilstu.edu/docs/oracle/server.101/b10759/statements_6014.htm # # Crée un objet séquence similaire à une séquence Oracle # Version spécifique à PowerShell v1.0 # L'appel de Nextval n...
combined_dataset/train/non-malicious/sample_40_98.ps1
sample_40_98.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> Import-Module -Name "$PSScriptRoot\..\..\Common\...
combined_dataset/train/non-malicious/SqlProxy.psm1.ps1
SqlProxy.psm1.ps1
# --------------------------------------------------------------------------- ### <Author> ### Chad Miller ### </Author> ### <Description> ### Based on functions in SQLPSX. SqlProxy.psm1 module is used for administering ### SQL Server logins, users, and roles. Designed to be used with PS Remoting. ### All actio...
combined_dataset/train/non-malicious/sample_11_8.ps1
sample_11_8.ps1
ConvertFrom-StringData @' id_virtualization=Virtualization Information id_virtualizationobtaining=Obtaining Information about Virtualization Environment id_virtualizationoutput=Virtualization Information Output '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor ...
combined_dataset/train/non-malicious/sample_6_29.ps1
sample_6_29.ps1
# ********************************************************************************************************************* # Version 1.0 # Date: 02-29-2012 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: # Collects Configuration Manager Client Information # 1. Gets CCMExec service Status, Start time,...
combined_dataset/train/non-malicious/1236.ps1
1236.ps1
param( [Parameter(Mandatory=$true)] [string] $ProtectedString ) Set-StrictMode -Version 'Latest' $PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition Add-Type -AssemblyName 'System.Security' Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.psd1...
combined_dataset/train/non-malicious/sample_19_32.ps1
sample_19_32.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 = '77.0.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_47_27.ps1
sample_47_27.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_6_55.ps1
sample_6_55.ps1
ConvertFrom-StringData @' id_appcompatdisabledcheck_st=Application Compatibility is currently disabled '@ # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFl...
combined_dataset/train/non-malicious/sample_1_56.ps1
sample_1_56.ps1
// ================================================================== // DCIM_CSLogsConcreteCollection // ================================================================== [dynamic, provider("dcismprovider"), Description( "DCIM_CSLogsConcreteCollection is a" "trivial derivation of CIM_...
combined_dataset/train/non-malicious/McAfeeAPI_01Connect.ps1
McAfeeAPI_01Connect.ps1
#region << ePO Connection and Initialization >> function McAfee-Connect{ param([String]$script:ServerURL="SERVERNAME:8443") $c = McAfee-Credential $script:wc = McAfee-WebClient -Credential $c } function McAfee-Credential{ $c = Get-Credential -Credential $null return $c } function McAfee-WebClient{ ...
combined_dataset/train/non-malicious/sample_30_41.ps1
sample_30_41.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 = '74.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/sample_21_44.ps1
sample_21_44.ps1
[ "if" "elseif" "else" "switch" ] @keyword.control.conditional [ "foreach" "for" "while" "do" "until" ] @keyword.control.repeat [ "break" "continue" "return" ] @keyword.control.return "in" @keyword.operator "function" @keyword.function [ "class" "enum" ] @keyword.storage.type [ "para...
combined_dataset/train/non-malicious/sample_63_22.ps1
sample_63_22.ps1
# # Module manifest for module 'OCI.PSModules.Bds' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Bds.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_15_44.ps1
sample_15_44.ps1
#Collect Event Logs for VSSBackup package $EventLogNames = @("Microsoft-Windows-Backup", "Microsoft-Windows-VHDMP/Operational", "System", "Application") Run-DiagExpression .\TS_GetEvents.ps1 -EventLogNames $EventLogNames -SectionDescription "Event Logs" # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNz...
combined_dataset/train/non-malicious/sample_57_90.ps1
sample_57_90.ps1
# # Module manifest for module 'OCI.PSModules.Accessgovernancecp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Accessgovernancecp.dll' # Version number of this module. ModuleVersion = '86.0.0' # Suppo...
combined_dataset/train/non-malicious/sample_9_21.ps1
sample_9_21.ps1
ConvertFrom-StringData @' id_clusterrelatedevtlogs=Event Logs - Failover Cluster id_clusterrelatedevtlogsStorage=Event Logs - Storage '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIB...
combined_dataset/train/non-malicious/sample_53_70.ps1
sample_53_70.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_84.ps1
sample_18_84.ps1
@{ RootModule = 'PSReadLine.psm1' NestedModules = @("Microsoft.PowerShell.PSReadLine2.dll") ModuleVersion = '2.1.0' GUID = '5714753b-2afd-4492-a5fd-01d9e2cff8b5' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' Description = 'Gr...
combined_dataset/train/non-malicious/1762.ps1
1762.ps1
param( [Parameter(Mandatory = $true, Position = 0)] $coverallsToken, [Parameter(Mandatory = $true, Position = 1)] $codecovToken, [Parameter(Position = 2)] $azureLogDrive = "L:\", [switch] $SuppressQuiet ) function GetFileTable() { $files = $script:covData | Select-Xml './/File' foreach($file...
combined_dataset/train/non-malicious/Get-Scope_2.ps1
Get-Scope_2.ps1
function Get-Scope{ $rtnScope = 0 $global:scope = $false $scope = $true while($($ErrorActionPreference = "silentlycontinue"; switch((get-Variable -Name scope -Scope $rtnScope).value){$null{$true} $true{$true} $false{$ErrorActionPreference = "continue"; return ($rtnScope - 1)}})){ $rtnScope+...
combined_dataset/train/non-malicious/4427.ps1
4427.ps1
function Install-Module { [CmdletBinding(DefaultParameterSetName = 'NameParameterSet', HelpUri = 'https://go.microsoft.com/fwlink/?LinkID=398573', SupportsShouldProcess = $true)] Param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ...
combined_dataset/train/non-malicious/sample_45_10.ps1
sample_45_10.ps1
# # Module manifest for module 'OCI.PSModules.Aianomalydetection' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aianomalydetection.dll' # Version number of this module. ModuleVersion = '80.0.0' # Suppo...
combined_dataset/train/non-malicious/42.ps1
42.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...