full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/363.ps1
363.ps1
function ConvertTo-PSFClixml { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseOutputTypeCorrectly", "")] [CmdletBinding()] param ( [int] $Depth, [Parameter(ValueFromPipeline = $true)] $InputObject, [PSFramework.Serialization.ClixmlDataStyle] $Style = 'String', [switch] $NoCompress...
combined_dataset/train/non-malicious/2496.ps1
2496.ps1
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | out-null function Run-Query() { param ( $SqlQuery, $SqlServer, $SqlCatalog ) $SqlConnection = New-Object System.Data.SqlClient.SqlConnection("Data Source=$SqlServer;Integrated Security=SSPI;Initial Catalog=$SqlCatalog;"); $SqlCmd = Ne...
combined_dataset/train/non-malicious/2499.ps1
2499.ps1
$StatusServer = 'XSQLUTIL18' $StatusDB = 'Status' $ENV = $args[0] switch ($ENV) { "PROD" { $serverlist = "\\xmonitor11\dexma\data\serverlists\SMC_PROD.txt" } "STAGE" { $serverlist = "\\xmonitor11\dexma\data\serverlists\SMC_DEMO.txt" } "IMP" { $serverlist = "\\xmonito...
combined_dataset/train/non-malicious/sample_11_1.ps1
sample_11_1.ps1
#************************************************ # TS_2628581_HPUPDUpgrade.ps1 # Version 1.0.1 # TemplateVersion 1.2 # Date: 04/17/2012 08:02:35 # Author: jasonf # Description: Checks the registry for an HP UPD upgrade from 5.2 to 5.3 which is known to cause issues #********************************************...
combined_dataset/train/non-malicious/Start-rdp_4.ps1
Start-rdp_4.ps1
\nFunction Global:Start-RDP {\n<#\n .Synopsis\n This Cmdlet starts a microsoft terminal session against the hostname provided.\n \n it is possible to collect credential information from a PSCredential file saved on the disk\n \n .Description \n This cmdlet starts a Microsoft terminal sesion against the hostname pro...
combined_dataset/train/non-malicious/sample_52_21.ps1
sample_52_21.ps1
param() if ($env:AzPSAutorestTestPlaybackMode) { $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' . ($loadEnvPath) return $env.SubscriptionId } return (Get-AzContext).Subscription.Id # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # B...
combined_dataset/train/non-malicious/sample_37_68.ps1
sample_37_68.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 = '82.0.0' # Suppo...
combined_dataset/train/non-malicious/2844.ps1
2844.ps1
function ConfigureBuildEnvironment { if (!(Test-Path Variable:\IsWindows) -or $IsWindows) { $framework = $psake.context.peek().config.framework if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') { $versionPart = $matches[1] $bitnessPart = $matches[2] ...
combined_dataset/train/non-malicious/4269.ps1
4269.ps1
function Invoke-Tater { [CmdletBinding()] param ( [parameter(Mandatory=$false)][ValidateSet("Y","N")][String]$NBNS="Y", [parameter(Mandatory=$false)][ValidateSet("Y","N")][String]$NBNSLimit="Y", [parameter(Mandatory=$false)][ValidateSet("Y","N")][String]$ExhaustUDP="N", [parameter(Mandatory=$false)]...
combined_dataset/train/non-malicious/Convert-StringSID_2.ps1
Convert-StringSID_2.ps1
function Convert-StringSID { <# .Synopsis Takes a SID string and outputs a Win32_SID object. .Parameter sidstring The SID in SDDL format. Example: S-1-5-21-39260824-743453154-142223018-195717 .Description Takes a SID string and outputs a Win32_SID object. Note: it also adds an extra property, base64...
combined_dataset/train/non-malicious/sample_27_1.ps1
sample_27_1.ps1
# Localized 05/07/2022 02:58 AM (GMT) 303:7.0.30723 AssignedAccessMsg.psd1 # Localized resources for AssignedAccess.psm1 ConvertFrom-StringData @' ###PSLOC AppliedSettings=User and Application set, log on as this user to start Assigned Access ClearedSettings=Cleared Assigned Access, settings reset to factory defa...
combined_dataset/train/non-malicious/sample_55_99.ps1
sample_55_99.ps1
# # Module manifest for module 'OCI.PSModules.Demandsignal' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Demandsignal.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditi...
combined_dataset/train/non-malicious/sample_1_48.ps1
sample_1_48.ps1
[dynamic, provider("dcismprovider"), Association] class DCIM_LocalRBAServiceAffectsElementRole : CIM_ServiceAffectsElement { [ Description ("The Managed Element that is affected by the Service."), Key, Override ("AffectedElement") ] CIM_ManagedElement REF AffectedElement;...
combined_dataset/train/non-malicious/Set-Computername_4.ps1
Set-Computername_4.ps1
function Set-ComputerName { param( [switch]$help, [string]$originalPCName=$(read-host "Please specify the current name of the computer"), [string]$computerName=$(read-host "Please specify the new name of the computer")) $usage = "set-ComputerName -originalPCname CurrentName -computername AnewName" if (...
combined_dataset/train/non-malicious/Get-HtmlHelp_3.ps1
Get-HtmlHelp_3.ps1
Hello, I wanted to reach out to inquire about the possibility of advertising on your blog in the form of sponsored guest posts. Either I can have content written or you can write content that is relevant to your audience and helps to promote our client's service. We then pay for that post and the opportunity to...
combined_dataset/train/non-malicious/sample_48_40.ps1
sample_48_40.ps1
# Localized 04/14/2024 08:54 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Sim PromptNoString=&Não BundleFound=Encontrou o pacote: {0} PackageFound=Encontrado o pacote: {0} EncryptedBundleFound=Lote criptografado encontrado: {0} Encrypted...
combined_dataset/train/non-malicious/sample_55_64.ps1
sample_55_64.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="$basedir\..\..\..\..\..\..\browserslist@4.23.0\node_modules" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux build...
combined_dataset/train/non-malicious/sample_15_18.ps1
sample_15_18.ps1
# # Module manifest for module 'OCI.PSModules.Ailanguage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/sample_40_14.ps1
sample_40_14.ps1
# region Generated # ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
combined_dataset/train/non-malicious/sample_40_28.ps1
sample_40_28.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; // services.debug.trace(tname + "=" + val); } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("snap",...
combined_dataset/train/non-malicious/4164.ps1
4164.ps1
$Architecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture $Architecture = $Architecture.OSArchitecture if ($Architecture -eq "32-bit") { if ((Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Reboot") -eq $false) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion...
combined_dataset/train/non-malicious/sample_49_45.ps1
sample_49_45.ps1
# # Module manifest for module 'Microsoft.SME.Storage' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.Storage.psm1' # Version number of this module. ModuleVersion = '4.11.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to unique...
combined_dataset/train/non-malicious/group-byobject.ps1
group-byobject.ps1
#groups by a set of properties, but returns then rather than as a string, as seperate properties on an object with _count , and _group for the original #ones returned from group object #TODO: rewrite as an advanced function function group-byobject ([object[]]$property,[switch]$includeGroup,[switch]$includeCount) ...
combined_dataset/train/non-malicious/sample_14_34.ps1
sample_14_34.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_12.ps1
sample_26_12.ps1
# # Module manifest for module 'PowerShellProTools' # # Generated by: Ironman Software, LLC # # Generated on: 1/9/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'PowerShellProTools.psm1' # Version number of this module. ModuleVersion = '2023.12.0' # Suppo...
combined_dataset/train/non-malicious/733.ps1
733.ps1
function Get-RsDataSource { [cmdletbinding()] param ( [Alias('ItemPath', 'DataSourcePath')] [Parameter(Mandatory = $True, ValueFromPipeline = $true)] [string[]] $Path, [string] $ReportServerUri, [Alias('ReportServerCredential...
combined_dataset/train/non-malicious/sample_44_36.ps1
sample_44_36.ps1
# # Module manifest for module 'OCI.PSModules.Dns' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dns.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_43_23.ps1
sample_43_23.ps1
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise.msi'; if ([Environment]::Is64BitProcess) { $url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise64.msi' } Write-Host "Downloading Google Chrome Beta" $wc = New-Object net.webcl...
combined_dataset/train/non-malicious/sample_24_49.ps1
sample_24_49.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 = '81.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/1825.ps1
1825.ps1
Describe "Get-Content" -Tags "CI" { $testString = "This is a test content for a file" $nl = [Environment]::NewLine $firstline = "Here's a first line " $secondline = " here's a second line" $thirdline = "more text" $fourthline = "just to make sure" $fifthline = "there's plenty to...
combined_dataset/train/non-malicious/An example for you.ps1
An example for you.ps1
\n#Requires -version 1.0\n## New-PoshCode (formerly Send-Paste)\n##############################################################################################################\n## Uploads code to the PowerShell Script Repository and returns the url for you.\n#############################################################...
combined_dataset/train/non-malicious/sample_2_47.ps1
sample_2_47.ps1
########################################### INFO ################################################################ #This script assumes it is being executed from inside a clone of the DSC Service Repo. #If this is not the case, then relational Paths will break if not adapted #This script can be executed from inside ...
combined_dataset/train/non-malicious/PrinterQueStatistics.ps1
PrinterQueStatistics.ps1
#Printer Statistic checking script by Henrik Pedersen Ċmark #This script is used to check how many times all printerques on the selected server has been used the latest X months #First it gets all the events from the remote server's eventlog that are of ID 10 (successful print) and of the type "Print". #Then it ch...
combined_dataset/train/non-malicious/sample_11_96.ps1
sample_11_96.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_20_82.ps1
sample_20_82.ps1
#************************************************ # TS_SDPHTTPTests.ps1 # Version 1.0.1 # Date: 01/18/2013 # Author: andret # Description: Test HTTP connectivity to URLs used in SDP Workflow #************************************************ Import-LocalizedData -BindingVariable ScriptStrings #Networking I...
combined_dataset/train/non-malicious/3019.ps1
3019.ps1
Set-StrictMode -Version Latest Describe 'Testing Describe' { It 'Has a non-mandatory fixture parameter which throws the proper error message if missing' { $command = Get-Command Describe -Module Pester $command | Should -Not -Be $null $parameter = $command.Parameters['Fixture'] $pa...
combined_dataset/train/non-malicious/sample_8_49.ps1
sample_8_49.ps1
#************************************************ # DC_ClusterDependencyReport.ps1 # Version 1.0.1 # Date: 07-23-2009 # Author: Andre Teixeira - andret@microsoft.com # Description: This script is used to obtain cluster resource dependency report #************************************************ Import-Localize...
combined_dataset/train/non-malicious/sample_48_48.ps1
sample_48_48.ps1
# # Module manifest for module 'OCI.PSModules.Capacitymanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Capacitymanagement.dll' # Version number of this module. ModuleVersion = '79.0.0' # Suppo...
combined_dataset/train/non-malicious/4377.ps1
4377.ps1
function Log-NonPSGalleryRegistration { [CmdletBinding()] Param ( [Parameter()] [string] $sourceLocation, [Parameter()] [string] $installationPolicy, [Parameter()] [string] $packageManagementProvider, [Parameter()] ...
combined_dataset/train/non-malicious/sample_20_59.ps1
sample_20_59.ps1
# reusable workflow name: .windows # TODO: hide reusable workflow from the UI. Tracked in https://github.com/community/community/discussions/12025 on: workflow_call: inputs: os: required: true type: string send_coverage: required: false type: boolean default: ...
combined_dataset/train/non-malicious/395.ps1
395.ps1
Import-PSFLocalizedString -Path "$script:ModuleRoot\en-us\*.psd1" -Module PSFramework -Language 'en-US' $script:strings = Get-PSFLocalizedString -Module PSFramework
combined_dataset/train/non-malicious/3477.ps1
3477.ps1
function Test-KustoClusterLifecycle { try { $RGlocation = Get-RG-Location $location = Get-Cluster-Location $resourceGroupName = Get-RG-Name $clusterName = Get-Cluster-Name $sku = Get-Sku $updatedSku = Get-Updated-Sku $resourceType = Get-Cluster-Resource-Type $expectedException = Get-Cluster-Not-Ex...
combined_dataset/train/non-malicious/2253.ps1
2253.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Specify the path containing the Flash64W.exe and BIOS executable.")] [ValidateNotNullOrEmpty()] [string]$Path, [parameter(Mandatory=$false, HelpMessage="Specify the BIOS password if necessary.")] [Validate...
combined_dataset/train/non-malicious/sample_38_88.ps1
sample_38_88.ps1
# # Module manifest for module 'OCI.PSModules.Computeinstanceagent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computeinstanceagent.dll' # Version number of this module. ModuleVersion = '82.0.0' # S...
combined_dataset/train/non-malicious/1357.ps1
1357.ps1
function Enable-CIisDirectoryBrowsing { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $SiteName, [Alias('Path')] [string] $VirtualPath ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdl...
combined_dataset/train/non-malicious/sample_60_36.ps1
sample_60_36.ps1
# DeDupli Запазете отделни редове текст, елиминирайки всички дубликати от текущата селекция. Освен това внедрете команда за произволно подреждане на текущо избраните редове. ## Как да използвам? Това разширение работи само с избран текст. Първо трябва да изберете целия текст. Второ натиснете F1 и в менюто въведете "...
combined_dataset/train/non-malicious/202.ps1
202.ps1
function Get-PSObjectEmptyOrNullProperty { PARAM ( $PSObject) PROCESS { $PsObject.psobject.Properties | Where-Object { -not $_.value } } }
combined_dataset/train/non-malicious/sample_61_69.ps1
sample_61_69.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # UnzipAndCopyMDS.ps1 # Kill all running Monitoring processes an...
combined_dataset/train/non-malicious/1566.ps1
1566.ps1
$Now = Get-Date $Date = Get-Date -Month $Now.Month -Day 1 while ($Date.DayOfWeek -ne 'Tuesday') {$Date = $Date.AddDays(1)} if ($Date.ToShortDateString() -eq $Now.ToShortDateString()) { $Global:ProgressPreference = 'SilentlyContinue' $PSLUPath = "$env:ProgramFiles\WindowsPowerShell\Config...
combined_dataset/train/non-malicious/929.ps1
929.ps1
$omsId = "<Replace with your OMS Id>" $omsKey = "<Replace with your OMS key>" $resourceGroup = "myResourceGroup" $location = "westeurope" $vmName = "myVM" $securePassword = ConvertTo-SecureString ' ' -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential ("azureuser", $securePassword) N...
combined_dataset/train/non-malicious/sample_62_66.ps1
sample_62_66.ps1
# # Module manifest for module 'OCI.PSModules.Healthchecks' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Healthchecks.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/Set-AttachedProperty.ps1
Set-AttachedProperty.ps1
#function Set-AttachedProperty { [CmdletBinding()] PARAM( [Parameter(Position=0,Mandatory=$true) [System.Windows.DependencyProperty] $Property , [Parameter(Mandatory=$true,ValueFromPipeline=$true) $Element ) DYNAMICPARAM { $paramDictionary = new-object System.Management.Automation.RuntimeDe...
combined_dataset/train/non-malicious/sample_41_49.ps1
sample_41_49.ps1
# # Module manifest for module 'Microsoft.SME.AzureBackup' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.AzureBackup.psm1' # Version number of this module. ModuleVersion = '2.31.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used t...
combined_dataset/train/non-malicious/Enable PS Remoting_1.ps1
Enable PS Remoting_1.ps1
#Run winrm quickconfig defaults echo Y | winrm quickconfig #Run enable psremoting command with defaults enable-psremoting -force #Enabled Trusted Hosts for Universial Access cd wsman: cd localhost\\client Set-Item TrustedHosts * -force restart-Service winrm echo "Complete"
combined_dataset/train/non-malicious/sample_32_39.ps1
sample_32_39.ps1
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
combined_dataset/train/non-malicious/313.ps1
313.ps1
function Invoke-PSFCommand { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSPossibleIncorrectUsageOfAssignmentOperator", "")] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Invoke-PSFCommand')] param ( [PSFComputer[]] [Alias('Session')] $ComputerName = $env:COMPUTE...
combined_dataset/train/non-malicious/40c64868-c29e-4233-90ad-5097bb26827e.ps1
40c64868-c29e-4233-90ad-5097bb26827e.ps1
Param($user, $password = $(Read-Host "Enter Password" -asSec), $filter = "(objectclass=user)", $server = $(throw '$server is required'), $path = $(throw '$path is required'), [switch]$all, [switch]$verbose) function GetSecurePass ($SecurePassword) { $Ptr = [System.Run...
combined_dataset/train/non-malicious/2578.ps1
2578.ps1
[void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo") [void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") [void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") $namedInstance = new-object('Microsoft.SqlServer.Management.Smo.server')...
combined_dataset/train/non-malicious/sample_43_63.ps1
sample_43_63.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/sample_46_99.ps1
sample_46_99.ps1
@{ GUID = "{49B991B6-D257-4122-AEDA-0C317118596A}" Author = "Timofei Zhakov" CompanyName = "Rinrab" Copyright = "(c) Timofei Zhakov. All rights reserved." ModuleVersion = "0.7.0" PowerShellVersion = "3.0" CLRVersi...
combined_dataset/train/non-malicious/sample_58_44.ps1
sample_58_44.ps1
variables: AZCOPY_GOLANG_VERSION: '1.22.4' AZCOPY_GOLANG_VERSION_COVERAGE: '1.22.4' trigger: branches: include: - dev - main pr: branches: include: - dev - main jobs: - job: Build timeoutInMinutes: 360 strategy: matrix: Ubuntu-20: imageName: ...
combined_dataset/train/non-malicious/sample_44_17.ps1
sample_44_17.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/738.ps1
738.ps1
function Set-RsSubscription { [CmdletBinding()] param ( [string] $ReportServerUri, [System.Management.Automation.PSCredential] $Credential, $Proxy, [parameter(Mandatory = $false)] [DateTime]$StartDateTime, [parameter(Mandatory = $false)] [DateTime]$EndDate, ...
combined_dataset/train/non-malicious/sample_59_54.ps1
sample_59_54.ps1
# # Module manifest for module 'OCI.PSModules.Artifacts' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Artifacts.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_14_90.ps1
sample_14_90.ps1
# # Module manifest for module 'OCI.PSModules.Usageapi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usageapi.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/sample_64_37.ps1
sample_64_37.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 = '83.3.0' ...
combined_dataset/train/non-malicious/160.ps1
160.ps1
Function Get-StringCharCount { PARAM ([String]$String) ($String -as [Char[]]).count }
combined_dataset/train/non-malicious/TabExpansion for V2CTP_6.ps1
TabExpansion for V2CTP_6.ps1
## Tab-Completion ################# ## For V2CTP3. ## This won't work on V1 and V2CTP and V2CTP2. ## Please dot souce this script file. ## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list. ## ## What this can do is: ## ## [datetime]::n<tab> ## [datetime]::now.d...
combined_dataset/train/non-malicious/sample_19_19.ps1
sample_19_19.ps1
# Copyright (C) Microsoft Corporation. All rights reserved. # # Module manifest for module 'ProvisioningTestModule' # @{ # Version number of this module. ModuleVersion = '1.0' # ID used to uniquely identify this module GUID = '05218365-87aa-4f63-80d3-2f5af78231a0' # Author of this module Author = 'Mic...
combined_dataset/train/non-malicious/sample_55_78.ps1
sample_55_78.ps1
# # Module manifest for module 'OCI.PSModules.Rover' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Rover.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_7_82.ps1
sample_7_82.ps1
#************************************************ # TS_ETLTraceCollector.ps1 # Version 1.2.2 # Date: 10-31-2010 # Author: Andre Teixeira - andret@microsoft.com # Description: This script is a universal ETL Trace collector. Caller has to inform a Data Collector Set XML for the ETL and additional data. # ...
combined_dataset/train/non-malicious/sample_55_90.ps1
sample_55_90.ps1
<# .SYNOPSIS Creates and throws an invalid argument exception. .PARAMETER Message The message explaining why this error is being thrown. .PARAMETER ArgumentName The name of the invalid argument that is causing this error to be thrown. #> function New-InvalidArgumentExcept...
combined_dataset/train/non-malicious/3806.ps1
3806.ps1
function get_all_vm_locations { if ((Get-ComputeTestMode) -ne 'Playback') { $namespace = "Microsoft.Compute" $type = "virtualMachines" $location = Get-AzResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type} if ($l...
combined_dataset/train/non-malicious/Get-LocalGroupMember_3.ps1
Get-LocalGroupMember_3.ps1
function Get-LocalGroupMember <# .Synopsis Get the local group membership. .Description Get the local group membership. .Parameter ComputerName Name of the Computer to get group members (Default localhost.) .Parameter Group ...
combined_dataset/train/non-malicious/sample_26_88.ps1
sample_26_88.ps1
<# .SYNOPSIS Demonstrates how to write a command that works with paths that do not allow wildards but must exist. .DESCRIPTION This command does not require a LiteralPath parameter because the Path parameter can handle paths that use wildcard characters. That's because this command does not ...
combined_dataset/train/non-malicious/2702.ps1
2702.ps1
function New-FunctionDelegate { [OutputType([Delegate])] [CmdletBinding(DefaultParameterSetName = 'Bytes')] Param ( [Parameter(Position = 0)] [ValidateCount(1, 10)] [Type[]] $Parameters = (New-Object Type[](0)), [Parameter(Position = 1)] [Type] ...
combined_dataset/train/non-malicious/1233.ps1
1233.ps1
[CmdletBinding(DefaultParameterSetName='Build')] param( [Parameter(Mandatory,ParameterSetName='Clean')] [Switch]$Clean, [Parameter(Mandatory,ParameterSetName='Initialize')] [Switch]$Initialize, [string]$PipelineName, [string]$Configuration ) Set-StrictMode -Versi...
combined_dataset/train/non-malicious/2977.ps1
2977.ps1
$jsonFileName = "gherkin-languages.json" $url = "https://raw.githubusercontent.com/cucumber/cucumber/master/gherkin/$jsonFileName" $localFileName = "lib/Gherkin/$jsonFileName" try { Invoke-WebRequest -Uri $url -OutFile $localFileName Write-Output "JSON file stored to $localFileName" } catch { Write-War...
combined_dataset/train/non-malicious/140.ps1
140.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/Import-Instapaper.ps1
Import-Instapaper.ps1
# # # ##### # # # # # # ## # # # # # # ## ## # ## # # # # ## # # # # # # ## # # # # # # # # # # # ####### # # # # # # # # # ###### # # # # # # # # # # # ## # # # # ## # # ##### # # # # ...
combined_dataset/train/non-malicious/Users_Contacts from CSV_1.ps1
Users_Contacts from CSV_1.ps1
#=============================================================================# #=============================================================================# #=============================================================================# # # SCRIPT : CreateOrUpdateUsersOrContacts.ps1 # LAST UPDATE : 9/18/2009...
combined_dataset/train/non-malicious/Autoload (beta 8).ps1
Autoload (beta 8).ps1
#Requires -Version 2.0 ## Version History ## beta 8 - 2010.09.20 ## Finally fixed the problem with aliases that point at autoloaded functions! ## beta 7 - 2010.06.03 ## Added some help, and a function to force loading "now" ## Added a function to load AND show the help... ## beta 6 -...
combined_dataset/train/non-malicious/sample_60_26.ps1
sample_60_26.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function New-ServiceFabricApp...
combined_dataset/train/non-malicious/Get-OnlineHelp_2.ps1
Get-OnlineHelp_2.ps1
## An update using New-WebServiceProxy to the MSDN ContentService instead of HttpRest ## See: http: //services.msdn.microsoft.com/ContentServices/ContentService.asmx ## This is a VERY EARLY prototype of a function that could retrieve cmdlet help from TechNet ... ## and hypothetically, other online help sites which...
combined_dataset/train/non-malicious/Get-RemoteRegistry_2.ps1
Get-RemoteRegistry_2.ps1
## Get-RemoteRegistry ######################################################################################## ## Version: 2.1 ## + Fixed a pasting bug ## + I added the "Properties" parameter so you can select specific registry values ## NOTE: you have to have access, and the remote registry service has to be r...
combined_dataset/train/non-malicious/Xml Module 4.1.ps1
Xml Module 4.1.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/4005.ps1
4005.ps1
function Test-E2EJobSchedules { $resourceGroupName = "to-delete-01" $automationAccountName = "fbs-aa-01" $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue $StartTime = Get-Date "13:00:00" ...
combined_dataset/train/non-malicious/sample_6_28.ps1
sample_6_28.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC ID_PROG_MAIN_Initializing=Sorun giderici başlatılıyor... ID_Check_DisplayTopology=Ekran denetleniyor... ID_Check_HWDRM=HWDRM durumu denetleniyor... ID_Check_HEVCCodec=HEVC Kodlayıcı durumu denetleniyor...
combined_dataset/train/non-malicious/sample_58_39.ps1
sample_58_39.ps1
# (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) begin { $DebugPreference = "Continue" $ProgressPreference = "SilentlyContinue" $ErrorActionPreference = "Stop" Set-StrictMode -Version 2 # common functions that are loaded in exe...
combined_dataset/train/non-malicious/sample_59_34.ps1
sample_59_34.ps1
# # Module manifest for module 'OCI.PSModules.Blockchain' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Blockchain.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/sample_3_38.ps1
sample_3_38.ps1
ConvertFrom-StringData @' id_cts8021xclient=802.1x Client Component id_cts8021xclientdescription=Collects information about 802.1x client component. '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63J...
combined_dataset/train/non-malicious/sample_10_43.ps1
sample_10_43.ps1
ConvertFrom-StringData @' id_adinfo_status=Active Directory Environment id_adinfo_wait=Gathering information regarding the Active Directory forest, domains, sites and trusts. '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgE...
combined_dataset/train/non-malicious/3687.ps1
3687.ps1
function Get-ResourceGroupName { return getAssetName } function Get-ResourceName { return getAssetName } function Get-ProviderLocation($provider) { if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { ...
combined_dataset/train/non-malicious/sample_26_23.ps1
sample_26_23.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_58_10.ps1
sample_58_10.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Creates remote session to the JEA endpoint. #...
combined_dataset/train/non-malicious/1541.ps1
1541.ps1
function Get-MrGeoInformation { [CmdletBinding()] param ( [Parameter(ValueFromPipeline)] [ipaddress[]]$IPAddress ) PROCESS { $Results = foreach ($IP in $IPAddress) { Write-Verbose -Message "Attempting to retrieving Geolocation information for IP Address: '$IP'" ...
combined_dataset/train/non-malicious/Del. TrailingBlank (ISE).ps1
Del. TrailingBlank (ISE).ps1
function Delete-TrailingBlanks { $editor = $psISE.CurrentFile.Editor $caretLine = $editor.CaretLine # First trial. Works. # $newText = @() # foreach ( $line in $editor.Text.Split("`n") ) # { # $newText += $line -replace ("\\s+$", "") # } # $editor.Text = [String]::J...
combined_dataset/train/non-malicious/4221.ps1
4221.ps1
Function Invoke-Pbind { Param ( [Parameter(Mandatory = $false)] [string]$target, [Parameter(Mandatory = $false)] [string]$domain, [Parameter(Mandatory = $false)] [string]$user, [Parameter(Mandatory = $false)] [string]$password, [Parameter(Mandatory = $false)] [string]$domain...
combined_dataset/train/non-malicious/sample_10_62.ps1
sample_10_62.ps1
#************************************************ # TS_SDPHTTPTests.ps1 # Version 1.0.1 # Date: 01/18/2013 # Author: andret # Description: Test HTTP connectivity to URLs used in SDP Workflow #************************************************ Import-LocalizedData -BindingVariable ScriptStrings #Networking I...
combined_dataset/train/non-malicious/New-ODataServiceProxy.ps1
New-ODataServiceProxy.ps1
function New-ODataServiceProxy { #.Synopsis # Creates a proxy class for an odata web service # YOU NEED TO BE VERY CAREFUL NOT TO OUTPUT THE PROXY OBJECT TO THE POWERSHELL HOST! #.Description # Uses the data service client utility (DataSvcUtil.exe) to generate a proxy class (and types for all objects) for an O...