full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/3066.ps1
3066.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "Should -BeLessThan" { It "passes if value is less than expected" { 0 | Should BeLessThan 1 0 | Should -BeLessThan 1 0 | Should -LT 1 } It "fails if values equal" { { 3 | Should B...
combined_dataset/train/non-malicious/1483.ps1
1483.ps1
function Get-ModuleVersion { param( [Parameter(Mandatory=$true)] [string] $ManifestPath ) Set-StrictMode -Version 'Latest' }
combined_dataset/train/non-malicious/sample_47_93.ps1
sample_47_93.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Clear-AMTAlarmClock { <# .Synopsis Clears Intel Active Management Technology alarm clock timers .Description This CmdLet clears the Intel Active Management Technology (AMT) alarm clock timers from clients that have Intel A...
combined_dataset/train/non-malicious/2641.ps1
2641.ps1
$dbs = Invoke-Sqlcmd -ServerInstance localhost -Database tempdb -Query "SELECT name FROM sys.databases WHERE database_id != 2 and state_desc = 'ONLINE'" $datestring = (Get-Date -Format 'yyyyMMddHHmm') foreach($db in $dbs.name){ $dir = "C:\Backups\$db" if( -not (Test-Path $dir)){New-Item -ItemType Di...
combined_dataset/train/non-malicious/sample_63_83.ps1
sample_63_83.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 # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3Ag...
combined_dataset/train/non-malicious/sample_63_25.ps1
sample_63_25.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 = '87.0.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/2558.ps1
2558.ps1
$Script:Version = '1.0.9.1126' $Script:LogSeparator = '*******************************************************************************' $Script:LogFile = "" function Get-ScriptName(){ $tmp = $MyInvocation.ScriptName.Substring($MyInvocation.ScriptName.LastIndexOf('\') + 1) $tmp.Sub...
combined_dataset/train/non-malicious/sample_56_55.ps1
sample_56_55.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
combined_dataset/train/non-malicious/sample_24_46.ps1
sample_24_46.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 storage: required: true type: string default: "graphdr...
combined_dataset/train/non-malicious/3980.ps1
3980.ps1
function Search-AzureRmGraph-Query { $queryResult = Search-AzGraph "project id, tags, properties | limit 2" Assert-IsInstance $queryResult Object[] Assert-AreEqual $queryResult.Count 2 Assert-IsInstance $queryResult[0] System.Management.Automation.PSCustomObject Assert-IsInstance $queryResult[1] S...
combined_dataset/train/non-malicious/sample_22_90.ps1
sample_22_90.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> Import-Module NetSecurity # Installs the Azur...
combined_dataset/train/non-malicious/178.ps1
178.ps1
function Update-O365UserUPNSuffix { [CmdletBinding()] [OutputType([pscustomobject])] param ( [Parameter(Mandatory = $true)] [String]$UserAlias, [Parameter(Mandatory = $true)] [String]$CurrentUPNSuffix, [Parameter(Mandatory = $true)] [String]$NewUPNSuff...
combined_dataset/train/non-malicious/sample_48_94.ps1
sample_48_94.ps1
# # Module manifest for module 'OCI.PSModules.Audit' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Audit.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_10_24.ps1
sample_10_24.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="D:\a\1\s\node_modules\.pnpm\typescript@4.9.5\node_modules\typescript\bin\node_modules;D:\a\1\s\node_modules\.pnpm\typescript@4.9.5\node_modules\typescript\node_modules;D...
combined_dataset/train/non-malicious/sample_41_30.ps1
sample_41_30.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/WhoAmI_2.ps1
WhoAmI_2.ps1
function whoami { [System.Security.Principal.WindowsIdentity]::GetCurrent().Name }
combined_dataset/train/non-malicious/Set-IPAddress.ps1
Set-IPAddress.ps1
function Set-IPAddress { param( [switch]$help, [string]$networkinterface =$(read-host "Enter the name of the NIC (ie Local Area Connection)"), [string]$ip = $(read-host "Enter an IP Address (ie 10.10.10.10)"), [string]$mask = $(read-host "Enter the subnet mask (ie 255.255.255.0)"), [string]$gatew...
combined_dataset/train/non-malicious/3235.ps1
3235.ps1
class ApprovalConfiguration { [int]$ExpireMinutes [System.Collections.ArrayList]$Commands ApprovalConfiguration() { $this.ExpireMinutes = 30 $this.Commands = New-Object -TypeName System.Collections.ArrayList } [hashtable]ToHash() { $hash = @{ ExpireMinutes = $t...
combined_dataset/train/non-malicious/1323.ps1
1323.ps1
function ConvertTo-CPropagationFlag { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [Carbon.Security.ContainerInheritanceFlags] [Alias('ContainerInheritanceFlags')] $ContainerInheritanceFlag ) Set-StrictMode -Version 'Latest' Use-CallerPreference -C...
combined_dataset/train/non-malicious/sample_51_75.ps1
sample_51_75.ps1
<# .SYNOPSIS Clean up log files from specified folders that are older than 30 days by default, but that can be overridden by a registry key. .DESCRIPTION Get all the files from the specified folders and recursively delete all files with creation date older than 30 days by default,...
combined_dataset/train/non-malicious/sample_8_51.ps1
sample_8_51.ps1
ConvertFrom-StringData @' id_fcinfo=Fibre Channel Information id_fcinforunning=Running Fibre Channel Information Tool (FCInfo) id_fcinfooutput=FCInfo Output id_fcinfooutputdesc=Fibre Channel Information Tool (FCInfo) output '@ # SIG # Begin signature block # MIIoUAYJKoZIhvcNAQcCoIIoQTCCKD0CAQExDzANBglghkgBZQME...
combined_dataset/train/non-malicious/sample_26_64.ps1
sample_26_64.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 = '74.1.0' # Supported...
combined_dataset/train/non-malicious/sample_11_27.ps1
sample_11_27.ps1
# Prepare windows environment for building and running containerd tests # Disable Windows Defender real time monitoring. Real time monitoring consumes a lot of # CPU and slows down tests as images are unarchived, and is not really needed in a short # lived test environment. Set-MpPreference -DisableRealtimeMonitoring:...
combined_dataset/train/non-malicious/USB Script backup_1.ps1
USB Script backup_1.ps1
<# .SYNOPSIS Backup-ToUSB.ps1 (Version 2.0, 6 Jan 2012) The author may be contacted via www.SeaStarDevelopment.Bravehost.com .DESCRIPTION This script will backup recently changed *.ps1,*.psm1,*.psd1 files from any selected folder (default is $pwd) to any number of inserted USB devices, on which an archive fol...
combined_dataset/train/non-malicious/45f1a2cb-dfc8-4b9f-8b09-a17bceef8edc.ps1
45f1a2cb-dfc8-4b9f-8b09-a17bceef8edc.ps1
Function Get-ServiceDACL { [CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] [String]$Servicename, [Parameter(Mandatory=$false,Position=1)] [String]$Computername= ".") $sddl = Invoke-expression -Command "c:\\Windows\\System32\\sc.ex...
combined_dataset/train/non-malicious/sample_6_0.ps1
sample_6_0.ps1
ConvertFrom-StringData @' id_symantecipscheck=Symantec Intrusion Prevention System (IPS) id_symantecipscheckdesc=Checking if Symantec Intrusion Prevention System (IPS) is installed '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEA...
combined_dataset/train/non-malicious/2901.ps1
2901.ps1
properties { $x = $null $y = $null $z = $null } task default -depends TestProperties task TestProperties -requiredVariables z{ }
combined_dataset/train/non-malicious/sample_20_26.ps1
sample_20_26.ps1
#************************************************ # TS_ModernAppsFailureForWindDefenderCheck.ps1 # Version 1.0.1 # Date: 03/22/2013 # Author: v-alyao # Description: [Idea ID 7723] [Windows] WinStore - Modern applications fail to start if incompatible security - av software installed # Rule number: 7723 # Rule ...
combined_dataset/train/non-malicious/1347.ps1
1347.ps1
function Install-CIisApplication { [CmdletBinding()] [OutputType([Microsoft.Web.Administration.Application])] param( [Parameter(Mandatory=$true)] [string] $SiteName, [Parameter(Mandatory=$true)] [Alias('Name')] [string] ...
combined_dataset/train/non-malicious/sample_65_87.ps1
sample_65_87.ps1
# # Module manifest for module 'OCI.PSModules.Functions' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Functions.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/add-OLPublicFolder.ps1
add-OLPublicFolder.ps1
function add-OLPublicFolder { param ( [string]$PFName, #Name of the new Public Folder $PFType, #Type of the new Public Folder [string]$PFParent = "\\") ...
combined_dataset/train/non-malicious/3855.ps1
3855.ps1
function Test-NewPeerAsn() { $asnId = 65000 $asnPeerName = getAssetName "Global" $asnPeer = getAssetName [string[]]$emails = "noc@$asnPeer.com","noc@$asnPeerName.com" $phone = getAssetName try{ New-AzPeerAsn -Name $asnPeerName -PeerName $asnPeer -PeerAsn $asnId -Email $emails -Phone $phone $asn...
combined_dataset/train/non-malicious/sample_1_24.ps1
sample_1_24.ps1
##************************************************************************** #********************* AUTO GENERAGED - DO NOT MODIFY ********************** # This file is the source code for discoverset OperatingSystemCore # Version 4.07 # Date: 10/20/2014 #***********************************************************...
combined_dataset/train/non-malicious/Start-rdp_3.ps1
Start-rdp_3.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/2252.ps1
2252.ps1
 [CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed.", ParameterSetName="SingleInstance")] [parameter(Mandatory=$true, ParameterSetName="Recursive")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -...
combined_dataset/train/non-malicious/sample_55_11.ps1
sample_55_11.ps1
var state = command.getTrait("state"); var manipData = services.manipulators.getManipulatorData("CameraManipulator"); var mode = manipData.getTrait("CameraManipulationMode"); var tool = new Object(); tool.activate = function () { state.value = 2; mode.value = 2; // Orbit mode } tool.deactivate = fun...
combined_dataset/train/non-malicious/sample_53_29.ps1
sample_53_29.ps1
Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility #Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
combined_dataset/train/non-malicious/sample_18_50.ps1
sample_18_50.ps1
#************************************************ # DC_Bluetooth-Component.ps1 # Version 1.0: Created # Date: 2020 # Author: Walter Eder (waltere@microsoft.com) # Description: Collects information about the Bluetooth Component. #******************************************************* Trap [Exception] { # ...
combined_dataset/train/non-malicious/sample_53_60.ps1
sample_53_60.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 = '82.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/Set-ScreenResolution.ps1
Set-ScreenResolution.ps1
Function Set-ScreenResolution { <# .Synopsis Sets the Screen Resolution of the primary monitor .Description Uses Pinvoke and ChangeDisplaySettings Win32API to make the change .Example Set-ScreenResolution -Width 1024 -Height 768 #> param ( [Parameter(Mandatory...
combined_dataset/train/non-malicious/Get-Comic.ps1
Get-Comic.ps1
#.Synopsis # Download comic strip images #.Description # Gets the latest comic from any of several different comic strips and downloads it to "My Pictures\\Comix" #.Parameter comic # The name of the comic to fetch: xkcd, dilbert, uf (user friendly) #.Notes # DEPEND-ON -Module HttpRest poshcode.org/787 # DEPE...
combined_dataset/train/non-malicious/sample_43_85.ps1
sample_43_85.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 = '79.0.0' # Support...
combined_dataset/train/non-malicious/287.ps1
287.ps1
function Test-PSFTaskEngineCache { [OutputType([System.Boolean])] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Test-PSFTaskEngineCache')] Param ( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string] $Module, [Parameter(Mandatory = $true)] [Valida...
combined_dataset/train/non-malicious/724.ps1
724.ps1
function Out-RsFolderContent { [CmdletBinding()] param( [switch] $Recurse, [Alias('ItemPath', 'Path')] [Parameter(Mandatory = $True)] [string] $RsFolder, [ValidateScript({ Test-Path $_ -PathType Container })] [Parameter(M...
combined_dataset/train/non-malicious/sample_22_82.ps1
sample_22_82.ps1
@{ GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Start-Transcript", "Stop-Transcript" AliasesTo...
combined_dataset/train/non-malicious/SMS hierarchy in Visio.ps1
SMS hierarchy in Visio.ps1
# Name : smsDiagram.ps1 # Author : David "Makovec" Moravec # Web : http://www.powershell.cz # Email : powershell.cz@googlemail.com # Twitter: makovec # # Description: Draw SMS 2003 hierarchy in Visio # # Version: 1.0 # History: # v0.1 - (add) Alan's vDiagram functions # (add) WMI query # v0....
combined_dataset/train/non-malicious/sample_5_83.ps1
sample_5_83.ps1
ConvertFrom-StringData @' id_ctsmcasecurechannel=Secure Channel Info id_ctsmcagetsecurechannellog=Gathering secure channel information for which domain controllers are being used for authentication. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgE...
combined_dataset/train/non-malicious/sample_33_69.ps1
sample_33_69.ps1
# TODO: Ensure scripts are run in admin mode [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [string] $VmName, [Parameter(Mandatory=$false)] [string] $VmMachineName = "RelativityDevVm", [Parameter(Mandatory=$true)] [string] $VmUsername, [Parameter(Mandatory=$true)] [str...
combined_dataset/train/non-malicious/sample_64_44.ps1
sample_64_44.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 Get-ServiceFabricApp...
combined_dataset/train/non-malicious/sample_36_31.ps1
sample_36_31.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AmtSetup { <# .Synopsis Returns Intel Active Management Technology setup information .Description This CmdLet gets Intel Active Management Technology (AMT) setup information from the local system. .Notes ME Dev...
combined_dataset/train/non-malicious/sample_17_5.ps1
sample_17_5.ps1
# # Module manifest for module 'OCI.PSModules.Loggingingestion' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingingestion.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported...
combined_dataset/train/non-malicious/Get-PipeLineObject.ps1
Get-PipeLineObject.ps1
# For TabExpansion.ps1 # this requires TabExpansion.ps1 function Get-PipeLineObject { $i = -2 do { $str = $line.Split("|")[$i] # extract the command name from the string # first split the string into statements and pipeline elements # This doesn't handle strings however...
combined_dataset/train/non-malicious/sample_34_20.ps1
sample_34_20.ps1
## Install Rigel app ###################### # In the event that the app is already provisioned, DO NOT provision it again. if ((get-appxprovisionedpackage -online |? {$_.DisplayName -eq "Microsoft.SkypeRoomSystem"}) -eq $null) { # Check if we are using store or dev package $licensePath = Get-Item $Env:...
combined_dataset/train/non-malicious/1456d523-444e-4f3c-bb7c-31c0cb1b218d.ps1
1456d523-444e-4f3c-bb7c-31c0cb1b218d.ps1
Param( [string]$CCNetListenerFile = $null, [string]$MyComputerName = [System.Environment]::MachineName, [string]$Config='Debug', [int]$CCNetLogQueueLength = 10 [switch]$NoBuild, [string]$SpecificVdir = $null ) # usage from ccnet will be something like this: #... #<powershell> #<scriptDirectory>iphi</sc...
combined_dataset/train/non-malicious/sample_66_4.ps1
sample_66_4.ps1
# # Module manifest for module 'OCI.PSModules.Dashboardservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dashboardservice.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported...
combined_dataset/train/non-malicious/7f47048d-3826-4d47-a13e-05e72014dacd.ps1
7f47048d-3826-4d47-a13e-05e72014dacd.ps1
#Find out how many accounts we should delete ( I'll make this interogate UPS at some point in future #for now this fudge will do Param ([int]$limit) if ($limit -eq 0) { $limit = 999999999 } $count = 1 write-host "------------- Started -------------" $output = Get-Date $output = "Started at " + $ou...
combined_dataset/train/non-malicious/2960.ps1
2960.ps1
properties { $buildOutputPath = ".\bin\$buildConfiguration" } task default -depends DoRelease task DoRelease { Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null" Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Re...
combined_dataset/train/non-malicious/Get-DhcpClient.ps1
Get-DhcpClient.ps1
<# .Description A C# P/Invoke wrapper for DhcpEnumSubnetClients from the DHCP API .Parameter Server A DHCP server to query .Parameter Scope The IP address representing the scope to query #> [CmdLetBinding()] Param( [Parameter(Mandatory = $True)] [Net.IPAddress]$Server, [Parameter(M...
combined_dataset/train/non-malicious/sample_42_34.ps1
sample_42_34.ps1
let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl(); let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/webCore.eventHandlers.js"]; let currentScriptElement = document.querySelector("script[src='Scripts/webCore.plugin.js']"); if (currentScriptElement !== null) { scr...
combined_dataset/train/non-malicious/4013.ps1
4013.ps1
workflow Test-WorkFlowWithVariousParameters { param([string] $a, [int] $b, [DateTime] $c) "a is " + $a "b is " + $b "c is " + $c }
combined_dataset/train/non-malicious/sample_45_97.ps1
sample_45_97.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=Modul PowerShell yang diperlukan (FailoverClusters) tidak ditemukan. Gunakan Alat Peran & Fitur untuk menginstal: Alat Administrasi Server Jarak Jauh | | Alat Administrasi Fitur | Alat Pengklusteran Failover Modul Kluster Failover untuk Windows PowerShell. Hype...
combined_dataset/train/non-malicious/Import-ExcelToSQL.ps1
Import-ExcelToSQL.ps1
#Change these settings as needed $filepath = 'C:\\Users\\u00\\Documents\\backupset.xlsx' #Comment/Uncomment connection string based on version #Connection String for Excel 2007: $connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=`"$filepath`";Extended Properties=`"Excel 12.0 Xml;HDR=YES`";" #Connection S...
combined_dataset/train/non-malicious/sample_40_97.ps1
sample_40_97.ps1
import os.path import shutil import subprocess import psutil import pytest import salt.exceptions pytestmark = [ pytest.mark.windows_whitelisted, pytest.mark.skip_unless_on_windows, pytest.mark.slow_test, ] @pytest.fixture(scope="module") def dsc(modules): # We seem to be hitting an issue where the...
combined_dataset/train/non-malicious/523.ps1
523.ps1
function Get-SPManagedMetadataServiceTerms{ [CmdletBinding()] param( [Parameter(Mandatory=$true)] [String] $Site, [String] $TermGroup ) function Add-ArrayLevelIndex{ param( $Object, $AttributeName, ...
combined_dataset/train/non-malicious/sample_11_48.ps1
sample_11_48.ps1
#************************************************ # TS_StoreAppsFailureForDCOMErrorCheck.ps1 # Version 1.0.1 # Date: 3/13/2013 # Author: V-maam # Description: [Idea ID 7544] [Windows] WinStore - Apps do not launch, because "ALL APPLICATIONS PACKAGES" removed from DCOM ACL # Rule number: 7544 # Rule URL: http:...
combined_dataset/train/non-malicious/sample_9_86.ps1
sample_9_86.ps1
#************************************************ # DC_PStat.PS1 # Version 1.0.1 # Date: 07-10-2009 # Author: Andre Teixeira - andret@microsoft.com # Description: PStat.exe tool, saving output to a file named $ComputerName_PStat.txt #************************************************ if($debug -eq $true){[void]$...
combined_dataset/train/non-malicious/sample_65_21.ps1
sample_65_21.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_63_95.ps1
sample_63_95.ps1
# # Module manifest for module 'OCI.PSModules.Functions' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Functions.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_59_87.ps1
sample_59_87.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_35_21.ps1
sample_35_21.ps1
# # Module manifest for module 'OCI.PSModules.Autoscaling' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Autoscaling.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/25.ps1
25.ps1
. $PSScriptRoot\Shared.ps1 Describe 'ANSI Tests' { Context 'Returns correct ANSI sequence for specified colors' { It 'Setting BackgroundColor to 0x0 results in Black background' { $ts = & $module.NewBoundScriptBlock({[PoshGitTextSpan]::new("TEST", 0xFF0000, 0)}) $ansiStr = $ts.toAns...
combined_dataset/train/non-malicious/sample_60_63.ps1
sample_60_63.ps1
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'https://aka...
combined_dataset/train/non-malicious/sample_46_29.ps1
sample_46_29.ps1
# # Module manifest for module 'OCI.PSModules.Disasterrecovery' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Disasterrecovery.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported...
combined_dataset/train/non-malicious/sample_3_29.ps1
sample_3_29.ps1
# QuickVue 可视化开发Vue组件的vscode插件,目前可用于快速创建`Vue管理台项目`和生成Web管理台的表格页面。 ## 功能 - 【0.0.6】右键文件夹,点击`快速新建项目`,可以可视化创建管理台项目,并一键将项目工程目录,同步到vscode中。 - 在`.vue`文件右键,或者`.vue的编辑器`里面右键,可以选择`快速Vue组件`,可以使用可视化模版页面。 ## 功能_快速Vue组件_介绍 - 在.vue文件下,右键选择`快速Vue组件`,即可打开视图页面,在其他文件中,打不开视图页面,会进行相应提示。 <img src="https://oss.html5iq.com/vscode/select...
combined_dataset/train/non-malicious/sample_27_0.ps1
sample_27_0.ps1
トピック about_IntelEthernetCmdlets 概説 IntelEthernetCmdlets モジュールを使用して、サポートされている インテル(R) イーサネット・デバイスの情報を入手したり、設定を構成したり、 問題をデバッグする方法について説明します。 説明 IntelEthernetCmdlets モジュールには、システム内のインテル(R) イーサネット・デバイスの情報入手または設定の構成を可能にする cmdlets が含まれています。ファームウェア・ログをサポートするデバイスでは、 問題のデバッグに役立つログ...
combined_dataset/train/non-malicious/sample_66_49.ps1
sample_66_49.ps1
<# .SYNOPSIS Scenario module for collecting Microsoft Remote Assistance and Quick Assist / RemoteHelp related data .DESCRIPTION Collect Remote Assistance related troubleshooting data .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version ...
combined_dataset/train/non-malicious/Oracle NetApp CommVault .ps1
Oracle NetApp CommVault .ps1
#Path Below must be set to reflect ORACLE_HOME [Reflection.Assembly]::LoadFile("C:\\app\\oracle\\product\\11.2.0\\client_1\\ODP.NET\\bin\\2.x\\Oracle.DataAccess.dll") Import-Module DataOntap #Populate credentials below function nas2snapadd {param ($volname) Connect-NaController -Name nau-nas2.naucom.com | out-nul...
combined_dataset/train/non-malicious/3620.ps1
3620.ps1
function Test-GetAzureRmDiagnosticSetting { try { $actual = Get-AzDiagnosticSetting -ResourceId /subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/insights-integration/providers/test.shoebox/testresources2/pstest0000eastusR2 -name service Assert-NotNull $actua...
combined_dataset/train/non-malicious/3337.ps1
3337.ps1
function Enable-ScheduledCommand { [PoshBot.BotCommand( Aliases = ('enableschedule', 'enable-schedule'), Permissions = 'manage-schedules' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [ValidateNotNullO...
combined_dataset/train/non-malicious/Export ASP Events 2 evtx.ps1
Export ASP Events 2 evtx.ps1
# Be sure to include the tailing backslash "\\" $DstFolder = "D:\\somefolder\\" $EvtSession = New-Object System.Diagnostics.Eventing.Reader.EventLogSession($env:computername) [string[]] $ProviderList = $EvtSession.GetProviderNames() | Select-String asp for($i=0;$i -lt $ProviderList.Length;$i++){ $EvtQuer...
combined_dataset/train/non-malicious/3577.ps1
3577.ps1
$global:createRolloutTemplate = ".\ScenarioTests\CreateRollout.json" $global:failureCreateRolloutTemplate = ".\ScenarioTests\CreateRollout_FailureRollout.json" $global:parametersFileName = "Storage.Parameters.json" $global:invalidParametersFileName = "Storage_Invalid.Parameters.json" $global:templateFileName = "Storag...
combined_dataset/train/non-malicious/sample_64_61.ps1
sample_64_61.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
combined_dataset/train/non-malicious/sample_5_54.ps1
sample_5_54.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/3606.ps1
3606.ps1
function Get-DeviceConnectionString { return ""; } function Get-IotDeviceConnectionString { return ""; } function Get-EncryptionKey { return ""; } function Get-Userpassword { return ""; } function Get-DeviceResourceGroupName { return "psrgpfortest" } function Get-DeviceName { retur...
combined_dataset/train/non-malicious/1224.ps1
1224.ps1
Set-StrictMode -Version 'Latest' Describe 'License Notices' { It 'all published files should have a license notice' { $projectRoot = Join-Path -Path $PSScriptRoot -ChildPath '..' -Resolve $carbonRoot = Join-Path -Path $projectRoot -ChildPath 'Carbon' -Resolve $licenseFilePath = Join-Path ...
combined_dataset/train/non-malicious/sample_33_54.ps1
sample_33_54.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 = '79.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/2381.ps1
2381.ps1
function Find-TroubleshootingEvent { [OutputType()] [CmdletBinding()] param ( [Parameter()] [ValidateNotNullOrEmpty()] [string[]]$ComputerName = (hostname), [Parameter()] [ValidateNotNullOrEmpty()] [int]$EventId ) try { @($ComputerName).foreach({ $computer = $_ $getEventParams = @{ Compu...
combined_dataset/train/non-malicious/Test-Port_8.ps1
Test-Port_8.ps1
Param([string]$srv,$port=135,$timeout=3000,[switch]$verbose) # Test-Port.ps1 # Does a TCP connection on specified port (135 by default) $ErrorActionPreference = "SilentlyContinue" # Create TCP Client $tcpclient = new-Object system.Net.Sockets.TcpClient # Tell TCP Client to connect to machine on Port ...
combined_dataset/train/non-malicious/sample_47_48.ps1
sample_47_48.ps1
# # Module manifest for module 'OCI.PSModules.Ocvp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocvp.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/3168.ps1
3168.ps1
if(-not $PSScriptRoot) { $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } $PSVersion = $PSVersionTable.PSVersion.Major $Verbose = @{} if($env:APPVEYOR_REPO_BRANCH -and $env:APPVEYOR_REPO_BRANCH -notlike "master") { $Verbose.add("Verbose",$True) } Import-Module $PSScriptRoot\..\Wait-Path.ps1 ...
combined_dataset/train/non-malicious/sample_6_95.ps1
sample_6_95.ps1
<# .SYNOPSIS Data collection tool for printing-related troubleshooting by Marius Porcolean (maporcol). .DESCRIPTION The Print-Collect.ps1 script simplifies the collection of Printing related troubleshooting data, making action plans easier. The tool is compliant with company policies, is signed & pu...
combined_dataset/train/non-malicious/sample_45_88.ps1
sample_45_88.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 = '75.1.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/sample_1_84.ps1
sample_1_84.ps1
#************************************************ # TS_HPPrinterDriverVersionCheck.ps1 # Version 1.0.1 # Date: 07/23/2013 # Author: v-alyao # Description: [KSE Rule] [ Windows V3] HKCU\Software\Hewlett-Packard registry hive increases in size on Citrix servers # Rule number: ca320e17-1fa3-4740-9f81-c97f299741b0 ...
combined_dataset/train/non-malicious/sample_20_98.ps1
sample_20_98.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Attestation.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Attestation.internal.psm1' if(Test-Path $internalModulePath) { ...
combined_dataset/train/non-malicious/sample_66_78.ps1
sample_66_78.ps1
$myPath = $PSScriptRoot $libsPath = Join-Path $myPath 'Libs' cd $myPath $url = 'https://businesscentral.dynamics.com/' $environmentName = 'Sandbox-01' # SaaS auth #AadTokenProvider - TODO!!! if (!$bcAuthContext) { $bcAuthContext = New-BcAuthContext -includeDeviceLogin } $bcAuthContext = Renew-BcAuth...
combined_dataset/train/non-malicious/sample_49_91.ps1
sample_49_91.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/sample_52_57.ps1
sample_52_57.ps1
# Use the PowerShell extension setting `powershell.scriptAnalysis.settingsPath` to get the current workspace # to use this PSScriptAnalyzerSettings.psd1 file to configure code analysis in Visual Studio Code. # This setting is configured in the workspace's `.vscode/settings.json`. # # For more information on PSScrip...
combined_dataset/train/non-malicious/sample_13_13.ps1
sample_13_13.ps1
@{ GUID="766204A6-330E-4263-A7AB-46C87AFC366C" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Disable-WSManCredSSP", "Enable-WSManC...
combined_dataset/train/non-malicious/4418.ps1
4418.ps1
function Set-PSRepository { [CmdletBinding(PositionalBinding = $false, HelpUri = 'https://go.microsoft.com/fwlink/?LinkID=517128')] Param ( [Parameter(Mandatory = $true, Position = 0, ValueFromPipelineByPropertyName = $true)] [ValidateNotNullOrEmpty()] [string] $...
combined_dataset/train/non-malicious/1732.ps1
1732.ps1
function Get-ServiceNowConfigurationItem { [OutputType([System.Management.Automation.PSCustomObject])] [CmdletBinding(DefaultParameterSetName, SupportsPaging)] Param( [Parameter(Mandatory = $false)] [string]$OrderBy = 'name', [Parameter(Mandatory = $false)] ...