full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/sample_45_93.ps1
sample_45_93.ps1
# # Module manifest for module 'OCI.PSModules.Usage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usage.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/Remove Special Char.ps1
Remove Special Char.ps1
gci 'c:\\test\\' -Recurse | % { Rename-Item $_.FullName $($_.Name -replace '[^\\w\\.]','') }
combined_dataset/train/non-malicious/Export-PSCredential_1.ps1
Export-PSCredential_1.ps1
# Author: Hal Rottenberg <hal@halr9000.com> # Url: http://halr9000.com/article/tag/lib-authentication.ps1 # Purpose: These functions allow one to easily save network credentials to disk in a relatively # secure manner. The resulting on-disk credential file can only [1] be decrypted # by the same user account...
combined_dataset/train/non-malicious/3969.ps1
3969.ps1
function Test-DdosProtectionPlanCRUD { $rgLocation = Get-ProviderLocation ResourceManagement $resourceTypeParent = "Microsoft.Network/DdosProtectionPlans" $location = Get-ProviderLocation $resourceTypeParent $rgName = Get-ResourceGroupName $ddosProtectionPlanName = Get-ResourceName ...
combined_dataset/train/non-malicious/Test-Prompt_1.ps1
Test-Prompt_1.ps1
$choices = [System.Management.Automation.Host.ChoiceDescription[]]( (New-Object System.Management.Automation.Host.ChoiceDescription "&Yes","Choose me!"), (New-Object System.Management.Automation.Host.ChoiceDescription "&No","Pick me!")) $Answer = $host.ui.PromptForChoice('Caption',"Message",$choices,(1)) Write-...
combined_dataset/train/non-malicious/sample_13_82.ps1
sample_13_82.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/4131.ps1
4131.ps1
[CmdletBinding()] param ( [switch]$ActiveDirectory, [switch]$NetworkShare, [string]$NetworkSharePath, [switch]$SCCMBitlockerPassword, [switch]$SCCMReporting ) Import-Module ActiveDirectory Function Get-BitLockerRecoveryKeyId { [cmdletBinding()] Param ( [Parameter(Mandatory = $false, ValueFromPipeLine...
combined_dataset/train/non-malicious/697.ps1
697.ps1
function Revoke-RsCatalogItemAccess { [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( [Alias('UserOrGroupName')] [Parameter(Mandatory = $True)] [string] $Identity, [Alias('ItemPath')] [Parameter(Mandatory = $T...
combined_dataset/train/non-malicious/sample_12_25.ps1
sample_12_25.ps1
@{ GUID = "A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author = "PowerShell" CompanyName = "Microsoft Corporation" Copyright = "Copyright (c) Microsoft Corporation." ModuleVersion = "7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion = "3.0" FunctionsToExport = @() CmdletsToExport = "Get-Credential", "Get-ExecutionP...
combined_dataset/train/non-malicious/sample_27_42.ps1
sample_27_42.ps1
# Localized ArchiveResources.psd1 ConvertFrom-StringData @' ###PSLOC PathNotFoundError=The path '{0}' either does not exist or is not a valid file system path. ExpandArchiveInValidDestinationPath=The path '{0}' is not a valid file system directory path. InvalidZipFileExtensionError={0} is not a supported archive...
combined_dataset/train/non-malicious/3474.ps1
3474.ps1
function WaitforStatetoBeSucceded { param([string]$resourceGroupName,[string]$namespaceName,[string]$drConfigName) $createdDRConfig = Get-AzEventHubGeoDRConfiguration -ResourceGroup $resourceGroupName -Namespace $namespaceName -Name $drConfigName while($createdDRConfig.ProvisioningState -ne "Succe...
combined_dataset/train/non-malicious/3705.ps1
3705.ps1
function Disable-AzAdvisorRecommendationByNameParameter { $RecommendationId = "4fa2ff4f-dc90-9876-0723-1360fa9f4bd7" $DaysParam = 30 $propertiesCount = "5" $TTLValue = "30.00:00:00" $NameValue = "HardcodedSuppressionName" $queryResult = Disable-AzAdvisorRecommendation -RecommendationName $Recomm...
combined_dataset/train/non-malicious/3410.ps1
3410.ps1
function Test-GetWebApp { $rgname = Get-ResourceGroupName $wname = Get-WebsiteName $wname2 = "$(Get-WebsiteName)Second" $location = Get-Location $whpName = Get-WebHostPlanName $tier = "Shared" $apiversion = "2015-08-01" $resourceType = "Microsoft.Web/sites" try { try { Remove-AzureRm...
combined_dataset/train/non-malicious/sample_5_51.ps1
sample_5_51.ps1
ConvertFrom-StringData @' progressbar_id_registrydatatypecheck=Verifying Microsoft Dynamics CRM registry key data types progressbar_id_registrydatatypecheckdesc=Verifying Microsoft Dynamics CRM registry key data types '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5...
combined_dataset/train/non-malicious/sample_35_99.ps1
sample_35_99.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath common.psm1) -Force try { # Indicates if the current project is a VB project if ([string]::IsNullOrEmpty($project.CodeModel.Language)) { $IsVbProject = $project.FullName -like "*.vbproj" } else {...
combined_dataset/train/non-malicious/sample_10_34.ps1
sample_10_34.ps1
# Source: https://github.com/edbarnes-msft/DrDAV/blob/master/Test_MsDavConnection.ps1 <# Script name: tss_MSDavConnection.ps1 Purpose: - check WebDAV/WebClient related settings and connectivity #> param( [Parameter(Mandatory=$False,Position=0,HelpMessage='Choose a writable output folder location, i.e. C:\Temp\ ...
combined_dataset/train/non-malicious/Pipeline and Parameter.ps1
Pipeline and Parameter.ps1
Function Test-Func { param( [Parameter(ValueFromPipeline=$true, Mandatory=$true, Position=0)] [string[]]$ComputerName ) Begin { Function Do-Process($p) { "Processing $($p)" } } Process { if($_) { Do-Process $_ } } ...
combined_dataset/train/non-malicious/sample_30_25.ps1
sample_30_25.ps1
[This article is subject to change.] 10 Consider the following guidance: Operation Frequency of use Cmdlets Install the Utility Once per VM Install-module Import-module Install-HcsTool Download the catalog file Once per VM and Device Manager Connect-AzAccount Set-AzContext Import-module Get-AzStorageContainer Import...
combined_dataset/train/non-malicious/3794.ps1
3794.ps1
$global:ps_test_tag_name = 'crptestps6050' function get_vm_config_object { param ([string] $rgname, [string] $vmsize) $st = Write-Verbose "Creating VM Config Object - Start"; $vmname = $rgname + 'vm'; $p = New-AzVMConfig -VMName $vmname -VMSize $vmsize; $st = Write-Verbo...
combined_dataset/train/non-malicious/sample_42_23.ps1
sample_42_23.ps1
ijSTF2QMV0d+rdP3fk8k5wvgjQuWUv9OHkoNVbsPEJvFN+WbHrYsUET8US4UFQsgWHNkaBnnYWo1ar3JLjKlLHmK3W5273DMhZfr1gYgDrljwZ4Huxi+29VnizOtpEueHSHCbFozZD5CSOhikcXVH0UIa7X/g4v8K4QdveALIVbchU7x4syH50WYD9pksovQgXsTgXZc3whORPnXDwhUdcDRX/5/4Krc5MxdulxbbW/4PCrsp6mQmzRG6Q7VrSxwhNOgZT8Xz+9Xs5n33YdhaFw04fZU5vhGLj7TUM6xurEJkWqOOU8lM30p+96aD2m0...
combined_dataset/train/non-malicious/748.ps1
748.ps1
param( [Parameter(Mandatory)] [string]$LastReleaseTag, [Parameter(Mandatory)] [string]$Token, [Parameter(Mandatory)] [string]$NewReleaseTag, [Parameter()] [switch]$HasCherryPick ) $Script:powershell_team = @( ...
combined_dataset/train/non-malicious/sample_8_14.ps1
sample_8_14.ps1
[dynamic, provider("dcismprovider"), Version ( "1.0.0" ), Description( "DCIM_PCIDeviceView is a derivation of CIM_View " "with PCI Device specific data" )] class DCIM_PCIDeviceView : DCIM_View { [ Description ("This property provides the last time System Inventory Collection On R...
combined_dataset/train/non-malicious/1507.ps1
1507.ps1
function Assert-NodeExists { [CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0)] [xml] $Xml, [Parameter(Mandatory=$true,Position=1)] [string] $XPath, [Parameter(Position=2)] [string] ...
combined_dataset/train/non-malicious/sample_22_92.ps1
sample_22_92.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '75.1.0' # Sup...
combined_dataset/train/non-malicious/505.ps1
505.ps1
function Enable-InternetExplorerEnhancedSecurityConfiguration{ [CmdletBinding()] param( ) $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37...
combined_dataset/train/non-malicious/4113.ps1
4113.ps1
Function GetHKUBinaryKeyValue ($RegKey, $KeyVal) { Set-Variable -Name HKUsers -Scope Local -Force Set-Variable -Name i -Scope Local -Force Set-Variable -Name Key -Scope Local -Force Set-Variable -Name SubKey -Scope Local -Force Set-Variable -Name SubKeys -Scope Local -Force Set-Variable -Name Temp -Scope Loca...
combined_dataset/train/non-malicious/880.ps1
880.ps1
$ResourceGroupName = "ResourceGroup01" $SubscriptionID = "SubscriptionID" $WorkspaceName = "DefaultWorkspace-" + (Get-Random -Maximum 99999) + "-" + $ResourceGroupName $Location = "eastus" $ErrorActionPreference = "Stop" Write-Output "Pulling Azure account credentials..." $Account = Add-AzAccount if ([string]:...
combined_dataset/train/non-malicious/set-FSRMQuotaBasedOnSQL.ps1
set-FSRMQuotaBasedOnSQL.ps1
#0# init $error.clear() cls $ErrorActionPreference= "Stop" # do zmiany na "SilentlyContinue" lub "Continue" po adaptacji #/0# #1# sql conn parameters $dataSource = "Serwer\\SQL01" $database = "nazwaBazyDanych" #$authentication = "Integrated Security=SSPI" # preferowana metoda, ale nie zawsze si&#281; tak da...
combined_dataset/train/non-malicious/2402.ps1
2402.ps1
. "$PSScriptRoot\Publish-PowerShellGalleryModule.ps1" $commandName = 'Publish-PowerShellGalleryModule' describe 'Publish-PowerShellGalleryModule' { mock 'Test-Path' { $true } mock 'ShowMenu' mock 'PromptChoice' mock 'GetRequiredManifestKeyParams' { @{ Version = 'ver' Description = 'desc' ...
combined_dataset/train/non-malicious/sample_64_82.ps1
sample_64_82.ps1
# Import the helper functions Import-Module $PSScriptRoot\..\..\Misc\helper.psm1 -Verbose:$false function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [System.String] $Category ) #Write-Verbose "Use this cmdlet t...
combined_dataset/train/non-malicious/Invoke-ISPackage.ps1
Invoke-ISPackage.ps1
<# .SYNOPSIS Runs an SSIS package from an SQL package store. .DESCRIPTION Invoke-ISPackage.ps1 script is a wrapper around dtexec.exe to run an SSIS package. .EXAMPLE PowerShell.exe -File "C:\\Scripts\\Invoke-ISPackage.ps1" -PackagePath "SQLPSX\\sqlpsx1" -ServerInstance "Z001\\SQL1" This example connects to SSIS ...
combined_dataset/train/non-malicious/Get-CInfo_2.ps1
Get-CInfo_2.ps1
function Get-CInfo { param($Comp) Function PC-Name{ param ($compname) $ADS = Get-ADComputer -Filter {name -eq $compname} -Properties * | Select-Object -Property name If($ads -eq $null) {$false} ELSE{$True} } $ping = PC-Name $COMP if ($ping -eq $true) { Write-Host -ForegroundColor G...
combined_dataset/train/non-malicious/Powershell $ UIA.ps1
Powershell $ UIA.ps1
$path = "$env:programfiles\\Reference Assemblies\\Microsoft\\Framework\\v3.0" $TypesAssembly = [Reflection.Assembly]::LoadFile("$path\\UIAutomationTypes.dll") $ClientAssembly = [Reflection.Assembly]::LoadFile("$path\\UIAutomationClient.dll") $NS = "System.Windows.Automation" [System.Diagnostics.Process]::Start(...
combined_dataset/train/non-malicious/sample_24_75.ps1
sample_24_75.ps1
@{ IncludeRules = @( 'PSPlaceOpenBrace', 'PSPlaceCloseBrace', 'PSUseConsistentWhitespace', 'PSUseConsistentIndentation', 'PSAlignAssignmentStatement', 'PSUseCorrectCasing' ) Rules = @{ PSPlaceOpenBrace = @{ Enable ...
combined_dataset/train/non-malicious/51.ps1
51.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/sample_41_68.ps1
sample_41_68.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("manipulationWorldMode", "bool", true); } else { ...
combined_dataset/train/non-malicious/sample_18_82.ps1
sample_18_82.ps1
ConvertFrom-StringData @' id_dellpoweredgebioscheck_sd=A BIOS version of this Server may cause data corruption problems '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAI...
combined_dataset/train/non-malicious/sample_37_70.ps1
sample_37_70.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 = '73.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_31_31.ps1
sample_31_31.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_40_39.ps1
sample_40_39.ps1
主題 about_IntelEthernetCmdlets 簡短說明 說明如何使用 IntelEthernetCmdlets 模組,在支援之 Intel(R) 乙太網路裝置取得資訊、配置設定或排除問題。 詳細說明 IntelEthernetCmdlets 模組內有 Cmdlet,可讓您在系統內的 Intel(R) 乙太網路裝置取得資訊或配置設定。您可以在支援韌體記 錄的裝置上配置及產生記錄檔,協助排除問題。 並非所有硬體和作業系統都支援所有 cmdlet。 Intel(R) 乙太網路 700 系列裝置不支援韌體記錄。 ...
combined_dataset/train/non-malicious/Set-Extension.ps1
Set-Extension.ps1
function Set-Extension { #.Synopsis # Change the extension on file paths #.Example # ls *.ps1 | Set-Extension bak | ls # # Lists all .bak files that correspond to .ps1 scripts #.Example # ls *.txt | move -dest { Set-Extension log -path $_.PSPath } # # Renames all .txt files by changing their extension t...
combined_dataset/train/non-malicious/317.ps1
317.ps1
function New-PSFMessageLevelModifier { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/New-PSFMessageLevelModifier')] Param ( [Parameter(Mandatory = $true)] [string] $Na...
combined_dataset/train/non-malicious/2793.ps1
2793.ps1
if (Get-Command logparser.exe) { $lpquery = @" SELECT COUNT(ProcessName, Owner) as ct, ProcessName, Owner FROM *Handle.tsv GROUP BY ProcessName, Owner ORDER BY ct ASC "@ & logparser -stats:off -i:csv -dtlines:0 -fixedsep:on -rtp...
combined_dataset/train/non-malicious/sample_20_86.ps1
sample_20_86.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 License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
combined_dataset/train/non-malicious/3756.ps1
3756.ps1
function Test-CreateGetRemoveMLCommitmentPlan { $planDeleted = $false $actualTest = { param([string] $location) try { $resourceGroupName = Get-ResourceGroupName $commitmentPlanName = Get-CommitmentPlanName LogOutput "Creating resourc...
combined_dataset/train/non-malicious/New-DesktopIni.ps1
New-DesktopIni.ps1
$di = [System.IO.FileInfo]"$(split-path $Profile -Parent)\\desktop.ini"\nset-content $di "[.ShellClassInfo]`r`nLocalizedResourceName=1$([char]160)WindowsPowerShell`r`nIconResource=C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe,0`r`n[ViewState]`r`nFolderType=Documents"\n$di.Attributes = $di.Attributes -b...
combined_dataset/train/non-malicious/sample_63_11.ps1
sample_63_11.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 Publish-UpgradedServ...
combined_dataset/train/non-malicious/sample_7_55.ps1
sample_7_55.ps1
##---------------------------------------------------------------------------- ## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved. ##---------------------------------------------------------------------------- # Import string constants . ./StringConstants.ps1 # Import shared functions and var...
combined_dataset/train/non-malicious/sample_19_69.ps1
sample_19_69.ps1
ConvertFrom-StringData @' id_sccm_checksqlconfig=Checking SQL Database Configuration id_sccm_checksqlvalue=Checking the Value of id_sccm_checksqlconfigdesc=Trying to connect to the SQL Database '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGs...
combined_dataset/train/non-malicious/2635.ps1
2635.ps1
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SqlWmiManagement')| Out-Null function Set-SqlServiceAccount{ param([string[]] $Instance ,[System.Management.Automation.PSCredential]$ServiceAccount ,[ValidateSet('SqlServer','SqlAgent')] $service = 'SqlServer' ) ...
combined_dataset/train/non-malicious/sample_58_8.ps1
sample_58_8.ps1
@{ GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 " Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" ModuleToProcess="PSDiagnostics.psm1" Func...
combined_dataset/train/non-malicious/sample_42_17.ps1
sample_42_17.ps1
# # Module manifest for module 'OCI.PSModules.Networkfirewall' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Networkfirewall.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported P...
combined_dataset/train/non-malicious/3688.ps1
3688.ps1
function Test-InvitationCrud { $resourceGroup = getAssetName try { $AccountName = getAssetName $ShareName = getAssetName $InvitationName = getAssetName $targetEmail = "test@microsoft.com" $createdInvitation = New-AzDataShareInvitation -AccountName $AccountName -ResourceGroupName $resourceGroup -S...
combined_dataset/train/non-malicious/sample_66_10.ps1
sample_66_10.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/_CTP3_ Invoke-ISE.ps1
_CTP3_ Invoke-ISE.ps1
Set-Alias ISE Invoke-ISE function Invoke-ISE () <# .SYNOPSIS start ISE from the PS-commandline .DESCRIPTION start ISE provide files as parameters or per pipe-line .NOTES Author : Bernd Kriszio - http://pauerschell.blogspot.com/ Requires : PowerShell V2 CTP3 and please can someone fix t...
combined_dataset/train/non-malicious/sample_34_94.ps1
sample_34_94.ps1
<# # .DESCRIPTION # Download and install MMAAgent & Microsoft Dependency agent # #> $ErrorActionPreference = "Stop" $isMmaRunning = (Get-Service -Name HealthService -ErrorAction SilentlyContinue).Status -eq 'Running' $isServiceMapRunning = (Get-Service -Name MicrosoftDependencyAgent -ErrorAction Silentl...
combined_dataset/train/non-malicious/3634.ps1
3634.ps1
function Test-AdvancedDataSecurityPolicyManagedInstanceTest { $testSuffix = getAssetName Create-AdvancedDataSecurityManagedInstanceTestEnvironment $testSuffix $params = Get-SqlAdvancedDataSecurityManagedInstanceTestEnvironmentParameters $testSuffix try { $policy = Get-AzSqlInstanceAdvancedDa...
combined_dataset/train/non-malicious/sample_58_95.ps1
sample_58_95.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_51_70.ps1
sample_51_70.ps1
$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent . "$MyPath\mesa_init_msvc.ps1" # we want more secure TLS 1.2 for most things, but it breaks SourceForge # downloads so must be done after Chocolatey use [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtoco...
combined_dataset/train/non-malicious/sample_43_33.ps1
sample_43_33.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_17_89.ps1
sample_17_89.ps1
##---------------------------------------------------------------------------- ## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved. ##---------------------------------------------------------------------------- # Import shared functions and vars . ./Commonalities.ps1 # Script used to reinstall...
combined_dataset/train/non-malicious/1634.ps1
1634.ps1
function Get-ComputerShares { param ( [string]$comp = $env:COMPUTERNAME ) if (!$comp) { throw 'No comps.' } $ping = New-Object System.Net.NetworkInformation.Ping try { $result = $ping.Send($comp) } catch { $result = $null } $sharename = $type =...
combined_dataset/train/non-malicious/sample_43_29.ps1
sample_43_29.ps1
<# .SYNOPSIS For a series of known or specified channels, lists out what would be installed for a given quality level and channel. .PARAMETER Quality Optional quality(s) to check .PARAMETER Channel Optional channel(s) to check. Otherwise checks a bunch of known channels. .PARAMETER Component Optional channel(s) to c...
combined_dataset/train/non-malicious/sample_25_90.ps1
sample_25_90.ps1
# # Module manifest for module 'OCI.PSModules.Marketplace' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplace.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEdition...
combined_dataset/train/non-malicious/sample_20_81.ps1
sample_20_81.ps1
ConvertFrom-StringData @' id_officeappstillopen=$offApp is still open id_closingofficeappcountdown=$offApp must be closed prior to continuing. It will be terminated in $timeToClose seconds. id_accessname=Microsoft Access id_accessnameshort=Access id_excelname=Microsoft Excel id_excelnameshort=Excel id_infopathn...
combined_dataset/train/non-malicious/74d37072-bf65-4930-9299-29a0ec36260e.ps1
74d37072-bf65-4930-9299-29a0ec36260e.ps1
Function Get-DriveInfo([string]$computer = "localhost") { PROCESS{ $LogicalDrive = Get-WmiObject –computername $computer Win32_LogicalDisk -filter "DriveType=3" $PhysicalDrive = Get-WmiObject -class "Win32_DiskDrive" -namespace "root\\CIMV2" -computername $computer $objResult = @() foreach ($item...
combined_dataset/train/non-malicious/sample_26_37.ps1
sample_26_37.ps1
# Localized 05/07/2022 03:58 AM (GMT) 303:7.0.30723 MSFT_RegistryResource.strings.psd1 # Localized resources for MSFT_EnvironmentResource ConvertFrom-StringData @' ###PSLOC ParameterValueInvalid=(ERROR) Parameter '{0}' has an invalid value '{1}' for type '{2}' InvalidPSDriveSpecified=(ERROR) Invalid PSDrive '{0...
combined_dataset/train/non-malicious/1552.ps1
1552.ps1
function Get-MSPSUGMeetingDate { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [string[]]$Month = (1..12), [Parameter(ValueFromPipeline)] [ValidateRange(2013,9999)] [Int[]]$Year = (Get-Date).Year ) PROCESS { foreach ($y in $Year) { fo...
combined_dataset/train/non-malicious/sample_35_90.ps1
sample_35_90.ps1
# # Module manifest for module 'OCI.PSModules.Oda' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oda.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/4407.ps1
4407.ps1
function ValidateAndGet-VersionPrereleaseStrings { Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Version, [string] $Prerelease, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.Management.Auto...
combined_dataset/train/non-malicious/sample_60_12.ps1
sample_60_12.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_11_17.ps1
sample_11_17.ps1
# # Module manifest for module 'OCI.PSModules.Threatintelligence' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Threatintelligence.dll' # Version number of this module. ModuleVersion = '74.1.0' # Suppo...
combined_dataset/train/non-malicious/Out-Default URL Launcher.ps1
Out-Default URL Launcher.ps1
# Wrapper for Out-Default that saves the last object written # and handles missing commands if the command is a directory # or an URL # function Out-Default ` { [CmdletBinding(ConfirmImpact="Medium")] param( [Parameter(ValueFromPipeline=$true)] ` [System.Management.Automation.PSObject] $Inp...
combined_dataset/train/non-malicious/918.ps1
918.ps1
$sourceSubscriptionId='yourSourceSubscriptionId' $sourceResourceGroupName='yourResourceGroupName' $snapshotName='yourSnapshotName' Select-AzSubscription -SubscriptionId $sourceSubscriptionId $snapshot= Get-AzSnapshot -ResourceGroupName $sourceResourceGroupName -Name $snapshotName $targetSubscriptionId='your...
combined_dataset/train/non-malicious/sample_63_74.ps1
sample_63_74.ps1
# # Module manifest for module 'OCI.PSModules.Cloudbridge' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEdition...
combined_dataset/train/non-malicious/915.ps1
915.ps1
$resourceGroup = "myResourceGroup" $location = "westeurope" $vmName = "myVM" $securePassword = ConvertTo-SecureString ' ' -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential ("azureuser", $securePassword) New-AzResourceGroup -Name $resourceGroup -Location $location $subnetConfig = Ne...
combined_dataset/train/non-malicious/sample_36_33.ps1
sample_36_33.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# .Synopsis Group Policy tools use administrative template files (.admx, .adml) to populate policy settings in the user interface. This allows administrators to manage registry-based policy settings. This script installes Powe...
combined_dataset/train/non-malicious/2881.ps1
2881.ps1
Framework '4.7.1' task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) {} else { $output = &msbuild /version /nologo 2>&1 Assert ($output -NotLike '15.0') '$output should contain 15.0' } }
combined_dataset/train/non-malicious/sample_27_89.ps1
sample_27_89.ps1
# # Module manifest for module 'OCI.PSModules.Loggingsearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingsearch.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/sample_50_87.ps1
sample_50_87.ps1
define({"provide":{"provided":[645],},"provided":{"provided":[645],},"prts":{"kprtscr":[210],},"prtsc":{"kprtscr":[210],},"prtscr":{"kprtscr":[210],},"ps":{"ps":[324,325],},"ptor":{"descriptor":[378,381],},"ptp":{"ptp":[528],},"ptp同":{"启用由ptp同步的mrs以同步多个读码器同步触发":[528],},"ptp同步":{"启用由ptp同步的mrs以同步多个读码器同步触发":[528],},"ptp同步...
combined_dataset/train/non-malicious/695.ps1
695.ps1
function Clear-SubString { [CmdletBinding()] param ( [Parameter(Mandatory = $True)] [string] $string, [Parameter(Mandatory = $True)] [string] $substring, [ValidateSet('front', 'back')] [string] $positio...
combined_dataset/train/non-malicious/237.ps1
237.ps1
Function Add-SCCMGroupDeviceAffinity { [CmdletBinding()] Param ( [Parameter(Mandatory = $True, HelpMessage = "Please Enter Site Server Site code")] $SiteCode, [Parameter(Mandatory = $True, HelpMessage = "Please Enter Site Server Name")] $SiteServer, [Parameter(Mandator...
combined_dataset/train/non-malicious/3961.ps1
3961.ps1
function Check-CmdletReturnType { param($cmdletName, $cmdletReturn) $cmdletData = Get-Command $cmdletName; Assert-NotNull $cmdletData; [array]$cmdletReturnTypes = $cmdletData.OutputType.Name | Foreach-Object { return ($_ -replace "Microsoft.Azure.Commands.Network.Models.","") }; [arra...
combined_dataset/train/non-malicious/1330.ps1
1330.ps1
function Test-CMsmqMessageQueue { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Name, [Switch] $Private ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext...
combined_dataset/train/non-malicious/1737.ps1
1737.ps1
param ( [string] $location = $env:BUILD_REPOSITORY_LOCALPATH, [Parameter(Mandatory, ParameterSetName = 'Build')] [string] $destination = '/mnt', [Parameter(Mandatory, ParameterSetName = 'Build')] [ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")] [ValidateNotNullOrEmpty()] ...
combined_dataset/train/non-malicious/sample_52_45.ps1
sample_52_45.ps1
# # Script module for module 'Az.AnalysisServices' that is executed when 'Az.AnalysisServices' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 05/16/2024 06:33:06 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { t...
combined_dataset/train/non-malicious/sample_55_72.ps1
sample_55_72.ps1
# # Module manifest for module 'OCI.PSModules.Apmcontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmcontrolplane.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported P...
combined_dataset/train/non-malicious/1456.ps1
1456.ps1
function Test-CWindowsFeature { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $Name, [Switch] $Installed ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet...
combined_dataset/train/non-malicious/sample_59_18.ps1
sample_59_18.ps1
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},i.getTagRu...
combined_dataset/train/non-malicious/sample_24_38.ps1
sample_24_38.ps1
Объект для работы с кластером серверов. -------------------- **Видимость:** @Глобально **Сравнение:** Сравнение ссылочное # V8Cluster#ClusterId Идентификатор кластера. -------------------- **Видимость:** @Глобально **ТолькоЧтение** **Определен:** **КластерV8** # V8Cluster#ComputerName Имя (символический ...
combined_dataset/train/non-malicious/Convert-BounceToX_11.ps1
Convert-BounceToX_11.ps1
# $Id: Convert-BounceToX500.ps1 610 2010-11-16 00:39:19Z jon $ # $Revision: 610 $ #.Synopsis # Convert Bounce to X500 #.Description # Convert URL Encoded address in a Bounce message to an X500 address # that can be added as an alias to the mail-enabled object #.Parameter bounceAddress # URL Encoded bounce...
combined_dataset/train/non-malicious/sample_47_20.ps1
sample_47_20.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AMTPowerState { <# .Synopsis Returns the system power state .Description This Cmdlet returns the system power state from clients that have Intel Active Management Technology(AMT) firmware version 3.2 or higher. .Note...
combined_dataset/train/non-malicious/1109.ps1
1109.ps1
$appPoolName = 'CarbonTestUninstallAppPool' function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { Uninstall-IisAppPool -Name $appPoolName Assert-False (Test-IisAppPool -Name $appPoolName) } function Stop-Test { Unins...
combined_dataset/train/non-malicious/354.ps1
354.ps1
function Install-PSFLoggingProvider { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Install-PSFLoggingProvider')] Param ( [Alias('Provider', 'ProviderName')] [string] $Name, [switch] $EnableException ) dynamicparam { if ($Name -and ([PSFramework.Logging.Pro...
combined_dataset/train/non-malicious/sample_46_68.ps1
sample_46_68.ps1
# # Module manifest for module 'OCI.PSModules.Queue' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Queue.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/Send-Growl _1.0.ps1
Send-Growl _1.0.ps1
## This is the first version of a Growl module (just dot-source to use in PowerShell 1.0) ## Initially it only supports a very simple notice, and I haven't gotten callbacks working yet ## Coming soon: ## * Send notices to other PCs directly ## * Wrap the registration of new messages ## * Figure out the stupid ...
combined_dataset/train/non-malicious/1645.ps1
1645.ps1
$a1 = New-Object System.Collections.ArrayList $a2 = New-Object System.Collections.ArrayList $a3 = New-Object System.Collections.ArrayList $a4 = New-Object System.Collections.ArrayList $a5 = New-Object System.Collections.ArrayList $a6 = New-Object System.Collections.ArrayList $a7 = New-Object System.Collections.ArrayLis...
combined_dataset/train/non-malicious/sample_52_83.ps1
sample_52_83.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_33_45.ps1
sample_33_45.ps1
# # Script module for module 'Az.ManagedServiceIdentity' that is executed when 'Az.ManagedServiceIdentity' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 04/23/2024 13:01:41 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotN...
combined_dataset/train/non-malicious/sample_10_85.ps1
sample_10_85.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\browserslist@4.22.3\node_modules\browserslist\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\br...