full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/sample_52_8.ps1
sample_52_8.ps1
# # Module manifest for module 'Az.ArcResourceBridge' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.ArcResourceBridge.psm1' # Version number of this module. ModuleVersion = '1.0.1' # Sup...
combined_dataset/train/non-malicious/image2excel.ps1
image2excel.ps1
None
combined_dataset/train/non-malicious/2206.ps1
2206.ps1
New-EventLog -LogName "Application" -Source "CCM Clean Primary User" Write-Eventlog -Logname "Application" -Source "CCM Clean Primary User" -EventID 64351 -EntryType Information -Message "Start Processing object(s)." try { $StateMsgs = Get-WmiObject -Namespace root\ccm\StateMsg -Class CCM_StateMsg -Filter ...
combined_dataset/train/non-malicious/sample_64_92.ps1
sample_64_92.ps1
fकालम '%{oii_groupedColumn/}' में ID '%I64u{groupByColumnId/}' पर सेट एक अमान्य GroupByColumn संदर्भ है‚कालम '%{oii_groupedColumn/}' को एक ऐसे कालम '%{oii_groupByColumn/}' द्वारा समूहीकृत किया गया है जो किसी भिन्न तालिका से संबंधित हैFहो सकता है कि भूमिका का नाम '*' या '*SharePoint' पर सेट न किया जा सके.eरिलेशनशिप '%{c...
combined_dataset/train/non-malicious/sample_15_45.ps1
sample_15_45.ps1
ConvertFrom-StringData @' id_ctstcpip=TCPIP id_ctstcpipdescription=Collects information about TCPIP. '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlA...
combined_dataset/train/non-malicious/Get-WarningsAndErrors.ps.ps1
Get-WarningsAndErrors.ps.ps1
##############################################################################\n##\n## Get-WarningsAndErrors\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\nDe...
combined_dataset/train/non-malicious/1251.ps1
1251.ps1
function Lock-CIisConfigurationSection { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string[]] $SectionPath ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionCo...
combined_dataset/train/non-malicious/3678.ps1
3678.ps1
function Test-FailoverDatabase { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location try { $databaseName = Get-DatabaseName New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName...
combined_dataset/train/non-malicious/3696.ps1
3696.ps1
function Test-FrontDoorCrud { $Name = getAssetName $resourceGroup = TestSetup-CreateResourceGroup $resourceGroupName = $resourceGroup.ResourceGroupName $tags = @{"tag1" = "value1"; "tag2" = "value2"} $hostName = "$Name.azurefd.net" $routingrule1 = New-AzFrontDoorRoutingRuleObject ...
combined_dataset/train/non-malicious/4245.ps1
4245.ps1
$scriptblock = { param ($Payload) $PipeName = "PoshMSProxy" $p = [System.IO.Directory]::GetFiles("\\.\\pipe\\") $start = $true foreach ($i in $p) { if ($i -like "*PoshMSProxy") { $start = $false } } while ($start) { add-Type -assembly "System.Core" ...
combined_dataset/train/non-malicious/sample_10_57.ps1
sample_10_57.ps1
#************************************************ # TS_B2693877_Sophos_BEFLTCheck.ps1 # Version 1.0.1 # TemplateVersion 1.2 # Date: 04/26/2012 11:29:18 # Author: jasonf # Description: Check for the presence of Sophos BEFLT.SYS version 5.60.1.7 #************************************************ Import-Localize...
combined_dataset/train/non-malicious/4031.ps1
4031.ps1
function Test-AzureLocation { $providerLocations = Get-AzLocation Assert-True { $providerLocations.Count -gt 0 } foreach ($location in $providerLocations) { Assert-True { $location.Providers.Count -gt 0 } } }
combined_dataset/train/non-malicious/sample_64_4.ps1
sample_64_4.ps1
# # Module manifest for module 'OCI.PSModules.Apmtraces' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmtraces.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/1334.ps1
1334.ps1
function Get-CIisHttpRedirect { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $SiteName, [Alias('Path')] [string] $VirtualPath = '' ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet ...
combined_dataset/train/non-malicious/sample_60_34.ps1
sample_60_34.ps1
# # Module manifest for module 'OCI.PSModules.Optimizer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Optimizer.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/ScriptTransforms module_4.ps1
ScriptTransforms module_4.ps1
function New-ParameterTransform { #.Synopsis # Generates Parameter Transformation Attributes in simple PowerShell syntax #.Description # New-ParameterTransform allows the creation of .Net Attribute classes which can be applied to PowerShell parameters to transform or manipulate data as it's being passed in. #.Exam...
combined_dataset/train/non-malicious/sample_24_14.ps1
sample_24_14.ps1
ConvertFrom-StringData @' EditorCommandExists=Editor command '{0}' already exists, skipping. EditorCommandImporting=Importing editor command '{0}'. MissingEditorContext=Unable to obtain editor context. Make sure PowerShell Editor Services is running and then try the command again. '@ # SIG # Begin signature bloc...
combined_dataset/train/non-malicious/New-ISEMenu_3.ps1
New-ISEMenu_3.ps1
Import-Module ShowUI Function New-ISEMenu { New-Grid -AllowDrop:$true -Name "ISEAddonCreator" -columns Auto, * -rows Auto,Auto,Auto,*,Auto,Auto -Margin 5 { New-Label -Name Warning -Foreground Red -FontWeight Bold -Column 1 ($target = New-TextBox -Name txtName -Column 1 -Row ($Row=1)) New-Label...
combined_dataset/train/non-malicious/sample_49_83.ps1
sample_49_83.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.DataProtection.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.DataProtection.internal.psm1' if(Test-Path $internalModulePat...
combined_dataset/train/non-malicious/Get-DellWarranty_1.ps1
Get-DellWarranty_1.ps1
function Get-DellWarranty { <# .Synopsis Provides warranty information for one or more Dell service tags. .Description Queries the Dell Website for a list of service tags and returns the warranty information as a custom object. If a service tag has multiple warranties, they are...
combined_dataset/train/non-malicious/Boots & Background Jobs_1.ps1
Boots & Background Jobs_1.ps1
## NOTE: This requires the current changeset download of PowerBoots (not the 0.2 beta) Import-Module PowerBoots # This simulates a download function, say Jaykul's Get-Webfile # You can output current progress for a large file, or if it's an array of links then out put the current (index/length)% # You will need t...
combined_dataset/train/non-malicious/Solarized (Dark) Theme_1.ps1
Solarized (Dark) Theme_1.ps1
<?xml version="1.0" encoding="utf-16"?> <StorableColorTheme xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Keys> <string>ErrorForegroundColor</string> <string>ErrorBackgroundColor</string> <string>WarningForegroundColor</string> <string>Warni...
combined_dataset/train/non-malicious/sample_62_60.ps1
sample_62_60.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # # ModifyProxySettings.ps1 - To be used by the installer - Mo...
combined_dataset/train/non-malicious/GPRS Online log_2.ps1
GPRS Online log_2.ps1
<# .SYNOPSIS Get-GprsTime (V3.0 Update for Windows 7) Check the total connect time of any GPRS devices from a specified date. Use Get-Help .\\Get-GprsTime -full to view Help for this file. .DESCRIPTION Display all the GPRS modem Event Log entries. While applications issued by the mobile phone manufacturers wi...
combined_dataset/train/non-malicious/Show-Sample1.ps1
Show-Sample1.ps1
Show -Width 300 -Height 150 { DockPanel { Menu -DockPanel-Dock Top -Height 20 { MenuItem -Header "_File" { ## Hook up the "New" menuitem to the New command ... MenuItem -Header "_New" -Command ([system.windows.input.applicationcommands]::new) MenuItem -Header ...
combined_dataset/train/non-malicious/sample_57_26.ps1
sample_57_26.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_65_36.ps1
sample_65_36.ps1
# # Module manifest for module 'OCI.PSModules.Database' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Database.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/sample_37_46.ps1
sample_37_46.ps1
# # Module manifest for module 'OCI.PSModules.Waas' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waas.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/8c9f21a1-4924-4551-ae6d-1fc52d7751a4.ps1
8c9f21a1-4924-4551-ae6d-1fc52d7751a4.ps1
#################################################################################################### ## Write-Sitemap.ps1 ## ## Generates a basic Sitemap for your website, based on a list of locations / products or whatever, ## (depending on your requirements). Can easily be extended to create more complex Sitemaps...
combined_dataset/train/non-malicious/sample_43_86.ps1
sample_43_86.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ param ( [Parameter(Manda...
combined_dataset/train/non-malicious/sample_32_89.ps1
sample_32_89.ps1
# # Module manifest for module 'DscInstall' # # Generated by: Zia Jalali # # Generated on: 07/31/2017 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'Heartbeat.psm1' # Version number of this module. ModuleVersion = '1.1' # ID used to uniquely identify thi...
combined_dataset/train/non-malicious/23.ps1
23.ps1
. $PSScriptRoot\Shared.ps1 Describe 'ParamsTabExpansion VSTS Tests' { Context 'Push Parameters TabExpansion Tests' { BeforeEach { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')] $repoPath = NewGitTempRepo ...
combined_dataset/train/non-malicious/1402.ps1
1402.ps1
function Set-CTrustedHost { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string[]] [Alias("Entries")] $Entry ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.Sessio...
combined_dataset/train/non-malicious/4027.ps1
4027.ps1
$TestOutputRoot = [System.AppDomain]::CurrentDomain.BaseDirectory; $ResourcesPath = Join-Path $TestOutputRoot "ScenarioTests" function Get-ResourceGroupName { return getAssetName } function Get-ResourceName { return getAssetName } function Get-PasswordForVM { return (getAssetName) + '_196Ab...
combined_dataset/train/non-malicious/sample_42_42.ps1
sample_42_42.ps1
#Copyright (C) 2020,2023 VMware, Inc. All rights reserved. #Checking necessary modules existance Import-Module Microsoft.PowerShell.Management if (!(Get-Module Microsoft.PowerShell.Management)) { Write-Error "Microsoft.PowerShell.Management module error" exit 1 } Import-Module Microsoft.PowerShell.U...
combined_dataset/train/non-malicious/sample_47_0.ps1
sample_47_0.ps1
# # Module manifest for module 'OCI.PSModules.Vbsinst' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/sample_57_84.ps1
sample_57_84.ps1
# # Module manifest for module 'OCI.PSModules.Waa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waa.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_36_2.ps1
sample_36_2.ps1
# Localized 05/11/2024 04:05 AM (GMT) 303:7.2.30118 CL_LocalizationData.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Troubleshooting Troubleshoot_DetectNetworkCache=Checking Windows Media Player network cache ... Resolution_Title=Resolution Resolution_ResetConfiguration=Resetting all configuration ...
combined_dataset/train/non-malicious/7f98fa6b-12e6-4938-a5e7-254d4d3ef2dd.ps1
7f98fa6b-12e6-4938-a5e7-254d4d3ef2dd.ps1
Import-Module : Process should have elevated status to access IIS configuration data. At C:\\Users\\ca27573\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1:18 char:29 + Get-Module -ListAvailable | Import-Module + ~~~~~~~~~~~~~ + CategoryInfo : OperationStoppe...
combined_dataset/train/non-malicious/1912.ps1
1912.ps1
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone() $originalWarningPreference = $WarningPreference $WarningPreference = "SilentlyContinue" $skipTest = ! ($IsWindows -and $IsCoreCLR -and (Test-IsElevated)) $PSDefaultParameterValues["it:skip"] = $skipTest try { Describe "Implicit remoting and CI...
combined_dataset/train/non-malicious/RegQuery.ps1
RegQuery.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Chad Miller ### </Author> ### <Description> ### Searches the registry key for the specified pattern on the specified computer ### Useful in finding installed S/W ### </Description> ### <Usage> ### ./Re...
combined_dataset/train/non-malicious/sample_25_50.ps1
sample_25_50.ps1
# # Module manifest for module 'OCI.PSModules.Containerinstances' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll' # Version number of this module. ModuleVersion = '80.0.0' # Suppo...
combined_dataset/train/non-malicious/Get Virtual ESXi IP Addr_1.ps1
Get Virtual ESXi IP Addr_1.ps1
function Get-VirtualEsxiIp { param($vm) $tmpFileTemplate = ($env:TEMP + "\\ipdetect-") $tmpFile = $tmpFileTemplate + (Get-Random) + ".png" # Take the screenshot. $view = $vm | Get-View -Property Name $path = $view.CreateScreenShot() $path -match "([^/]+/[^/]+$)" | Out-Null $relativePath = $matches[1] ...
combined_dataset/train/non-malicious/4355.ps1
4355.ps1
function Set-EnvironmentVariable { param ( [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $Name, [parameter()] [String] $Value, [parameter(Mandatory = $true)] [int] $Target ) if ($Target -eq $script:En...
combined_dataset/train/non-malicious/sample_56_24.ps1
sample_56_24.ps1
# # Module manifest for module 'OCI.PSModules.Resourcescheduler' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Resourcescheduler.dll' # Version number of this module. ModuleVersion = '87.0.0' # Support...
combined_dataset/train/non-malicious/Share Perms.ps1
Share Perms.ps1
$FolderPath = "\\\\FilerName\\ShareName" $rootfolder = Get-ChildItem -Path $FolderPath -recurse foreach ($file in $rootfolder) { $file.FullName Get-Acl $file.FullName | Format-List $acl = Get-Acl $file.FullName $acl.Access | %{$acl.RemoveAccessRule($_)} ...
combined_dataset/train/non-malicious/sample_66_57.ps1
sample_66_57.ps1
# # Module manifest for module 'OCI.PSModules.Identitydataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identitydataplane.dll' # Version number of this module. ModuleVersion = '88.1.0' # Support...
combined_dataset/train/non-malicious/257.ps1
257.ps1
function Get-ADSiteInventory { [CmdletBinding()] PARAM() PROCESS { TRY{ $ScriptName = (Get-Variable -name MyInvocation -Scope 0 -ValueOnly).Mycommand Write-Verbose -message "[$ScriptName][PROCESS] Retrieve current Forest" $Forest = ...
combined_dataset/train/non-malicious/sample_44_55.ps1
sample_44_55.ps1
# # Module manifest for module 'OCI.PSModules.Lockbox' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Lockbox.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/sample_39_16.ps1
sample_39_16.ps1
# # Module manifest for module 'OCI.PSModules.Managementagent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Managementagent.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported P...
combined_dataset/train/non-malicious/sample_36_64.ps1
sample_36_64.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/746.ps1
746.ps1
param( [Parameter(Position=0, Mandatory)] [ValidateNotNullOrEmpty()] [string] $ScriptPath, [Parameter()] [string] $TestName, [Parameter()] [ValidatePattern('\d*')] [string] $LineNumber, [Parameter()] [switch] $All ) $pesterModule = ...
combined_dataset/train/non-malicious/1041.ps1
1041.ps1
[CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' $PSCommandPath = $MyInvocation.MyCommand.Definition $PSScriptRoot = Split-Path -Parent -Path $PSCommandPath $os = Get-WmiObject -Class 'Win32_OperatingSystem' $osVersion = [version]$os.Version if( $osVersion.Major -eq 6 -and $osVersion.Minor ...
combined_dataset/train/non-malicious/sample_22_78.ps1
sample_22_78.ps1
# # Module manifest for module 'OCI.PSModules.Vault' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vault.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/3010.ps1
3010.ps1
Set-StrictMode -Version Latest InModuleScope -ModuleName Pester { Describe 'GetPesterPsVersion' { It 'Returns value of $PSVersionTable.PsVersion.Major' { Mock Get-Variable -ParameterFilter { $Name -eq 'PSVersionTable' -and $ValueOnly } -MockWIth { @{ PSVersion = [Version]'1.0.0'...
combined_dataset/train/non-malicious/3320.ps1
3320.ps1
function Get-CommandHelp { [PoshBot.BotCommand( Aliases = ('man', 'help') )] [cmdletbinding(DefaultParameterSetName = 'Detailed')] param( [parameter(Mandatory)] $Bot, [parameter(Position = 0)] [string]$Filter, [parameter(ParameterSetName = 'Detaile...
combined_dataset/train/non-malicious/Split-String.ps1
Split-String.ps1
function Split-String { #.Synopsis # Split a string and execute a scriptblock to give access to the pieces #.Description # Splits a string (by default, on whitespace), and assigns it to $0, and the first 9 words to $1 through $9 ... and then calls the specified scriptblock #.Example # echo "this is one test ff...
combined_dataset/train/non-malicious/sample_55_51.ps1
sample_55_51.ps1
<UserControl x:Class="Avast.Net.Console.Network.Views.SoundsSettingsView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:groupbox="clr-namespace:Groupbox;assembly=Groupbox" xmlns:ViewModels="clr-namespace:Avast...
combined_dataset/train/non-malicious/sample_11_46.ps1
sample_11_46.ps1
ConvertFrom-StringData @' id_adapterkb980486check=Checking 6to4 and physical adapters id_adapterkb980486checkdesc=Checking the number of 6to4 and physical adapters (KB 980486) '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3Ag...
combined_dataset/train/non-malicious/sample_49_30.ps1
sample_49_30.ps1
# # Module manifest for module 'OCI.PSModules.Osubusage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubusage.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/4012.ps1
4012.ps1
Configuration ContosoDscConfiguration { Node "TEST-PC1" { WindowsFeature MyFeatureInstance { Ensure = "Present" Name = "RSAT" } WindowsFeature My2ndFeatureInstance { Ensure = "Present" Name = "Bitlocker" } } } ContosoDscConfigur...
combined_dataset/train/non-malicious/sample_60_8.ps1
sample_60_8.ps1
import{af as s}from"./index-c0c4c5d7.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d) * Released under the MIT license * https://github.com/microsoft/monaco-edi...
combined_dataset/train/non-malicious/Get-CountDown.ps1
Get-CountDown.ps1
function Get-CountDown() { <# .Synopsis CountDown timer and progress bar .Description A simple countdown timer as an advanced function. Displays the time remaining along with a_ progress bar displaying percentage time elapsed. If no parameters are passed, t...
combined_dataset/train/non-malicious/sample_1_78.ps1
sample_1_78.ps1
# # Module manifest for module 'OCI.PSModules.Logging' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Logging.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/1140.ps1
1140.ps1
Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $ps3Installed = $false $PSVersion,$CLRVersion = powershell -NoProfile -NonInteractive -Command { $PSVersionTable.PSVersion ; $PSVersionTable.CLRVersion } $getPsVersionTablePath = Join-Path -P...
combined_dataset/train/non-malicious/sample_54_86.ps1
sample_54_86.ps1
# # Module manifest for module 'OCI.PSModules.Resourcescheduler' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Resourcescheduler.dll' # Version number of this module. ModuleVersion = '84.0.0' # Support...
combined_dataset/train/non-malicious/sample_53_95.ps1
sample_53_95.ps1
# # Module manifest for module 'OCI.PSModules.Emwarehouse' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Emwarehouse.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/sample_13_50.ps1
sample_13_50.ps1
param ( [string]$command="install" ) Write-Output "Command=" $command function Install(){ # state the install command here (notice: all source are inside "\bin" folder. here is the example $PathToSelf = Split-Path -Path $PSCommandPath -Parent Push-Location $PathToSelf -Verbose Start-Process -...
combined_dataset/train/non-malicious/HelpModules 2.1.ps1
HelpModules 2.1.ps1
# HelpModules # A Module for generating module stubs so you can Update-Help (or Save-Help) # Includes two options for reading the help from those modules (StubFunctions or Get-ModuleHelp) # 1.0 - 2013/2/1 - Initial release Friday, Feb 1st, 2013 # 2.0 - 2013/2/1 - Updated release with improved pipeline/remot...
combined_dataset/train/non-malicious/180.ps1
180.ps1
function Get-LocalAdministratorBuiltin { [CmdletBinding()] param ( [Parameter()] $ComputerName = $env:computername ) Process { Foreach ($Computer in $ComputerName) { Try { Add-Type -AssemblyName System.DirectoryServices.Accoun...
combined_dataset/train/non-malicious/2573.ps1
2573.ps1
param ($sqlServer,$path,[switch]$scriptPerPublication) Import-Module Repl if ($sqlServer -eq "") { $sqlserver = Read-Host -Prompt "Please provide a value for -sqlServer" } if ($path -eq "") { $path = Read-Host -Prompt "Please provide a value for output directory path" } $scriptOptions = New-ReplScript...
combined_dataset/train/non-malicious/sample_6_82.ps1
sample_6_82.ps1
# diag_dnd.psm1 # Created by tdimli # March 2020 # # Diagnostic functions for DND area # version $DND_version = "1.0.240710.0" # Area and Area/Component arrays $DND = @("xray_dnd_pnp", "xray_dnd_powermgmt") #Component/Diagnostic Function arrays $xray_dnd_pnp = @("dnd_pnp_KB5017275") $xray_dnd_powermgmt...
combined_dataset/train/non-malicious/Reflection Module_2.ps1
Reflection Module_2.ps1
#requires -version 2.0 # ALSO REQUIRES Autoload for some functionality # You should create a Reflection.psd1 with the contents: @{ RequiredModules = @("Autoload"); GUID="64b5f609-970f-4e65-b02f-93ccf3e60cbb"; ModuleVersion="3.5.0.0" } #History: # 1.0 - First public release (March 19, 2010) # 2.0 - Private Build ...
combined_dataset/train/non-malicious/sample_54_75.ps1
sample_54_75.ps1
# # Module manifest for module 'OCI.PSModules.Onesubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Onesubscription.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported P...
combined_dataset/train/non-malicious/Get-Tail_1.ps1
Get-Tail_1.ps1
# Name: Get-Tail.ps1 # Author: William Stacey # Created: 02/22/2007 # Description: Gets the last N lines of a file. Does scan from end-of-file so works on large files. Also has a loop flag that prompts for refresh. function Get-Tail([string]$path = $(throw "Path name must be specified."), [int]$count = 10, [bool...
combined_dataset/train/non-malicious/sample_43_52.ps1
sample_43_52.ps1
Rem AnimationEncyclopedia.vbs Rem An InDesign VBScript Rem Rem Author: Brenda Burden Rem Creates a 6-page sample doc demonstrating the new InDesign Animation feature Rem Search Reference Rem PAGE ONE - Sample of Animation Properties Rem PAGE TWO - Sample of all Animation Events Rem PAGE THREE - Sample ...
combined_dataset/train/non-malicious/1793.ps1
1793.ps1
Describe "Rename-Item tests" -Tag "CI" { BeforeAll { Setup -f originalFile.txt -content "This is content" $source = "$TESTDRIVE/originalFile.txt" $target = "$TESTDRIVE/ItemWhichHasBeenRenamed.txt" Setup -f [orig-file].txt -content "This is not content" $sourceSp = "$TestDri...
combined_dataset/train/non-malicious/6a35f0a2-b19c-4518-8c2b-56793070490d.ps1
6a35f0a2-b19c-4518-8c2b-56793070490d.ps1
[sourcecode language="css"] ## # ----------------------------------------------------- function Release-Ref ($ref) { ([System.Runtime.InteropServices.Marshal]::ReleaseComObject( [System.__ComObject]$ref) -gt 0) [System.GC]::Collect() [System.GC]::WaitForPendingFinalizers() } # --------------------------...
combined_dataset/train/non-malicious/1004.ps1
1004.ps1
$storageName = "<your-unique-storage-name>" $myEndpoint = "<your-endpoint-URL>" $myResourceGroup="<resource-group-name>" New-AzResourceGroup -Name $myResourceGroup -Location westus2 New-AzStorageAccount -ResourceGroupName $myResourceGroup ` -Name $storageName ` -Location westus2 ` -SkuName Standard_LRS `...
combined_dataset/train/non-malicious/sample_5_89.ps1
sample_5_89.ps1
#************************************************ # DC_NPS-Component.ps1 # Version 1.0 # Date: 2009-2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about NPS/RADIUS. # Called from: Networking Diagnostics # [we] 2022-03-16: masked 'Shared secret' #**************************...
combined_dataset/train/non-malicious/sample_41_35.ps1
sample_41_35.ps1
. ./Stop-Process2.ps1 notepad.exe notepad.exe notepad.exe Stop-Process2 -Name "notepad" # SIG # Begin signature block # MIIr5AYJKoZIhvcNAQcCoIIr1TCCK9ECAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA4mt...
combined_dataset/train/non-malicious/1051.ps1
1051.ps1
param( [string] $Message ) $Message $PSVersionTable $env:PROCESSOR_ARCHITECTURE
combined_dataset/train/non-malicious/PowerShell Template_4.ps1
PowerShell Template_4.ps1
Function New-Script { $strName = $env:username $date = get-date -format d $name = Read-Host "Filename" if ($name -eq "") { $name="NewTemplate" } $email = Read-Host "eMail Address" if ($email -eq "") { $email="email@mycompany.com" } $comment=@(); while($s = (Read-Host "Comment").Trim()){$comment+="$s`r`n#"} $f...
combined_dataset/train/non-malicious/sample_46_6.ps1
sample_46_6.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 = '74.1.0' # Supported PSEditi...
combined_dataset/train/non-malicious/3043.ps1
3043.ps1
function Should-BeGreaterThan($ActualValue, $ExpectedValue, [switch] $Negate, [string] $Because) { if ($Negate) { return Should-BeLessOrEqual -ActualValue $ActualValue -ExpectedValue $ExpectedValue -Negate:$false -Because $Because } if ($ActualValue -le $ExpectedValue) { return New-Obj...
combined_dataset/train/non-malicious/sample_65_48.ps1
sample_65_48.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/801.ps1
801.ps1
Get-Process -ComputerName "test-computer" function Get-Thing { [Alias()] [OutputType([int])] Param ( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $Name ) Begin { } Process { return 0; } End { } } Get-Thing -Name "test"
combined_dataset/train/non-malicious/sample_6_9.ps1
sample_6_9.ps1
ConvertFrom-StringData @' id_appcompatdisabledcheck_st=Application Compatibility is currently disabled '@ # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFl...
combined_dataset/train/non-malicious/sample_18_51.ps1
sample_18_51.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_14_9.ps1
sample_14_9.ps1
#************************************************ # DC_DFSServer-Component.ps1 # Version x # Date: 20022 # Author: WalterE # Description: Collects information about DFS Server. # Called from: Networking Diags #******************************************************* Trap [Exception] { # Handle exception a...
combined_dataset/train/non-malicious/sample_49_73.ps1
sample_49_73.ps1
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. # This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 # # What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry #...
combined_dataset/train/non-malicious/Write-Log_1.ps1
Write-Log_1.ps1
function Write-Log { #region Parameters [cmdletbinding()] Param( [Parameter(ValueFromPipeline=$true,Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Message, [Parameter()] [ValidateSet(“Error”, “Warn”, “Info”)] [string] $Level = “Info”, [Parameter()] [ValidateRange(1,30)] ...
combined_dataset/train/non-malicious/Select-Xml 2.2.ps1
Select-Xml 2.2.ps1
#requires -version 2.0 # Select-Xml 2.2 and Remove-XmlNamespace # Version History: # Select-Xml 2.0 was the first script version I wrote, and it didn't function identically to the built-in Select-Xml with regards to parameter parsing # Select-Xml 2.1 matched the built-in Select-Xml parameter sets, it's now a drop-i...
combined_dataset/train/non-malicious/sample_19_40.ps1
sample_19_40.ps1
ConvertFrom-StringData @' EditorCommandExists=Editor command '{0}' already exists, skipping. EditorCommandImporting=Importing editor command '{0}'. MissingEditorContext=Unable to obtain editor context. Make sure PowerShell Editor Services is running and then try the command again. '@ # SIG # Begin signature bloc...
combined_dataset/train/non-malicious/sample_47_41.ps1
sample_47_41.ps1
@{ GUID="CA046F10-CA64-4740-8FF9-2565DBA61A4F" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Get-WinEvent", "New-WinEvent", "Get-C...
combined_dataset/train/non-malicious/676.ps1
676.ps1
$reportServerUri = if ($env:PesterServerUrl -eq $null) { 'http://localhost/reportserver' } else { $env:PesterServerUrl } Describe "Set-RsItemDataSource" { $rsFolderPath = '' $datasourcesReportPath = '' BeforeEach { $folderName = 'SUT_OutRsRestCatalogItem_' + [guid]::NewGuid() ...
combined_dataset/train/non-malicious/Resolve-Aliases _3.7.ps1
Resolve-Aliases _3.7.ps1
#requires -version 2.0 ## ResolveAliases Module v 1.6 ######################################################################################################################## ## Sample Use: ## Resolve-Aliases Script.ps1 | Set-Content Script.Resolved.ps1 ## ls *.ps1 | Resolve-Aliases -Inplace ##############...
combined_dataset/train/non-malicious/sample_40_44.ps1
sample_40_44.ps1
/*!--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *----------------------------------------------------------*/ define(["require", "exports"], function (require, exports) { /// <reference path="../../../Scripts/global.d.ts" /> /** ...
combined_dataset/train/non-malicious/sample_20_85.ps1
sample_20_85.ps1
# # Module manifest for module 'OCI.PSModules.Loggingsearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingsearch.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/sample_36_88.ps1
sample_36_88.ps1
# # Module manifest for module 'OCI.PSModules.Certificates' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificates.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditi...