full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/857.ps1 | 857.ps1 | function New-HDInsightAndVNet {
$ErrorActionPreference = "Stop"
$context = Get-AzContext
if ($context -eq $null) {
Connect-AzAccount
}
$context
$resourceGroupName = Read-Host -Prompt "Enter the Azure Resource Group name"
$location = Read-Host -Prompt... |
combined_dataset/train/non-malicious/sample_11_91.ps1 | sample_11_91.ps1 | #************************************************
# TS_NetworkDTCEnabled.ps1
# Version 1.0.0
# Date: 03-23-2012
# Author: Jeremy LaBorde - jlaborde
# Description: Checks to see if Network DTC
# is enabled
#
#************************************************
. .\DistSvcs_Utils.ps1
Import-LocalizedData -B... |
combined_dataset/train/non-malicious/765.ps1 | 765.ps1 |
function Import-FileNoWildcard {
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true,
Position=0,
ParameterSetName="Path",
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
... |
combined_dataset/train/non-malicious/sample_66_41.ps1 | sample_66_41.ps1 | #
# Module manifest for module 'Az.Synapse'
#
# Generated by: Microsoft Corporation
#
# Generated on: 7/4/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.Synapse.psm1'
# Version number of this module.
ModuleVersion = '3.0.9'
# Supported PSEditions
Com... |
combined_dataset/train/non-malicious/sample_59_86.ps1 | sample_59_86.ps1 | <#############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
#############################################################>
... |
combined_dataset/train/non-malicious/sample_67_71.ps1 | sample_67_71.ps1 | #
# Module manifest for module 'OCI.PSModules.Mysql'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Mysql.dll'
# Version number of this module.
ModuleVersion = '83.3.0'
# Supported PSEditions
Compatible... |
combined_dataset/train/non-malicious/sample_33_70.ps1 | sample_33_70.ps1 | #
# Module manifest for module 'OCI.PSModules.Sch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Sch.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/497.ps1 | 497.ps1 |
function Get-AvailableDriveLetter {
param(
[parameter(Mandatory=$False)]
[Switch]
$ReturnFirstLetterOnly,
[parameter(Mandatory=$False)]
$FavoriteDriveLetter
)
if($ReturnFirstLetterOnly -eq $true -and $FavoriteDriveLetter -ne $null){
throw "Only one parameter is possible for this function"
exit
}
... |
combined_dataset/train/non-malicious/BufferBox 3.6.ps1 | BufferBox 3.6.ps1 | ####################################################################################################
## This script is just a demonstration of some of the things you can do with the buffer
## in the default PowerShell host... it serves as a reminder of how much work remains on
## PoshConsole, and as an inspiration t... |
combined_dataset/train/non-malicious/sample_25_84.ps1 | sample_25_84.ps1 | #
# Module manifest for module 'OCI.PSModules.Oce'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Oce.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/sample_38_5.ps1 | sample_38_5.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_66_86.ps1 | sample_66_86.ps1 | #
# Module manifest for module 'OCI.PSModules.Ocicontrolcenter'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll'
# Version number of this module.
ModuleVersion = '87.0.0'
# Supported... |
combined_dataset/train/non-malicious/sample_49_38.ps1 | sample_49_38.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 = '82.0.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_5_68.ps1 | sample_5_68.ps1 | #************************************************
# DC_RDSGW.ps1
# Version 1.0.1
# Date: 21-01-2012
# Author: Daniel Grund - dgrund@microsoft.com
# Description:
# This script gets the RDSSH config and
# checks vital signs to inform user.
# 1.0.0 Beta release
#************************************************... |
combined_dataset/train/non-malicious/sample_6_44.ps1 | sample_6_44.ps1 | #region ::::: Help :::::
<#
.SYNOPSIS
Script Name: GetLogs.ps1
Purpose: gather data from Windows Failover Cluster Nodes (default 3 Month back)
Version: 1.4
Last Update: 2nd June 2020
Author: Josef Holzer
Email-Alias: josefh
.DESCRIPTION
This script coll... |
combined_dataset/train/non-malicious/sample_24_58.ps1 | sample_24_58.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
function Find-Ast {
<#
.EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml
#>
[CmdletBinding(PositionalBinding=$false, DefaultParameterSetName='FilterScript')]
param(
[Parameter(Position=0, ParameterSe... |
combined_dataset/train/non-malicious/disable local users 2k08.ps1 | disable local users 2k08.ps1 | ##################################################################################
#
# Script name: Set-LocalAccount.ps1
# Author: niklas.goude@zipper.se
# Homepage: www.powershell.nu
# http://www.powershell.nu/wp-content/uploads/2009/07/set-localaccount.ps1
# start script - .\\set-localaccount.ps1 -D... |
combined_dataset/train/non-malicious/2052.ps1 | 2052.ps1 |
Describe "SxS Module Path Basic Tests" -tags "CI" {
BeforeAll {
if ($IsWindows)
{
$powershell = "$PSHOME\pwsh.exe"
$ProductName = "WindowsPowerShell"
if ($IsCoreCLR -and ($PSHOME -notlike "*Windows\System32\WindowsPowerShell\v1.0"))
{
... |
combined_dataset/train/non-malicious/Roll-Dice.ps1 | Roll-Dice.ps1 | # Roll-Dice.ps1
# Cody Bunch
# ProfessionalVMware.com
Begin {
$rand = New-Object System.Random
$dice = $rand.next(1,3)
}
Process {
if ( $_ -isnot [VMware.VimAutomation.Client20.ManagedObjectBaseImpl.SnapshotImpl] ) { continue }
if ($dice > 1) {
$_ | Remove-Snapshot -Confirm:$false
Write-Host "$_... |
combined_dataset/train/non-malicious/2685.ps1 | 2685.ps1 |
Connect-PnPOnline -Url https://yourtenant.sharepoint.com
$creds = Get-Credential
Connect-PnPOnline -Url https://yourtenant.sharepoint.com -Credentials $creds
Connect-PnPOnline -Url https://yourtenant.sharepoint.com -Credentials "LABEL"
Connect-PnPOnline -Url https://yourtenant.sharepoint.com -AppId e8a9a0ef-8... |
combined_dataset/train/non-malicious/1372.ps1 | 1372.ps1 |
function Get-CIisAppPool
{
[CmdletBinding()]
[OutputType([Microsoft.Web.Administration.ApplicationPool])]
param(
[string]
$Name
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$mgr = New-O... |
combined_dataset/train/non-malicious/4211.ps1 | 4211.ps1 | $psloadedrunas = $null
function Invoke-Runas {
param (
[Parameter(Mandatory = $True)]
[string]$User,
[Parameter(Mandatory = $True)]
[string]$Password,
[Parameter(Mandatory = $False)]
[string]$Domain=".",
[Parameter(Mandatory = $True)]
[string]$Comman... |
combined_dataset/train/non-malicious/sample_47_6.ps1 | sample_47_6.ps1 | #
# Module manifest for module 'Az.ElasticSan'
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.ElasticSan.psm1'
# Version number of this module.
ModuleVersion = '1.0.2'
# Supported PSEditi... |
combined_dataset/train/non-malicious/sample_59_44.ps1 | sample_59_44.ps1 | window['excelUiSlice20Sprite'] = {"icons":[{"type":"svg","id":"TrashCan_16","children":[{"type":"path","className":"OfficeIconColors_HighContrast","d":"M 768 1664 h -128 v -1152 h 128 m 256 1152 h -128 v -1152 h 128 m 256 1152 h -128 v -1152 h 128 m 512 -256 h -128 v 1604 q 0 39 -15 73 q -15 35 -40 60 q -26 26 -60 40 q... |
combined_dataset/train/non-malicious/sample_6_74.ps1 | sample_6_74.ps1 | ConvertFrom-StringData @'
id_Files=Collecting Log Files
ID_FilesCab=Cabinet Files
ID_FilesLogs=Log Files
'@
# SIG # Begin signature block
# MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCG... |
combined_dataset/train/non-malicious/Get-DellWarranty.ps1 | Get-DellWarranty.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/sample_47_52.ps1 | sample_47_52.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 = '75.1.0'
# Supported P... |
combined_dataset/train/non-malicious/3289.ps1 | 3289.ps1 | enum DiscordGatewayEventCode {
UnknownError = 4000
UnknownOpcode = 4001
DocodeError = 4002
NotAuthenticated = 4003
AuthenticationFailed = 4004
AlreadyAuthenticated = 4005
InvalidSeq = 4007
RateLimited = 4008
SessionTimeout = 4009
... |
combined_dataset/train/non-malicious/finddupe_12.ps1 | finddupe_12.ps1 | function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvider];
$hashAlgorithm = new-object $cryptoServiceProvider
$stream = $file.OpenRead();
$hashByteArray = $hashA... |
combined_dataset/train/non-malicious/sample_8_39.ps1 | sample_8_39.ps1 | ConvertFrom-StringData @'
id_scheduletasks=Schedule Tasks Information
id_scheduletasksobtaining=Obtaining information about schedule tasks
id_scheduletaskssection=Schedule Tasks Information
id_scheduletasksoutput=Schedule Tasks List
'@
# SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBgl... |
combined_dataset/train/non-malicious/754.ps1 | 754.ps1 |
[CmdletBinding(DefaultParameterSetName='Increment')]
param(
[Parameter(ParameterSetName='Increment')]
[ValidateSet('Major', 'Minor', 'Patch', 'Preview')]
[string]
$IncrementLevel = 'Preview',
[Parameter(Mandatory, ParameterSetName='SetVersion')]
[semver]
$NewVersion,
[Parameter(Ma... |
combined_dataset/train/non-malicious/SharePoint UserID grab.ps1 | SharePoint UserID grab.ps1 |
## .\\SharePoint_Users_Read.ps1 "http://some.urlname.com/" "User Information List" ""
## .\\SharePoint_Users_Read.ps1 "http://some.urlname.com/" "User Information List" "user, someone"
param(
[string] $rqurdstrPath = $(Throw "--SharePoint Core Path required."), #required parameter
[string] $rqurdstrListName = $... |
combined_dataset/train/non-malicious/sample_46_35.ps1 | sample_46_35.ps1 | <#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line... |
combined_dataset/train/non-malicious/831.ps1 | 831.ps1 |
$cred = Get-Credential
New-AzVmss `
-ResourceGroupName "myResourceGroup" `
-VMScaleSetName "myScaleSet" `
-Location "EastUS" `
-VirtualNetworkName "myVnet" `
-SubnetName "mySubnet" `
-PublicIpAddressName "myPublicIPAddress" `
-LoadBalancerName "myLoadBalancer" `
-Credential $cred `
-UpgradePolicy... |
combined_dataset/train/non-malicious/2967.ps1 | 2967.ps1 | $nugetBinPath = Join-Path -Path $env:ChocolateyInstall -ChildPath 'bin'
$packageBatFileName = Join-Path -Path $nugetBinPath -ChildPath 'psake.bat'
Remove-Module -Name [p]sake -Verbose:$false
Remove-Item -Path $packageBatFileName -Force -Confirm:$false
Write-Host 'PSake has been uninstalled'
|
combined_dataset/train/non-malicious/sample_57_98.ps1 | sample_57_98.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
[CmdletBinding(DefaultParamet... |
combined_dataset/train/non-malicious/sample_13_28.ps1 | sample_13_28.ps1 | ConvertFrom-StringData @'
id_dirs=Collecting Directory Output
'@
# SIG # Begin signature block
# MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDRy8kiReDoGdLC
# nmSgV1SViLYbd... |
combined_dataset/train/non-malicious/sample_14_17.ps1 | sample_14_17.ps1 | #************************************************
# DC_Setup_AppCompat.ps1
# Version 1.0
# Date: 2009-2019
# Author: Walter Eder (waltere@microsoft.com)
# Description: Collects additional AppCompat information.
# Called from: TS_AutoAddCommands_Setup.ps1
#*******************************************************
... |
combined_dataset/train/non-malicious/Check Server Health.ps1 | Check Server Health.ps1 | ########################################################
# Created by Brian English
# Brian.English@charlottefl.com
# eddiephoenix@gmail.com
#
# for Charlotte County Government
# No warranty suggested or implied
########################################################
# Purpose: Check Server Service Healt... |
combined_dataset/train/non-malicious/sample_36_77.ps1 | sample_36_77.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.1.0'
# Supported PSEditions
Compatible... |
combined_dataset/train/non-malicious/3817.ps1 | 3817.ps1 |
function Test-AvailabilitySet
{
$rgname = Get-ComputeTestResourceName
try
{
$loc = Get-ComputeVMLocation;
New-AzResourceGroup -Name $rgname -Location $loc -Force;
$asetName = 'avs' + $rgname;
$nonDefaultUD = 2;
$nonDefaultFD = 3;
... |
combined_dataset/train/non-malicious/sample_31_56.ps1 | sample_31_56.ps1 | #!powershell
# Copyright: (c) 2015, Jon Hawkesworth (@jhawkesworth) <jhawkesworth@protonmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.ArgvParser
#Requires -Module Ansible.ModuleUtils.CommandUtil
#Requires -Module Ansible.Mo... |
combined_dataset/train/non-malicious/3608.ps1 | 3608.ps1 |
function Get-StorageAccountCredentialName
{
return getAssetName
}
function Test-GetStorageAccountCredentialNonExistent
{
$rgname = Get-DeviceResourceGroupName
$dfname = Get-DeviceName
$staname = Get-StorageAccountCredentialName
Assert-ThrowsContains { Get-AzDataBoxEdgeStorageAccountCredential ... |
combined_dataset/train/non-malicious/4078.ps1 | 4078.ps1 | Clear-Host
Set-Variable -Name a -Scope Global -Force
Set-Variable -Name SMSCli -Scope Global -Force
$SMSCli = [wmiclass] "root\ccm:SMS_Client"
$a = $SMSCli.TriggerSchedule("{00000000-0000-0000-0000-000000000001}")
If ($a.__PROPERTY_COUNT -eq 1) {
$SMSCli.Dispose
Remove-Variable -Name a -Scope Global -Force
Remove-... |
combined_dataset/train/non-malicious/3542.ps1 | 3542.ps1 |
function Test-AzureSqlGetItems
{
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "sqlpaasrg" -Name "sqlpaasrn";
$namedContainer = Get-AzRecoveryServicesBackupContainer `
-VaultId $vault.ID `
-ContainerType "AzureSQL" `
-BackupManagementType "AzureSQL" `
-Name "Sql;sqlpaasrg;sqlpaas... |
combined_dataset/train/non-malicious/sample_24_11.ps1 | sample_24_11.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 = '82.0.0'
# Supported PSEdi... |
combined_dataset/train/non-malicious/2291.ps1 | 2291.ps1 |
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[parameter(Mandatory = $true, ParameterSetName = "DefaultSet", HelpMessage = "Specify the type of object to query for")]
[parameter(Mandatory = $true, ParameterSetName = "CriteriaSet")]
[ValidateNotNullOrEmpty()]
[ValidateSet("User")]
[string]$O... |
combined_dataset/train/non-malicious/8480db1c-b0f9-4a82-aa9a-17edc18cae00.ps1 | 8480db1c-b0f9-4a82-aa9a-17edc18cae00.ps1 | <#
Author: Matt Schmitt
Date: 11/29/12
Version: 1.0
From: USA
Email: ithink2020@gmail.com
Website: http://about.me/schmittmatt
Twitter: @MatthewASchmitt
Description
A script for checking the status of a service on a group of servers, from a list in a file.
#>
$... |
combined_dataset/train/non-malicious/LookUp-WirelessLocation.ps1 | LookUp-WirelessLocation.ps1 | function LookUp-Location {
param([String] $mac)
$mac = $mac.Replace(":","").Replace("-","")
$wClient = New-Object System.Net.WebClient
$body = "<?xml version='1.0'?><LocationRQ xmlns='http://skyhookwireless.com/wps/2005' version='2.6' street-address-lookup='full'><authentication version='2.0'><simple><username>be... |
combined_dataset/train/non-malicious/Get-ShortURL.ps1 | Get-ShortURL.ps1 | Function Get-ShortURL {
Param($longURL, $login, $apiKey)
$url = "http://api.bit.ly/shorten?version=2.0.1&format=xml&longUrl=$longURL&login=$login&apiKey=$apikey"
$request = [net.webrequest]::Create($url)
$responseStream = new-object System.IO.StreamReader($request.GetResponse().GetResponseStream())
$response... |
combined_dataset/train/non-malicious/2970.ps1 | 2970.ps1 |
$dotnetCLIChannel = 'Current'
$dotnetCLIRequiredVersion = 'latest'
$NoSudo = $false
. "$PSScriptRoot/tools.ps1"
$DotnetArguments = @{ Channel = $dotnetCLIChannel; Version = $dotnetCLIRequiredVersion; NoSudo = $NoSudo }
Install-Dotnet @DotnetArguments
$Env:PATH += "$([IO.Path]::PathSeparator)$Env:HOME/.dotnet"
do... |
combined_dataset/train/non-malicious/sample_59_39.ps1 | sample_59_39.ps1 | qيحتوي العمود '%{oii_groupedColumn/}' على مرجع GroupByColumn غير صالح عُيَّن على المعّرف '%I64u{groupByColumnId/}'dالعمود '%{oii_groupedColumn/}' مجموع بواسطة العمود '%{oii_groupByColumn/}' الذي ينتمي إلى جدول مختلف1لا يجوز تعيين اسم الدور إلى '*' أو '*SharePoint'.Kتشير العلاقة '%{ccon_relname/}' إلى عمود من النوع رقم ... |
combined_dataset/train/non-malicious/sample_30_50.ps1 | sample_30_50.ps1 | #
# Module manifest for module 'OCI.PSModules.Cloudmigrations'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Cloudmigrations.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported P... |
combined_dataset/train/non-malicious/1493.ps1 | 1493.ps1 |
function New-AssertionException
{
param(
[Parameter(Position=0)]
[string]
$Message
)
Set-StrictMode -Version 'Latest'
$scopeNum = 0
$stackTrace = @()
foreach( $item in (Get-PSCallStack) )
{
$invocationInfo = $item.InvocationI... |
combined_dataset/train/non-malicious/3389.ps1 | 3389.ps1 |
function Test-Image
{
param ($loc)
$rgname = Get-ComputeTestResourceName
try
{
if ($loc -eq $null)
{
$loc = Get-ComputeVMLocation;
}
New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;
$vmsize ... |
combined_dataset/train/non-malicious/sample_31_99.ps1 | sample_31_99.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_33_53.ps1 | sample_33_53.ps1 | # Localized 04/14/2024 08:54 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=&Sì
PromptNoString=&No
BundleFound=Pacchetto trovato: {0}
PackageFound=Pacchetto trovato: {0}
EncryptedBundleFound=Bundle crittografato trovato: {0}
EncryptedPackag... |
combined_dataset/train/non-malicious/Show-ColorizedContent.ps.ps1 | Show-ColorizedContent.ps.ps1 | ##############################################################################\n##\n## Show-ColorizedContent\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\nDi... |
combined_dataset/train/non-malicious/sample_67_99.ps1 | sample_67_99.ps1 | #
# Module manifest for module 'Microsoft.Online.SharePoint.PowerShell'
#
# Generated by: Microsoft Corportation
#
# Generated on: 8/29/2011
#
@{
# Script module or binary module file associated with this manifest
ModuleToProcess = 'Microsoft.Online.SharePoint.PowerShell.dll'
# Version number of this modu... |
combined_dataset/train/non-malicious/3793.ps1 | 3793.ps1 |
function Test-VirtualMachineExtension
{
$rgname = Get-ComputeTestResourceName
try
{
$loc = Get-ComputeVMLocation;
New-AzResourceGroup -Name $rgname -Location $loc -Force;
$vmsize = 'Standard_A2';
$vmname = 'vm' + $rgname;
$p = N... |
combined_dataset/train/non-malicious/Get-UcsServerVlan.ps1 | Get-UcsServerVlan.ps1 | function Get-UcsServerVlan {
Get-UcsServiceProfile | Foreach-Object {
$sp = $_
$sp | Get-UcsVnic | Foreach-Object {
$vn = $_
$vn | Get-UcsVnicInterface | Foreach-Object {
$output = New-Object psobject –property @{
Server = $sp.Name
... |
combined_dataset/train/non-malicious/sample_45_94.ps1 | sample_45_94.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 = '81.0.0'
# Supported PSEditions
Co... |
combined_dataset/train/non-malicious/SQLPSX SSIS Demo.ps1 | SQLPSX SSIS Demo.ps1 | #Edit SSIS.psm1 and Comment/Uncomment 2005 or 2008 version of SSIS assembly
#add-type -AssemblyName "Microsoft.SqlServer.ManagedDTS, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
add-type -AssemblyName "Microsoft.SqlServer.ManagedDTS, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd80... |
combined_dataset/train/non-malicious/1923.ps1 | 1923.ps1 |
function New-NestedJson {
Param(
[ValidateRange(1, 2048)]
[int]
$Depth
)
$nestedJson = "true"
$Depth..1 | ForEach-Object {
$nestedJson = '{"' + $_ + '":' + $nestedJson + '}'
}
return $nestedJson
}
function Count-ObjectDepth {
Param([PSCustomObject] $Inp... |
combined_dataset/train/non-malicious/sample_9_47.ps1 | sample_9_47.ps1 | ConvertFrom-StringData @'
id_servermanagerinfo=Server Manager Information
id_servermanagerobtaining=Obtaining Server Manager logs and role information
id_servermanageroclist=Optional Components list (oclist)
'@
# SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# B... |
combined_dataset/train/non-malicious/1335.ps1 | 1335.ps1 |
function Enable-CIisSecurityAuthentication
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string]
$SiteName,
[Alias('Path')]
[string]
$VirtualPath = '',
[Parameter(Mandatory=$tr... |
combined_dataset/train/non-malicious/sample_40_22.ps1 | sample_40_22.ps1 | #
# Module manifest for module 'OCI.PSModules.Apigateway'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apigateway.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_33_71.ps1 | sample_33_71.ps1 | <#
/// <copyright>
/// INTEL CONFIDENTIAL
///
/// Copyright 2014 Intel Corporation
///
/// This software and the related documents are Intel copyrighted materials, and your use of
/// them is governed by the express license under which they were provided to you ("License").
/// Unless the License provides other... |
combined_dataset/train/non-malicious/sample_32_24.ps1 | sample_32_24.ps1 | # Localized 04/14/2024 08:54 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=はい(&Y)
PromptNoString=いいえ(&N)
BundleFound=見つかったバンドル: {0}
PackageFound=パッケージが見つかりました: {0}
EncryptedBundleFound=暗号化されたバンドルが見つかりました: {0}
EncryptedPackageFound=暗号化されたパッ... |
combined_dataset/train/non-malicious/2340.ps1 | 2340.ps1 | function Get-ActiveDirectoryUserNameMatch($FirstName,$LastName,$MiddleInitial) {
if ($MiddleInitial) {
$Filter = { (initials -eq $MiddleInitial) -and (surname -eq $LastName) -and (givenname -eq $FirstName) }
$MatchType = 'FML'
} else {
$Filter = { (surname -eq $LastName) -and (givenname -eq $FirstName) }
$Mat... |
combined_dataset/train/non-malicious/sample_24_87.ps1 | sample_24_87.ps1 | <#
.SYNOPSIS
SyncServiceIIS.ps1 script file
This is a place-holder file only for agent patch build purposes
#>
Write-Host "This file functionality is deprecated and is place-holder only"
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3Ag... |
combined_dataset/train/non-malicious/457.ps1 | 457.ps1 |
Set-PSFConfig -Module PSFramework -Name 'message.info.minimum' -Value 1 -Initialize -Validation "integer0to9" -Handler { [PSFramework.Message.MessageHost]::MinimumInformation = $args[0] } -Description "The minimum required message level for messages that will be shown to the user."
Set-PSFConfig -Module PSFramework -N... |
combined_dataset/train/non-malicious/sample_20_31.ps1 | sample_20_31.ps1 | #
# This script launches the VC redist executable and handles certain error scenarios.
#
param(
[Parameter(Mandatory=$true)][String][ValidateNotNullOrEmpty()]$PayloadDirectory,
[Parameter(Mandatory=$true)][String][ValidateSet("arm64","x64","x86")]$Architecture,
[Parameter(Mandatory=$true)][String][Val... |
combined_dataset/train/non-malicious/Progress Message popup.ps1 | Progress Message popup.ps1 | #Generated Form Function
function ProgressMessage {
########################################################################
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
# Generated On: 29/01/2013 11:01 AM
# Generated By: Denis St-Pierre, Ottawa, Canada
#source http://po... |
combined_dataset/train/non-malicious/sample_30_31.ps1 | sample_30_31.ps1 | "use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Clear = void 0;
const switch_1 = require("../switch");
class Clear extends switch_1.Switch {
switch = 'clear';
}
exports.Clear = Clear;
//# sourceMappingURL... |
combined_dataset/train/non-malicious/4294.ps1 | 4294.ps1 | function New-SQLiteConnection
{
[cmdletbinding()]
[OutputType([System.Data.SQLite.SQLiteConnection])]
param(
[Parameter( Position=0,
Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
V... |
combined_dataset/train/non-malicious/sample_39_99.ps1 | sample_39_99.ps1 | #
# Module manifest for module 'OCI.PSModules.Databasemigration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Databasemigration.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Support... |
combined_dataset/train/non-malicious/885.ps1 | 885.ps1 |
$resourceGroupName = "<Enter a name for the resource group>"
$nhubnamespace = "<Enter a name for the notification hub namespace>"
$location = "East US"
New-AzResourceGroup -Name $resourceGroupName -Location $location
New-AzNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $nhubnamespace -Locat... |
combined_dataset/train/non-malicious/Get-ScriptCoverage.ps1 | Get-ScriptCoverage.ps1 | #############################################################################\n##\n## Get-ScriptCoverage\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\nUses c... |
combined_dataset/train/non-malicious/sample_62_73.ps1 | sample_62_73.ps1 | #
# Module manifest for module 'OCI.PSModules.Objectstorage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Objectstorage.dll'
# Version number of this module.
ModuleVersion = '86.2.0'
# Supported PSEdi... |
combined_dataset/train/non-malicious/sample_64_60.ps1 | sample_64_60.ps1 | #
# Script module for module 'Az.Synapse' that is executed when 'Az.Synapse' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 07/04/2024 08:22:41
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
{
... |
combined_dataset/train/non-malicious/sample_20_97.ps1 | sample_20_97.ps1 | ConvertFrom-StringData @'
progressbar_id_crm_fileversion_outdated=Checking For Outdated Microsoft CRM File Versions
progressbar_id_crm_fileversion_outdateddesc=Checking Microsoft CRM File Version Information To Ensure Recent Updates Are Installed
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBc... |
combined_dataset/train/non-malicious/sample_11_97.ps1 | sample_11_97.ps1 | trap [Exception]
{
WriteTo-ErrorDebugReport -ErrorRecord $_
continue
}
If (!$Is_SiteServer) {
TraceOut "ConfigMgr Site Server not detected. This script gathers data only from a Site Server. Exiting."
exit 0
}
TraceOut "Started"
Import-LocalizedData -BindingVariable ScriptStrings
$sectiondescription... |
combined_dataset/train/non-malicious/New-Shortcut.ps1 | New-Shortcut.ps1 | #requires -version 2.0
function New-Shortcut {
<#
.SYNOPSIS
Creates a new shortcut (.lnk file) pointing at the specified file.
.DESCRIPTION
The New-Shortcut script creates a shortcut pointing at the target in the location you specify. You may specify the location as a folder path (which must exist), with a n... |
combined_dataset/train/non-malicious/sample_44_7.ps1 | sample_44_7.ps1 | #
# Module manifest for module 'OCI.PSModules.Desktops'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Desktops.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
Comp... |
combined_dataset/train/non-malicious/695c148f-1099-41a1-abaf-8e0b163f9eff.ps1 | 695c148f-1099-41a1-abaf-8e0b163f9eff.ps1 | #===================================================================================
#
# Filename: AddExecuteInPowerShellToPS1Files.ps1
#
# Author: Nigel Boulton
#
# Version: 1.00
#
# Date: 9 Nov 2008
#
# Mod dates:
#
# Purpose: To add context menu items for .ps1 files in Windows Explorer, to
# allow... |
combined_dataset/train/non-malicious/sample_8_85.ps1 | sample_8_85.ps1 | ConvertFrom-StringData @'
id_dpm_dpmdb_activity=Gathering DPMDB
id_dpm_dpmdb_status=Running DC_CollectDPMDB.ps1
id_dpm_notinstalled=CollectDPMLogs did not run due to missing registry key pointing to the DPM installation folder
'@
# SIG # Begin signature block
# MIIoOAYJKoZIhvcNAQcCoIIoKTCCKCUCAQExDzANBglghkgBZQ... |
combined_dataset/train/non-malicious/sample_48_15.ps1 | sample_48_15.ps1 | # Localized 05/08/2024 05:10 AM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=&Ja
PromptNoString=&Nein
BundleFound=Bundle gefunden: {0}
PackageFound=Paket gefunden: {0}
EncryptedBundleFound=Verschlüsseltes Bundle gefunden: {0}
EncryptedPackag... |
combined_dataset/train/non-malicious/3770.ps1 | 3770.ps1 |
function Test-CreateIntegrationAccountAgreementX12
{
$agreementX12FilePath = Join-Path (Join-Path $TestOutputRoot "Resources") "X12AgreementContent.json"
$agreementX12Content = [IO.File]::ReadAllText($agreementX12FilePath)
$resourceGroup = TestSetup-CreateResourceGroup
$integrationAccountName = "IA-... |
combined_dataset/train/non-malicious/sample_20_35.ps1 | sample_20_35.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=Nenašel se požadovaný modul PowerShell (FailoverClusters). Pomocí nástroje Role a funkce nainstalujte: Nástroje pro vzdálenou správu serveru | Nástroje pro správu funkcí | Nástroje Clustering s podporou převzetí služeb při selhání | Modul clusteru s podporou pře... |
combined_dataset/train/non-malicious/sample_29_99.ps1 | sample_29_99.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.apach... |
combined_dataset/train/non-malicious/sample_31_3.ps1 | sample_31_3.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 = '81.0.0'
# Supported PSEditions
Compat... |
combined_dataset/train/non-malicious/sample_26_96.ps1 | sample_26_96.ps1 | #
# Module manifest for module 'OCI.PSModules.Adm'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Adm.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/sample_51_73.ps1 | sample_51_73.ps1 | # Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1
ConvertFrom-StringData @'
###PSLOC
Troubleshoot_Title=Vianmääritys
Troubleshoot_DetectDVDDevice=Tarkistetaan DVD-laitetta...
Troubleshoot_DetectDVDvideoDecoder=Tarkistetaan videodekooderia DVD-toistoa varten...
Troubleshoot_DetectDVDAud... |
combined_dataset/train/non-malicious/sample_24_90.ps1 | sample_24_90.ps1 | const ALIAS = Symbol.for('yaml.alias');
const DOC = Symbol.for('yaml.document');
const MAP = Symbol.for('yaml.map');
const PAIR = Symbol.for('yaml.pair');
const SCALAR = Symbol.for('yaml.scalar');
const SEQ = Symbol.for('yaml.seq');
const NODE_TYPE = Symbol.for('yaml.node.type');
const isAlias = (node) => !!node && typ... |
combined_dataset/train/non-malicious/817.ps1 | 817.ps1 | function My-Function ($myInput)
{
My-Function $myInput
}
$things = 4
$things
My-Function $things
Write-Output "Hello World";
Get-ChildItem
gci
dir
Write-Host
Get-ChildItem
|
combined_dataset/train/non-malicious/4398.ps1 | 4398.ps1 | function ValidateAndGet-RequiredModuleDetails
{
param(
[Parameter()]
$ModuleManifestRequiredModules,
[Parameter()]
[PSModuleInfo[]]
$RequiredPSModuleInfos,
[Parameter(Mandatory=$true)]
[string]
$Repository,
[Parameter(Mandatory=$true)]
... |
combined_dataset/train/non-malicious/1416.ps1 | 1416.ps1 |
function Get-CIisConfigurationSection
{
[CmdletBinding(DefaultParameterSetName='Global')]
[OutputType([Microsoft.Web.Administration.ConfigurationSection])]
param(
[Parameter(Mandatory=$true,ParameterSetName='ForSite')]
[string]
$SiteName,
[Parameter(Pa... |
combined_dataset/train/non-malicious/1724.ps1 | 1724.ps1 | function Get-ServiceNowRequest {
[OutputType([System.Management.Automation.PSCustomObject])]
[CmdletBinding(DefaultParameterSetName, SupportsPaging)]
Param(
[Parameter(Mandatory = $false)]
[string]$OrderBy = 'opened_at',
[Parameter(Mandatory = $false)]
[Val... |
combined_dataset/train/non-malicious/sample_67_8.ps1 | sample_67_8.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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.