full_path
stringlengths 31
232
| filename
stringlengths 4
167
| content
stringlengths 0
48.3M
|
---|---|---|
combined_dataset/train/non-malicious/Get-MACFromIP.ps1
|
Get-MACFromIP.ps1
|
Function Get-MACFromIP {
param ($IPAddress)
$sign = @"
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
public static class NetUtils
{
[System.Runtime.InteropServices.DllImport("iphlpapi.dll", ExactSpelling = true)]
static extern int SendARP(int DestIP, int SrcIP, byte[] pMacAddr, ref int PhyAddrLen);
public static string GetMacAddress(String addr)
{
try
{
IPAddress IPaddr = IPAddress.Parse(addr);
byte[] mac = new byte[6];
int L = 6;
SendARP(BitConverter.ToInt32(IPaddr.GetAddressBytes(), 0), 0, mac, ref L);
String macAddr = BitConverter.ToString(mac, 0, L);
return (macAddr.Replace('-',':'));
}
catch (Exception ex)
{
return (ex.Message);
}
}
}
"@
$type = Add-Type -TypeDefinition $sign -Language CSharp -PassThru
$type::GetMacAddress($IPAddress)
}
|
combined_dataset/train/non-malicious/finddupe_7.ps1
|
finddupe_7.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 = $hashAlgorithm.ComputeHash($stream);
$stream.Close();
## We have to be sure that we close the file stream if any exceptions are thrown.
trap
{
if ($stream -ne $null)
{
$stream.Close();
}
break;
}
foreach ($byte in $hashByteArray) { if ($byte -lt 16) {$result += “0{0:X}” -f $byte } else { $result += “{0:X}” -f $byte }}
return [string]$result;
}
write-host "Usage: finddupe.ps1 <directory/file #1> <directory/file #2> ... <directory/file #N> [-delete] [-noprompt]"
$matches = 0 # initialize number of matches for summary.
$files=$null
$del = $false # delete duplicates
$noprompt = $false # delete without prompting toggle
for ($i=0;$i -ne $args.count; $i++)
{
if ($args[$i] -eq "-delete")
{
$del=$true;continue
}
else
{
if ($args[$i] -eq "-noprompt")
{
$noprompt=$true;continue
}
else
{
$files+=(dir $args[$i] -recurse | ? {$_.psiscontainer -ne $true})
}
}
}
if ($files -eq $null) {write-host "No files found." -f red; exit}
$files | % {$_.fullname}
for ($i=0;$i -ne $files.count; $i++) # Cycle thru all files
{
if ($files[$i] -eq $null) {continue}
$md5 = $null
$filecheck = $files[$i]
$files[$i] = $null
for ($c=0;$c -ne $files.count; $c++)
{
if ($files[$c] -eq $null) {continue}
# write-host "Comparing $filecheck and $($files[$c]) `r" -nonewline
if ($filecheck.length -eq $files[$c].length)
{
#write-host "Comparing MD5 of $($filecheck.fullname) and $($files[$c].fullname) `r" -nonewline
if ($md5 -eq $null) {$md5 = (get-md5 $filecheck)}
if ($md5 -eq (get-md5 $files[$c]))
{
write-host "Size and MD5 match: " -fore red -nonewline
"{0} and {1}" -f $filecheck.fullname, $files[$c].fullname
$matches++
if ($del -eq $true)
{
if ($noprompt -eq $true)
{
del $files[$c].fullname;write-host "$($files[$c].fullname) deleted." -f Red
}
else
{
del $files[$c].fullname -confirm
}
}
$files[$c] = $null
}
}
}
}
write-host ""
write-host "Number of Files checked: $($files.count)." # Display useful info; files checked and matches found.
write-host "Number of matches found: $($matches)."
write-host ""
|
combined_dataset/train/non-malicious/Start-ProcessAsAdministr.ps1
|
Start-ProcessAsAdministr.ps1
|
function Start-ProcessAsAdministrator
{
<#
.ForwardHelpTargetName Start-Process
.ForwardHelpCategory Cmdlet
#>
[CmdletBinding(DefaultParameterSetName='Default')]
param(
[Parameter(Mandatory=$true, Position=0)]
[Alias('PSPath')]
[ValidateNotNullOrEmpty()]
[System.String]
$FilePath,
[Parameter(Position=1)]
[Alias('Args')]
[ValidateNotNullOrEmpty()]
[System.String[]]
$ArgumentList,
[Parameter(ParameterSetName='Default')]
[Alias('RunAs')]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[ValidateNotNullOrEmpty()]
[System.String]
$WorkingDirectory,
[Parameter(ParameterSetName='Default')]
[Alias('Lup')]
[Switch]
$LoadUserProfile,
[Parameter(ParameterSetName='Default')]
[Alias('nnw')]
[Switch]
$NoNewWindow,
[Switch]
$PassThru,
[Parameter(ParameterSetName='Default')]
[Alias('RSE')]
[ValidateNotNullOrEmpty()]
[System.String]
$RedirectStandardError,
[Parameter(ParameterSetName='Default')]
[Alias('RSI')]
[ValidateNotNullOrEmpty()]
[System.String]
$RedirectStandardInput,
[Parameter(ParameterSetName='Default')]
[Alias('RSO')]
[ValidateNotNullOrEmpty()]
[System.String]
$RedirectStandardOutput,
[Switch]
$Wait,
[Parameter(ParameterSetName='UseShellExecute')]
[ValidateNotNullOrEmpty()]
[System.Diagnostics.ProcessWindowStyle]
$WindowStyle,
[Parameter(ParameterSetName='Default')]
[Switch]
$UseNewEnvironment
)
process {
$psBoundParameters = $psBoundParameters += @{"Verb"="runas"}
Start-Process @psBoundParameters
}
}
|
combined_dataset/train/non-malicious/Deleted-ObjectsAD_2.ps1
|
Deleted-ObjectsAD_2.ps1
|
param(
$Domen,
[string[]]$ObjectsDeleted
)
function Ping ($Name){
$ping = new-object System.Net.NetworkInformation.Ping
if ($ping.send($Name).Status -eq "Success") {$True}
else {$False}
trap {Write-Verbose "Error Ping"; $False; continue}
}
[string[]]$ObjectPath
[string[]]$Disks
[string[]]$Info
[string[]]$Computers
$Computers = Get-QADComputer -Service $Domen -OSName '*XP*','*Vista*','*7*' -SizeLimit 0 -ErrorAction SilentlyContinue |
Select-Object name -ExpandProperty name
foreach ($Computer in $Computers){
$Alive = Ping $Computer
if ($Alive -eq "True"){
Write-Host "Seach $Computer" -BackgroundColor Blue
trap {Write-Host "Error WmiObject $Computer";Continue}
$Disks += Get-WmiObject win32_logicaldisk -ComputerName $Computer -ErrorAction SilentlyContinue |
Where-Object {$_.Size -ne $null}
if ($Disks){
foreach ($Disk in $Disks){
if ($Disk.Name -like "*:*") {
$Disk = $Disk.Name.Replace(":","$")
}
trap {Write-Host "Error ChildItem $Computer";Continue}
$ObjectPath += Get-ChildItem "\\\\$Computer\\$Disk\\*" -Recurse -ErrorAction SilentlyContinue
if ($ObjectPath){
foreach ($Object in $ObjectsDeleted){
$ObjectPath |
Where-Object {$_.Name -like $Object} |
% { $Path = $_.FullName;
Remove-Item $_.FullName -Recurse -Force -ErrorAction SilentlyContinue;
$Info += "" | Select-Object @{e={$Path};n='Path'},`
@{e={"Delete"};n='Action'}
}
}
}
}
}
}
}
$Info | Format-Table -AutoSize -ErrorAction SilentlyContinue
|
combined_dataset/train/non-malicious/4178.ps1
|
4178.ps1
|
cls
Set-Variable -Name App -Value $null
Set-Variable -Name File -Force
Set-Variable -Name GUID -Force
Set-Variable -Name RelativePath -Scope Global -Force
$MissingGUIDs = @()
Function GetRelativePath {
$Global:RelativePath=(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)+"\"
}
GetRelativePath
$File = Import-Csv -Header GUID1 $Global:RelativePath"GUIDs.txt"
Foreach ($GUID in $File) {
$App = Get-WmiObject win32_product | Where-Object {$_.IdentifyingNumber -match $GUID.GUID1}
$App
If ($App.Name -like "") {
$MissingGUIDs += $GUID.GUID1
}
$App = $null
}
Write-Host
Write-Host "Missing GUIDs"
Write-Host "-------------"
$MissingGUIDs
Remove-Variable -Name App -Force
Remove-Variable -Name File -Force
Remove-Variable -Name GUID -Force
Remove-Variable -Name MissingGUIDs -Force
Remove-Variable -Name RelativePath -Scope Global -Force
|
combined_dataset/train/non-malicious/de04269d-38ca-4bb2-8559-9bd6072c319f.ps1
|
de04269d-38ca-4bb2-8559-9bd6072c319f.ps1
|
#==========================================================================
# NAME: getunknownsids.ps1
#
# AUTHOR: Stephen Wheet
# Version: 4.0
# Date: 6/11/10
#
# COMMENT:
# This script was created to find unknown SIDs or old domain permissions
# on folders. It ignores folders where inheirtance is turned on.
#
# This works on NETAPPS and WINDOWS servers. You will need the DLL's
#
# Version 2: completely changed the query method and ACL removal
# Version 3: Added ability to query AD for servers, and handles getting
# getting shares automatically from:
# NETAPP FILERS
# Windows servers
# Version 4: Cleaned up folder checking and added checking for local
# account checking so we could ignore.
#
#==========================================================================
Function checkshare {
Param($PassedShareName)
Process
{
$path = "\\\\$serverFQDN\\$PassedShareName"
$filename = $path.Replace("\\","-") + ".csv"
#Place Headers on out-put file
$list = "Task,Path,Access Entity,"
$list | format-table | Out-File "c:\\reports\\unknownsids\\$filename"
#Populate Folders Array
Write-Host "Writing results to : $filename"
$date = Get-Date
Write-Host $date
Write-Host "Getting Folders in: $Path"
#PSIscontainer means folders only
[Array] $folders = Get-ChildItem -path $path -recurse | ? {$_.PSIsContainer}
#Process data in array
ForEach ($folder in [Array] $folders)
{
#Check to see if there are any folders
If ($folder.pspath){
#Convert Powershell Provider Folder Path to standard folder path
$PSPath = (Convert-Path $folder.pspath)
Write-Host "Checking Dir: $PSPath"
#Check to make sure valid
If ($PSPath){
#Get the ACL's from each folder
$error.clear()
$acl = Get-Acl -Path $PSPath
#Write log if no access
if (!$?) {
$errmsg = "Error,$PSPath,ACCESS DENIED"
$errmsg | format-table | Out-File -append "$filename"
} #end IF
$ACL.Access |
?{!$_.IsInherited} |
?{ $_.IdentityReference -like $unknownsid -or $_.IdentityReference -like $olddomain } |
% {$value = $_.IdentityReference.Value
#Check for Local account
$localsid = 0
If ($value -like $unknownsid){
$checkforlocal = $value.split("-")
$total =$checkforlocal.count -1
@@ if ($checkforlocal[$total] -match "^100.$" -or $checkforlocal[$total] -match "^500"){
$localsid = 1
# You can uncomment the below if you want to report on local accounts.
#$list = ("Local,$PSPath,$value")
#$list | format-table | Out-File -append "$filename"
} #end IF
} #end IF
If (!$localsid){
Write-host "Found - $PSPath - $value"
$list = ("Found,$PSPath,$value")
$list | format-table | Out-File -append "$filename"
#Remove Bad SID
if ($removeacl) { $ACL.RemoveAccessRuleSpecific($_)
Write-host "Deleting - $PSPath - $value"
$list = ("Deleting,$PSPath,$value")
$list | format-table | Out-File -append "$filename"
}#end IF
if ($removeacl -and $value) {
$date = Get-Date
Write-Host $date
Write-host "Setting - $PSPath"
$list = ("Setting,$PSPath")
$list | format-table | Out-File -append "$filename"
Set-ACL $PSpath $ACL
$value = ""
} #end IF
} #end if
} #end foreachobj
} #end if
} #end if
} #end ForEach
}#end Process
} #end function
get-pssnapin -registered | add-pssnapin -passthru
[void][Reflection.Assembly]::LoadFile('C:\\reports\\ManageOntap.dll') #Need this DLL from netapp 3.5SDK
$ReqVersion = [version]"1.2.2.1254"
$QadVersion = (Get-PSSnapin Quest.ActiveRoles.ADManagement).Version #Need Quest plugins installed
if($QadVersion -lt $ReqVersion) {
throw "Quest AD cmdlets version '$ReqVersion' is required. Please download the latest version"
} #end If
#Set variables
$value = ""
$unknownsid = "*S-1-5-21-*" #Broken SID Verify the Broken SID number on your system and replace
$olddomain = "Domain.local*" #Old w2k/nt4 domain
$ErrorActionPreference = "SilentlyContinue"
$removeacl = 0 #change to 1 if you want to remove the SID, 0 for only logging
$localsid = 0
#Get all the servers from the specified OU
$Servers = get-QADComputer -SearchRoot 'domain.local/ou/Server' # change the container.
Foreach ($server in $Servers ) {
$serverFQDN = $server.dnsname
write-host $serverFQDN
#Test ping server to make sure it's up before querying it
$ping = new-object System.Net.NetworkInformation.Ping
$Reply = $ping.Send($serverFQDN)
if ($Reply.status -eq "Success"){
Write-Host "Online"
#Check for Netapp .. if found get the shares differently
If ($serverFQDN -like "*netapp*"){
$server = new-object netapp.manage.naserver($serverFQDN,1,0)
#pass authentication
$server.Style = "RPC"
# Issue command to get the shares
$NaElement = New-Object NetApp.Manage.NaElement("system-cli")
$arg = New-Object NetApp.Manage.NaElement("args")
$arg.AddNewChild('arg','cifs')
$arg.AddNewChild('arg','shares')
$NaElement.AddChildElement($arg)
$CifsString = $server.InvokeElem($NaElement).GetChildContent("cli-output")
# Split the returned txt up .. the $null makes it skip a line
$null,$null,$Lines = $CifsString.Split("`n")
Foreach ($line in $Lines ) {
# Had to trick it so skip the line with permissions, then exclude ETC$ adn c$
if (!$line.startswith(" ") -and $line -notlike "*Etc$*" -and $line -notlike "*C$*"){
$l= $line.Split(" ")
checkshare -PassedShareName $l[0] #Pass share to function
} #end if
} #end foreach
} #end if
Else{ #Else if a Windows server query via WMI
Get-WMIObject Win32_Share -Computer $serverFQDN |
where {$_.Name -like "*$*" -and $_.Name -notlike "*ADMIN*" -and $_.Name -notlike "*IPC*" -and $_.Name -notlike "*lib*"} |
%{
#Set path
$sharename = $_.name
checkshare -PassedShareName $sharename #Pass share to function
} #end ForEachObj
} #End Else
} #End If
} #end ForEach
|
combined_dataset/train/non-malicious/sample_24_44.ps1
|
sample_24_44.ps1
|
#
# Module manifest for module 'OCI.PSModules.Servicemanagerproxy'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Servicemanagerproxy.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = '01ac6ca4-c358-4958-baf9-455f6dd1de04'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Servicemanagerproxy Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.1.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Servicemanagerproxy.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIServicemanagerproxyServiceEnvironment',
'Get-OCIServicemanagerproxyServiceEnvironmentsList'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Servicemanagerproxy'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/Shell.ShellLink.ps1
|
Shell.ShellLink.ps1
|
## With thanks to Steve McMahon and his article:
## http://vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp
##
## After executing Add-Type, below, you'll be able to:
## new-object Shell.ShellLink ".\\Some Shortcut.lnk"
Add-Type -Ref System.Drawing, System.Windows.Forms @'
using System;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace Shell
{
/// <summary>
/// Enables extraction of icons for any file type from
/// the Shell.
/// </summary>
public class FileIcon
{
#region UnmanagedCode
private const int MAX_PATH = 260;
[StructLayout(LayoutKind.Sequential)]
private struct SHFILEINFO
{
public IntPtr hIcon;
public int iIcon;
public int dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=MAX_PATH)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)]
public string szTypeName;
}
[DllImport("shell32")]
private static extern int SHGetFileInfo (
string pszPath,
int dwFileAttributes,
ref SHFILEINFO psfi,
uint cbFileInfo,
uint uFlags);
[DllImport("user32.dll")]
private static extern int DestroyIcon(IntPtr hIcon);
private const int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x100;
private const int FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x2000;
private const int FORMAT_MESSAGE_FROM_HMODULE = 0x800;
private const int FORMAT_MESSAGE_FROM_STRING = 0x400;
private const int FORMAT_MESSAGE_FROM_SYSTEM = 0x1000;
private const int FORMAT_MESSAGE_IGNORE_INSERTS = 0x200;
private const int FORMAT_MESSAGE_MAX_WIDTH_MASK = 0xFF;
[DllImport("kernel32")]
private extern static int FormatMessage (
int dwFlags,
IntPtr lpSource,
int dwMessageId,
int dwLanguageId,
string lpBuffer,
uint nSize,
int argumentsLong);
[DllImport("kernel32")]
private extern static int GetLastError();
#endregion
#region Member Variables
private string fileName;
private string displayName;
private string typeName;
private SHGetFileInfoConstants flags;
private Icon fileIcon;
#endregion
#region Enumerations
[Flags]
public enum SHGetFileInfoConstants : int
{
SHGFI_ICON = 0x100, // get icon
SHGFI_DISPLAYNAME = 0x200, // get display name
SHGFI_TYPENAME = 0x400, // get type name
SHGFI_ATTRIBUTES = 0x800, // get attributes
SHGFI_ICONLOCATION = 0x1000, // get icon location
SHGFI_EXETYPE = 0x2000, // return exe type
SHGFI_SYSICONINDEX = 0x4000, // get system icon index
SHGFI_LINKOVERLAY = 0x8000, // put a link overlay on icon
SHGFI_SELECTED = 0x10000, // show icon in selected state
SHGFI_ATTR_SPECIFIED = 0x20000, // get only specified attributes
SHGFI_LARGEICON = 0x0, // get large icon
SHGFI_SMALLICON = 0x1, // get small icon
SHGFI_OPENICON = 0x2, // get open icon
SHGFI_SHELLICONSIZE = 0x4, // get shell size icon
//SHGFI_PIDL = 0x8, // pszPath is a pidl
SHGFI_USEFILEATTRIBUTES = 0x10, // use passed dwFileAttribute
SHGFI_ADDOVERLAYS = 0x000000020, // apply the appropriate overlays
SHGFI_OVERLAYINDEX = 0x000000040 // Get the index of the overlay
}
#endregion
#region Implementation
/// <summary>
/// Gets/sets the flags used to extract the icon
/// </summary>
public FileIcon.SHGetFileInfoConstants Flags
{
get
{
return flags;
}
set
{
flags = value;
}
}
/// <summary>
/// Gets/sets the filename to get the icon for
/// </summary>
public string FileName
{
get
{
return fileName;
}
set
{
fileName = value;
}
}
/// <summary>
/// Gets the icon for the chosen file
/// </summary>
public Icon ShellIcon
{
get
{
return fileIcon;
}
}
/// <summary>
/// Gets the display name for the selected file
/// if the SHGFI_DISPLAYNAME flag was set.
/// </summary>
public string DisplayName
{
get
{
return displayName;
}
}
/// <summary>
/// Gets the type name for the selected file
/// if the SHGFI_TYPENAME flag was set.
/// </summary>
public string TypeName
{
get
{
return typeName;
}
}
/// <summary>
/// Gets the information for the specified
/// file name and flags.
/// </summary>
public void GetInfo()
{
fileIcon = null;
typeName = "";
displayName = "";
SHFILEINFO shfi = new SHFILEINFO();
uint shfiSize = (uint)Marshal.SizeOf(shfi.GetType());
int ret = SHGetFileInfo(
fileName, 0, ref shfi, shfiSize, (uint)(flags));
if (ret != 0)
{
if (shfi.hIcon != IntPtr.Zero)
{
fileIcon = System.Drawing.Icon.FromHandle(shfi.hIcon);
// Now owned by the GDI+ object
//DestroyIcon(shfi.hIcon);
}
typeName = shfi.szTypeName;
displayName = shfi.szDisplayName;
}
else
{
int err = GetLastError();
Console.WriteLine("Error {0}", err);
string txtS = new string('\\0', 256);
int len = FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
IntPtr.Zero, err, 0, txtS, 256, 0);
Console.WriteLine("Len {0} text {1}", len, txtS);
// throw exception
}
}
/// <summary>
/// Constructs a new, default instance of the FileIcon
/// class. Specify the filename and call GetInfo()
/// to retrieve an icon.
/// </summary>
public FileIcon()
{
flags = SHGetFileInfoConstants.SHGFI_ICON |
SHGetFileInfoConstants.SHGFI_DISPLAYNAME |
SHGetFileInfoConstants.SHGFI_TYPENAME |
SHGetFileInfoConstants.SHGFI_ATTRIBUTES |
SHGetFileInfoConstants.SHGFI_EXETYPE;
}
/// <summary>
/// Constructs a new instance of the FileIcon class
/// and retrieves the icon, display name and type name
/// for the specified file.
/// </summary>
/// <param name="fileName">The filename to get the icon,
/// display name and type name for</param>
public FileIcon(string fileName) : this()
{
this.fileName = fileName;
GetInfo();
}
/// <summary>
/// Constructs a new instance of the FileIcon class
/// and retrieves the information specified in the
/// flags.
/// </summary>
/// <param name="fileName">The filename to get information
/// for</param>
/// <param name="flags">The flags to use when extracting the
/// icon and other shell information.</param>
public FileIcon(string fileName, FileIcon.SHGetFileInfoConstants flags)
{
this.fileName = fileName;
this.flags = flags;
GetInfo();
}
#endregion
}
#region ShellLink Object
/// <summary>
/// Summary description for ShellLink.
/// </summary>
public class ShellLink : IDisposable
{
#region ComInterop for IShellLink
#region IPersist Interface
[ComImportAttribute()]
[GuidAttribute("0000010C-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
private interface IPersist
{
[PreserveSig]
//[helpstring("Returns the class identifier for the component object")]
void GetClassID(out Guid pClassID);
}
#endregion
#region IPersistFile Interface
[ComImportAttribute()]
[GuidAttribute("0000010B-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
private interface IPersistFile
{
// can't get this to go if I extend IPersist, so put it here:
[PreserveSig]
void GetClassID(out Guid pClassID);
//[helpstring("Checks for changes since last file write")]
void IsDirty();
//[helpstring("Opens the specified file and initializes the object from its contents")]
void Load(
[MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
uint dwMode);
//[helpstring("Saves the object into the specified file")]
void Save(
[MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
[MarshalAs(UnmanagedType.Bool)] bool fRemember);
//[helpstring("Notifies the object that save is completed")]
void SaveCompleted(
[MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
//[helpstring("Gets the current name of the file associated with the object")]
void GetCurFile(
[MarshalAs(UnmanagedType.LPWStr)] out string ppszFileName);
}
#endregion
#region IShellLink Interface
[ComImportAttribute()]
[GuidAttribute("000214EE-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
private interface IShellLinkA
{
//[helpstring("Retrieves the path and filename of a shell link object")]
void GetPath(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszFile,
int cchMaxPath,
ref _WIN32_FIND_DATAA pfd,
uint fFlags);
//[helpstring("Retrieves the list of shell link item identifiers")]
void GetIDList(out IntPtr ppidl);
//[helpstring("Sets the list of shell link item identifiers")]
void SetIDList(IntPtr pidl);
//[helpstring("Retrieves the shell link description string")]
void GetDescription(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszFile,
int cchMaxName);
//[helpstring("Sets the shell link description string")]
void SetDescription(
[MarshalAs(UnmanagedType.LPStr)] string pszName);
//[helpstring("Retrieves the name of the shell link working directory")]
void GetWorkingDirectory(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszDir,
int cchMaxPath);
//[helpstring("Sets the name of the shell link working directory")]
void SetWorkingDirectory(
[MarshalAs(UnmanagedType.LPStr)] string pszDir);
//[helpstring("Retrieves the shell link command-line arguments")]
void GetArguments(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszArgs,
int cchMaxPath);
//[helpstring("Sets the shell link command-line arguments")]
void SetArguments(
[MarshalAs(UnmanagedType.LPStr)] string pszArgs);
//[propget, helpstring("Retrieves or sets the shell link hot key")]
void GetHotkey(out short pwHotkey);
//[propput, helpstring("Retrieves or sets the shell link hot key")]
void SetHotkey(short pwHotkey);
//[propget, helpstring("Retrieves or sets the shell link show command")]
void GetShowCmd(out uint piShowCmd);
//[propput, helpstring("Retrieves or sets the shell link show command")]
void SetShowCmd(uint piShowCmd);
//[helpstring("Retrieves the location (path and index) of the shell link icon")]
void GetIconLocation(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszIconPath,
int cchIconPath,
out int piIcon);
//[helpstring("Sets the location (path and index) of the shell link icon")]
void SetIconLocation(
[MarshalAs(UnmanagedType.LPStr)] string pszIconPath,
int iIcon);
//[helpstring("Sets the shell link relative path")]
void SetRelativePath(
[MarshalAs(UnmanagedType.LPStr)] string pszPathRel,
uint dwReserved);
//[helpstring("Resolves a shell link. The system searches for the shell link object and updates the shell link path and its list of identifiers (if necessary)")]
void Resolve(
IntPtr hWnd,
uint fFlags);
//[helpstring("Sets the shell link path and filename")]
void SetPath(
[MarshalAs(UnmanagedType.LPStr)] string pszFile);
}
[ComImportAttribute()]
[GuidAttribute("000214F9-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
private interface IShellLinkW
{
//[helpstring("Retrieves the path and filename of a shell link object")]
void GetPath(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile,
int cchMaxPath,
ref _WIN32_FIND_DATAW pfd,
uint fFlags);
//[helpstring("Retrieves the list of shell link item identifiers")]
void GetIDList(out IntPtr ppidl);
//[helpstring("Sets the list of shell link item identifiers")]
void SetIDList(IntPtr pidl);
//[helpstring("Retrieves the shell link description string")]
void GetDescription(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile,
int cchMaxName);
//[helpstring("Sets the shell link description string")]
void SetDescription(
[MarshalAs(UnmanagedType.LPWStr)] string pszName);
//[helpstring("Retrieves the name of the shell link working directory")]
void GetWorkingDirectory(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir,
int cchMaxPath);
//[helpstring("Sets the name of the shell link working directory")]
void SetWorkingDirectory(
[MarshalAs(UnmanagedType.LPWStr)] string pszDir);
//[helpstring("Retrieves the shell link command-line arguments")]
void GetArguments(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs,
int cchMaxPath);
//[helpstring("Sets the shell link command-line arguments")]
void SetArguments(
[MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
//[propget, helpstring("Retrieves or sets the shell link hot key")]
void GetHotkey(out short pwHotkey);
//[propput, helpstring("Retrieves or sets the shell link hot key")]
void SetHotkey(short pwHotkey);
//[propget, helpstring("Retrieves or sets the shell link show command")]
void GetShowCmd(out uint piShowCmd);
//[propput, helpstring("Retrieves or sets the shell link show command")]
void SetShowCmd(uint piShowCmd);
//[helpstring("Retrieves the location (path and index) of the shell link icon")]
void GetIconLocation(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath,
int cchIconPath,
out int piIcon);
//[helpstring("Sets the location (path and index) of the shell link icon")]
void SetIconLocation(
[MarshalAs(UnmanagedType.LPWStr)] string pszIconPath,
int iIcon);
//[helpstring("Sets the shell link relative path")]
void SetRelativePath(
[MarshalAs(UnmanagedType.LPWStr)] string pszPathRel,
uint dwReserved);
//[helpstring("Resolves a shell link. The system searches for the shell link object and updates the shell link path and its list of identifiers (if necessary)")]
void Resolve(
IntPtr hWnd,
uint fFlags);
//[helpstring("Sets the shell link path and filename")]
void SetPath(
[MarshalAs(UnmanagedType.LPWStr)] string pszFile);
}
#endregion
#region ShellLinkCoClass
[GuidAttribute("00021401-0000-0000-C000-000000000046")]
[ClassInterfaceAttribute(ClassInterfaceType.None)]
[ComImportAttribute()]
private class CShellLink{}
#endregion
#region Private IShellLink enumerations
private enum EShellLinkGP : uint
{
SLGP_SHORTPATH = 1,
SLGP_UNCPRIORITY = 2
}
[Flags]
private enum EShowWindowFlags : uint
{
SW_HIDE = 0,
SW_SHOWNORMAL = 1,
SW_NORMAL = 1,
SW_SHOWMINIMIZED = 2,
SW_SHOWMAXIMIZED = 3,
SW_MAXIMIZE = 3,
SW_SHOWNOACTIVATE = 4,
SW_SHOW = 5,
SW_MINIMIZE = 6,
SW_SHOWMINNOACTIVE = 7,
SW_SHOWNA = 8,
SW_RESTORE = 9,
SW_SHOWDEFAULT = 10,
SW_MAX = 10
}
#endregion
#region IShellLink Private structs
[StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Unicode)]
private struct _WIN32_FIND_DATAW
{
public uint dwFileAttributes;
public _FILETIME ftCreationTime;
public _FILETIME ftLastAccessTime;
public _FILETIME ftLastWriteTime;
public uint nFileSizeHigh;
public uint nFileSizeLow;
public uint dwReserved0;
public uint dwReserved1;
[MarshalAs(UnmanagedType.ByValTStr , SizeConst = 260)] // MAX_PATH
public string cFileName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string cAlternateFileName;
}
[StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)]
private struct _WIN32_FIND_DATAA
{
public uint dwFileAttributes;
public _FILETIME ftCreationTime;
public _FILETIME ftLastAccessTime;
public _FILETIME ftLastWriteTime;
public uint nFileSizeHigh;
public uint nFileSizeLow;
public uint dwReserved0;
public uint dwReserved1;
[MarshalAs(UnmanagedType.ByValTStr , SizeConst = 260)] // MAX_PATH
public string cFileName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string cAlternateFileName;
}
[StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0)]
private struct _FILETIME
{
public uint dwLowDateTime;
public uint dwHighDateTime;
}
#endregion
#region UnManaged Methods
private class UnManagedMethods
{
[DllImport("Shell32", CharSet=CharSet.Auto)]
internal extern static int ExtractIconEx (
[MarshalAs(UnmanagedType.LPTStr)]
string lpszFile,
int nIconIndex,
IntPtr[] phIconLarge,
IntPtr[] phIconSmall,
int nIcons);
[DllImport("user32")]
internal static extern int DestroyIcon(IntPtr hIcon);
}
#endregion
#endregion
#region Enumerations
/// <summary>
/// Flags determining how the links with missing
/// targets are resolved.
/// </summary>
[Flags]
public enum EShellLinkResolveFlags : uint
{
/// <summary>
/// Allow any match during resolution. Has no effect
/// on ME/2000 or above, use the other flags instead.
/// </summary>
SLR_ANY_MATCH = 0x2,
/// <summary>
/// Call the Microsoft Windows Installer.
/// </summary>
SLR_INVOKE_MSI = 0x80,
/// <summary>
/// Disable distributed link tracking. By default,
/// distributed link tracking tracks removable media
/// across multiple devices based on the volume name.
/// It also uses the UNC path to track remote file
/// systems whose drive letter has changed. Setting
/// SLR_NOLINKINFO disables both types of tracking.
/// </summary>
SLR_NOLINKINFO = 0x40,
/// <summary>
/// Do not display a dialog box if the link cannot be resolved.
/// When SLR_NO_UI is set, a time-out value that specifies the
/// maximum amount of time to be spent resolving the link can
/// be specified in milliseconds. The function returns if the
/// link cannot be resolved within the time-out duration.
/// If the timeout is not set, the time-out duration will be
/// set to the default value of 3,000 milliseconds (3 seconds).
/// </summary>
SLR_NO_UI = 0x1,
/// <summary>
/// Not documented in SDK. Assume same as SLR_NO_UI but
/// intended for applications without a hWnd.
/// </summary>
SLR_NO_UI_WITH_MSG_PUMP = 0x101,
/// <summary>
/// Do not update the link information.
/// </summary>
SLR_NOUPDATE = 0x8,
/// <summary>
/// Do not execute the search heuristics.
/// </summary>
SLR_NOSEARCH = 0x10,
/// <summary>
/// Do not use distributed link tracking.
/// </summary>
SLR_NOTRACK = 0x20,
/// <summary>
/// If the link object has changed, update its path and list
/// of identifiers. If SLR_UPDATE is set, you do not need to
/// call IPersistFile::IsDirty to determine whether or not
/// the link object has changed.
/// </summary>
SLR_UPDATE = 0x4
}
public enum LinkDisplayMode : uint
{
edmNormal = EShowWindowFlags.SW_NORMAL,
edmMinimized = EShowWindowFlags.SW_SHOWMINNOACTIVE,
edmMaximized = EShowWindowFlags.SW_MAXIMIZE
}
#endregion
#region Member Variables
// Use Unicode (W) under NT, otherwise use ANSI
private IShellLinkW linkW;
private IShellLinkA linkA;
private string shortcutFile = "";
#endregion
#region Constructor
/// <summary>
/// Creates an instance of the Shell Link object.
/// </summary>
public ShellLink()
{
if (System.Environment.OSVersion.Platform == PlatformID.Win32NT)
{
linkW = (IShellLinkW)new CShellLink();
}
else
{
linkA = (IShellLinkA)new CShellLink();
}
}
/// <summary>
/// Creates an instance of a Shell Link object
/// from the specified link file
/// </summary>
/// <param name="linkFile">The Shortcut file to open</param>
public ShellLink(string linkFile) : this()
{
Open(linkFile);
}
#endregion
#region Destructor and Dispose
/// <summary>
/// Call dispose just in case it hasn't happened yet
/// </summary>
~ShellLink()
{
Dispose();
}
/// <summary>
/// Dispose the object, releasing the COM ShellLink object
/// </summary>
public void Dispose()
{
if (linkW != null )
{
Marshal.ReleaseComObject(linkW);
linkW = null;
}
if (linkA != null)
{
Marshal.ReleaseComObject(linkA);
linkA = null;
}
}
#endregion
#region Implementation
public string ShortCutFile
{
get
{
return this.shortcutFile;
}
set
{
this.shortcutFile = value;
}
}
/// <summary>
/// Gets a System.Drawing.Icon containing the icon for this
/// ShellLink object.
/// </summary>
private Icon getIcon(bool large)
{
// Get icon index and path:
int iconIndex = 0;
// If there are no details set for the icon, then we must use
// the shell to get the icon for the target:
if (String.IsNullOrEmpty(IconPath))
{
// Use the FileIcon object to get the icon:
FileIcon.SHGetFileInfoConstants flags =
FileIcon.SHGetFileInfoConstants.SHGFI_ICON |
FileIcon.SHGetFileInfoConstants.SHGFI_ATTRIBUTES;
if (large)
{
flags = flags | FileIcon.SHGetFileInfoConstants.SHGFI_LARGEICON;
}
else
{
flags = flags | FileIcon.SHGetFileInfoConstants.SHGFI_SMALLICON;
}
FileIcon fileIcon = new FileIcon(Target, flags);
return fileIcon.ShellIcon;
}
else
{
// Use ExtractIconEx to get the icon:
IntPtr[] hIconEx = new IntPtr[1] {IntPtr.Zero};
int iconCount = 0;
if (large)
{
iconCount = UnManagedMethods.ExtractIconEx(
IconPath,
iconIndex,
hIconEx,
null,
1);
}
else
{
iconCount = UnManagedMethods.ExtractIconEx(
IconPath,
iconIndex,
null,
hIconEx,
1);
}
// If success then return as a GDI+ object
Icon icon = null;
if (hIconEx[0] != IntPtr.Zero)
{
icon = Icon.FromHandle(hIconEx[0]);
//UnManagedMethods.DestroyIcon(hIconEx[0]);
}
return icon;
}
}
/// <summary>
/// Gets the path to the file containing the icon for this shortcut.
/// </summary>
public string IconPath
{
get
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out iconIndex);
}
if(iconIndex > 0) {
iconPath.AppendFormat(",{0}",iconIndex);
}
return iconPath.ToString();
}
set
{
StringBuilder iconPath = new StringBuilder(260, 260);
String iconLocation = String.Empty;
int iconIndex = 0;
String[] oldPath = Regex.Split(value, ",(?=\\\\d+$)");
if(oldPath.Length > 1) {
iconLocation = oldPath[0];
iconIndex = Int32.Parse(oldPath[1]);
} else {
iconLocation = value;
}
if(iconIndex == 0) {
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out iconIndex);
}
if(!iconLocation.Equals(iconPath.ToString(), StringComparison.InvariantCulture)) {
iconIndex = 0;
}
}
if (linkA == null)
{
linkW.SetIconLocation(iconLocation, iconIndex);
}
else
{
linkA.SetIconLocation(iconLocation, iconIndex);
}
}
}
/// <summary>
/// Gets the index of this icon within the icon path's resources
/// </summary>
public int IconIndex
{
get
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
return iconIndex;
}
set
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
if (linkA == null)
{
linkW.SetIconLocation(iconPath.ToString(), value);
}
else
{
linkA.SetIconLocation(iconPath.ToString(), value);
}
}
}
/// <summary>
/// Gets/sets the fully qualified path to the link's target
/// </summary>
public string Target
{
get
{
StringBuilder target = new StringBuilder(260, 260);
if (linkA == null)
{
_WIN32_FIND_DATAW fd = new _WIN32_FIND_DATAW();
linkW.GetPath(target, target.Capacity, ref fd,
(uint)EShellLinkGP.SLGP_UNCPRIORITY);
}
else
{
_WIN32_FIND_DATAA fd = new _WIN32_FIND_DATAA();
linkA.GetPath(target, target.Capacity, ref fd,
(uint)EShellLinkGP.SLGP_UNCPRIORITY);
}
return target.ToString();
}
set
{
if (linkA == null)
{
linkW.SetPath(value);
}
else
{
linkA.SetPath(value);
}
}
}
/// <summary>
/// Gets/sets the Working Directory for the Link
/// </summary>
public string WorkingDirectory
{
get
{
StringBuilder path = new StringBuilder(260, 260);
if (linkA == null)
{
linkW.GetWorkingDirectory(path, path.Capacity);
}
else
{
linkA.GetWorkingDirectory(path, path.Capacity);
}
return path.ToString();
}
set
{
if (linkA == null)
{
linkW.SetWorkingDirectory(value);
}
else
{
linkA.SetWorkingDirectory(value);
}
}
}
/// <summary>
/// Gets/sets the description of the link
/// </summary>
public string Description
{
get
{
StringBuilder description = new StringBuilder(1024, 1024);
if (linkA == null)
{
linkW.GetDescription(description, description.Capacity);
}
else
{
linkA.GetDescription(description, description.Capacity);
}
return description.ToString();
}
set
{
if (linkA == null)
{
linkW.SetDescription(value);
}
else
{
linkA.SetDescription(value);
}
}
}
/// <summary>
/// Gets/sets any command line arguments associated with the link
/// </summary>
public string Arguments
{
get
{
StringBuilder arguments = new StringBuilder(260, 260);
if (linkA == null)
{
linkW.GetArguments(arguments, arguments.Capacity);
}
else
{
linkA.GetArguments(arguments, arguments.Capacity);
}
return arguments.ToString();
}
set
{
if (linkA == null)
{
linkW.SetArguments(value);
}
else
{
linkA.SetArguments(value);
}
}
}
/// <summary>
/// Gets/sets the initial display mode when the shortcut is
/// run
/// </summary>
public LinkDisplayMode DisplayMode
{
get
{
uint cmd = 0;
if (linkA == null)
{
linkW.GetShowCmd(out cmd);
}
else
{
linkA.GetShowCmd(out cmd);
}
return (LinkDisplayMode)cmd;
}
set
{
if (linkA == null)
{
linkW.SetShowCmd((uint)value);
}
else
{
linkA.SetShowCmd((uint)value);
}
}
}
/// <summary>
/// Gets/sets the HotKey to start the shortcut (if any)
/// </summary>
public Keys HotKey
{
get
{
short key = 0;
if (linkA == null)
{
linkW.GetHotkey(out key);
}
else
{
linkA.GetHotkey(out key);
}
return (Keys)key;
}
set
{
if (linkA == null)
{
linkW.SetHotkey((short)value);
}
else
{
linkA.SetHotkey((short)value);
}
}
}
/// <summary>
/// Saves the shortcut to ShortCutFile.
/// </summary>
public void Save()
{
Save(shortcutFile);
}
/// <summary>
/// Saves the shortcut to the specified file
/// </summary>
/// <param name="linkFile">The shortcut file (.lnk)</param>
public void Save( string linkFile )
{
// Save the object to disk
if (linkA == null)
{
((IPersistFile)linkW).Save(linkFile, true);
shortcutFile = linkFile;
}
else
{
((IPersistFile)linkA).Save(linkFile, true);
shortcutFile = linkFile;
}
}
/// <summary>
/// Loads a shortcut from the specified file
/// </summary>
/// <param name="linkFile">The shortcut file (.lnk) to load</param>
public void Open(
string linkFile
)
{
Open(linkFile,
IntPtr.Zero,
(EShellLinkResolveFlags.SLR_ANY_MATCH |
EShellLinkResolveFlags.SLR_NO_UI),
1);
}
/// <summary>
/// Loads a shortcut from the specified file, and allows flags controlling
/// the UI behaviour if the shortcut's target isn't found to be set.
/// </summary>
/// <param name="linkFile">The shortcut file (.lnk) to load</param>
/// <param name="hWnd">The window handle of the application's UI, if any</param>
/// <param name="resolveFlags">Flags controlling resolution behaviour</param>
public void Open(
string linkFile,
IntPtr hWnd,
EShellLinkResolveFlags resolveFlags
)
{
Open(linkFile,
hWnd,
resolveFlags,
1);
}
/// <summary>
/// Loads a shortcut from the specified file, and allows flags controlling
/// the UI behaviour if the shortcut's target isn't found to be set. If
/// no SLR_NO_UI is specified, you can also specify a timeout.
/// </summary>
/// <param name="linkFile">The shortcut file (.lnk) to load</param>
/// <param name="hWnd">The window handle of the application's UI, if any</param>
/// <param name="resolveFlags">Flags controlling resolution behaviour</param>
/// <param name="timeOut">Timeout if SLR_NO_UI is specified, in ms.</param>
public void Open(
string linkFile,
IntPtr hWnd,
EShellLinkResolveFlags resolveFlags,
ushort timeOut
)
{
uint flags;
if ((resolveFlags & EShellLinkResolveFlags.SLR_NO_UI)
== EShellLinkResolveFlags.SLR_NO_UI)
{
flags = (uint)((int)resolveFlags | (timeOut << 16));
}
else
{
flags = (uint)resolveFlags;
}
if (linkA == null)
{
((IPersistFile)linkW).Load(linkFile, 0); //STGM_DIRECT)
linkW.Resolve(hWnd, flags);
this.shortcutFile = linkFile;
}
else
{
((IPersistFile)linkA).Load(linkFile, 0); //STGM_DIRECT)
linkA.Resolve(hWnd, flags);
this.shortcutFile = linkFile;
}
}
#endregion
}
#endregion
}
'@
|
combined_dataset/train/non-malicious/sample_53_65.ps1
|
sample_53_65.ps1
|
#
# Module manifest for module 'OCI.PSModules.Dataflow'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dataflow.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = '60441277-1663-4d77-af11-39ab99c7ac41'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Dataflow Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '82.0.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Dataflow.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIDataflowApplication', 'Get-OCIDataflowApplicationsList',
'Get-OCIDataflowPool', 'Get-OCIDataflowPoolsList',
'Get-OCIDataflowPrivateEndpoint',
'Get-OCIDataflowPrivateEndpointsList', 'Get-OCIDataflowRun',
'Get-OCIDataflowRunLog', 'Get-OCIDataflowRunLogsList',
'Get-OCIDataflowRunsList', 'Get-OCIDataflowSqlEndpoint',
'Get-OCIDataflowSqlEndpointsList', 'Get-OCIDataflowStatement',
'Get-OCIDataflowStatementsList', 'Get-OCIDataflowWorkRequest',
'Get-OCIDataflowWorkRequestErrorsList',
'Get-OCIDataflowWorkRequestLogsList',
'Get-OCIDataflowWorkRequestsList',
'Move-OCIDataflowApplicationCompartment',
'Move-OCIDataflowPoolCompartment',
'Move-OCIDataflowPrivateEndpointCompartment',
'Move-OCIDataflowRunCompartment',
'Move-OCIDataflowSqlEndpointCompartment',
'New-OCIDataflowApplication', 'New-OCIDataflowPool',
'New-OCIDataflowPrivateEndpoint', 'New-OCIDataflowRun',
'New-OCIDataflowSqlEndpoint', 'New-OCIDataflowStatement',
'Remove-OCIDataflowApplication', 'Remove-OCIDataflowPool',
'Remove-OCIDataflowPrivateEndpoint', 'Remove-OCIDataflowRun',
'Remove-OCIDataflowSqlEndpoint', 'Remove-OCIDataflowStatement',
'Start-OCIDataflowPool', 'Stop-OCIDataflowPool',
'Update-OCIDataflowApplication', 'Update-OCIDataflowPool',
'Update-OCIDataflowPrivateEndpoint', 'Update-OCIDataflowRun',
'Update-OCIDataflowSqlEndpoint'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Dataflow'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/wpf datagrid xaml.ps1
|
wpf datagrid xaml.ps1
|
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="Window"
Title="DataGrid Binding"
Width="640" Height="480">
<Grid >
<TextBlock Height="24" Margin="8,8,8,0" TextWrapping="Wrap" Text="DataGrid" VerticalAlignment="Top" FontSize="18.667" FontFamily="Arial" FontWeight="Bold"/>
<DataGrid HorizontalAlignment="Left" Margin="8,82,0,8" Width="240" Name="HadesDevices" AutoGenerateColumns="True">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=DeviceGroup}" Header="Manufacturer"></DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Path=Device}" Header="Model"></DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Path=Platform}" Header="Platform"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>
|
combined_dataset/train/non-malicious/2176.ps1
|
2176.ps1
|
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Specify the Primary Site server")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 2})]
[string]$SiteServer = "$($env:COMPUTERNAME)",
[parameter(Mandatory=$true, HelpMessage="Specify the name of a Distribution Point Group")]
[string]$DPGName,
[parameter(Mandatory=$false, HelpMessage="Specify the name of a Distribution Point Group")]
[int]$CreatedDaysAgo = 1
)
Begin {
try {
Write-Verbose "Determining SiteCode for Site Server: '$($SiteServer)'"
$SiteCodeObjects = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $SiteServer -ErrorAction Stop
foreach ($SiteCodeObject in $SiteCodeObjects) {
if ($SiteCodeObject.ProviderForLocalSite -eq $true) {
$SiteCode = $SiteCodeObject.SiteCode
Write-Debug "SiteCode: $($SiteCode)"
}
}
}
catch [Exception] {
Throw "Unable to determine SiteCode"
}
try {
Write-Verbose "Importing Configuration Manager module"
Write-Debug ((($env:SMS_ADMIN_UI_PATH).Substring(0,$env:SMS_ADMIN_UI_PATH.Length-5)) + "\ConfigurationManager.psd1")
Import-Module ((($env:SMS_ADMIN_UI_PATH).Substring(0,$env:SMS_ADMIN_UI_PATH.Length-5)) + "\ConfigurationManager.psd1") -Force -ErrorAction Stop -Verbose:$false
if ((Get-PSDrive $SiteCode -ErrorAction SilentlyContinue -Verbose:$false | Measure-Object).Count -ne 1) {
New-PSDrive -Name $SiteCode -PSProvider "AdminUI.PS.Provider\CMSite" -Root $SiteServer -ErrorAction Stop -Verbose:$false
}
Set-Location ($SiteCode + ":") -Verbose:$false
}
catch [Exception] {
Throw $_.Exception.Message
}
}
Process {
try {
$DPG = Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_DistributionPointGroup -ComputerName $SiteServer -Filter "Name = '$($DPGName)'"
if (($DPG | Measure-Object).Count -eq 1) {
Write-Verbose "Found Distribution Point Group: $($DPG.Name)"
}
elseif (($DPG | Measure-Object).Count -gt 1) {
Throw "Query for DPGs returned more than 1 object"
}
else {
Throw "Unable to determine Distribution Point Group name from specified string for parameter 'DPGName'"
}
}
catch [Exception] {
Throw $_.Exception.Message
}
try {
Write-Verbose "Enumerating applicable Applications"
if ($PSBoundParameters["CreatedDaysAgo"]) {
$Applications = Get-CMApplication -Verbose:$false | Select-Object LocalizedDisplayName, PackageID, DateCreated | Where-Object { $_.DateCreated -ge (Get-Date).AddDays(-$CreatedDaysAgo) }
}
else {
$Applications = Get-CMApplication -Verbose:$false | Select-Object LocalizedDisplayName, PackageID
}
foreach ($Application in $Applications) {
if (-not(Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_DPGroupDistributionStatusDetails -ComputerName $SiteServer -Filter "PackageID = '$($Application.PackageID)'" -ErrorAction SilentlyContinue)) {
if ($PSCmdlet.ShouldProcess("$($DPG.Name)", "Distribute Application: $($Application.LocalizedDisplayName)")) {
$DPG.AddPackages($Application.PackageID) | Out-Null
}
}
}
Set-Location C:
}
catch [Exception] {
Throw $_.Exception.Message
}
}
|
combined_dataset/train/non-malicious/chkhash_19.ps1
|
chkhash_19.ps1
|
# calculate SHA512 of file.
function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider];
$hashAlgorithm = new-object $cryptoServiceProvider
$stream = $file.OpenRead();
$hashByteArray = $hashAlgorithm.ComputeHash($stream);
$stream.Close();
## We have to be sure that we close the file stream if any exceptions are thrown.
trap
{
if ($stream -ne $null)
{
$stream.Close();
}
break;
}
foreach ($byte in $hashByteArray) { if ($byte -lt 16) {$result += “0{0:X}” -f $byte } else { $result += “{0:X}” -f $byte }}
return [string]$result;
}
function noequal ( $first, $second)
{
if (!($second) -or $second -eq "") {return $true}
$first=join-path $first "\\"
foreach($s in $second)
{
if ($first.tolower().startswith($s.tolower())) {return $false}
}
return $true
}
# chkhash.ps1 [file(s)/dir #1] [file(s)/dir #2] ... [file(s)/dir #3] [-u] [-h [path of .xml database]]
# -u updates the XML file database and exits
# otherwise, all files are checked against the XML file database.
# -h specifies location of xml hash database
$hashespath=".\\hashes.xml"
del variable:\\args3 -ea 0
del variable:\\args2 -ea 0
del variable:\\xfiles -ea 0
del variable:\\files -ea 0
del variable:\\exclude -ea 0
$args3=@()
$args2=@($args)
$nu = 0
$errs = 0
$fc = 0
$fm = 0
$upd = $false
$create = $false
"ChkHash.ps1 - ChkHash.ps1 can create a .XML database of files and their SHA-512 hashes and check files against the database, "
"in order to detect corrupt or hacked files."
""
".\\chkhash.ps1 -h for usage."
""
for($i=0;$i -lt $args2.count; $i++)
{
if ($args2[$i] -like "-h*") # -help specified?
{
"Usage: .\\chkhash.ps1 [-h] [-u] [-c] [-x <file path of hashes .xml database>] [file(s)/dir #1] [file(s)/dir #2] ... [file(s)/dir #n] [-e <Dirs>]"
"Options: -h - Help display."
" -c - Create hash database. If .xml hash database does not exist, -c will be assumed."
" -u - Update changed files and add new files to existing database."
" -x - specifies .xml database file path to use. Default is .\\hashes.xml"
" -e - exclude dirs. Put this after the files/dirs you want to check with SHA512 and needs to be fullpath (e.g. c:\\users\\bob not ..\\bob)."
""
"Examples: PS>.\\chkhash.ps1 c:\\ d:\\ -c -x c:\\users\\bob\\hashes\\hashes.xml"
" [hash all files on c:\\ and d:\\ and subdirs, create and store hashes in c:\\users\\bob\\hashes\\hashes.xml]"
" PS>.\\chkhash.ps1 c:\\users\\alice\\pictures\\sunset.jpg -u -x c:\\users\\alice\\hashes\\pictureshashes.xml]"
" [hash c:\\users\\alice\\pictures\\sunset.jpg and add or update the hash to c:\\users\\alice\\hashes\\picturehashes.xml"
" PS>.\\chkhash.ps1 c:\\users\\eve\\documents d:\\media\\movies -x c:\\users\\eve\\hashes\\private.xml"
" [hash all files in c:\\users\\eve\\documents and d:\\media\\movies, check against hashes stored in c:\\users\\eve\\hashes\\private.xml"
" or create it and store hashes there if not present]"
" PS>.\\chkhash.ps1 c:\\users\\eve -x c:\\users\\eve\\hashes\\private.xml -e c:\\users\\eve\\hashes"
" [hash all files in c:\\users\\eve and subdirs, check hashes against c:\\users\\eve\\hashes\\private.xml or store if not present, exclude "
" c:\\users\\eve\\hashes directory and subdirs]"
" PS>.\\chkhash.p1s c:\\users\\ted\\documents\\f* d:\\data -x d:\\hashes.xml -e d:\\data\\test d:\\data\\favorites -u"
" [hash all files starting with 'f' in c:\\users\\ted\\documents, and all files in d:\\data, add or update hashes to"
" existing d:\\hashes.xml, exclude d:\\data\\test and d:\\data\\favorites and subdirs]"
" PS>.\\chkhash -x c:\\users\\alice\\hashes\\hashes.xml"
" [Load hashes.xml and check hashes of all files contained within.]"
""
"Note: files in subdirectories of any specified directory are automatically processed."
" if you specify only an -x option, or no option and .\\hash.xml exists, only files in the database will be checked."
exit
}
if ($args2[$i] -like "-u*") {$upd=$true;continue} # Update and Add new files to database?
if ($args2[$i] -like "-c*") {$create=$true;continue} # Create database specified?
if ($args2[$i] -like "-x*")
{
$i++ # Get hashes xml database path
if ($i -ge $args2.count)
{
write-host "-X specified but no file path of .xml database specified. Exiting."
exit
}
$hashespath=$args2[$i]
continue
}
if ($args2[$i] -like "-e*") # Exclude files, dirs
{
while (($i+1) -lt $args2.count)
{
$i++
if ($args2[$i] -like "-*") {break}
$exclude+=@(join-path $args2[$i] "\\") # collect array of excluded directories.
}
continue
}
$args3+=@($args2[$i]) # Add files/dirs
}
if ($args3.count -ne 0)
{
# Get list of files and SHA512 hash them.
"Enumerating files from specified locations..."
$files=@(dir $args3 -recurse -ea 0 | ?{$_.mode -notmatch "d"} | ?{noequal $_.directoryname $exclude}) # Get list of files
if ($files.count -eq 0) {"No files found. Exiting."; exit}
if ($create -eq $true -or !(test-path $hashespath)) # Create database?
{
# Create SHA512 hashes of files and write to new database
$files = $files | %{write-host "SHA-512 Hashing `"$($_.fullname)`" ...";add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru}
$files |export-clixml $hashespath
"Created $hashespath"
"$($files.count) file hash(es) saved. Exiting."
exit
}
write-host "Loading file hashes from $hashespath..." -nonewline
$xfiles=@(import-clixml $hashespath|?{noequal $_.directoryname $exclude}) # Load database
if ($xfiles.count -eq 0) {"No files specified and no files in Database. Exiting.";Exit}
}
else
{
if (!(test-path $hashespath)) {"No database found or specified, exiting."; exit}
write-host "Loading file hashes from $hashespath..." -nonewline
$xfiles=@(import-clixml $hashespath|?{noequal $_.directoryname $exclude}) # Load database and check it
if ($xfiles.count -eq 0) {"No files specified and no files in Database. Exiting.";Exit}
$files=$xfiles
}
"Loaded $($xfiles.count) file hash(es)."
$hash=@{}
for($x=0;$x -lt $xfiles.count; $x++) # Build dictionary (hash) of filenames and indexes into file array
{
if ($hash.contains($xfiles[$x].fullname)) {continue}
$hash.Add($xfiles[$x].fullname,$x)
}
foreach($f in $files)
{
if ((get-item -ea 0 $f.fullname) -eq $null) {continue} # skip if file no longer exists.
$n=($hash.($f.fullname))
if ($n -eq $null)
{
$nu++ # increment needs/needed updating count
if ($upd -eq $false) {"Needs to be added: `"$($f.fullname)`"";continue} # if not updating, then continue
"SHA-512 Hashing `"$($f.fullname)`" ..."
# Create SHA512 hash of file
$f=$f |%{add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru -force}
$xfiles+=@($f) # then add file + hash to list
continue
}
$f=$f |%{add-member -inputobject $_ -name SHA512 -membertype noteproperty -value $(get-SHA512 $_.fullname) -passthru -force}
$fc++ # File checked increment.
if ($xfiles[$n].SHA512 -eq $f.SHA512) # Check SHA512 for mixmatch.
{$fm++;continue} # if matched, increment file matches and continue loop
$errs++ # increment mixmatches
if ($upd -eq $true) { $xfiles[$n]=$f; "Updated `"$($f.fullname)`"";continue}
"Bad SHA-512 found: `"$($f.fullname)`""
}
if ($upd -eq $true) # if database updated
{
$xfiles|export-clixml $hashespath # write xml database
"Updated $hashespath"
"$nu file hash(es) added to database."
"$errs file hash(es) updated in database."
exit
}
"$errs SHA-512 mixmatch(es) found."
"$fm file(s) SHA512 matched."
"$fc file(s) checked total."
if ($nu -ne 0) {"$nu file(s) need to be added [run with -u option to Add file hashes to database]."}
|
combined_dataset/train/non-malicious/3626.ps1
|
3626.ps1
|
function Test-BasicDataClassificationOnSqlManagedDatabase
{
$testSuffix = getAssetName
Create-ManagedDataClassificationTestEnvironment $testSuffix
$params = Get-DataClassificationManagedTestEnvironmentParameters $testSuffix
try
{
$recommendations = Get-AzSqlInstanceDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -InstanceName $params.serverName -DatabaseName $params.databaseName
Assert-AreEqual 0 ($recommendations.SensitivityLabels).count
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.InstanceName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
$recommendations = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.serverName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityRecommendation
Assert-AreEqual 0 ($recommendations.SensitivityLabels).count
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.InstanceName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
$allClassifications = Get-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName $params.rgname -InstanceName $params.serverName -DatabaseName $params.databaseName
Assert-AreEqual 0 ($allClassifications.SensitivityLabels).count
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
$allClassifications = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.serverName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification
Assert-AreEqual 0 ($allClassifications.SensitivityLabels).count
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.serverName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityRecommendation | Set-AzSqlInstanceDatabaseSensitivityClassification
Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.serverName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification | Remove-AzSqlInstanceDatabaseSensitivityClassification
}
finally
{
Remove-DataClassificationManagedTestEnvironment $testSuffix
}
}
function Test-DataClassificationOnSqlManagedDatabase
{
$testSuffix = getAssetName
Create-ManagedDataClassificationTestEnvironment $testSuffix
$params = Get-DataClassificationManagedTestEnvironmentParameters $testSuffix
try
{
$recommendations = Get-AzSqlInstanceDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -InstanceName $params.ServerName -DatabaseName $params.databaseName
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.ServerName $recommendations.InstanceName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
$recommendationsCount = ($recommendations.SensitivityLabels).count
Assert-AreEqual 4 $recommendationsCount
$firstRecommendation = ($recommendations.SensitivityLabels)[0]
$firstSchemaName = $firstRecommendation.SchemaName
$firstTableName = $firstRecommendation.TableName
$firstColumnName = $firstRecommendation.ColumnName
$firstInformationType = $firstRecommendation.InformationType
$firstSensitivityLabel = $firstRecommendation.SensitivityLabel
Assert-AreEqual "dbo" $firstSchemaName
Assert-AreEqual "Persons" $firstTableName
Assert-NotNullOrEmpty $firstColumnName
Assert-NotNullOrEmpty $firstInformationType
Assert-NotNullOrEmpty $firstSensitivityLabel
$secondRecommendation = ($recommendations.SensitivityLabels)[1]
$secondSchemaName = $secondRecommendation.SchemaName
$secondTableName = $secondRecommendation.TableName
$secondColumnName = $secondRecommendation.ColumnName
$secondInformationType = $secondRecommendation.InformationType
$secondSensitivityLabel = $secondRecommendation.SensitivityLabel
Assert-AreEqual "dbo" $secondSchemaName
Assert-AreEqual "Persons" $secondTableName
Assert-NotNullOrEmpty $secondColumnName
Assert-NotNullOrEmpty $secondInformationType
Assert-NotNullOrEmpty $secondSensitivityLabel
Set-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName $params.rgname -InstanceName $params.ServerName -DatabaseName $params.databaseName -SchemaName $firstSchemaName -TableName $firstTableName -ColumnName $firstColumnName -InformationType $firstInformationType -SensitivityLabel $firstSensitivityLabel
Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Set-AzSqlInstanceDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName -InformationType $secondInformationType -SensitivityLabel $secondSensitivityLabel
$allClassifications = Get-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName $params.rgname -InstanceName $params.ServerName -DatabaseName $params.databaseName
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 2 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.ServerName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
$firstClassification = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification -SchemaName $firstSchemaName -TableName $firstTableName -ColumnName $firstColumnName
Assert-AreEqual 1 ($firstClassification.SensitivityLabels).count
$classification = ($firstClassification.SensitivityLabels)[0]
Assert-AreEqual $firstSchemaName $classification.SchemaName
Assert-AreEqual $firstTableName $classification.TableName
Assert-AreEqual $firstColumnName $classification.ColumnName
Assert-AreEqual $firstInformationType $classification.InformationType
Assert-AreEqual $firstSensitivityLabel $classification.SensitivityLabel
$secondClassification = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
Assert-AreEqual 1 ($secondClassification.SensitivityLabels).count
$classification = ($secondClassification.SensitivityLabels)[0]
Assert-AreEqual $secondSchemaName $classification.SchemaName
Assert-AreEqual $secondTableName $classification.TableName
Assert-AreEqual $secondColumnName $classification.ColumnName
Assert-AreEqual $secondInformationType $classification.InformationType
Assert-AreEqual $secondSensitivityLabel $classification.SensitivityLabel
$recommendations = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.ServerName $recommendations.InstanceName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 2 ($recommendations.SensitivityLabels).count
Remove-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName $params.rgname -InstanceName $params.ServerName -DatabaseName $params.databaseName -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$allClassifications = Get-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName $params.rgname -InstanceName $params.ServerName -DatabaseName $params.databaseName
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 1 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.ServerName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
$recommendations = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityRecommendation
Assert-AreEqual 3 ($recommendations.SensitivityLabels).count
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.ServerName $recommendations.InstanceName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityRecommendation | Set-AzSqlInstanceDatabaseSensitivityClassification
$recommendations = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.ServerName $recommendations.InstanceName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 0 ($recommendations.SensitivityLabels).count
$allClassifications = Get-AzSqlInstanceDatabaseSensitivityClassification -ResourceGroupName $params.rgname -InstanceName $params.ServerName -DatabaseName $params.databaseName
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 4 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.ServerName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Remove-AzSqlInstanceDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$allClassifications = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 3 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.ServerName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification | Remove-AzSqlInstanceDatabaseSensitivityClassification
$allClassifications = Get-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.ServerName -Name $params.databaseName | Get-AzSqlInstanceDatabaseSensitivityClassification
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 0 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.ServerName $allClassifications.InstanceName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
}
finally
{
Remove-DataClassificationManagedTestEnvironment $testSuffix
}
}
function Test-DataClassificationOnSqlDatabase
{
$testSuffix = getAssetName
Create-SqlDataClassificationTestEnvironment $testSuffix
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix
try
{
$recommendations = Get-AzSqlDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
$recommendationsCount = ($recommendations.SensitivityLabels).count
Assert-AreEqual 4 $recommendationsCount
$firstRecommendation = ($recommendations.SensitivityLabels)[0]
$firstSchemaName = $firstRecommendation.SchemaName
$firstTableName = $firstRecommendation.TableName
$firstColumnName = $firstRecommendation.ColumnName
$firstInformationType = $firstRecommendation.InformationType
$firstSensitivityLabel = $firstRecommendation.SensitivityLabel
Assert-AreEqual "dbo" $firstSchemaName
Assert-AreEqual "Persons" $firstTableName
Assert-NotNullOrEmpty $firstColumnName
Assert-NotNullOrEmpty $firstInformationType
Assert-NotNullOrEmpty $firstSensitivityLabel
$secondRecommendation = ($recommendations.SensitivityLabels)[1]
$secondSchemaName = $secondRecommendation.SchemaName
$secondTableName = $secondRecommendation.TableName
$secondColumnName = $secondRecommendation.ColumnName
$secondInformationType = $secondRecommendation.InformationType
$secondSensitivityLabel = $secondRecommendation.SensitivityLabel
Assert-AreEqual "dbo" $secondSchemaName
Assert-AreEqual "Persons" $secondTableName
Assert-NotNullOrEmpty $secondColumnName
Assert-NotNullOrEmpty $secondInformationType
Assert-NotNullOrEmpty $secondSensitivityLabel
Set-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -SchemaName $firstSchemaName -TableName $firstTableName -ColumnName $firstColumnName -InformationType $firstInformationType -SensitivityLabel $firstSensitivityLabel
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Set-AzSqlDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName -InformationType $secondInformationType -SensitivityLabel $secondSensitivityLabel
$allClassifications = Get-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 2 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.ServerName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
$firstClassification = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityClassification -SchemaName $firstSchemaName -TableName $firstTableName -ColumnName $firstColumnName
Assert-AreEqual 1 ($firstClassification.SensitivityLabels).count
$classification = ($firstClassification.SensitivityLabels)[0]
Assert-AreEqual $firstSchemaName $classification.SchemaName
Assert-AreEqual $firstTableName $classification.TableName
Assert-AreEqual $firstColumnName $classification.ColumnName
Assert-AreEqual $firstInformationType $classification.InformationType
Assert-AreEqual $firstSensitivityLabel $classification.SensitivityLabel
$secondClassification = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
Assert-AreEqual 1 ($secondClassification.SensitivityLabels).count
$classification = ($secondClassification.SensitivityLabels)[0]
Assert-AreEqual $secondSchemaName $classification.SchemaName
Assert-AreEqual $secondTableName $classification.TableName
Assert-AreEqual $secondColumnName $classification.ColumnName
Assert-AreEqual $secondInformationType $classification.InformationType
Assert-AreEqual $secondSensitivityLabel $classification.SensitivityLabel
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 2 ($recommendations.SensitivityLabels).count
Remove-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$allClassifications = Get-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 1 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.ServerName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual 3 ($recommendations.SensitivityLabels).count
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation | Set-AzSqlDatabaseSensitivityClassification
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 0 ($recommendations.SensitivityLabels).count
$allClassifications = Get-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 4 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.ServerName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Remove-AzSqlDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$allClassifications = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityClassification
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 3 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.ServerName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityClassification | Remove-AzSqlDatabaseSensitivityClassification
$allClassifications = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityClassification
$allClassificationsCount = ($allClassifications.SensitivityLabels).count
Assert-AreEqual 0 $allClassificationsCount
Assert-AreEqual $params.rgname $allClassifications.ResourceGroupName
Assert-AreEqual $params.serverName $allClassifications.ServerName
Assert-AreEqual $params.databaseName $allClassifications.DatabaseName
}
finally
{
Remove-DataClassificationTestEnvironment $testSuffix
}
}
function Test-ErrorIsThrownWhenInvalidClassificationIsSet
{
$testSuffix = getAssetName
Create-SqlDataClassificationTestEnvironment $testSuffix
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix
try
{
$recommendations = Get-AzSqlDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
$recommendation = ($recommendations.SensitivityLabels)[0]
$schemaName = $recommendation.SchemaName
$tableName = $recommendation.TableName
$columnName = $recommendation.ColumnName
$informationType = $recommendation.InformationType
$sensitivityLabel = $recommendation.SensitivityLabel
$badInformationType = $informationType + $informationType
$badInformationTypeMessage = "Information Type '" + $badinformationType + "' is not part of Information Protection Policy. Please add '" + $badinformationType + "' to the Information Protection Policy, or use one of the following: "
Assert-ThrowsContains -script { Set-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName `
-DatabaseName $params.databaseName -SchemaName $schemaName -TableName $tableName -ColumnName $columnName -InformationType $badInformationType `
-SensitivityLabel $sensitivityLabel} -message $badInformationTypeMessage
$badSensitivityLabel = $sensitivityLabel + $sensitivityLabel
$badSensitivityLabelMessage = "Sensitivity Label '" + $badSensitivityLabel + "' is not part of Information Protection Policy. Please add '" + $badSensitivityLabel + "' to the Information Protection Policy, or use one of the following: "
Assert-ThrowsContains -script { Set-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName `
-DatabaseName $params.databaseName -SchemaName $schemaName -TableName $tableName -ColumnName $columnName -InformationType $badInformationType `
-SensitivityLabel $badSensitivityLabel} -message $badSensitivityLabelMessage
$message = "Value is not specified neither for InformationType parameter nor for SensitivityLabel parameter"
Assert-ThrowsContains -script { Set-AzSqlDatabaseSensitivityClassification -ResourceGroupName $params.rgname -ServerName $params.serverName `
-DatabaseName $params.databaseName -SchemaName $schemaName -TableName $tableName -ColumnName $columnName} -message $message
}
finally
{
Remove-DataClassificationTestEnvironment $testSuffix
}
}
function Assert-NotNullOrEmpty ($str)
{
Assert-NotNull $str
Assert-AreNotEqual "" $str
}
function Get-DataClassificationTestEnvironmentParameters ($testSuffix)
{
return @{ rgname = "dc-cmdlet-test-rg" +$testSuffix;
serverName = "dc-cmdlet-server" +$testSuffix;
databaseName = "dc-cmdlet-db" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
}
}
function Get-DataClassificationManagedTestEnvironmentParameters ($testSuffix)
{
return @{ rgname = "cl_one";
serverName = "dc-cmdlet-server" +$testSuffix;
databaseName = "dc-cmdlet-db" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
}
}
function Create-ManagedDataClassificationTestEnvironment ($testSuffix, $location = "North Europe")
{
$params = Get-DataClassificationManagedTestEnvironmentParameters $testSuffix
New-AzureRmResourceGroup -Name $params.rgname -Location $location
$vnetName = "cl_initial"
$subnetName = "Cool"
$virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $location
$subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq $subnetName })[0].Id
$credentials = Get-ServerCredential
$licenseType = "BasePrice"
$storageSizeInGB = 32
$vCore = 16
$skuName = "GP_Gen4"
$collation = "SQL_Latin1_General_CP1_CI_AS"
$managedInstance = New-AzSqlInstance -ResourceGroupName $params.rgname -Name $params.serverName `
-Location $location -AdministratorCredential $credentials -SubnetId $subnetId `
-LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -SkuName $skuName
New-AzSqlInstanceDatabase -ResourceGroupName $params.rgname -InstanceName $params.serverName -Name $params.databaseName -Collation $collation
}
function Remove-DataClassificationManagedTestEnvironment ($testSuffix)
{
$params = Get-DataClassificationManagedTestEnvironmentParameters $testSuffix
Remove-AzureRmResourceGroup -Name $params.rgname -Force
}
function Remove-DataClassificationTestEnvironment ($testSuffix)
{
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix
Remove-AzureRmResourceGroup -Name $params.rgname -Force
}
function Create-SqlDataClassificationTestEnvironment ($testSuffix, $location = "West Central US", $serverVersion = "12.0")
{
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix
New-AzResourceGroup -Name $params.rgname -Location $location
$password = $params.pwd
$secureString = ($password | ConvertTo-SecureString -asPlainText -Force)
$credentials = new-object System.Management.Automation.PSCredential($params.loginName, $secureString)
New-AzSqlServer -ResourceGroupName $params.rgname -ServerName $params.serverName -ServerVersion $serverVersion -Location $location -SqlAdministratorCredentials $credentials
New-AzSqlServerFirewallRule -ResourceGroupName $params.rgname -ServerName $params.serverName -StartIpAddress 0.0.0.0 -EndIpAddress 255.255.255.255 -FirewallRuleName "dcRule"
New-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -eq "Record")
{
$fullServerName = $params.serverName + ".database.windows.net"
$login = $params.loginName
$databaseName = $params.databaseName
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = "Server=$fullServerName;uid=$login;pwd=$password;Database=$databaseName;Integrated Security=False;"
try
{
$connection.Open()
$command = $connection.CreateCommand()
$command.CommandText = "CREATE TABLE Persons (PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255));"
$command.ExecuteReader()
}
finally
{
$connection.Close()
}
}
}
function Test-EnableDisableRecommendationsOnSqlDatabase
{
$testSuffix = getAssetName
Create-SqlDataClassificationTestEnvironment $testSuffix
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix
try
{
$recommendations = Get-AzSqlDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
$recommendationsCount = ($recommendations.SensitivityLabels).count
Assert-AreEqual 4 $recommendationsCount
$firstRecommendation = ($recommendations.SensitivityLabels)[0]
$firstSchemaName = $firstRecommendation.SchemaName
$firstTableName = $firstRecommendation.TableName
$firstColumnName = $firstRecommendation.ColumnName
$firstInformationType = $firstRecommendation.InformationType
$firstSensitivityLabel = $firstRecommendation.SensitivityLabel
Assert-AreEqual "dbo" $firstSchemaName
Assert-AreEqual "Persons" $firstTableName
Assert-NotNullOrEmpty $firstColumnName
Assert-NotNullOrEmpty $firstInformationType
Assert-NotNullOrEmpty $firstSensitivityLabel
$secondRecommendation = ($recommendations.SensitivityLabels)[1]
$secondSchemaName = $secondRecommendation.SchemaName
$secondTableName = $secondRecommendation.TableName
$secondColumnName = $secondRecommendation.ColumnName
$secondInformationType = $secondRecommendation.InformationType
$secondSensitivityLabel = $secondRecommendation.SensitivityLabel
Assert-AreEqual "dbo" $secondSchemaName
Assert-AreEqual "Persons" $secondTableName
Assert-NotNullOrEmpty $secondColumnName
Assert-NotNullOrEmpty $secondInformationType
Assert-NotNullOrEmpty $secondSensitivityLabel
Disable-AzSqlDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -SchemaName $firstSchemaName -TableName $firstTableName -ColumnName $firstColumnName
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Disable-AzSqlDatabaseSensitivityRecommendation -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 2 ($recommendations.SensitivityLabels).count
Assert-AreNotEqual $firstColumnName ($recommendations.SensitivityLabels)[0].ColumnName
Assert-AreNotEqual $firstColumnName ($recommendations.SensitivityLabels)[1].ColumnName
Assert-AreNotEqual $secondColumnName ($recommendations.SensitivityLabels)[0].ColumnName
Assert-AreNotEqual $secondColumnName ($recommendations.SensitivityLabels)[1].ColumnName
Enable-AzSqlDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual 3 ($recommendations.SensitivityLabels).count
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreNotEqual $firstColumnName ($recommendations.SensitivityLabels)[0].ColumnName
Assert-AreNotEqual $firstColumnName ($recommendations.SensitivityLabels)[1].ColumnName
Assert-AreNotEqual $firstColumnName ($recommendations.SensitivityLabels)[2].ColumnName
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation | Disable-AzSqlDatabaseSensitivityRecommendation
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 0 ($recommendations.SensitivityLabels).count
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Enable-AzSqlDatabaseSensitivityRecommendation -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Assert-AreEqual $params.rgname $recommendations.ResourceGroupName
Assert-AreEqual $params.serverName $recommendations.ServerName
Assert-AreEqual $params.databaseName $recommendations.DatabaseName
Assert-AreEqual 1 ($recommendations.SensitivityLabels).count
$recommendation = ($recommendations.SensitivityLabels)[0]
Assert-AreEqual $secondSchemaName $recommendation.SchemaName
Assert-AreEqual $secondTableName $recommendation.TableName
Assert-AreEqual $secondColumnName $recommendation.ColumnName
Assert-NotNullOrEmpty $recommendation.InformationType
Assert-NotNullOrEmpty $recommendation.SensitivityLabel
}
finally
{
Remove-DataClassificationTestEnvironment $testSuffix
}
}
|
combined_dataset/train/non-malicious/sample_66_32.ps1
|
sample_66_32.ps1
|
#
# Module manifest for module 'OCI.PSModules.Aidocument'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aidocument.dll'
# Version number of this module.
ModuleVersion = '85.1.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = '48b9296a-b4a7-43bb-8d59-3eaf832baf2a'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Aidocument Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '85.1.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Aidocument.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIAidocumentModel', 'Get-OCIAidocumentModelsList',
'Get-OCIAidocumentProcessorJob', 'Get-OCIAidocumentProject',
'Get-OCIAidocumentProjectsList', 'Get-OCIAidocumentWorkRequest',
'Get-OCIAidocumentWorkRequestErrorsList',
'Get-OCIAidocumentWorkRequestLogsList',
'Get-OCIAidocumentWorkRequestsList',
'Invoke-OCIAidocumentAnalyzeDocument',
'Invoke-OCIAidocumentPatchModel',
'Move-OCIAidocumentModelCompartment',
'Move-OCIAidocumentProjectCompartment', 'New-OCIAidocumentModel',
'New-OCIAidocumentProcessorJob', 'New-OCIAidocumentProject',
'Remove-OCIAidocumentModel', 'Remove-OCIAidocumentProject',
'Stop-OCIAidocumentProcessorJob', 'Stop-OCIAidocumentWorkRequest',
'Update-OCIAidocumentModel', 'Update-OCIAidocumentProject'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Aidocument'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/Network Config _ Excel.ps1
|
Network Config _ Excel.ps1
|
$excel = New-Object -comobject Excel.Application
$excel.visible = $False #Change to True to see the excel build
$wbook = $excel.Workbooks.Add()
$wsheet = $wbook.Worksheets.Item(1)
$wsheet.Cells.Item(1,1) = "Date"
$wsheet.Cells.Item(1,2) = "Server"
$wsheet.Cells.Item(1,3) = "NETID"
$wsheet.Cells.Item(1,4) = "Description"
$wsheet.Cells.Item(1,5) = "MAC"
$wsheet.Cells.Item(1,6) = "IP"
$wsheet.Cells.Item(1,7) = "DHCPEnabled"
$wsheet.Cells.Item(1,8) = "DHCPServer"
$wsheet.Cells.Item(1,9) = "DNSServerSearchOrder"
$wsheet.Cells.Item(1,10) = "WINSPrimaryServer"
$wsheet.Cells.Item(1,11) = "WINSSecondaryServer"
$wsheet.Cells.Item(1,12) = "DomainDNSRegistrationEnabled"
$wsheet.Cells.Item(1,13) = "FullDNSRegistrationEnabled"
$wsheet.Cells.Item(1,14) = "WINSEnableLMHostsLookup"
$range = $wsheet.UsedRange
$range.Interior.ColorIndex = 19
$range.Font.ColorIndex = 11
$range.Font.Bold = $True
$iRow = 2
$AllAdapters = @("")
$InputFile = "C:\\Scripts\\Servers.txt"
$Servers = Get-Content $InputFile
ForEach($Server in $Servers)
{
$Adapters = Get-Wmiobject Win32_NetworkAdapterConfiguration -Computername `
$Server | Where-Object{$_.IPEnabled -eq $True}
ForEach($Adapter In $Adapters)
{
[String]$DNSServers = ""
$Adapters2 = Get-Wmiobject Win32_NetworkAdapter -Computername $Server `
| Where-Object{$_.Caption -eq $Adapter.Caption}
[String]$NetID = $Adapters2.NetConnectionID
If($Adapter.DNSServerSearchOrder -ne $Null){ForEach($Address In `
$Adapter.DNSServerSearchOrder){$DNSServers += "[" + $Address + "]"}}
$wsheet.Cells.Item($iRow,1) = Get-Date
$wsheet.Cells.Item($iRow,2) = $Server
$wsheet.Cells.Item($iRow,3) = $NETID
$wsheet.Cells.Item($iRow,4) = $Adapter.Description
$wsheet.Cells.Item($iRow,5) = $Adapter.MACAddress
$wsheet.Cells.Item($iRow,6) = $Adapter.IPAddress
$wsheet.Cells.Item($iRow,7) = $Adapter.DHCPEnabled
$wsheet.Cells.Item($iRow,8) = $Adapter.DHCPServer
$wsheet.Cells.Item($iRow,9) = $DNSServers
$wsheet.Cells.Item($iRow,10) = $Adapter.WINSPrimaryServer
$wsheet.Cells.Item($iRow,11) = $Adapter.WINSSecondaryServer
$wsheet.Cells.Item($iRow,12) = $Adapter.DomainDNSRegistrationEnabled
$wsheet.Cells.Item($iRow,13) = $Adapter.FullDNSRegistrationEnabled
$wsheet.Cells.Item($iRow,14) = $Adapter.WINSEnableLMHostsLookup
$iRow = $iRow + 1
}
}
$range.EntireColumn.AutoFilter()
$range.EntireColumn.AutoFit()
$excel.ActiveWorkbook.SaveAs("C:\\Scripts\\NetworkScan.xls")
$excel.ActiveWorkbook.Close
$excel.Application.Quit
|
combined_dataset/train/non-malicious/sample_41_48.ps1
|
sample_41_48.ps1
|
#
# Module manifest for module 'OCI.PSModules.Database'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Database.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = 'e1b520e7-13c2-41a0-be48-3eacc401dff5'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Database Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '83.2.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Database.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Add-OCIDatabaseStorageCapacityCloudExadataInfrastructure',
'Add-OCIDatabaseStorageCapacityExadataInfrastructure',
'Add-OCIDatabaseVirtualMachineToCloudVmCluster',
'Add-OCIDatabaseVirtualMachineToVmCluster',
'Complete-OCIDatabaseExternalBackupJob',
'Confirm-OCIDatabaseVmClusterNetwork',
'Disable-OCIDatabaseAutonomousDatabaseManagement',
'Disable-OCIDatabaseAutonomousDatabaseOperationsInsights',
'Disable-OCIDatabaseExternalContainerDatabaseDatabaseManagement',
'Disable-OCIDatabaseExternalContainerDatabaseStackMonitoring',
'Disable-OCIDatabaseExternalNonContainerDatabaseDatabaseManagement',
'Disable-OCIDatabaseExternalNonContainerDatabaseOperationsInsights',
'Disable-OCIDatabaseExternalNonContainerDatabaseStackMonitoring',
'Disable-OCIDatabaseExternalPluggableDatabaseDatabaseManagement',
'Disable-OCIDatabaseExternalPluggableDatabaseOperationsInsights',
'Disable-OCIDatabaseExternalPluggableDatabaseStackMonitoring',
'Disable-OCIDatabaseManagement',
'Disable-OCIDatabasePluggableDatabaseManagement',
'Edit-OCIDatabaseManagement',
'Edit-OCIDatabasePluggableDatabaseManagement',
'Enable-OCIDatabaseAutonomousDatabaseManagement',
'Enable-OCIDatabaseAutonomousDatabaseOperationsInsights',
'Enable-OCIDatabaseExadataInfrastructure',
'Enable-OCIDatabaseExternalContainerDatabaseDatabaseManagement',
'Enable-OCIDatabaseExternalContainerDatabaseStackMonitoring',
'Enable-OCIDatabaseExternalNonContainerDatabaseDatabaseManagement',
'Enable-OCIDatabaseExternalNonContainerDatabaseOperationsInsights',
'Enable-OCIDatabaseExternalNonContainerDatabaseStackMonitoring',
'Enable-OCIDatabaseExternalPluggableDatabaseDatabaseManagement',
'Enable-OCIDatabaseExternalPluggableDatabaseOperationsInsights',
'Enable-OCIDatabaseExternalPluggableDatabaseStackMonitoring',
'Enable-OCIDatabaseManagement',
'Enable-OCIDatabasePluggableDatabaseManagement', 'Get-OCIDatabase',
'Get-OCIDatabaseApplicationVip',
'Get-OCIDatabaseApplicationVipsList',
'Get-OCIDatabaseAutonomousContainerDatabase',
'Get-OCIDatabaseAutonomousContainerDatabaseDataguardAssociation',
'Get-OCIDatabaseAutonomousContainerDatabaseDataguardAssociationsList',
'Get-OCIDatabaseAutonomousContainerDatabaseResourceUsage',
'Get-OCIDatabaseAutonomousContainerDatabasesList',
'Get-OCIDatabaseAutonomousContainerDatabaseVersionsList',
'Get-OCIDatabaseAutonomousDatabase',
'Get-OCIDatabaseAutonomousDatabaseBackup',
'Get-OCIDatabaseAutonomousDatabaseBackupsList',
'Get-OCIDatabaseAutonomousDatabaseCharacterSetsList',
'Get-OCIDatabaseAutonomousDatabaseClonesList',
'Get-OCIDatabaseAutonomousDatabaseDataguardAssociation',
'Get-OCIDatabaseAutonomousDatabaseDataguardAssociationsList',
'Get-OCIDatabaseAutonomousDatabaseRefreshableClonesList',
'Get-OCIDatabaseAutonomousDatabaseRegionalWallet',
'Get-OCIDatabaseAutonomousDatabasesList',
'Get-OCIDatabaseAutonomousDatabaseSoftwareImage',
'Get-OCIDatabaseAutonomousDatabaseSoftwareImagesList',
'Get-OCIDatabaseAutonomousDatabaseWallet',
'Get-OCIDatabaseAutonomousDbPreviewVersionsList',
'Get-OCIDatabaseAutonomousDbVersionsList',
'Get-OCIDatabaseAutonomousExadataInfrastructure',
'Get-OCIDatabaseAutonomousExadataInfrastructureShapesList',
'Get-OCIDatabaseAutonomousExadataInfrastructuresList',
'Get-OCIDatabaseAutonomousPatch',
'Get-OCIDatabaseAutonomousVirtualMachine',
'Get-OCIDatabaseAutonomousVirtualMachinesList',
'Get-OCIDatabaseAutonomousVmCluster',
'Get-OCIDatabaseAutonomousVmClusterAcdResourceUsageList',
'Get-OCIDatabaseAutonomousVmClusterResourceUsage',
'Get-OCIDatabaseAutonomousVmClustersList', 'Get-OCIDatabaseBackup',
'Get-OCIDatabaseBackupDestination',
'Get-OCIDatabaseBackupDestinationList',
'Get-OCIDatabaseBackupsList',
'Get-OCIDatabaseCloudAutonomousVmCluster',
'Get-OCIDatabaseCloudAutonomousVmClusterAcdResourceUsageList',
'Get-OCIDatabaseCloudAutonomousVmClusterResourceUsage',
'Get-OCIDatabaseCloudAutonomousVmClustersList',
'Get-OCIDatabaseCloudExadataInfrastructure',
'Get-OCIDatabaseCloudExadataInfrastructuresList',
'Get-OCIDatabaseCloudExadataInfrastructureUnallocatedResources',
'Get-OCIDatabaseCloudVmCluster',
'Get-OCIDatabaseCloudVmClusterIormConfig',
'Get-OCIDatabaseCloudVmClustersList',
'Get-OCIDatabaseCloudVmClusterUpdate',
'Get-OCIDatabaseCloudVmClusterUpdateHistoryEntriesList',
'Get-OCIDatabaseCloudVmClusterUpdateHistoryEntry',
'Get-OCIDatabaseCloudVmClusterUpdatesList',
'Get-OCIDatabaseConsoleConnection',
'Get-OCIDatabaseConsoleConnectionsList',
'Get-OCIDatabaseConsoleHistoriesList',
'Get-OCIDatabaseConsoleHistory',
'Get-OCIDatabaseConsoleHistoryContent',
'Get-OCIDatabaseContainerDatabasePatchesList',
'Get-OCIDatabaseDataGuardAssociation',
'Get-OCIDatabaseDataGuardAssociationsList', 'Get-OCIDatabaseDbHome',
'Get-OCIDatabaseDbHomePatch', 'Get-OCIDatabaseDbHomePatchesList',
'Get-OCIDatabaseDbHomePatchHistoryEntriesList',
'Get-OCIDatabaseDbHomePatchHistoryEntry',
'Get-OCIDatabaseDbHomesList', 'Get-OCIDatabaseDbNode',
'Get-OCIDatabaseDbNodesList', 'Get-OCIDatabaseDbServer',
'Get-OCIDatabaseDbServersList', 'Get-OCIDatabaseDbSystem',
'Get-OCIDatabaseDbSystemComputePerformancesList',
'Get-OCIDatabaseDbSystemPatch',
'Get-OCIDatabaseDbSystemPatchesList',
'Get-OCIDatabaseDbSystemPatchHistoryEntriesList',
'Get-OCIDatabaseDbSystemPatchHistoryEntry',
'Get-OCIDatabaseDbSystemShapesList', 'Get-OCIDatabaseDbSystemsList',
'Get-OCIDatabaseDbSystemStoragePerformancesList',
'Get-OCIDatabaseDbSystemUpgradeHistoryEntriesList',
'Get-OCIDatabaseDbSystemUpgradeHistoryEntry',
'Get-OCIDatabaseDbVersionsList',
'Get-OCIDatabaseExadataInfrastructure',
'Get-OCIDatabaseExadataInfrastructureOcpus',
'Get-OCIDatabaseExadataInfrastructuresList',
'Get-OCIDatabaseExadataInfrastructureUnAllocatedResources',
'Get-OCIDatabaseExadataIormConfig',
'Get-OCIDatabaseExternalBackupJob',
'Get-OCIDatabaseExternalContainerDatabase',
'Get-OCIDatabaseExternalContainerDatabasesList',
'Get-OCIDatabaseExternalDatabaseConnector',
'Get-OCIDatabaseExternalDatabaseConnectorsList',
'Get-OCIDatabaseExternalNonContainerDatabase',
'Get-OCIDatabaseExternalNonContainerDatabasesList',
'Get-OCIDatabaseExternalPluggableDatabase',
'Get-OCIDatabaseExternalPluggableDatabasesList',
'Get-OCIDatabaseFlexComponentsList',
'Get-OCIDatabaseGiVersionsList',
'Get-OCIDatabaseInfrastructureTargetVersions',
'Get-OCIDatabaseKeyStore', 'Get-OCIDatabaseKeyStoresList',
'Get-OCIDatabaseMaintenanceRun',
'Get-OCIDatabaseMaintenanceRunHistory',
'Get-OCIDatabaseMaintenanceRunHistoryList',
'Get-OCIDatabaseMaintenanceRunsList', 'Get-OCIDatabaseOneoffPatch',
'Get-OCIDatabaseOneoffPatchesList',
'Get-OCIDatabasePdbConversionHistoryEntriesList',
'Get-OCIDatabasePdbConversionHistoryEntry',
'Get-OCIDatabasePluggableDatabase',
'Get-OCIDatabasePluggableDatabasesList', 'Get-OCIDatabasesList',
'Get-OCIDatabaseSoftwareImage', 'Get-OCIDatabaseSoftwareImagesList',
'Get-OCIDatabaseSystemVersionsList',
'Get-OCIDatabaseUpgradeHistoryEntriesList',
'Get-OCIDatabaseUpgradeHistoryEntry', 'Get-OCIDatabaseVmCluster',
'Get-OCIDatabaseVmClusterNetwork',
'Get-OCIDatabaseVmClusterNetworksList',
'Get-OCIDatabaseVmClusterPatch',
'Get-OCIDatabaseVmClusterPatchesList',
'Get-OCIDatabaseVmClusterPatchHistoryEntriesList',
'Get-OCIDatabaseVmClusterPatchHistoryEntry',
'Get-OCIDatabaseVmClustersList', 'Get-OCIDatabaseVmClusterUpdate',
'Get-OCIDatabaseVmClusterUpdateHistoryEntriesList',
'Get-OCIDatabaseVmClusterUpdateHistoryEntry',
'Get-OCIDatabaseVmClusterUpdatesList',
'Invoke-OCIDatabaseAutonomousDatabaseManualRefresh',
'Invoke-OCIDatabaseCheckExternalDatabaseConnectorConnectionStatus',
'Invoke-OCIDatabaseConfigureAutonomousDatabaseVaultKey',
'Invoke-OCIDatabaseConfigureSaasAdminUser',
'Invoke-OCIDatabaseConvertToPdb',
'Invoke-OCIDatabaseConvertToRegularPluggableDatabase',
'Invoke-OCIDatabaseDbNodeAction',
'Invoke-OCIDatabaseDownloadExadataInfrastructureConfigFile',
'Invoke-OCIDatabaseDownloadOneoffPatch',
'Invoke-OCIDatabaseDownloadValidationReport',
'Invoke-OCIDatabaseDownloadVmClusterNetworkConfigFile',
'Invoke-OCIDatabaseFailoverAutonomousContainerDatabaseDataguardAssociation',
'Invoke-OCIDatabaseFailOverAutonomousDatabase',
'Invoke-OCIDatabaseFailoverDataGuardAssociation',
'Invoke-OCIDatabaseLaunchAutonomousExadataInfrastructure',
'Invoke-OCIDatabaseLocalClonePluggableDatabase',
'Invoke-OCIDatabaseMigrateExadataDbSystemResourceModel',
'Invoke-OCIDatabaseMigrateVaultKey',
'Invoke-OCIDatabaseRefreshPluggableDatabase',
'Invoke-OCIDatabaseReinstateAutonomousContainerDatabaseDataguardAssociation',
'Invoke-OCIDatabaseReinstateDataGuardAssociation',
'Invoke-OCIDatabaseRemoteClonePluggableDatabase',
'Invoke-OCIDatabaseResizeVmClusterNetwork',
'Invoke-OCIDatabaseResourcePoolShapes',
'Invoke-OCIDatabaseRotateAutonomousContainerDatabaseEncryptionKey',
'Invoke-OCIDatabaseRotateAutonomousDatabaseEncryptionKey',
'Invoke-OCIDatabaseRotateAutonomousVmClusterOrdsCerts',
'Invoke-OCIDatabaseRotateAutonomousVmClusterSslCerts',
'Invoke-OCIDatabaseRotateCloudAutonomousVmClusterOrdsCerts',
'Invoke-OCIDatabaseRotateCloudAutonomousVmClusterSslCerts',
'Invoke-OCIDatabaseRotateOrdsCerts',
'Invoke-OCIDatabaseRotatePluggableDatabaseEncryptionKey',
'Invoke-OCIDatabaseRotateSslCerts',
'Invoke-OCIDatabaseRotateVaultKey',
'Invoke-OCIDatabaseSaasAdminUserStatus',
'Invoke-OCIDatabaseScanExternalContainerDatabasePluggableDatabases',
'Invoke-OCIDatabaseShrinkAutonomousDatabase',
'Invoke-OCIDatabaseSwitchoverAutonomousContainerDatabaseDataguardAssociation',
'Invoke-OCIDatabaseSwitchoverAutonomousDatabase',
'Invoke-OCIDatabaseSwitchoverDataGuardAssociation',
'Invoke-OCIDatabaseTerminateAutonomousContainerDatabase',
'Invoke-OCIDatabaseTerminateAutonomousExadataInfrastructure',
'Invoke-OCIDatabaseTerminateDbSystem',
'Invoke-OCIDatabaseUpgradeDatabase',
'Invoke-OCIDatabaseUpgradeDbSystem',
'Move-OCIDatabaseAutonomousContainerDatabaseCompartment',
'Move-OCIDatabaseAutonomousDatabaseCompartment',
'Move-OCIDatabaseAutonomousDatabaseSoftwareImageCompartment',
'Move-OCIDatabaseAutonomousExadataInfrastructureCompartment',
'Move-OCIDatabaseAutonomousVmClusterCompartment',
'Move-OCIDatabaseBackupDestinationCompartment',
'Move-OCIDatabaseCloudAutonomousVmClusterCompartment',
'Move-OCIDatabaseCloudExadataInfrastructureCompartment',
'Move-OCIDatabaseCloudVmClusterCompartment',
'Move-OCIDatabaseDataguardRole',
'Move-OCIDatabaseDbSystemCompartment',
'Move-OCIDatabaseDisasterRecoveryConfiguration',
'Move-OCIDatabaseExadataInfrastructureCompartment',
'Move-OCIDatabaseExternalContainerDatabaseCompartment',
'Move-OCIDatabaseExternalNonContainerDatabaseCompartment',
'Move-OCIDatabaseExternalPluggableDatabaseCompartment',
'Move-OCIDatabaseKeyStoreCompartment',
'Move-OCIDatabaseKeyStoreType',
'Move-OCIDatabaseOneoffPatchCompartment',
'Move-OCIDatabaseSoftwareImageCompartment',
'Move-OCIDatabaseVmClusterCompartment', 'New-OCIDatabase',
'New-OCIDatabaseApplicationVip',
'New-OCIDatabaseAutonomousContainerDatabase',
'New-OCIDatabaseAutonomousContainerDatabaseDataguardAssociation',
'New-OCIDatabaseAutonomousDatabase',
'New-OCIDatabaseAutonomousDatabaseBackup',
'New-OCIDatabaseAutonomousDatabaseSoftwareImage',
'New-OCIDatabaseAutonomousDatabaseWallet',
'New-OCIDatabaseAutonomousVmCluster', 'New-OCIDatabaseBackup',
'New-OCIDatabaseBackupDestination',
'New-OCIDatabaseCloudAutonomousVmCluster',
'New-OCIDatabaseCloudExadataInfrastructure',
'New-OCIDatabaseCloudVmCluster', 'New-OCIDatabaseConsoleConnection',
'New-OCIDatabaseConsoleHistory',
'New-OCIDatabaseDataGuardAssociation', 'New-OCIDatabaseDbHome',
'New-OCIDatabaseDbSystem', 'New-OCIDatabaseExadataInfrastructure',
'New-OCIDatabaseExternalBackupJob',
'New-OCIDatabaseExternalContainerDatabase',
'New-OCIDatabaseExternalDatabaseConnector',
'New-OCIDatabaseExternalNonContainerDatabase',
'New-OCIDatabaseExternalPluggableDatabase',
'New-OCIDatabaseKeyStore', 'New-OCIDatabaseMaintenanceRun',
'New-OCIDatabaseOneoffPatch', 'New-OCIDatabasePluggableDatabase',
'New-OCIDatabaseRecommendedVmClusterNetwork',
'New-OCIDatabaseSoftwareImage', 'New-OCIDatabaseVmCluster',
'New-OCIDatabaseVmClusterNetwork',
'Register-OCIDatabaseAutonomousDatabaseDataSafe',
'Remove-OCIDatabase', 'Remove-OCIDatabaseApplicationVip',
'Remove-OCIDatabaseAutonomousDatabase',
'Remove-OCIDatabaseAutonomousDatabaseBackup',
'Remove-OCIDatabaseAutonomousDatabaseSoftwareImage',
'Remove-OCIDatabaseAutonomousVmCluster', 'Remove-OCIDatabaseBackup',
'Remove-OCIDatabaseBackupDestination',
'Remove-OCIDatabaseCloudAutonomousVmCluster',
'Remove-OCIDatabaseCloudExadataInfrastructure',
'Remove-OCIDatabaseCloudVmCluster',
'Remove-OCIDatabaseConsoleConnection',
'Remove-OCIDatabaseConsoleHistory', 'Remove-OCIDatabaseDbHome',
'Remove-OCIDatabaseExadataInfrastructure',
'Remove-OCIDatabaseExternalContainerDatabase',
'Remove-OCIDatabaseExternalDatabaseConnector',
'Remove-OCIDatabaseExternalNonContainerDatabase',
'Remove-OCIDatabaseExternalPluggableDatabase',
'Remove-OCIDatabaseKeyStore', 'Remove-OCIDatabaseOneoffPatch',
'Remove-OCIDatabasePluggableDatabase',
'Remove-OCIDatabaseSoftwareImage',
'Remove-OCIDatabaseVirtualMachineFromCloudVmCluster',
'Remove-OCIDatabaseVirtualMachineFromVmCluster',
'Remove-OCIDatabaseVmCluster', 'Remove-OCIDatabaseVmClusterNetwork',
'Restart-OCIDatabaseAutonomousContainerDatabase',
'Restart-OCIDatabaseAutonomousDatabase', 'Restore-OCIDatabase',
'Restore-OCIDatabaseAutonomousDatabase',
'Start-OCIDatabaseAutonomousDatabase',
'Start-OCIDatabasePluggableDatabase',
'Stop-OCIDatabaseAutonomousDatabase', 'Stop-OCIDatabaseBackup',
'Stop-OCIDatabasePluggableDatabase',
'Unregister-OCIDatabaseAutonomousDatabaseDataSafe',
'Update-OCIDatabase',
'Update-OCIDatabaseAutonomousContainerDatabase',
'Update-OCIDatabaseAutonomousContainerDatabaseDataguardAssociation',
'Update-OCIDatabaseAutonomousDatabase',
'Update-OCIDatabaseAutonomousDatabaseBackup',
'Update-OCIDatabaseAutonomousDatabaseRegionalWallet',
'Update-OCIDatabaseAutonomousDatabaseSoftwareImage',
'Update-OCIDatabaseAutonomousDatabaseWallet',
'Update-OCIDatabaseAutonomousExadataInfrastructure',
'Update-OCIDatabaseAutonomousVmCluster',
'Update-OCIDatabaseBackupDestination',
'Update-OCIDatabaseCloudAutonomousVmCluster',
'Update-OCIDatabaseCloudExadataInfrastructure',
'Update-OCIDatabaseCloudVmCluster',
'Update-OCIDatabaseCloudVmClusterIormConfig',
'Update-OCIDatabaseConsoleConnection',
'Update-OCIDatabaseConsoleHistory',
'Update-OCIDatabaseDataGuardAssociation',
'Update-OCIDatabaseDbHome', 'Update-OCIDatabaseDbNode',
'Update-OCIDatabaseDbSystem',
'Update-OCIDatabaseExadataInfrastructure',
'Update-OCIDatabaseExadataIormConfig',
'Update-OCIDatabaseExternalContainerDatabase',
'Update-OCIDatabaseExternalDatabaseConnector',
'Update-OCIDatabaseExternalNonContainerDatabase',
'Update-OCIDatabaseExternalPluggableDatabase',
'Update-OCIDatabaseKeyStore', 'Update-OCIDatabaseMaintenanceRun',
'Update-OCIDatabaseOneoffPatch',
'Update-OCIDatabasePluggableDatabase',
'Update-OCIDatabaseSoftwareImage', 'Update-OCIDatabaseVmCluster',
'Update-OCIDatabaseVmClusterNetwork'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Database'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/sample_5_58.ps1
|
sample_5_58.ps1
|
// Copyright (c) 2016 Dell Inc. or its subsidiaries. All Rights Reserved.
// ==================================================================
// DCIM_FCCapabilities
// ==================================================================
[dynamic, provider("dcismprovider"),
Description(
"DCIM_FCCapabilities describes the capabilities of Fiber Channel and "
"its port and partitions." )]
class DCIM_FCCapabilities : CIM_Capabilities {
[
Description ("A unique identifier for the instance."),
Key
]
string InstanceID;
[
Description ("A string containing the Fully Qualified Device Description, a user-friendly name for the object."),
Required
]
string FQDD;
[
Description ("This property represents the maximum number of I/Os per connection."),
Required
]
uint16 FCMaxIOsPerSession;
[
Description ("This property represents the maximum number of logins per port."),
Required
]
uint16 FCMaxNumberLogins;
[
Description ("This property represents the maximum number of exchanges."),
Required
]
uint16 FCMaxNumberExchanges;
[
Description ("This property represents the maximum NPIV per port."),
Required
]
uint16 FCMaxNPIVPerPort;
[
Description ("This property represents the maximum number of FC Targets supported."),
Required
]
uint16 FCMaxNumberOfFCTargets;
[
Description ("This property represents the maximum number of outstanding commands across all connections."),
Required
]
uint16 FCMaxNumberOutStandingCommands;
[
Description ("The property details FC's port's flex adddressing support."),
Required,
Valuemap { "0", "2", "3" },
Values { "Unknown", "Supported", "Not Supported" }
]
uint8 FlexAddressingSupport;
[
Description ("The property details FC's port's uEFI support."),
Required,
Valuemap { "0", "2", "3" },
Values { "Unknown", "Supported", "Not Supported" }
]
uint8 uEFISupport;
[
Description ("The property details FC's boot support."),
Required,
Valuemap { "0", "2", "3" },
Values { "Unknown", "Supported", "Not Supported" }
]
uint8 FCBootSupport;
[
Description ("The property details FC's on chip thermal sensor support."),
Required,
Valuemap { "0", "2", "3" },
Values { "Unknown", "Supported", "Not Supported" }
]
uint8 OnChipThermalSensor;
[
Description ("The property details FC's feature licensing support."),
Required,
Valuemap { "0", "2", "3" },
Values { "Unknown", "Supported", "Not Supported" }
]
uint8 FeatureLicensingSupport;
[
Description ("This property specifies if the card supports persistence policy."),
Required,
Valuemap { "0", "2", "3" },
Values { "Unknown", "Supported", "Not Supported" }
]
uint8 PersistencePolicySupport;
};
/* SIG # Begin signature block */
/* MIItDgYJKoZIhvcNAQcCoIIs/zCCLPsCAQExDzANBglghkgBZQMEAgEFADB5Bgor */
/* BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG */
/* KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCwzXfjuRPkSi9d */
/* 9H89BoAzRziBDGKoETPTHL5vV0SUPaCCEmMwggXfMIIEx6ADAgECAhBOQOQ3VO3m */
/* jAAAAABR05R/MA0GCSqGSIb3DQEBCwUAMIG+MQswCQYDVQQGEwJVUzEWMBQGA1UE */
/* ChMNRW50cnVzdCwgSW5jLjEoMCYGA1UECxMfU2VlIHd3dy5lbnRydXN0Lm5ldC9s */
/* ZWdhbC10ZXJtczE5MDcGA1UECxMwKGMpIDIwMDkgRW50cnVzdCwgSW5jLiAtIGZv */
/* ciBhdXRob3JpemVkIHVzZSBvbmx5MTIwMAYDVQQDEylFbnRydXN0IFJvb3QgQ2Vy */
/* dGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjAeFw0yMTA1MDcxNTQzNDVaFw0zMDEx */
/* MDcxNjEzNDVaMGkxCzAJBgNVBAYTAlVTMRYwFAYDVQQKDA1FbnRydXN0LCBJbmMu */
/* MUIwQAYDVQQDDDlFbnRydXN0IENvZGUgU2lnbmluZyBSb290IENlcnRpZmljYXRp */
/* b24gQXV0aG9yaXR5IC0gQ1NCUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK */
/* AoICAQCngY/3FEW2YkPy2K7TJV5IT1G/xX2fUBw10dZ+YSqUGW0nRqSmGl33VFFq */
/* gCLGqGZ1TVSDyV5oG6v2W2Swra0gvVTvRm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LM0B7zfxW/cX/8N */
/* xRTgZ2WixUFQJ7E9LFjgLC4/OZcOkppUa6bXXor46loWGoGmGA2/3ZktMlVW0T8p */
/* Zr15F5s85xk/La8N9GBNfak/e8X04Jj4vbT6taFQv5Zs8eGX8weoRpwALgsaJHjg */
/* ml1kE22o9XTFaT1NLUMIGKgwpxtFFeWeuifN363YoEAmPUtUzxk32SxZm4b+2p3H */
/* V4r/tN9k7+b9yApu48PDg54xU7R2RnkmPBVMxv5Bx91spxtqKkDltsX12gYFYW/n */
/* 5386cFflE2WyT8qrxkUE+6tlFBz94xTV0pmtk+WFcEvEWbDrNBOA64Hmm030ybsN */
/* HjeuWur7AD7wg8LjqeylPpUM+0hUSrOmp+LSUQWc+HN1He+zsWD+neRSKUa6ucWC */
/* lXeZ0vS31sqQu9UUHyZBDtp9GJCty3IchF5T2x0xwBw4DG7NrNEjYnPvpibiSTcy */
/* XtFdy7+3oEo0xpAlBqZi+7YWES8Qfky9ZvVcvjZKtEn4pZKBCiRO6HUSGdu9VyFM */
/* kW+rMqbo1wlpz/dc5BoqxQ0b */
/* SIG # End signature block */
|
combined_dataset/train/non-malicious/The Letter Diamond.ps1
|
The Letter Diamond.ps1
|
## Write a program which draws a diamond of the form illustrted
## below. The letter which is to appear at the widest point of the
## figure (E in the example) is to be specified as the input data.
## A
## B B
## C C
## D D
## E E
## D D
## C C
## B B
## A
Param([char]$letter = "E")
$start = [int][char]"B"
$end = [int]$letter
$outerpadding = ($end - $start) + 5
$innerpadding = -1
Write-Host "$(" " * $outerpadding)A"
foreach($char in ([string[]][char[]]($start..$end))) {
$innerpadding += 2
$outerpadding--
Write-Host "$(" " * $outerpadding)$char$(" " * $innerpadding)$char"
}
$end--
foreach($char in ([string[]][char[]]($end..$start))) {
$innerpadding -= 2
$outerpadding++
Write-Host "$(" " * $outerpadding)$char$(" " * $innerpadding)$char"
}
Write-Host "$(" " * $outerpadding) A"
|
combined_dataset/train/non-malicious/sample_25_23.ps1
|
sample_25_23.ps1
|
#
# Module manifest for module 'OCI.PSModules.Resourcesearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Resourcesearch.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = '7fdc6e7d-ec41-48a8-9c23-5e5149a3e83b'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Resourcesearch Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '80.0.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Resourcesearch.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIResourcesearchResourceType',
'Get-OCIResourcesearchResourceTypesList',
'Invoke-OCIResourcesearchSearchResources'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Resourcesearch'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/sample_3_97.ps1
|
sample_3_97.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.ms/powershell72-help'
FunctionsToExport = @()
AliasesToExport = @("gcb", "gtz", "scb")
CmdletsToExport=@("Add-Content",
"Clear-Content",
"Clear-ItemProperty",
"Join-Path",
"Convert-Path",
"Copy-ItemProperty",
"Get-ChildItem",
"Get-Clipboard",
"Set-Clipboard",
"Get-Content",
"Get-ItemProperty",
"Get-ItemPropertyValue",
"Move-ItemProperty",
"Get-Location",
"Set-Location",
"Push-Location",
"Pop-Location",
"New-PSDrive",
"Remove-PSDrive",
"Get-PSDrive",
"Get-Item",
"New-Item",
"Set-Item",
"Remove-Item",
"Move-Item",
"Rename-Item",
"Copy-Item",
"Clear-Item",
"Invoke-Item",
"Get-PSProvider",
"New-ItemProperty",
"Split-Path",
"Test-Path",
"Get-Process",
"Stop-Process",
"Wait-Process",
"Debug-Process",
"Start-Process",
"Test-Connection",
"Remove-ItemProperty",
"Rename-ItemProperty",
"Resolve-Path",
"Set-Content",
"Set-ItemProperty",
"Get-TimeZone",
"Stop-Computer",
"Restart-Computer")
}
# SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDZALKsuUJ2I+wz
# JJFUZn8RCcmowiJC42TpooVsdJsPsaCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0
# Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjQwO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XNoaW5ndG9uMRAwDgYDVQQHEwdS
# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT
# HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB91ggdQTK+8L0AAEA
# AAH3MCIEIPLH4fJzB+Qtp8J7NvowDwCiOQrD9NzD49xowuJrCprJMA0GCSqGSIb3
# DQEBCwUABIICAJeMYqFxCrHjiz7jUNzwb3tgIssY2TlWRX9fg1XKWEqfWy5L5vHq
# 9s73SWUwcxVpPS9uCaAL2x+RwIow+BmVKdUV4RRZqUIRoJAb8naQmyG8nBdpA+xw
# uJyQF5rIwuZCioth4qTe+9eBtl/7gsOvncQ4USSTRKvXfnuDFqVSHYeMl6mIs6nK
# L9yf0coAQgCsrgknV6ltAI5UQTS+gbKWVmreeZgXLZOynqcw3NWJe7OGdQWGbTMW
# 013w2aStmqbeVZX3ExeL5I479qxuvkAcU2Mgg9z0Oe4sJat+QxGfB2CeJ9LzKX1d
# IU/JAYv8ci8FsIBywmSrhY51yz/+txlVPZfOvveVCFnGpDF1HnwUfXBvFrRgQjCf
# i2L8PvdyhCzjCcIEyt8b3MDfTog+cOeW9FMU3HF9yEo1PRDriZ+JisjmaWpMqRSC
# OY/Ft0Aq0uNfwyHsVn5HKcAhSOzik0cy9GmmnPa2lL7MPEClf8P0HaTdcgnqft7Q
# 87RSw6H+784LWmIkqYffUgXvePduz3/cbxOMVEl+0/oipA0+9Nh+i95yhF5/L8IQ
# DXNKXY79GKl1X7choa8PyLb8qhd+NWu1kCQ2x8ZKZV0sBlJwvXBkiT8ZLl9c6o9r
# n831lSTQhz7NYxZ8fBjPa99Zg4yg28j6WUBdVUdZnSM0wAx6NZOvjWT8
# SIG # End signature block
|
combined_dataset/train/non-malicious/3518.ps1
|
3518.ps1
|
function Test-RecordSetCrud
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$createdRecord = New-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Ttl 100 -RecordType A -Metadata @{ tag1 ="val1"}
Assert-NotNull $createdRecord
Assert-NotNull $createdRecord.Etag
Assert-AreEqual 100 $createdRecord.Ttl
Assert-AreEqual $zoneName $createdRecord.ZoneName
Assert-AreEqual $recordName $createdRecord.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdRecord.ResourceGroupName
Assert-AreEqual 1 $createdRecord.Metadata.Count
Assert-AreEqual 0 $createdRecord.Records.Count
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedRecord.ResourceGroupName
Assert-AreEqual $retrievedRecord.Etag $createdRecord.Etag
Assert-AreEqual 1 $retrievedRecord.Metadata.Count
Assert-AreEqual 0 $retrievedRecord.Records.Count
$createdRecord.Metadata = @{ tag1 = "val1"; tag2 = "val2"}
$createdRecord.Ttl = 1300
$updatedRecord = $createdRecord | Add-AzPrivateDnsRecordConfig -Ipv4Address 13.13.0.13 | Set-AzPrivateDnsRecordSet
Assert-NotNull $updatedRecord
Assert-NotNull $updatedRecord.Etag
Assert-AreEqual $recordName $updatedRecord.Name
Assert-AreEqual $zoneName $updatedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $updatedRecord.ResourceGroupName
Assert-AreEqual 1300 $updatedRecord.Ttl
Assert-AreNotEqual $updatedRecord.Etag $createdRecord.Etag
Assert-AreEqual 2 $updatedRecord.Metadata.Count
Assert-AreEqual 1 $updatedRecord.Records.Count
Assert-AreEqual "13.13.0.13" $updatedRecord.Records[0].Ipv4Address
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedRecord.ResourceGroupName
Assert-AreEqual $retrievedRecord.Etag $updatedRecord.Etag
Assert-AreEqual 2 $retrievedRecord.Metadata.Count
Assert-AreEqual 1 $retrievedRecord.Records.Count
Assert-AreEqual "13.13.0.13" $retrievedRecord.Records[0].Ipv4Address
$removed = Remove-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A -PassThru -Confirm:$false
Assert-True { $removed }
Assert-ThrowsLike { Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A } "*does not exist*"
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetCrudTrimsDotFromZoneName
{
$zoneName = Get-RandomZoneName
$zoneNameWithDot = $zoneName + "."
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$createdRecord = New-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneNameWithDot -ResourceGroupName $resourceGroup.ResourceGroupName -Ttl 100 -RecordType A -Metadata @{tag1 = "val1"}
Assert-NotNull $createdRecord
Assert-AreEqual $zoneName $createdRecord.ZoneName
Assert-AreEqual $recordName $createdRecord.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdRecord.ResourceGroupName
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneNameWithDot -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedRecord.ResourceGroupName
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneNameWithDot -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedRecord.ResourceGroupName
$removed = Remove-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneNameWithDot -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A -PassThru -Confirm:$false
Assert-True { $removed }
Assert-ThrowsLike { Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A } "*does not exist*"
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetCrudWithPiping
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$updatedRecord = New-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType A -Metadata @{tag1 = "val1"} | Add-AzPrivateDnsRecordConfig -Ipv4Address 13.13.0.13 | Set-AzPrivateDnsRecordSet
$resourceGroupName = $updatedRecord.ResourceGroupName
Assert-NotNull $updatedRecord
Assert-NotNull $updatedRecord.Etag
Assert-AreEqual $recordName $updatedRecord.Name
Assert-AreEqual $zoneName $updatedRecord.ZoneName
Assert-NotNull $updatedRecord.ResourceGroupName
Assert-AreEqual 1 $updatedRecord.Metadata.Count
Assert-AreEqual 1 $updatedRecord.Records.Count
Assert-AreEqual "13.13.0.13" $updatedRecord.Records[0].Ipv4Address
$removed = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $updatedRecord.ResourceGroupName -RecordType A | Remove-AzPrivateDnsRecordSet -PassThru -Confirm:$false
Assert-True { $removed }
Assert-ThrowsLike { Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $updatedRecord.ResourceGroupName -RecordType A } "*does not exist*"
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $updatedRecord.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroupName -Force
}
function Test-RecordSetCrudWithPipingTrimsDotFromZoneName
{
$zoneName = Get-RandomZoneName
$zoneNameWithDot = $zoneName + "."
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$zoneObjectWithDot = New-Object Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone
$zoneObjectWithDot.Name = $zoneNameWithDot
$zoneObjectWithDot.ResourceGroupName = $zone.ResourceGroupName
$createdRecord = New-AzPrivateDnsRecordSet -ZoneName $zoneObjectWithDot.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType A -Metadata @{ tag1 ="val1"}
Assert-NotNull $createdRecord
Assert-AreEqual $recordName $createdRecord.Name
Assert-AreEqual $zoneName $createdRecord.ZoneName
Assert-AreEqual $zone.ResourceGroupName $createdRecord.ResourceGroupName
$recordObjectWithDot = New-Object Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
$recordObjectWithDot.Name = $recordName
$recordObjectWithDot.ZoneName = $zoneNameWithDot
$recordObjectWithDot.ResourceGroupName = $zone.ResourceGroupName
$recordObjectWithDot.Ttl = 60
$recordAfterAdd = $recordObjectWithDot | Add-AzPrivateDnsRecordConfig -Ipv4Address 13.13.0.13
Assert-AreEqual $zoneNameWithDot $recordAfterAdd.ZoneName
$updatedRecord = $recordAfterAdd | Set-AzPrivateDnsRecordSet -Overwrite
Assert-NotNull $updatedRecord
Assert-AreEqual $recordName $updatedRecord.Name
Assert-AreEqual $zoneName $updatedRecord.ZoneName
Assert-AreEqual $zone.ResourceGroupName $updatedRecord.ResourceGroupName
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneNameWithDot -ResourceGroupName $zone.ResourceGroupName -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $zone.ResourceGroupName $updatedRecord.ResourceGroupName
$removed = $recordObjectWithDot | Remove-AzPrivateDnsRecordSet -Overwrite -PassThru -Confirm:$false
Assert-True { $removed }
Assert-ThrowsLike { Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $updatedRecord.ResourceGroupName -RecordType A } "*does not exist*"
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $zone.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $zone.ResourceGroupName -Force
}
function Test-RecordSetCrudWithZoneResourceId
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$createdRecord = New-AzPrivateDnsRecordSet -Name $recordName -ParentResourceId $zone.ResourceId -Ttl 100 -RecordType A -Metadata @{ tag1 ="val1"}
Assert-NotNull $createdRecord
Assert-NotNull $createdRecord.Etag
Assert-AreEqual 100 $createdRecord.Ttl
Assert-AreEqual $zoneName $createdRecord.ZoneName
Assert-AreEqual $recordName $createdRecord.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdRecord.ResourceGroupName
Assert-AreEqual 1 $createdRecord.Metadata.Count
Assert-AreEqual 0 $createdRecord.Records.Count
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ParentResourceId $zone.ResourceId -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedRecord.ResourceGroupName
Assert-AreEqual $retrievedRecord.Etag $createdRecord.Etag
Assert-AreEqual 1 $retrievedRecord.Metadata.Count
Assert-AreEqual 0 $retrievedRecord.Records.Count
$createdRecord.Metadata = @{ tag1 = "val1"; tag2 = "val2"}
$createdRecord.Ttl = 1300
$updatedRecord = $createdRecord | Add-AzPrivateDnsRecordConfig -Ipv4Address 13.13.0.13 | Set-AzPrivateDnsRecordSet
Assert-NotNull $updatedRecord
Assert-NotNull $updatedRecord.Etag
Assert-AreEqual $recordName $updatedRecord.Name
Assert-AreEqual $zoneName $updatedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $updatedRecord.ResourceGroupName
Assert-AreEqual 1300 $updatedRecord.Ttl
Assert-AreNotEqual $updatedRecord.Etag $createdRecord.Etag
Assert-AreEqual 2 $updatedRecord.Metadata.Count
Assert-AreEqual 1 $updatedRecord.Records.Count
Assert-AreEqual "13.13.0.13" $updatedRecord.Records[0].Ipv4Address
$retrievedRecord = Get-AzPrivateDnsRecordSet -Name $recordName -ParentResourceId $zone.ResourceId -RecordType A
Assert-NotNull $retrievedRecord
Assert-AreEqual $recordName $retrievedRecord.Name
Assert-AreEqual $zoneName $retrievedRecord.ZoneName
Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedRecord.ResourceGroupName
Assert-AreEqual $retrievedRecord.Etag $updatedRecord.Etag
Assert-AreEqual 2 $retrievedRecord.Metadata.Count
Assert-AreEqual 1 $retrievedRecord.Records.Count
Assert-AreEqual "13.13.0.13" $retrievedRecord.Records[0].Ipv4Address
$removed = Remove-AzPrivateDnsRecordSet -Name $recordName -Zone $zone -RecordType A -PassThru -Confirm:$false
Assert-True { $removed }
Assert-ThrowsLike { Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A } "*does not exist*"
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
Remove-AzResourceGroup -Name $zone.ResourceGroupName -Force
}
function Test-RecordSetA
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType A -PrivateDnsRecords @()
$record = $record | Add-AzPrivateDnsRecordConfig -Ipv4Address 1.1.1.1
$record = $record | Add-AzPrivateDnsRecordConfig -Ipv4Address 2.2.2.2
$record = $record | Remove-AzPrivateDnsRecordConfig -Ipv4Address 1.1.1.1
$record = $record | Remove-AzPrivateDnsRecordConfig -Ipv4Address 3.3.3.3
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual "2.2.2.2" $getResult.Records[0].Ipv4Address
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-AreEqual 1 $listResult[0].Records.Count
Assert-AreEqual "2.2.2.2" $listResult[0].Records[0].Ipv4Address
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -PassThru -Confirm:$false
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetANonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$aRecords=@()
$aRecords += New-AzPrivateDnsRecordConfig -IPv4Address "192.168.0.1"
$aRecords += New-AzPrivateDnsRecordConfig -IPv4Address "192.168.0.2"
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType A -PrivateDnsRecords $aRecords
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-AreEqual 2 $getResult.Records.Count
Assert-AreEqual "192.168.0.1" $getResult.Records[0].Ipv4Address
Assert-AreEqual "192.168.0.2" $getResult.Records[1].Ipv4Address
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A
Assert-AreEqual 2 $listResult[0].Records.Count
Assert-AreEqual "192.168.0.1" $listResult[0].Records[0].Ipv4Address
Assert-AreEqual "192.168.0.2" $listResult[0].Records[1].Ipv4Address
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetAAAA
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType AAAA
$record = $record | Add-AzPrivateDnsRecordConfig -Ipv6Address 1::11
$record = $record | Add-AzPrivateDnsRecordConfig -Ipv6Address 2::22
$record = $record | Add-AzPrivateDnsRecordConfig -Ipv6Address 4::44
$record = $record | Remove-AzPrivateDnsRecordConfig -Ipv6Address 2::22
$record = $record | Remove-AzPrivateDnsRecordConfig -Ipv6Address 3::33
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType AAAA
Assert-AreEqual 2 $getResult.Records.Count
Assert-AreEqual "1::11" $getResult.Records[0].Ipv6Address
Assert-AreEqual "4::44" $getResult.Records[1].Ipv6Address
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType AAAA
Assert-AreEqual 2 $listResult[0].Records.Count
Assert-AreEqual "1::11" $listResult[0].Records[0].Ipv6Address
Assert-AreEqual "4::44" $listResult[0].Records[1].Ipv6Address
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetAAAANonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$aaaaRecords=@()
$aaaaRecords += New-AzPrivateDnsRecordConfig -IPv6Address "2002::1"
$aaaaRecords += New-AzPrivateDnsRecordConfig -IPv6Address "2002::2"
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType AAAA -PrivateDnsRecords $aaaaRecords
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType AAAA
Assert-AreEqual 2 $getResult.Records.Count
Assert-AreEqual "2002::1" $getResult.Records[0].Ipv6Address
Assert-AreEqual "2002::2" $getResult.Records[1].Ipv6Address
$removed = $getResult | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetCNAME
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType CNAME
$record = $record | Add-AzPrivateDnsRecordConfig -Cname www.example.com
$record = $record | Remove-AzPrivateDnsRecordConfig -Cname www.example.com
$record = $record | Add-AzPrivateDnsRecordConfig -Cname www.contoso.com
$record = $record | Remove-AzPrivateDnsRecordConfig -Cname gibberish
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType CNAME
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual "www.contoso.com" $getResult.Records[0].Cname
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType CNAME
Assert-AreEqual 1 $listResult[0].Records.Count
Assert-AreEqual "www.contoso.com" $listResult[0].Records[0].Cname
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetCNAMENonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$records = New-AzPrivateDnsRecordConfig -Cname "www.contoso.com"
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType CNAME -PrivateDnsRecords $records
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType CNAME
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual "www.contoso.com" $getResult.Records[0].Cname
$removed = $getResult | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetMX
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $zone.ResourceGroupName -Name $recordName -Ttl 100 -RecordType MX
$record = $record | Add-AzPrivateDnsRecordConfig -Exchange mail1.theg.com -Preference 10
$record = $record | Add-AzPrivateDnsRecordConfig -Exchange mail2.theg.com -Preference 10
$record = $record | Remove-AzPrivateDnsRecordConfig -Exchange mail1.theg.com -Preference 10
$record = $record | Remove-AzPrivateDnsRecordConfig -Exchange mail2.theg.com -Preference 15
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType MX
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual "mail2.theg.com" $getResult.Records[0].Exchange
Assert-AreEqual 10 $getResult.Records[0].Preference
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType MX
Assert-AreEqual 1 $listResult[0].Records.Count
Assert-AreEqual "mail2.theg.com" $listResult[0].Records[0].Exchange
Assert-AreEqual 10 $listResult[0].Records[0].Preference
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetMXNonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$records = @();
$records += New-AzPrivateDnsRecordConfig -Exchange mail2.theg.com -Preference 0
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType MX -PrivateDnsRecords $records
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType MX
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual "mail2.theg.com" $getResult.Records[0].Exchange
Assert-AreEqual 0 $getResult.Records[0].Preference
$removed = $getResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetTXT
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType TXT
$record = $record | Add-AzPrivateDnsRecordConfig -Value text1
$record = $record | Add-AzPrivateDnsRecordConfig -Value text2
$record = $record | Add-AzPrivateDnsRecordConfig -Value text3
$record = $record | Remove-AzPrivateDnsRecordConfig -Value text1
$record = $record | Remove-AzPrivateDnsRecordConfig -Value text4
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType TXT
Assert-AreEqual 2 $getResult.Records.Count
Assert-AreEqual text2 $getResult.Records[0].Value
Assert-AreEqual text3 $getResult.Records[1].Value
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType TXT
Assert-AreEqual 2 $listResult[0].Records.Count
Assert-AreEqual text2 $listResult[0].Records[0].Value
Assert-AreEqual text3 $listResult[0].Records[1].Value
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetTXTNonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$records = @()
$records += New-AzPrivateDnsRecordConfig -Value text2
$records += New-AzPrivateDnsRecordConfig -Value text3
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType TXT -PrivateDnsRecords $records
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType TXT
Assert-AreEqual 2 $getResult.Records.Count
Assert-AreEqual text2 $getResult.Records[0].Value
Assert-AreEqual text3 $getResult.Records[1].Value
$removed = $getResult | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetTXTLegacyLengthValidation
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$longRecordTxt = Get-TxtOfSpecifiedLength 1025;
$maxRecordTxt = Get-TxtOfSpecifiedLength 1024;
$recordSet = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType TXT ;
Assert-Throws {$recordSet | Add-AzPrivateDnsRecordConfig -Value $longRecordTxt }
$recordSet = $recordSet | Add-AzPrivateDnsRecordConfig -Value $maxRecordTxt
$setResult = $recordSet | Set-AzPrivateDnsRecordSet ;
Assert-AreEqual $maxRecordTxt $setResult.Records[0].Value;
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType TXT ;
Assert-AreEqual $maxRecordTxt $getResult.Records[0].Value;
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetTXTLengthValidation
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$longRecordTxt = Get-TxtOfSpecifiedLength 1025;
Assert-Throws {New-AzPrivateDnsRecordConfig -Value $longRecordTxt }
$maxRecordTxt = Get-TxtOfSpecifiedLength 1024;
$maxRecord = New-AzPrivateDnsRecordConfig -Value $maxRecordTxt
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType TXT -PrivateDnsRecords $maxRecord ;
Assert-AreEqual $maxRecordTxt $record.Records[0].Value;
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType TXT ;
Assert-AreEqual $maxRecordTxt $getResult.Records[0].Value;
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetPTR
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType PTR
$record = $record | Add-AzPrivateDnsRecordConfig -Ptrdname "contoso1.com"
$record = $record | Add-AzPrivateDnsRecordConfig -Ptrdname "contoso2.com"
$record = $record | Add-AzPrivateDnsRecordConfig -Ptrdname "contoso3.com"
$record = $record | Remove-AzPrivateDnsRecordConfig -Ptrdname "contoso1.com"
$record = $record | Remove-AzPrivateDnsRecordConfig -Ptrdname "contoso4.com"
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType PTR
Assert-AreEqual 2 $getResult.Records.Count
Assert-AreEqual "contoso2.com" $getResult.Records[0].Ptrdname
Assert-AreEqual "contoso3.com" $getResult.Records[1].Ptrdname
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType PTR
Assert-AreEqual 2 $listResult[0].Records.Count
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetPTRNonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$records = @()
$records += New-AzPrivateDnsRecordConfig -PtrdName "contoso.com"
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType PTR -PrivateDnsRecords $records
Assert-AreEqual 1 $record.Records.Count
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType PTR
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual "contoso.com" $getResult.Records[0].Ptrdname
$removed = $getResult | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetSRV
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType SRV
$record = $record | Add-AzPrivateDnsRecordConfig -Port 53 -Priority 1 -Target ns1.example.com -Weight 5
$record = $record | Add-AzPrivateDnsRecordConfig -Port 53 -Priority 2 -Target ns2.example.com -Weight 10
$record = $record | Remove-AzPrivateDnsRecordConfig -Port 53 -Priority 2 -Target ns2.example.com -Weight 10
$record = $record | Remove-AzPrivateDnsRecordConfig -Port 42 -Priority 999 -Target ns5.example.com -Weight 1600
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType SRV
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual 53 $getResult.Records[0].Port
Assert-AreEqual 1 $getResult.Records[0].Priority
Assert-AreEqual ns1.example.com $getResult.Records[0].Target
Assert-AreEqual 5 $getResult.Records[0].Weight
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType SRV
Assert-AreEqual 1 $listResult[0].Records.Count
Assert-AreEqual 53 $listResult[0].Records[0].Port
Assert-AreEqual 1 $listResult[0].Records[0].Priority
Assert-AreEqual ns1.example.com $listResult[0].Records[0].Target
Assert-AreEqual 5 $listResult[0].Records[0].Weight
$removed = $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetSRVNonEmpty
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$records = @()
$records += New-AzPrivateDnsRecordConfig -Port 53 -Priority 1 -Target ns1.example.com -Weight 5
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType SRV -PrivateDnsRecords $records
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType SRV
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual 53 $getResult.Records[0].Port
Assert-AreEqual 1 $getResult.Records[0].Priority
Assert-AreEqual ns1.example.com $getResult.Records[0].Target
Assert-AreEqual 5 $getResult.Records[0].Weight
$removed = $getResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetSOA
{
$zoneName = Get-RandomZoneName
$recordName = "@"
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = $zone | Get-AzPrivateDnsRecordSet -Name $recordName -RecordType SOA
Assert-Throws { New-AzPrivateDnsRecordSet -Name $recordName -RecordType SOA -ResourceGroupName $resourceGroup -ZoneName $zoneName -Ttl 100 } "There can be only one record set of type SOA, and it can be modified but not deleted."
Assert-AreEqual 1 $record.Count
$record.Records[0].RefreshTime = 13
$record.Records[0].RetryTime = 666
$record.Records[0].ExpireTime = 42
$record.Records[0].MinimumTtl = 321
$record.Ttl = 110901
$record | Set-AzPrivateDnsRecordSet
$getResult = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType SOA
Assert-AreEqual 1 $getResult.Records.Count
Assert-AreEqual 13 $getResult.Records[0].RefreshTime
Assert-AreEqual 666 $getResult.Records[0].RetryTime
Assert-AreEqual 42 $getResult.Records[0].ExpireTime
Assert-AreEqual 321 $getResult.Records[0].MinimumTtl
Assert-AreEqual 110901 $getResult.Ttl
$listResult = Get-AzPrivateDnsRecordSet -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType SOA
Assert-AreEqual 1 $listResult[0].Records.Count
Assert-AreEqual 13 $listResult[0].Records[0].RefreshTime
Assert-AreEqual 666 $listResult[0].Records[0].RetryTime
Assert-AreEqual 42 $listResult[0].Records[0].ExpireTime
Assert-AreEqual 321 $listResult[0].Records[0].MinimumTtl
Assert-AreEqual 110901 $listResult[0].Ttl
Assert-Throws { $listResult[0] | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru } "Record sets of type 'SOA' with name '@' cannot be deleted."
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Validate-CAARecord(
$record,
[int] $flags,
$tag,
$value)
{
Assert-AreEqual $flags $record.Flags
Assert-AreEqual $tag $record.Tag
Assert-AreEqual $value $record.Value
}
function Test-RecordSetNewAlreadyExists
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$record = New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 100 -RecordType A | Add-AzPrivateDnsRecordConfig -Ipv4Address 1.2.9.8
$message = [System.String]::Format("The Record set {0} exists already and hence cannot be created again.", $recordName);
Assert-Throws { New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 212 -RecordType A } $message
New-AzPrivateDnsRecordSet -ZoneName $zone.Name -ResourceGroupName $resourceGroup.ResourceGroupName -Name $recordName -Ttl 999 -RecordType A -Overwrite -Confirm:$false
$retrievedRecordSet = $zone | Get-AzPrivateDnsRecordSet -Name $recordName -RecordType A
Assert-AreEqual 999 $retrievedRecordSet.Ttl
Assert-AreEqual 0 $retrievedRecordSet.Records.Count
$retrievedRecordSet | Remove-AzPrivateDnsRecordSet -Confirm:$false
$zone | Remove-AzPrivateDnsZone -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetAddRecordTypeMismatch
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = $zone | New-AzPrivateDnsRecordSet -Name $recordName -Ttl 100 -RecordType MX
Assert-Throws { $recordSet | Add-AzPrivateDnsRecordConfig -Ipv6Address 3::90 } "Cannot add a record of type AAAA to a record set of type MX. The types must match."
$recordSet | Remove-AzPrivateDnsRecordSet -Confirm:$false
Remove-AzPrivateDnsZone -Name $recordSet.ZoneName -ResourceGroupName $recordSet.ResourceGroupName -Confirm:$false
}
function Test-RecordSetAddTwoCnames
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = $zone | New-AzPrivateDnsRecordSet -Name $recordName -Ttl 100 -RecordType CNAME
$resourceGroupName = $recordSet.ResourceGroupName
$recordSet | Add-AzPrivateDnsRecordConfig -Cname www.goril.la
Assert-Throws { $recordSet | Add-AzPrivateDnsRecordConfig -Cname rubadub.dub } "There already exists a CNAME record in this set. A CNAME record set can only contain one record."
Assert-AreEqual 1 $recordSet.Records.Count
$recordSet | Remove-AzPrivateDnsRecordConfig -Cname www.goril.la
$recordSet | Add-AzPrivateDnsRecordConfig -Cname rubadub.dub
Assert-AreEqual 1 $recordSet.Records.Count
Assert-AreEqual rubadub.dub $recordSet.Records[0].Cname
$recordSet | Remove-AzPrivateDnsRecordSet -Confirm:$false
Remove-AzPrivateDnsZone -Name $recordSet.ZoneName -ResourceGroupName $recordSet.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroupName -Force
}
function Test-RecordSetRemoveRecordTypeMismatch
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = $zone | New-AzPrivateDnsRecordSet -Name $recordName -Ttl 100 -RecordType TXT
$resourceGroupName = $recordSet.ResourceGroupName
Assert-Throws { $recordSet | Remove-AzPrivateDnsRecordConfig -Cname nsa.fed.gov } "Cannot remove a record of type CNAME from a record set of type TXT. The types must match."
$recordSet | Remove-AzPrivateDnsRecordSet -Confirm:$false
Remove-AzPrivateDnsZone -Name $recordSet.ZoneName -ResourceGroupName $recordSet.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroupName -Force
}
function Test-RecordSetRemoveUsingResourceId
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = $zone | New-AzPrivateDnsRecordSet -Name $recordName -Ttl 100 -RecordType TXT
$resourceGroupName = $recordSet.ResourceGroupName
$removed = Remove-AzPrivateDnsRecordSet -ResourceId $recordSet.Id -PassThru -Confirm:$false
Assert-True { $removed }
Assert-ThrowsLike { Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A } "*does not exist*"
$recordSet | Remove-AzPrivateDnsRecordSet -Confirm:$false
Remove-AzPrivateDnsZone -Name $recordSet.ZoneName -ResourceGroupName $recordSet.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroupName -Force
}
function Test-RecordSetEtagMismatch
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = $zone | New-AzPrivateDnsRecordSet -Name $recordName -Ttl 100 -RecordType AAAA
$originalEtag = $recordSet.Etag
$recordSet.Etag = "gibberish"
$message = [System.String]::Format("The Record set {0} has been modified (etag mismatch).", $recordName);
Assert-Throws { $recordSet | Set-AzPrivateDnsRecordSet } $message
$updatedRecordSet = $recordSet | Set-AzPrivateDnsRecordSet -Overwrite
Assert-AreNotEqual "gibberish" $updatedRecordSet.Etag
Assert-AreNotEqual $recordSet.Etag $updatedRecordSet.Etag
$message = [System.String]::Format("The Record set {0} has been modified (etag mismatch).", $recordName);
Assert-Throws { $recordSet | Remove-AzPrivateDnsRecordSet -Confirm:$false } $message
Assert-True { $recordSet | Remove-AzPrivateDnsRecordSet -Overwrite -Confirm:$false -PassThru }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $recordSet.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $recordSet.ResourceGroupName -Force
}
function Test-RecordSetGet
{
$zoneName = Get-RandomZoneName
$recordName1 = getAssetname
$recordName2 = getAssetname
$recordName3 = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$soaRecords = Get-AzPrivateDnsRecordSet -Zone $zone -RecordType SOA
Assert-AreEqual 1 $soaRecords.Count
New-AzPrivateDnsRecordSet -Zone $zone -Name $recordName1 -Ttl 100 -RecordType AAAA
New-AzPrivateDnsRecordSet -Zone $zone -Name $recordName2 -Ttl 1200 -RecordType AAAA
New-AzPrivateDnsRecordSet -Zone $zone -Name $recordName3 -Ttl 1500 -RecordType MX
$aaaaRecords = $zone | Get-AzPrivateDnsRecordSet -RecordType AAAA
$mxRecords = $zone | Get-AzPrivateDnsRecordSet -RecordType MX
Assert-AreEqual 2 $aaaaRecords.Count
Assert-AreEqual 1 $mxRecords.Count
$allRecords = Get-AzPrivateDnsRecordSet -Zone $zone
Assert-AreEqual 4 $allRecords.Count
$zone | Remove-AzPrivateDnsRecordSet -Name $recordName1 -RecordType AAAA -Confirm:$false
$zone | Remove-AzPrivateDnsRecordSet -Name $recordName2 -RecordType AAAA -Confirm:$false
$zone | Remove-AzPrivateDnsRecordSet -Name $recordName3 -RecordType MX -Confirm:$false
$zone | Remove-AzPrivateDnsZone -Confirm:$false -Overwrite
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetGetWithEndsWith
{
$rootRecordName = "@"
$recordSuffix = ".com"
$anotherSuffix = ".con"
$zoneName = Get-RandomZoneName
$recordName1 = (getAssetname) + $recordSuffix
$recordName2 = (getAssetname) + $anotherSuffix
$recordName3 = (getAssetname) + $recordSuffix
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$rootRecords = $zone | Get-AzPrivateDnsRecordSet -EndsWith $rootRecordName
Assert-AreEqual 2 $rootRecords.Count -Message ("Expected 2 root records. Actual: " + $rootRecords.Count)
New-AzPrivateDnsRecordSet -Zone $zone -Name $recordName1 -Ttl 100 -RecordType AAAA
New-AzPrivateDnsRecordSet -Zone $zone -Name $recordName2 -Ttl 1200 -RecordType AAAA
New-AzPrivateDnsRecordSet -Zone $zone -Name $recordName3 -Ttl 1500 -RecordType MX
$aaaaRecords = $zone | Get-AzPrivateDnsRecordSet -RecordType AAAA -EndsWith $recordSuffix
$mxRecords = $zone | Get-AzPrivateDnsRecordSet -RecordType MX -EndsWith $recordSuffix
Assert-AreEqual 1 $aaaaRecords.Count -Message ("Expected 1 AAAA record. Actual: " + $aaaaRecords.Count)
Assert-AreEqual 1 $mxRecords.Count -Message ("Expected 1 MX record. Actual: " + $mxRecords.Count)
$allRecords = $zone | Get-AzPrivateDnsRecordSet -EndsWith $recordSuffix
Assert-AreEqual 2 $allRecords.Count -Message ("Expected 2 records across types. Actual: " + $allRecords.Count)
$zone | Remove-AzPrivateDnsRecordSet -Name $recordName1 -RecordType AAAA -Confirm:$false
$zone | Remove-AzPrivateDnsRecordSet -Name $recordName2 -RecordType AAAA -Confirm:$false
$zone | Remove-AzPrivateDnsRecordSet -Name $recordName3 -RecordType MX -Confirm:$false
$zone | Remove-AzPrivateDnsZone -Confirm:$false -Overwrite
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetEndsWithZoneName
{
$zoneName = Get-RandomZoneName
$recordName = (getAssetname) + "." + $zoneName
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$message = "PSPrivateDnsRecordSet"
$warning = (New-AzPrivateDnsRecordSet -Name $recordName -RecordType A -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Ttl 100)3>&1 | Out-String
Write-Verbose $warning
Remove-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType A -PassThru -Confirm:$false
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
function Test-RecordSetNewRecordNoName
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = New-AzPrivateDnsRecordSet -Name $recordName -Ttl 100 -RecordType MX -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$recordSet = Get-AzPrivateDnsRecordSet -ResourceGroupName $resourceGroup.ResourceGroupName -ZoneName $zoneName -RecordType MX
$record1 = Add-AzPrivateDnsRecordConfig -Exchange mail1.theg.com -Preference 1 -RecordSet $recordSet
$recordSet | Set-AzPrivateDnsRecordSet
$getRecordSetOne = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType MX
Assert-AreEqual 1 $getRecordSetOne.Records.Count
$record2 = Add-AzPrivateDnsRecordConfig -Exchange mail2.theg.com -Preference 10 -RecordSet $getRecordSetOne
$getRecordSetOne | Set-AzPrivateDnsRecordSet
$getRecordSetTwo = Get-AzPrivateDnsRecordSet -Name $recordName -ZoneName $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -RecordType MX
Assert-AreEqual 2 $getRecordSetTwo.Records.Count
$record1 = $record1 | Remove-AzPrivateDnsRecordConfig -Exchange mail1.theg.com -Preference 1
$record2 = $record2 | Remove-AzPrivateDnsRecordConfig -Exchange mail2.theg.com -Preference 10
$removed = $getRecordSetTwo | Remove-AzPrivateDnsRecordSet -Confirm:$false -PassThru
Assert-True { $removed }
Remove-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
|
combined_dataset/train/non-malicious/1306.ps1
|
1306.ps1
|
function Test-CPathIsJunction
{
[CmdletBinding(DefaultParameterSetName='Path')]
param(
[Parameter(Mandatory=$true,ParameterSetName='Path',Position=0)]
[string]
$Path,
[Parameter(Mandatory=$true,ParameterSetName='LiteralPath')]
[string]
$LiteralPath
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
if( $PSCmdlet.ParameterSetName -eq 'Path' )
{
if( [Management.Automation.WildcardPattern]::ContainsWildcardCharacters($Path) )
{
$junctions = Get-Item -Path $Path -Force |
Where-Object { $_.PsIsContainer -and $_.IsJunction }
return ($junctions -ne $null)
}
return Test-CPathIsJunction -LiteralPath $Path
}
if( Test-Path -LiteralPath $LiteralPath -PathType Container )
{
return (Get-Item -LiteralPath $LiteralPath -Force).IsJunction
}
return $false
}
|
combined_dataset/train/non-malicious/Get_Set Signature (CTP2)_2.ps1
|
Get_Set Signature (CTP2)_2.ps1
|
#Requires -version 2.0
## Authenticode.psm1
####################################################################################################
## Wrappers for the Get-AuthenticodeSignature and Set-AuthenticodeSignature cmdlets
## These properly parse paths, so they don't kill your pipeline and script if you include a folder
##
## Usage:
## ls | Get-AuthenticodeSignature
## Get all the signatures
##
## ls | Select-Signed -Mine -Broken | Set-AuthenticodeSignature
## Re-sign anything you signed before that has changed
##
## ls | Select-Signed -NotMine -ValidOnly | Set-AuthenticodeSignature
## Re-sign scripts that are hash-correct but not signed by me or by someone trusted
##
####################################################################################################
## History:
## 1.3 - Fixed some bugs in If-Signed and renamed it to Select-Signed
## - Added -MineOnly and -NotMineOnly switches to Select-Signed
## 1.2 - Added a hack workaround to make it appear as though we can sign and check PSM1 files
## It's important to remember that the signatures are NOT checked by PowerShell yet...
## 1.1 - Added a filter "If-Signed" that can be used like: ls | If-Signed
## - With optional switches: ValidOnly, InvalidOnly, BrokenOnly, TrustedOnly, UnsignedOnly
## - commented out the default Certificate which won't work for "you"
## 1.0 - first working version, includes wrappers for Get and Set
##
## YOU MUST CHANGE THIS ...
# Set-Variable CertificateThumbprint "0DA3A2A2189CD74AE371E6C57504FEB9A59BB22E" -Scope Script -Option ReadOnly
Set-Variable CertificateThumbprint "F05F583BB5EA4C90E3B9BF1BDD0B657701245BD5" -Scope Script -Option ReadOnly
CMDLET Test-Signature {
PARAM (
[Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)]
# We can't actually require the type, or we won't be able to check the fake ones
# [System.Management.Automation.Signature]
$Signature
,
[Alias("Valid")]
[Switch]$ForceValid
)
return ( $Signature.Status -eq "Valid" -or
( !$ForceValid -and
($Signature.Status -eq "UnknownError") -and
($_.SignerCertificate.Thumbprint -eq $CertificateThumbprint)
) )
}
CMDLET Set-AuthenticodeSignature -snapin Huddled.BetterDefaults {
PARAM (
[Parameter(Position=1, Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[Alias("FullName")]
[ValidateScript({
if((resolve-path $_).Provider.Name -ne "FileSystem") {
throw "Specified Path is not in the FileSystem: '$_'"
}
if(!(Test-Path -PathType Leaf $_)) {
throw "Specified Path is not a File: '$_'"
}
return $true
})]
[string]
$Path
, ## TODO: you should CHANGE THIS to a method which gets *your* default certificate
[Parameter(Position=2, Mandatory=$false)]
$Certificate = $(ls cert:\\CurrentUser\\my\\$CertificateThumbprint)
)
PROCESS {
if( ".psm1" -eq [IO.Path]::GetExtension($Path) ) {
# function setpsm1sig($Path) {
$ps1Path = "$Path.ps1"
Rename-Item $Path (Split-Path $ps1Path -Leaf)
$sig = Microsoft.PowerShell.Security\\Set-AuthenticodeSignature -Certificate $Certificate -FilePath $ps1Path | Select *
Rename-Item $ps1Path (Split-Path $Path -Leaf)
$sig.PSObject.TypeNames.Insert( 0, "System.Management.Automation.Signature" )
$sig.Path = $Path
$sig
} else {
Microsoft.PowerShell.Security\\Set-AuthenticodeSignature -Certificate $Certificate -FilePath $Path
}
}
}
CMDLET Get-AuthenticodeSignature -snapin Huddled.BetterDefaults {
PARAM (
[Parameter(Position=1, Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[Alias("FullName")]
[ValidateScript({
if((resolve-path $_).Provider.Name -ne "FileSystem") {
throw "Specified Path is not in the FileSystem: '$_'"
}
if(!(Test-Path -PathType Leaf $_)) {
throw "Specified Path is not a File: '$_'"
}
return $true
})]
[string]
$Path
)
PROCESS {
if( ".psm1" -eq [IO.Path]::GetExtension($Path) ) {
# function getpsm1sig($Path) {
$ps1Path = "$Path.ps1"
Rename-Item $Path (Split-Path $ps1Path -Leaf)
$sig = Microsoft.PowerShell.Security\\Get-AuthenticodeSignature -FilePath $ps1Path | select *
Rename-Item $ps1Path (Split-Path $Path -Leaf)
$sig.PSObject.TypeNames.Insert( 0, "System.Management.Automation.Signature" )
$sig.Path = $Path
$sig
} else {
Microsoft.PowerShell.Security\\Get-AuthenticodeSignature -FilePath $Path
}
}
}
CMDLET Select-Signed -snapin Huddled.BetterDefaults {
PARAM (
[Parameter(Position=1, Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[Alias("FullName")]
[ValidateScript({
if((resolve-path $_).Provider.Name -ne "FileSystem") {
throw "Specified Path is not in the FileSystem: '$_'"
}
return $true
})]
[string]
$Path
,
[Parameter()]
[switch]$MineOnly
,
[Parameter()]
[switch]$NotMineOnly
,
[Parameter()]
[switch]$BrokenOnly
,
[Parameter()]
[switch]$TrustedOnly
,
[Parameter()]
[switch]$ValidOnly
,
[Parameter()]
[switch]$InvalidOnly
,
[Parameter()]
[switch]$UnsignedOnly
)
if(!(Test-Path -PathType Leaf $Path)) {
# if($ErrorAction -ne "SilentlyContinue") {
# Write-Error "Specified Path is not a File: '$Path'"
# }
} else {
$sig = Get-AuthenticodeSignature $Path
# Broken only returns ONLY things which are HashMismatch
if($BrokenOnly -and $sig.Status -ne "HashMismatch")
{
Write-Debug "$($sig.Status) - Not Broken: $Path"
return
}
# Trusted only returns ONLY things which are Valid
if($TrustedOnly -and $sig.Status -ne "Valid")
{
Write-Debug "$($sig.Status) - Not Trusted: $Path"
return
}
# AllValid returns only things that are SIGNED and not HashMismatch
if($ValidOnly -and (($sig.Status -ne "HashMismatch") -or !$sig.SignerCertificate) )
{
Write-Debug "$($sig.Status) - Not Valid: $Path"
return
}
# NOTValid returns only things that are SIGNED and not HashMismatch
if($InvalidOnly -and ($sig.Status -eq "Valid"))
{
Write-Debug "$($sig.Status) - Valid: $Path"
return
}
# Unsigned returns only things that aren't signed
# NOTE: we don't test using NotSigned, because that's only set for .ps1 or .exe files??
if($UnsignedOnly -and $sig.SignerCertificate )
{
Write-Debug "$($sig.Status) - Signed: $Path"
return
}
# Mine returns only things that were signed by MY CertificateThumbprint
if($MineOnly -and (!($sig.SignerCertificate) -or ($sig.SignerCertificate.Thumbprint -ne $CertificateThumbprint)))
{
Write-Debug "Originally signed by someone else, thumbprint: $($sig.SignerCertificate.Thumbprint)"
Write-Debug "Does not match your default certificate print: $CertificateThumbprint"
Write-Debug " $Path"
return
}
# NotMine returns only things that were signed by MY CertificateThumbprint
if($NotMineOnly -and (!($sig.SignerCertificate) -or ($sig.SignerCertificate.Thumbprint -eq $CertificateThumbprint)))
{
if($sig.SignerCertificate) {
Write-Debug "Originally signed by you, thumbprint: $($sig.SignerCertificate.Thumbprint)"
Write-Debug "Matches your default certificate print: $CertificateThumbprint"
Write-Debug " $Path"
}
return
}
if(!$BrokenOnly -and !$TrustedOnly -and !$ValidOnly -and !$InvalidOnly -and !$UnsignedOnly -and !($sig.SignerCertificate) )
{
# Write-Debug ("You asked for Broken ({0}) or Trusted ({1}) or Valid ({2}) or Invalid ({3}) or Unsigned ({4}) and the cert is: ({5})" -f [int]$BrokenOnly, [int]$TrustedOnly, [int]$ValidOnly, [int]$InvalidOnly, [int]$UnsignedOnly, $sig.SignerCertificate)
Write-Debug "$($sig.Status) - Not Signed: $Path"
return
}
get-childItem $sig.Path
}
}
Export-ModuleMember Set-AuthenticodeSignature,Get-AuthenticodeSignature,Test-Signature,Select-Signed
# SIG # Begin signature block
# MIIK0AYJKoZIhvcNAQcCoIIKwTCCCr0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUlcaRTm+/m0Lma0cwCp9wfClq
# laagggbEMIIGwDCCBKigAwIBAgIJAKpDRVMtv0LqMA0GCSqGSIb3DQEBBQUAMIHG
# MQswCQYDVQQGEwJVUzERMA8GA1UECBMITmV3IFlvcmsxEjAQBgNVBAcTCVJvY2hl
# c3RlcjEaMBgGA1UEChMRSHVkZGxlZE1hc3Nlcy5vcmcxHjAcBgNVBAsTFUNlcnRp
# ZmljYXRlIEF1dGhvcml0eTErMCkGA1UEAxMiSm9lbCBCZW5uZXR0IENlcnRpZmlj
# YXRlIEF1dGhvcml0eTEnMCUGCSqGSIb3DQEJARYYSmF5a3VsQEh1ZGRsZWRNYX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8BAmhjx6F/h/v8MdLvMXzV4jcATZp6ywCf6k9OfuqCOETDSl9b6Lxm//guHgmUV
# mpzU7n21ZOBv8ElUGZLvIfQCsmZ/ON7obwpFfhamuFIsSJ0w
# SIG # End signature block
|
combined_dataset/train/non-malicious/Connect-VMHost.ps1
|
Connect-VMHost.ps1
|
#requires -version 2 -pssnapin VMware.VimAutomation.Core
Function Connect-VMHost {
<#
.Summary
Used to Connect a disconnected host to vCenter.
.Parameter VMHost
VMHost to reconnect to virtual center
.Example
Get-VMHost | Where-Object {$_.state -eq "Disconnected"} | Connect-VMHost
Will Attempt to reconnect any host that are currently disconnected.
.Example
Connect-VMHost -Name ESX1.get-admin.local
Will reconnect ESX1 to vCenter
#>
[CmdletBinding(
SupportsShouldProcess=$True,
SupportsTransactions=$False,
ConfirmImpact="low",
DefaultParameterSetName="ByString"
)]
Param(
[Parameter(
Mandatory=$True,
Valuefrompipeline=$true,
ParameterSetName="ByObj"
)]
[VMware.VimAutomation.Client20.VMHostImpl[]]
$VMHost,
[Parameter(
Mandatory=$True,
Position=0,
ParameterSetName="ByString"
)]
[string[]]
$Name
)
Begin {
IF ($Name) {
$VMHost = $Name|%{ Get-VMHost -Name $_ }
}
}
process {
Foreach ($VMHostImpl in ($VMHost|Get-View)) {
$ReconnectSpec = New-Object VMware.Vim.HostConnectSpec
$ReconnectSpec.HostName = $VMHostImpl.Summary.Config.Name
$ReconnectSpec.Port = $VMHostImpl.Summary.Config.Port
$ReconnectSpec.Force = $true
if ($pscmdlet.ShouldProcess($VMHostImpl.name)) {
$VMHostImpl.ReconnectHost_Task($ReconnectSpec)
}
}
}
}
|
combined_dataset/train/non-malicious/4244.ps1
|
4244.ps1
|
function Dump-NTDS
{
[cmdletbinding()]
Param
(
[string[]]$EmptyFolder
)
if( (Get-ChildItem $EmptyFolder | Measure-Object).Count -eq 0)
{
if (Test-Administrator) {
NTdsutil.exe "activate instance ntds" "ifm" "create full $($EmptyFolder) " "q" "q"
} else {
Write-Output "Not running in elevated mode - must run as administrator"
}
} else {
Write-Output "Folder is not empty, must use an empty folder"
}
Write-Output "If successfull, Zip the files and download using - New-ZipFile c:\temp\test.zip c:\temp\test\"
}
function Test-Administrator
{
$user = [Security.Principal.WindowsIdentity]::GetCurrent();
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
|
combined_dataset/train/non-malicious/VMware _ Windows Admin.ps1
|
VMware _ Windows Admin.ps1
|
#========================================================================
# Created on: 5/17/2012 2:03 PM
# Created by: Clint Jones
# Organization: Virtually Genius!
# Filename: Get-VMHostVersions
#========================================================================
#Import modules
Add-PSSnapin "Vmware.VimAutomation.Core"
#Path to the log files
$log = "C:\\Scripts\\VMware\\Logs\\hostversions.txt"
#Creates directory structure for log files
$pathverif = Test-Path -Path c:\\scripts\\vmware\\logs
switch ($pathverif)
{
True {}
False {New-Item "c:\\scripts\\vmware\\logs" -ItemType directory}
default {Write-Host "An error has occured when checking the file structure"}
}
#Connect to VMware servers
$viserver = Read-Host "Enter VMware server:"
$creds = Get-Credential
Connect-ViServer -Server $viserver -Credential $creds
#Get the version number of the host
Get-VMHost | Select-Object Name, Version | Format-Table -AutoSize | Out-File -FilePath $log -Append
|
combined_dataset/train/non-malicious/sample_52_87.ps1
|
sample_52_87.ps1
|
## Copyright (c) Microsoft Corporation. All rights reserved.
<#
.SYNOPSIS
This cmdlet collects a performance recording of Microsoft Defender Antivirus
scans.
.DESCRIPTION
This cmdlet collects a performance recording of Microsoft Defender Antivirus
scans. These performance recordings contain Microsoft-Antimalware-Engine
and NT kernel process events and can be analyzed after collection using the
Get-MpPerformanceReport cmdlet.
This cmdlet requires elevated administrator privileges.
The performance analyzer provides insight into problematic files that could
cause performance degradation of Microsoft Defender Antivirus. This tool is
provided "AS IS", and is not intended to provide suggestions on exclusions.
Exclusions can reduce the level of protection on your endpoints. Exclusions,
if any, should be defined with caution.
.EXAMPLE
New-MpPerformanceRecording -RecordTo:.\Defender-scans.etl
#>
function New-MpPerformanceRecording {
[CmdletBinding(DefaultParameterSetName='Interactive')]
param(
# Specifies the location where to save the Microsoft Defender Antivirus
# performance recording.
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]$RecordTo,
# Specifies the duration of the performance recording in seconds.
[Parameter(Mandatory=$true, ParameterSetName='Timed')]
[ValidateRange(0,2147483)]
[int]$Seconds,
# Specifies the PSSession object in which to create and save the Microsoft
# Defender Antivirus performance recording. When you use this parameter,
# the RecordTo parameter refers to the local path on the remote machine.
[Parameter(Mandatory=$false)]
[System.Management.Automation.Runspaces.PSSession[]]$Session,
# Optional argument to specifiy a different tool for recording traces. Default is wpr.exe
# When $Session parameter is used this path represents a location on the remote machine.
[Parameter(Mandatory=$false)]
[string]$WPRPath = $null
)
[bool]$interactiveMode = ($PSCmdlet.ParameterSetName -eq 'Interactive')
[bool]$timedMode = ($PSCmdlet.ParameterSetName -eq 'Timed')
# Hosts
[string]$powerShellHostConsole = 'ConsoleHost'
[string]$powerShellHostISE = 'Windows PowerShell ISE Host'
[string]$powerShellHostRemote = 'ServerRemoteHost'
if ($interactiveMode -and ($Host.Name -notin @($powerShellHostConsole, $powerShellHostISE, $powerShellHostRemote))) {
$ex = New-Object System.Management.Automation.ItemNotFoundException 'Cmdlet supported only on local PowerShell console, Windows PowerShell ISE and remote PowerShell console.'
$category = [System.Management.Automation.ErrorCategory]::NotImplemented
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'NotImplemented',$category,$Host.Name
$psCmdlet.WriteError($errRecord)
return
}
if ($null -ne $Session) {
[int]$RemotedSeconds = if ($timedMode) { $Seconds } else { -1 }
Invoke-Command -Session:$session -ArgumentList:@($RecordTo, $RemotedSeconds) -ScriptBlock:{
param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]$RecordTo,
[Parameter(Mandatory=$true)]
[ValidateRange(-1,2147483)]
[int]$RemotedSeconds
)
if ($RemotedSeconds -eq -1) {
New-MpPerformanceRecording -RecordTo:$RecordTo -WPRPath:$WPRPath
} else {
New-MpPerformanceRecording -RecordTo:$RecordTo -Seconds:$RemotedSeconds -WPRPath:$WPRPath
}
}
return
}
if (-not (Test-Path -LiteralPath:$RecordTo -IsValid)) {
$ex = New-Object System.Management.Automation.ItemNotFoundException "Cannot record Microsoft Defender Antivirus performance recording to path '$RecordTo' because the location does not exist."
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'InvalidPath',$category,$RecordTo
$psCmdlet.WriteError($errRecord)
return
}
# Resolve any relative paths
$RecordTo = $psCmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RecordTo)
# Dependencies: WPR Profile
[string]$wprProfile = "$PSScriptRoot\MSFT_MpPerformanceRecording.wprp"
if (-not (Test-Path -LiteralPath:$wprProfile -PathType:Leaf)) {
$ex = New-Object System.Management.Automation.ItemNotFoundException "Cannot find dependency file '$wprProfile' because it does not exist."
$category = [System.Management.Automation.ErrorCategory]::ObjectNotFound
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'PathNotFound',$category,$wprProfile
$psCmdlet.WriteError($errRecord)
return
}
# Dependencies: WPR Version
try
{
# If user provides a valid string as $WPRPath we go with that.
[string]$wprCommand = $WPRPath
if (!$wprCommand) {
$wprCommand = "wpr.exe"
$wprs = @(Get-Command -All "wpr" 2> $null)
if ($wprs -and ($wprs.Length -ne 0)) {
$latestVersion = [System.Version]"0.0.0.0"
$wprs | ForEach-Object {
$currentVersion = $_.Version
$currentFullPath = $_.Source
$currentVersionString = $currentVersion.ToString()
Write-Host "Found $currentVersionString at $currentFullPath"
if ($currentVersion -gt $latestVersion) {
$latestVersion = $currentVersion
$wprCommand = $currentFullPath
}
}
}
}
}
catch
{
# Fallback to the old ways in case we encounter an error (ex: version string format change).
[string]$wprCommand = "wpr.exe"
}
finally
{
Write-Host "`nUsing $wprCommand version $((Get-Command $wprCommand).FileVersionInfo.FileVersion)`n"
}
#
# Test dependency presence
#
if (-not (Get-Command $wprCommand -ErrorAction:SilentlyContinue)) {
$ex = New-Object System.Management.Automation.ItemNotFoundException "Cannot find dependency command '$wprCommand' because it does not exist."
$category = [System.Management.Automation.ErrorCategory]::ObjectNotFound
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'PathNotFound',$category,$wprCommand
$psCmdlet.WriteError($errRecord)
return
}
# Exclude versions that have known bugs or are not supported any more.
[int]$wprFileVersion = ((Get-Command $wprCommand).Version.Major) -as [int]
if ($wprFileVersion -le 6) {
$ex = New-Object System.Management.Automation.PSNotSupportedException "You are using an older and unsupported version of '$wprCommand'. Please download and install Windows ADK:`r`nhttps://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install`r`nand try again."
$category = [System.Management.Automation.ErrorCategory]::NotInstalled
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'NotSupported',$category,$wprCommand
$psCmdlet.WriteError($errRecord)
return
}
function CancelPerformanceRecording {
Write-Host "`n`nCancelling Microsoft Defender Antivirus performance recording... " -NoNewline
& $wprCommand -cancel -instancename MSFT_MpPerformanceRecording
$wprCommandExitCode = $LASTEXITCODE
switch ($wprCommandExitCode) {
0 {}
0xc5583000 {
Write-Error "Cannot cancel performance recording because currently Windows Performance Recorder is not recording."
return
}
default {
Write-Error ("Cannot cancel performance recording: 0x{0:x08}." -f $wprCommandExitCode)
return
}
}
Write-Host "ok.`n`nRecording has been cancelled."
}
#
# Ensure Ctrl-C doesn't abort the app without cleanup
#
# - local PowerShell consoles: use [Console]::TreatControlCAsInput; cleanup performed and output preserved
# - PowerShell ISE: use try { ... } catch { throw } finally; cleanup performed and output preserved
# - remote PowerShell: use try { ... } catch { throw } finally; cleanup performed but output truncated
[bool]$canTreatControlCAsInput = $interactiveMode -and ($Host.Name -eq $powerShellHostConsole)
$savedControlCAsInput = $null
$shouldCancelRecordingOnTerminatingError = $false
try
{
if ($canTreatControlCAsInput) {
$savedControlCAsInput = [Console]::TreatControlCAsInput
[Console]::TreatControlCAsInput = $true
}
#
# Start recording
#
Write-Host "Starting Microsoft Defender Antivirus performance recording... " -NoNewline
$shouldCancelRecordingOnTerminatingError = $true
& $wprCommand -start "$wprProfile!Scans.Light" -filemode -instancename MSFT_MpPerformanceRecording
$wprCommandExitCode = $LASTEXITCODE
switch ($wprCommandExitCode) {
0 {}
0xc5583001 {
$shouldCancelRecordingOnTerminatingError = $false
Write-Error "Cannot start performance recording because Windows Performance Recorder is already recording."
return
}
default {
$shouldCancelRecordingOnTerminatingError = $false
Write-Error ("Cannot start performance recording: 0x{0:x08}." -f $wprCommandExitCode)
return
}
}
Write-Host "ok.`n`nRecording has started." -NoNewline
if ($timedMode) {
Write-Host "`n`n Recording for $Seconds seconds... " -NoNewline
Start-Sleep -Seconds:$Seconds
Write-Host "ok." -NoNewline
} elseif ($interactiveMode) {
$stopPrompt = "`n`n=> Reproduce the scenario that is impacting the performance on your device.`n`n Press <ENTER> to stop and save recording or <Ctrl-C> to cancel recording"
if ($canTreatControlCAsInput) {
Write-Host "${stopPrompt}: "
do {
$key = [Console]::ReadKey($true)
if (($key.Modifiers -eq [ConsoleModifiers]::Control) -and (($key.Key -eq [ConsoleKey]::C))) {
CancelPerformanceRecording
$shouldCancelRecordingOnTerminatingError = $false
#
# Restore Ctrl-C behavior
#
[Console]::TreatControlCAsInput = $savedControlCAsInput
return
}
} while (($key.Modifiers -band ([ConsoleModifiers]::Alt -bor [ConsoleModifiers]::Control -bor [ConsoleModifiers]::Shift)) -or ($key.Key -ne [ConsoleKey]::Enter))
} else {
Read-Host -Prompt:$stopPrompt
}
}
#
# Stop recording
#
Write-Host "`n`nStopping Microsoft Defender Antivirus performance recording... "
& $wprCommand -stop $RecordTo -instancename MSFT_MpPerformanceRecording
$wprCommandExitCode = $LASTEXITCODE
switch ($wprCommandExitCode) {
0 {
$shouldCancelRecordingOnTerminatingError = $false
}
0xc5583000 {
$shouldCancelRecordingOnTerminatingError = $false
Write-Error "Cannot stop performance recording because Windows Performance Recorder is not recording a trace."
return
}
default {
Write-Error ("Cannot stop performance recording: 0x{0:x08}." -f $wprCommandExitCode)
return
}
}
Write-Host "ok.`n`nRecording has been saved to '$RecordTo'."
Write-Host `
'
The performance analyzer provides insight into problematic files that could
cause performance degradation of Microsoft Defender Antivirus. This tool is
provided "AS IS", and is not intended to provide suggestions on exclusions.
Exclusions can reduce the level of protection on your endpoints. Exclusions,
if any, should be defined with caution.
'
Write-Host `
'
The trace you have just captured may contain personally identifiable information,
including but not necessarily limited to paths to files accessed, paths to
registry accessed and process names. Exact information depends on the events that
were logged. Please be aware of this when sharing this trace with other people.
'
} catch {
throw
} finally {
if ($shouldCancelRecordingOnTerminatingError) {
CancelPerformanceRecording
}
if ($null -ne $savedControlCAsInput) {
#
# Restore Ctrl-C behavior
#
[Console]::TreatControlCAsInput = $savedControlCAsInput
}
}
}
function PadUserDateTime
{
[OutputType([DateTime])]
param(
[Parameter(Mandatory = $true, Position = 0)]
[DateTime]$UserDateTime
)
# Padding user input to include all events up to the start of the next second.
if (($UserDateTime.Ticks % 10000000) -eq 0)
{
return $UserDateTime.AddTicks(9999999)
}
else
{
return $UserDateTime
}
}
function ValidateTimeInterval
{
[OutputType([PSCustomObject])]
param(
[DateTime]$MinStartTime = [DateTime]::MinValue,
[DateTime]$MinEndTime = [DateTime]::MinValue,
[DateTime]$MaxStartTime = [DateTime]::MaxValue,
[DateTime]$MaxEndTime = [DateTime]::MaxValue
)
$ret = [PSCustomObject]@{
arguments = [string[]]@()
status = $false
}
if ($MinStartTime -gt $MaxEndTime)
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MinStartTime '$MinStartTime' should have been lower than MaxEndTime '$MaxEndTime'"
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Invalid time interval',$category,"'$MinStartTime' .. '$MaxEndTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
if ($MinStartTime -gt $MaxStartTime)
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MinStartTime '$MinStartTime' should have been lower than MaxStartTime '$MaxStartTime'"
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Invalid time interval',$category,"'$MinStartTime' .. '$MaxStartTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
if ($MinEndTime -gt $MaxEndTime)
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MinEndTime '$MinEndTime' should have been lower than MaxEndTime '$MaxEndTime'"
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Invalid time interval',$category,"'$MinEndTime' .. '$MaxEndTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
if ($MinStartTime -gt [DateTime]::MinValue)
{
try
{
$MinStartFileTime = $MinStartTime.ToFileTime()
}
catch
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MinStartTime '$MinStartTime' is not a valid timestamp."
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Value has to be a local DateTime between "January 1, 1601 12:00:00 AM UTC" and "December 31, 9999 11:59:59 PM UTC"',$category,"'$MinStartTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
$ret.arguments += @('-MinStartTime', $MinStartFileTime)
}
if ($MaxEndTime -lt [DateTime]::MaxValue)
{
try
{
$MaxEndFileTime = $MaxEndTime.ToFileTime()
}
catch
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MaxEndTime '$MaxEndTime' is not a valid timestamp."
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Value has to be a local DateTime between "January 1, 1601 12:00:00 AM UTC" and "December 31, 9999 11:59:59 PM UTC"',$category,"'$MaxEndTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
$ret.arguments += @('-MaxEndTime', $MaxEndFileTime)
}
if ($MaxStartTime -lt [DateTime]::MaxValue)
{
try
{
$MaxStartFileTime = $MaxStartTime.ToFileTime()
}
catch
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MaxStartTime '$MaxStartTime' is not a valid timestamp."
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Value has to be a local DateTime between "January 1, 1601 12:00:00 AM UTC" and "December 31, 9999 11:59:59 PM UTC"',$category,"'$MaxStartTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
$ret.arguments += @('-MaxStartTime', $MaxStartFileTime)
}
if ($MinEndTime -gt [DateTime]::MinValue)
{
try
{
$MinEndFileTime = $MinEndTime.ToFileTime()
}
catch
{
$ex = New-Object System.Management.Automation.ValidationMetadataException "MinEndTime '$MinEndTime' is not a valid timestamp."
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'Value has to be a local DateTime between "January 1, 1601 12:00:00 AM UTC" and "December 31, 9999 11:59:59 PM UTC"',$category,"'$MinEndTime'"
$psCmdlet.WriteError($errRecord)
return $ret
}
$ret.arguments += @('-MinEndTime', $MinEndFileTime)
}
$ret.status = $true
return $ret
}
function ParseFriendlyDuration
{
[OutputType([TimeSpan])]
param(
[Parameter(Mandatory = $true, Position = 0)]
[string]
$FriendlyDuration
)
if ($FriendlyDuration -match '^(\d+)(?:\.(\d+))?(sec|ms|us)$')
{
[string]$seconds = $Matches[1]
[string]$decimals = $Matches[2]
[string]$unit = $Matches[3]
[uint32]$magnitude =
switch ($unit)
{
'sec' {7}
'ms' {4}
'us' {1}
}
if ($decimals.Length -gt $magnitude)
{
throw [System.ArgumentException]::new("String '$FriendlyDuration' was not recognized as a valid Duration: $($decimals.Length) decimals specified for time unit '$unit'; at most $magnitude expected.")
}
return [timespan]::FromTicks([int64]::Parse($seconds + $decimals.PadRight($magnitude, '0')))
}
[timespan]$result = [timespan]::FromTicks(0)
if ([timespan]::TryParse($FriendlyDuration, [ref]$result))
{
return $result
}
throw [System.ArgumentException]::new("String '$FriendlyDuration' was not recognized as a valid Duration; expected a value like '0.1234567sec' or '0.1234ms' or '0.1us' or a valid TimeSpan.")
}
[scriptblock]$FriendlyTimeSpanToString = { '{0:0.0000}ms' -f ($this.Ticks / 10000.0) }
function New-FriendlyTimeSpan
{
param(
[Parameter(Mandatory = $true)]
[uint64]$Ticks,
[bool]$Raw = $false
)
if ($Raw) {
return $Ticks
}
$result = [TimeSpan]::FromTicks($Ticks)
$result.PsTypeNames.Insert(0, 'MpPerformanceReport.TimeSpan')
$result | Add-Member -Force -MemberType:ScriptMethod -Name:'ToString' -Value:$FriendlyTimeSpanToString
$result
}
function New-FriendlyDateTime
{
param(
[Parameter(Mandatory = $true)]
[uint64]$FileTime,
[bool]$Raw = $false
)
if ($Raw) {
return $FileTime
}
[DateTime]::FromFileTime($FileTime)
}
function Add-DefenderCollectionType
{
param(
[Parameter(Mandatory = $true)]
[ref]$CollectionRef
)
if ($CollectionRef.Value.Length -and ($CollectionRef.Value | Get-Member -Name:'Processes','Files','Extensions','Scans','Folder'))
{
$CollectionRef.Value.PSTypeNames.Insert(0, 'MpPerformanceReport.NestedCollection')
}
}
[scriptblock]$FriendlyScanInfoToString = {
[PSCustomObject]@{
ScanType = $this.ScanType
StartTime = $this.StartTime
EndTime = $this.EndTime
Duration = $this.Duration
Reason = $this.Reason
Path = $this.Path
ProcessPath = $this.ProcessPath
ProcessId = $this.ProcessId
Image = $this.Image
}
}
function Get-ScanComments
{
param(
[PSCustomObject[]]$SecondaryEvents,
[bool]$Raw = $false
)
$Comments = @()
foreach ($item in @($SecondaryEvents | Sort-Object -Property:StartTime)) {
if (($item | Get-Member -Name:'Message' -MemberType:NoteProperty).Count -eq 1) {
if (($item | Get-Member -Name:'Duration' -MemberType:NoteProperty).Count -eq 1) {
$Duration = New-FriendlyTimeSpan -Ticks:$item.Duration -Raw:$Raw
$StartTime = New-FriendlyDateTime -FileTime:$item.StartTime -Raw:$Raw
$Comments += "Expensive operation `"{0}`" started at {1} lasted {2}" -f ($item.Message, $StartTime, $Duration.ToString())
if (($item | Get-Member -Name:'Debug' -MemberType:NoteProperty).Count -eq 1) {
$item.Debug | ForEach-Object {
if ($_.EndsWith("is NOT trusted") -or $_.StartsWith("Not trusted, ") -or $_.ToLower().Contains("error") -or $_.Contains("Result of ValidateTrust")) {
$Comments += "$_"
}
}
}
}
else {
if ($item.Message.Contains("subtype=Lowfi")) {
$Comments += $item.Message.Replace("subtype=Lowfi", "Low-fidelity detection")
}
else {
$Comments += $item.Message
}
}
}
elseif (($item | Get-Member -Name:'ScanType' -MemberType:NoteProperty).Count -eq 1) {
$Duration = New-FriendlyTimeSpan -Ticks:$item.Duration -Raw:$Raw
$OpId = "Internal opertion"
if (($item | Get-Member -Name:'Path' -MemberType:NoteProperty).Count -eq 1) {
$OpId = $item.Path
}
elseif (($item | Get-Member -Name:'ProcessPath' -MemberType:NoteProperty).Count -eq 1) {
$OpId = $item.ProcessPath
}
$Comments += "{0} {1} lasted {2}" -f ($item.ScanType, $OpId, $Duration.ToString())
}
}
$Comments
}
filter ConvertTo-DefenderScanInfo
{
param(
[bool]$Raw = $false
)
$result = [PSCustomObject]@{
ScanType = [string]$_.ScanType
StartTime = New-FriendlyDateTime -FileTime:$_.StartTime -Raw:$Raw
EndTime = New-FriendlyDateTime -FileTime:$_.EndTime -Raw:$Raw
Duration = New-FriendlyTimeSpan -Ticks:$_.Duration -Raw:$Raw
Reason = [string]$_.Reason
SkipReason = [string]$_.SkipReason
}
if (($_ | Get-Member -Name:'Path' -MemberType:NoteProperty).Count -eq 1) {
$result | Add-Member -NotePropertyName:'Path' -NotePropertyValue:([string]$_.Path)
}
if (($_ | Get-Member -Name:'ProcessPath' -MemberType:NoteProperty).Count -eq 1) {
$result | Add-Member -NotePropertyName:'ProcessPath' -NotePropertyValue:([string]$_.ProcessPath)
}
if (($_ | Get-Member -Name:'Image' -MemberType:NoteProperty).Count -eq 1) {
$result | Add-Member -NotePropertyName:'Image' -NotePropertyValue:([string]$_.Image)
}
elseif ($_.ProcessPath -and (-not $_.ProcessPath.StartsWith("pid"))) {
try {
$result | Add-Member -NotePropertyName:'Image' -NotePropertyValue:([string]([System.IO.FileInfo]$_.ProcessPath).Name)
} catch {
# Silently ignore.
}
}
$ProcessId = if ($_.ProcessId -gt 0) { [int]$_.ProcessId } elseif ($_.ScannedProcessId -gt 0) { [int]$_.ScannedProcessId } else { $null }
if ($ProcessId) {
$result | Add-Member -NotePropertyName:'ProcessId' -NotePropertyValue:([int]$ProcessId)
}
if ($result.Image -and $result.ProcessId) {
$ProcessName = "{0} ({1})" -f $result.Image, $result.ProcessId
$result | Add-Member -NotePropertyName:'ProcessName' -NotePropertyValue:([string]$ProcessName)
}
if ((($_ | Get-Member -Name:'Extra' -MemberType:NoteProperty).Count -eq 1) -and ($_.Extra.Count -gt 0)) {
$Comments = @(Get-ScanComments -SecondaryEvents:$_.Extra -Raw:$Raw)
$result | Add-Member -NotePropertyName:'Comments' -NotePropertyValue:$Comments
}
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScanInfo')
}
$result | Add-Member -Force -MemberType:ScriptMethod -Name:'ToString' -Value:$FriendlyScanInfoToString
$result
}
filter ConvertTo-DefenderScanOverview
{
param(
[bool]$Raw = $false
)
$vals = [ordered]@{}
foreach ($entry in $_.PSObject.Properties) {
if ($entry.Value) {
$Key = $entry.Name.Replace("_", " ")
if ($Key.EndsWith("Time")) {
$vals[$Key] = New-FriendlyDateTime -FileTime:$entry.Value -Raw:$Raw
}
elseif ($Key.EndsWith("Duration")) {
$vals[$Key] = New-FriendlyTimeSpan -Ticks:$entry.Value -Raw:$Raw
}
else {
$vals[$Key] = $entry.Value
}
}
}
# Remove duplicates
if (($_ | Get-Member -Name:'PerfHints' -MemberType:NoteProperty).Count -eq 1) {
$hints = [ordered]@{}
foreach ($hint in $_.PerfHints) {
$hints[$hint] = $true
}
$vals["PerfHints"] = @($hints.Keys)
}
$result = New-Object PSCustomObject -Property:$vals
$result
}
filter ConvertTo-DefenderScanStats
{
param(
[bool]$Raw = $false
)
$result = [PSCustomObject]@{
Count = $_.Count
TotalDuration = New-FriendlyTimeSpan -Ticks:$_.TotalDuration -Raw:$Raw
MinDuration = New-FriendlyTimeSpan -Ticks:$_.MinDuration -Raw:$Raw
AverageDuration = New-FriendlyTimeSpan -Ticks:$_.AverageDuration -Raw:$Raw
MaxDuration = New-FriendlyTimeSpan -Ticks:$_.MaxDuration -Raw:$Raw
MedianDuration = New-FriendlyTimeSpan -Ticks:$_.MedianDuration -Raw:$Raw
}
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScanStats')
}
$result
}
[scriptblock]$FriendlyScannedFilePathStatsToString = {
[PSCustomObject]@{
Count = $this.Count
TotalDuration = $this.TotalDuration
MinDuration = $this.MinDuration
AverageDuration = $this.AverageDuration
MaxDuration = $this.MaxDuration
MedianDuration = $this.MedianDuration
Path = $this.Path
}
}
filter ConvertTo-DefenderScannedFilePathStats
{
param(
[bool]$Raw = $false
)
$result = $_ | ConvertTo-DefenderScanStats -Raw:$Raw
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScannedFilePathStats')
}
$result | Add-Member -NotePropertyName:'Path' -NotePropertyValue:($_.Path)
$result | Add-Member -Force -MemberType:ScriptMethod -Name:'ToString' -Value:$FriendlyScannedFilePathStatsToString
if ($null -ne $_.Scans)
{
$result | Add-Member -NotePropertyName:'Scans' -NotePropertyValue:@(
$_.Scans | ConvertTo-DefenderScanInfo -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Scans)
}
}
if ($null -ne $_.Processes)
{
$result | Add-Member -NotePropertyName:'Processes' -NotePropertyValue:@(
$_.Processes | ConvertTo-DefenderScannedProcessStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Processes)
}
}
$result
}
[scriptblock]$FriendlyScannedPathsStatsToString = {
[PSCustomObject]@{
Count = $this.Count
TotalDuration = $this.TotalDuration
MinDuration = $this.MinDuration
AverageDuration = $this.AverageDuration
MaxDuration = $this.MaxDuration
MedianDuration = $this.MedianDuration
Path = $this.Path
Folder = $this.Folder
}
}
filter ConvertTo-DefenderScannedPathsStats
{
param(
[bool]$Raw = $false
)
$result = $_ | ConvertTo-DefenderScanStats -Raw:$Raw
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScannedPathStats')
}
$result | Add-Member -NotePropertyName:'Path' -NotePropertyValue:($_.Path)
if ($null -ne $_.Folder)
{
$result | Add-Member -NotePropertyName:'Folder' -NotePropertyValue:@(
$_.Folder | ConvertTo-DefenderScannedPathsStats -Raw:$Raw
)
$result | Add-Member -Force -MemberType:ScriptMethod -Name:'ToString' -Value:$FriendlyScannedPathsStatsToString
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Folder)
}
}
if ($null -ne $_.Files)
{
$result | Add-Member -NotePropertyName:'Files' -NotePropertyValue:@(
$_.Files | ConvertTo-DefenderScannedFilePathStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Files)
}
}
if ($null -ne $_.Scans)
{
$result | Add-Member -NotePropertyName:'Scans' -NotePropertyValue:@(
$_.Scans | ConvertTo-DefenderScanInfo -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Scans)
}
}
if ($null -ne $_.Processes)
{
$result | Add-Member -NotePropertyName:'Processes' -NotePropertyValue:@(
$_.Processes | ConvertTo-DefenderScannedProcessStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Processes)
}
}
$result
}
[scriptblock]$FriendlyScannedFileExtensionStatsToString = {
[PSCustomObject]@{
Count = $this.Count
TotalDuration = $this.TotalDuration
MinDuration = $this.MinDuration
AverageDuration = $this.AverageDuration
MaxDuration = $this.MaxDuration
MedianDuration = $this.MedianDuration
Extension = $this.Extension
}
}
filter ConvertTo-DefenderScannedFileExtensionStats
{
param(
[bool]$Raw = $false
)
$result = $_ | ConvertTo-DefenderScanStats -Raw:$Raw
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScannedFileExtensionStats')
}
$result | Add-Member -NotePropertyName:'Extension' -NotePropertyValue:($_.Extension)
$result | Add-Member -Force -MemberType:ScriptMethod -Name:'ToString' -Value:$FriendlyScannedFileExtensionStatsToString
if ($null -ne $_.Scans)
{
$result | Add-Member -NotePropertyName:'Scans' -NotePropertyValue:@(
$_.Scans | ConvertTo-DefenderScanInfo -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Scans)
}
}
if ($null -ne $_.Files)
{
$result | Add-Member -NotePropertyName:'Files' -NotePropertyValue:@(
$_.Files | ConvertTo-DefenderScannedFilePathStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Files)
}
}
if ($null -ne $_.Processes)
{
$result | Add-Member -NotePropertyName:'Processes' -NotePropertyValue:@(
$_.Processes | ConvertTo-DefenderScannedProcessStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Processes)
}
}
if ($null -ne $_.Folder)
{
$result | Add-Member -NotePropertyName:'Folder' -NotePropertyValue:@(
$_.Folder | ConvertTo-DefenderScannedPathsStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Folder)
}
}
$result
}
[scriptblock]$FriendlyScannedProcessStatsToString = {
[PSCustomObject]@{
Count = $this.Count
TotalDuration = $this.TotalDuration
MinDuration = $this.MinDuration
AverageDuration = $this.AverageDuration
MaxDuration = $this.MaxDuration
MedianDuration = $this.MedianDuration
ProcessPath = $this.ProcessPath
}
}
filter ConvertTo-DefenderScannedProcessStats
{
param(
[bool]$Raw
)
$result = $_ | ConvertTo-DefenderScanStats -Raw:$Raw
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScannedProcessStats')
}
$result | Add-Member -NotePropertyName:'ProcessPath' -NotePropertyValue:($_.Process)
$result | Add-Member -Force -MemberType:ScriptMethod -Name:'ToString' -Value:$FriendlyScannedProcessStatsToString
if ($null -ne $_.Scans)
{
$result | Add-Member -NotePropertyName:'Scans' -NotePropertyValue:@(
$_.Scans | ConvertTo-DefenderScanInfo -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Scans)
}
}
if ($null -ne $_.Files)
{
$result | Add-Member -NotePropertyName:'Files' -NotePropertyValue:@(
$_.Files | ConvertTo-DefenderScannedFilePathStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Files)
}
}
if ($null -ne $_.Extensions)
{
$result | Add-Member -NotePropertyName:'Extensions' -NotePropertyValue:@(
$_.Extensions | ConvertTo-DefenderScannedFileExtensionStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Extensions)
}
}
if ($null -ne $_.Folder)
{
$result | Add-Member -NotePropertyName:'Folder' -NotePropertyValue:@(
$_.Folder | ConvertTo-DefenderScannedPathsStats -Raw:$Raw
)
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.Folder)
}
}
$result
}
<#
.SYNOPSIS
This cmdlet reports the file paths, file extensions, and processes that cause
the highest impact to Microsoft Defender Antivirus scans.
.DESCRIPTION
This cmdlet analyzes a previously collected Microsoft Defender Antivirus
performance recording and reports the file paths, file extensions and processes
that cause the highest impact to Microsoft Defender Antivirus scans.
The performance analyzer provides insight into problematic files that could
cause performance degradation of Microsoft Defender Antivirus. This tool is
provided "AS IS", and is not intended to provide suggestions on exclusions.
Exclusions can reduce the level of protection on your endpoints. Exclusions,
if any, should be defined with caution.
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopFiles:10 -TopExtensions:10 -TopProcesses:10 -TopScans:10
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopFiles:10 -TopExtensions:10 -TopProcesses:10 -TopScans:10 -Raw | ConvertTo-Json
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopFiles:10
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopFiles:10 -TopScansPerFile:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopFiles:10 -TopProcessesPerFile:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopFiles:10 -TopProcessesPerFile:3 -TopScansPerProcessPerFile:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopScansPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopScansPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopFilesPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopFilesPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopFilesPerPath:3 -TopScansPerFilePerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopFilesPerPath:3 -TopScansPerFilePerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopExtensionsPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopExtensionsPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopExtensionsPerPath:3 -TopScansPerExtensionPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopExtensionsPerPath:3 -TopScansPerExtensionPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopProcessesPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopProcessesPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopPathsDepth:3 -TopProcessesPerPath:3 -TopScansPerProcessPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopPaths:10 -TopProcessesPerPath:3 -TopScansPerProcessPerPath:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopScansPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopPathsPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopPathsPerExtension:3 -TopPathsDepth:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopPathsPerExtension:3 -TopPathsDepth:3 -TopScansPerPathPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopPathsPerExtension:3 -TopScansPerPathPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopFilesPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopFilesPerExtension:3 -TopScansPerFilePerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopProcessesPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopExtensions:10 -TopProcessesPerExtension:3 -TopScansPerProcessPerExtension:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopScansPerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopExtensionsPerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopExtensionsPerProcess:3 -TopScansPerExtensionPerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopFilesPerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopFilesPerProcess:3 -TopScansPerFilePerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopPathsPerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopPathsPerProcess:3 -TopPathsDepth:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopPathsPerProcess:3 -TopPathsDepth:3 -TopScansPerPathPerProcess:3
.EXAMPLE
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopProcesses:10 -TopPathsPerProcess:3 -TopScansPerPathPerProcess:3
.EXAMPLE
# Find top 10 scans with longest durations that both start and end between MinStartTime and MaxEndTime:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinStartTime:"5/14/2022 7:01:11 AM" -MaxEndTime:"5/14/2022 7:01:41 AM"
.EXAMPLE
# Find top 10 scans with longest durations between MinEndTime and MaxStartTime, possibly partially overlapping this period
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinEndTime:"5/14/2022 7:01:11 AM" -MaxStartTime:"5/14/2022 7:01:41 AM"
.EXAMPLE
# Find top 10 scans with longest durations between MinStartTime and MaxStartTime, possibly partially overlapping this period
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinStartTime:"5/14/2022 7:01:11 AM" -MaxStartTime:"5/14/2022 7:01:41 AM"
.EXAMPLE
# Find top 10 scans with longest durations that start at MinStartTime or later:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinStartTime:"5/14/2022 7:01:11 AM"
.EXAMPLE
# Find top 10 scans with longest durations that start before or at MaxStartTime:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MaxStartTime:"5/14/2022 7:01:11 AM"
.EXAMPLE
# Find top 10 scans with longest durations that end at MinEndTime or later:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinEndTime:"5/14/2022 7:01:11 AM"
.EXAMPLE
# Find top 10 scans with longest durations that end before or at MaxEndTime:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MaxEndTime:"5/14/2022 7:01:11 AM"
.EXAMPLE
# Find top 10 scans with longest durations, impacting the current interval, that did not start or end between MaxStartTime and MinEndTime.
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MaxStartTime:"5/14/2022 7:01:11 AM" -MinEndTime:"5/14/2022 7:01:41 AM"
.EXAMPLE
# Find top 10 scans with longest durations, impacting the current interval, that started between MinStartTime and MaxStartTime, and ended later than MinEndTime.
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinStartTime:"5/14/2022 7:00:00 AM" -MaxStartTime:"5/14/2022 7:01:11 AM" -MinEndTime:"5/14/2022 7:01:41 AM"
.EXAMPLE
# Find top 10 scans with longest durations, impacting the current interval, that started before MaxStartTime, and ended between MinEndTime and MaxEndTime.
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MaxStartTime:"5/14/2022 7:01:11 AM" -MinEndTime:"5/14/2022 7:01:41 AM" -MaxEndTime:"5/14/2022 7:02:00 AM"
.EXAMPLE
# Find top 10 scans with longest durations, impacting the current interval, that started between MinStartTime and MaxStartTime, and ended between MinEndTime and MaxEndTime.
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinStartTime:"5/14/2022 7:00:00 AM" -MaxStartTime:"5/14/2022 7:01:11 AM" -MinEndTime:"5/14/2022 7:01:41 AM" -MaxEndTime:"5/14/2022 7:02:00 AM"
.EXAMPLE
# Find top 10 scans with longest durations that both start and end between MinStartTime and MaxEndTime, using DateTime as raw numbers in FILETIME format, e.g. from -Raw report format:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinStartTime:([DateTime]::FromFileTime(132969744714304340)) -MaxEndTime:([DateTime]::FromFileTime(132969745000971033))
.EXAMPLE
# Find top 10 scans with longest durations between MinEndTime and MaxStartTime, possibly partially overlapping this period, using DateTime as raw numbers in FILETIME format, e.g. from -Raw report format:
Get-MpPerformanceReport -Path:.\Defender-scans.etl -TopScans:10 -MinEndTime:([DateTime]::FromFileTime(132969744714304340)) -MaxStartTime:([DateTime]::FromFileTime(132969745000971033))
.EXAMPLE
# Display a summary or overview of the scans captured in the trace, in addition to the information displayed regularly through other arguments. Output is influenced by time interval arguments MinStartTime and MaxEndTime.
Get-MpPerformanceReport -Path:.\Defender-scans.etl [other arguments] -Overview
#>
function Get-MpPerformanceReport {
[CmdletBinding()]
param(
# Specifies the location of Microsoft Defender Antivirus performance recording to analyze.
[Parameter(Mandatory=$true,
Position=0,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
HelpMessage="Location of Microsoft Defender Antivirus performance recording.")]
[ValidateNotNullOrEmpty()]
[string]$Path,
# Requests a top files report and specifies how many top files to output, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopFiles = 0,
# Specifies how many top scans to output for each top file, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerFile = 0,
# Specifies how many top processes to output for each top file, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopProcessesPerFile = 0,
# Specifies how many top scans to output for each top process for each top file, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerProcessPerFile = 0,
# Requests a top paths report and specifies how many top entries to output, sorted by "Duration". This is called recursively for each directory entry. Scans are grouped hierarchically per folder and sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopPaths = 0,
# Specifies the maxmimum depth (path-wise) that will be used to grop scans when $TopPaths is used.
[ValidateRange(1,1024)]
[int]$TopPathsDepth = 0,
# Specifies how many top scans to output for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerPath = 0,
# Specifies how many top files to output for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopFilesPerPath = 0,
# Specifies how many top scans to output for each top file for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerFilePerPath = 0,
# Specifies how many top extensions to output for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopExtensionsPerPath = 0,
# Specifies how many top scans to output for each top extension for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerExtensionPerPath = 0,
# Specifies how many top processes to output for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopProcessesPerPath = 0,
# Specifies how many top scans to output for each top process for each top path, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerProcessPerPath = 0,
# Requests a top extensions report and specifies how many top extensions to output, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopExtensions = 0,
# Specifies how many top scans to output for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerExtension = 0,
# Specifies how many top paths to output for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopPathsPerExtension = 0,
# Specifies how many top scans to output for each top path for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerPathPerExtension = 0,
# Specifies how many top files to output for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopFilesPerExtension = 0,
# Specifies how many top scans to output for each top file for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerFilePerExtension = 0,
# Specifies how many top processes to output for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopProcessesPerExtension = 0,
# Specifies how many top scans to output for each top process for each top extension, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerProcessPerExtension = 0,
# Requests a top processes report and specifies how many top processes to output, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopProcesses = 0,
# Specifies how many top scans to output for each top process in the Top Processes report, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerProcess = 0,
# Specifies how many top files to output for each top process, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopFilesPerProcess = 0,
# Specifies how many top scans to output for each top file for each top process, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerFilePerProcess = 0,
# Specifies how many top extensions to output for each top process, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopExtensionsPerProcess = 0,
# Specifies how many top scans to output for each top extension for each top process, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerExtensionPerProcess = 0,
# Specifies how many top paths to output for each top process, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopPathsPerProcess = 0,
# Specifies how many top scans to output for each top path for each top process, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScansPerPathPerProcess = 0,
# Requests a top scans report and specifies how many top scans to output, sorted by "Duration".
[ValidateRange(0,([int]::MaxValue))]
[int]$TopScans = 0,
## TimeSpan format: d | h:m | h:m:s | d.h:m | h:m:.f | h:m:s.f | d.h:m:s | d.h:m:.f | d.h:m:s.f => d | (d.)?h:m(:s(.f)?)? | ((d.)?h:m:.f)
# Specifies the minimum duration of any scans or total scan durations of files, extensions and processes included in the report.
# Accepts values like '0.1234567sec' or '0.1234ms' or '0.1us' or a valid TimeSpan.
[ValidatePattern('^(?:(?:(\d+)(?:\.(\d+))?(sec|ms|us))|(?:\d+)|(?:(\d+\.)?\d+:\d+(?::\d+(?:\.\d+)?)?)|(?:(\d+\.)?\d+:\d+:\.\d+))$')]
[string]$MinDuration = '0us',
# Specifies the minimum start time of scans included in the report. Accepts a valid DateTime.
[DateTime]$MinStartTime = [DateTime]::MinValue,
# Specifies the minimum end time of scans included in the report. Accepts a valid DateTime.
[DateTime]$MinEndTime = [DateTime]::MinValue,
# Specifies the maximum start time of scans included in the report. Accepts a valid DateTime.
[DateTime]$MaxStartTime = [DateTime]::MaxValue,
# Specifies the maximum end time of scans included in the report. Accepts a valid DateTime.
[DateTime]$MaxEndTime = [DateTime]::MaxValue,
# Adds an overview or summary of the scans captured in the trace to the regular output.
[switch]$Overview,
# Specifies that the output should be machine readable and readily convertible to serialization formats like JSON.
# - Collections and elements are not be formatted.
# - TimeSpan values are represented as number of 100-nanosecond intervals.
# - DateTime values are represented as number of 100-nanosecond intervals since January 1, 1601 (UTC).
[switch]$Raw
)
#
# Validate performance recording presence
#
if (-not (Test-Path -Path:$Path -PathType:Leaf)) {
$ex = New-Object System.Management.Automation.ItemNotFoundException "Cannot find path '$Path'."
$category = [System.Management.Automation.ErrorCategory]::ObjectNotFound
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'PathNotFound',$category,$Path
$psCmdlet.WriteError($errRecord)
return
}
function ParameterValidationError {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]
$ParameterName,
[Parameter(Mandatory)]
[string]
$ParentParameterName
)
$ex = New-Object System.Management.Automation.ValidationMetadataException "Parameter '$ParameterName' requires parameter '$ParentParameterName'."
$category = [System.Management.Automation.ErrorCategory]::MetadataError
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'InvalidParameter',$category,$ParameterName
$psCmdlet.WriteError($errRecord)
}
#
# Additional parameter validation
#
if ($TopFiles -eq 0)
{
if ($TopScansPerFile -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerFile' -ParentParameterName:'TopFiles'
}
if ($TopProcessesPerFile -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopProcessesPerFile' -ParentParameterName:'TopFiles'
}
}
if ($TopProcessesPerFile -eq 0)
{
if ($TopScansPerProcessPerFile -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerProcessPerFile' -ParentParameterName:'TopProcessesPerFile'
}
}
if ($TopPathsDepth -gt 0)
{
if (($TopPaths -eq 0) -and ($TopPathsPerProcess -eq 0) -and ($TopPathsPerExtension -eq 0))
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopPathsDepth' -ParentParameterName:'TopPaths or TopPathsPerProcess or TopPathsPerExtension'
}
}
if ($TopPaths -eq 0)
{
if ($TopScansPerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerPath' -ParentParameterName:'TopPaths'
}
if ($TopFilesPerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopFilesPerPath' -ParentParameterName:'TopPaths'
}
if ($TopExtensionsPerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopExtensionsPerPath' -ParentParameterName:'TopPaths'
}
if ($TopProcessesPerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopProcessesPerPath' -ParentParameterName:'TopPaths'
}
}
if ($TopFilesPerPath -eq 0)
{
if ($TopScansPerFilePerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerFilePerPath' -ParentParameterName:'TopFilesPerPath'
}
}
if ($TopExtensionsPerPath -eq 0)
{
if ($TopScansPerExtensionPerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerExtensionPerPath' -ParentParameterName:'TopExtensionsPerPath'
}
}
if ($TopProcessesPerPath -eq 0)
{
if ($TopScansPerProcessPerPath -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerProcessPerPath' -ParentParameterName:'TopProcessesPerPath'
}
}
if ($TopExtensions -eq 0)
{
if ($TopScansPerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerExtension' -ParentParameterName:'TopExtensions'
}
if ($TopFilesPerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopFilesPerExtension' -ParentParameterName:'TopExtensions'
}
if ($TopProcessesPerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopProcessesPerExtension' -ParentParameterName:'TopExtensions'
}
if ($TopPathsPerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopPathsPerExtension' -ParentParameterName:'TopExtensions'
}
}
if ($TopFilesPerExtension -eq 0)
{
if ($TopScansPerFilePerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerFilePerExtension' -ParentParameterName:'TopFilesPerExtension'
}
}
if ($TopProcessesPerExtension -eq 0)
{
if ($TopScansPerProcessPerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerProcessPerExtension' -ParentParameterName:'TopProcessesPerExtension'
}
}
if ($TopPathsPerExtension -eq 0)
{
if ($TopScansPerPathPerExtension -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerPathPerExtension' -ParentParameterName:'TopPathsPerExtension'
}
}
if ($TopProcesses -eq 0)
{
if ($TopScansPerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerProcess' -ParentParameterName:'TopProcesses'
}
if ($TopFilesPerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopFilesPerProcess' -ParentParameterName:'TopProcesses'
}
if ($TopExtensionsPerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopExtensionsPerProcess' -ParentParameterName:'TopProcesses'
}
if ($TopPathsPerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopPathsPerProcess' -ParentParameterName:'TopProcesses'
}
}
if ($TopFilesPerProcess -eq 0)
{
if ($TopScansPerFilePerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerFilePerProcess' -ParentParameterName:'TopFilesPerProcess'
}
}
if ($TopExtensionsPerProcess -eq 0)
{
if ($TopScansPerExtensionPerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerExtensionPerProcess' -ParentParameterName:'TopExtensionsPerProcess'
}
}
if ($TopPathsPerProcess -eq 0)
{
if ($TopScansPerPathPerProcess -gt 0)
{
ParameterValidationError -ErrorAction:Stop -ParameterName:'TopScansPerPathPerProcess' -ParentParameterName:'TopPathsPerProcess'
}
}
if (($TopFiles -eq 0) -and ($TopExtensions -eq 0) -and ($TopProcesses -eq 0) -and ($TopScans -eq 0) -and ($TopPaths -eq 0) -and (-not $Overview)) {
$ex = New-Object System.Management.Automation.ItemNotFoundException "At least one of the parameters 'TopFiles', 'TopPaths', 'TopExtensions', 'TopProcesses', 'TopScans' or 'Overview' must be present."
$category = [System.Management.Automation.ErrorCategory]::InvalidArgument
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'InvalidArgument',$category,$wprProfile
$psCmdlet.WriteError($errRecord)
return
}
# Dependencies
[string]$PlatformPath = (Get-ItemProperty -Path:'HKLM:\Software\Microsoft\Windows Defender' -Name:'InstallLocation' -ErrorAction:Stop).InstallLocation
#
# Test dependency presence
#
[string]$mpCmdRunCommand = "${PlatformPath}MpCmdRun.exe"
if (-not (Get-Command $mpCmdRunCommand -ErrorAction:SilentlyContinue)) {
$ex = New-Object System.Management.Automation.ItemNotFoundException "Cannot find '$mpCmdRunCommand'."
$category = [System.Management.Automation.ErrorCategory]::ObjectNotFound
$errRecord = New-Object System.Management.Automation.ErrorRecord $ex,'PathNotFound',$category,$mpCmdRunCommand
$psCmdlet.WriteError($errRecord)
return
}
# assemble report arguments
[string[]]$reportArguments = @(
$PSBoundParameters.GetEnumerator() |
Where-Object { $_.Key.ToString().StartsWith("Top") -and ($_.Value -gt 0) } |
ForEach-Object { "-$($_.Key)"; "$($_.Value)"; }
)
[timespan]$MinDurationTimeSpan = ParseFriendlyDuration -FriendlyDuration:$MinDuration
if ($MinDurationTimeSpan -gt [TimeSpan]::FromTicks(0))
{
$reportArguments += @('-MinDuration', ($MinDurationTimeSpan.Ticks))
}
$MaxEndTime = PadUserDateTime -UserDateTime:$MaxEndTime
$MaxStartTime = PadUserDateTime -UserDateTime:$MaxStartTime
$ret = ValidateTimeInterval -MinStartTime:$MinStartTime -MaxEndTime:$MaxEndTime -MaxStartTime:$MaxStartTime -MinEndTime:$MinEndTime
if ($false -eq $ret.status)
{
return
}
[string[]]$intervalArguments = $ret.arguments
if (($null -ne $intervalArguments) -and ($intervalArguments.Length -gt 0))
{
$reportArguments += $intervalArguments
}
if ($Overview)
{
$reportArguments += "-Overview"
}
$report = (& $mpCmdRunCommand -PerformanceReport -RecordingPath $Path @reportArguments) | Where-Object { -not [string]::IsNullOrEmpty($_) } | ConvertFrom-Json
$result = [PSCustomObject]@{}
if (-not $Raw) {
$result.PSTypeNames.Insert(0, 'MpPerformanceReport.Result')
}
if ($TopFiles -gt 0)
{
$reportTopFiles = @(if ($null -ne $report.TopFiles) { @($report.TopFiles | ConvertTo-DefenderScannedFilePathStats -Raw:$Raw) } else { @() })
$result | Add-Member -NotePropertyName:'TopFiles' -NotePropertyValue:$reportTopFiles
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.TopFiles)
}
}
if ($TopPaths -gt 0)
{
$reportTopPaths = @(if ($null -ne $report.TopPaths) { @($report.TopPaths | ConvertTo-DefenderScannedPathsStats -Raw:$Raw) } else { @() })
$result | Add-Member -NotePropertyName:'TopPaths' -NotePropertyValue:$reportTopPaths
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.TopPaths)
}
}
if ($TopExtensions -gt 0)
{
$reportTopExtensions = @(if ($null -ne $report.TopExtensions) { @($report.TopExtensions | ConvertTo-DefenderScannedFileExtensionStats -Raw:$Raw) } else { @() })
$result | Add-Member -NotePropertyName:'TopExtensions' -NotePropertyValue:$reportTopExtensions
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.TopExtensions)
}
}
if ($TopProcesses -gt 0)
{
$reportTopProcesses = @(if ($null -ne $report.TopProcesses) { @($report.TopProcesses | ConvertTo-DefenderScannedProcessStats -Raw:$Raw) } else { @() })
$result | Add-Member -NotePropertyName:'TopProcesses' -NotePropertyValue:$reportTopProcesses
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.TopProcesses)
}
}
if ($TopScans -gt 0)
{
$reportTopScans = @(if ($null -ne $report.TopScans) { @($report.TopScans | ConvertTo-DefenderScanInfo -Raw:$Raw) } else { @() })
$result | Add-Member -NotePropertyName:'TopScans' -NotePropertyValue:$reportTopScans
if (-not $Raw) {
Add-DefenderCollectionType -CollectionRef:([ref]$result.TopScans)
}
}
if ($Overview)
{
if ($null -ne $report.Overview) {
$reportOverview = $report.Overview | ConvertTo-DefenderScanOverview -Raw:$Raw
$result | Add-Member -NotePropertyName:'Overview' -NotePropertyValue:$reportOverview
if (-not $Raw) {
$result.Overview.PSTypeNames.Insert(0, 'MpPerformanceReport.Overview')
}
}
}
$result
}
$exportModuleMemberParam = @{
Function = @(
'New-MpPerformanceRecording'
'Get-MpPerformanceReport'
)
}
Export-ModuleMember @exportModuleMemberParam
# SIG # Begin signature block
# MIIlpQYJKoZIhvcNAQcCoIIlljCCJZICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEo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GqHS0DWxPzlNl7oAE8uNRba6mdXPs3oO
# dhfqyfwPjCEIeeD7N3+A58D74B+mkeeY+JU8Dcq4kCGHVcsWTwbn5aMTstEyWdYx
# y3BTyfo2yksiqiQEXOArT+YdlR4UvcXf4Q7W1UWJybS4ac0vSr68ad7kyUlmjDYk
# Qvr1tkwdLdv7eEPBF9SaCsdFnX+CloMlD/MuVr9N6Agddd8FWDw37AeuD1tGAxBb
# HCTnMaDR807gagVIabjmgpBdV2WhpPIwk7c2kSFVGB6Pj0iCN4cOYHcnttnmxnNR
# rFmKdQu9G+jiKpbdrQJ6mQ30KZq3vdNH0RhSYkGGVXJ0MkzJuf9UKk78AUNenS6f
# cw74idHY3pLGSWNjTqd0HXHgi4LfOCqit4HhmtWgmWQHK/u6Id+QnIA=
# SIG # End signature block
|
combined_dataset/train/non-malicious/8fad46f9-26e1-4da7-8cc9-eb8a10d893dc.ps1
|
8fad46f9-26e1-4da7-8cc9-eb8a10d893dc.ps1
|
$devEnvArgs = '"' + "$pwd"+"\\Installer\\myInstaller.sln" + '"';
$devSwitches = '"' + "/rebuild Release 2>&1" + '"';
$output = &$vsExe $devEnvArgs $devSwitches;
|
combined_dataset/train/non-malicious/sample_61_72.ps1
|
sample_61_72.ps1
|
#
# Module manifest for module 'OCI.PSModules.Fleetsoftwareupdate'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Fleetsoftwareupdate.dll'
# Version number of this module.
ModuleVersion = '86.2.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = 'e830226f-46c5-4916-992f-740cc29d35ab'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Fleetsoftwareupdate Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '86.2.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Fleetsoftwareupdate.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Add-OCIFleetsoftwareupdateFsuCollectionTargets',
'Get-OCIFleetsoftwareupdateFsuAction',
'Get-OCIFleetsoftwareupdateFsuActionOutputContent',
'Get-OCIFleetsoftwareupdateFsuActionsList',
'Get-OCIFleetsoftwareupdateFsuCollection',
'Get-OCIFleetsoftwareupdateFsuCollectionsList',
'Get-OCIFleetsoftwareupdateFsuCollectionTargetsList',
'Get-OCIFleetsoftwareupdateFsuCycle',
'Get-OCIFleetsoftwareupdateFsuCyclesList',
'Get-OCIFleetsoftwareupdateFsuDiscoveriesList',
'Get-OCIFleetsoftwareupdateFsuDiscovery',
'Get-OCIFleetsoftwareupdateFsuDiscoveryTargetsList',
'Get-OCIFleetsoftwareupdateFsuJob',
'Get-OCIFleetsoftwareupdateFsuJobOutputContent',
'Get-OCIFleetsoftwareupdateFsuJobOutputsList',
'Get-OCIFleetsoftwareupdateFsuJobsList',
'Get-OCIFleetsoftwareupdateWorkRequest',
'Get-OCIFleetsoftwareupdateWorkRequestErrorsList',
'Get-OCIFleetsoftwareupdateWorkRequestLogsList',
'Get-OCIFleetsoftwareupdateWorkRequestsList',
'Invoke-OCIFleetsoftwareupdateCloneFsuCycle',
'Invoke-OCIFleetsoftwareupdateResumeFsuAction',
'Invoke-OCIFleetsoftwareupdateRetryFsuJob',
'Move-OCIFleetsoftwareupdateFsuActionCompartment',
'Move-OCIFleetsoftwareupdateFsuCollectionCompartment',
'Move-OCIFleetsoftwareupdateFsuCycleCompartment',
'Move-OCIFleetsoftwareupdateFsuDiscoveryCompartment',
'New-OCIFleetsoftwareupdateFsuAction',
'New-OCIFleetsoftwareupdateFsuCollection',
'New-OCIFleetsoftwareupdateFsuCycle',
'New-OCIFleetsoftwareupdateFsuDiscovery',
'Remove-OCIFleetsoftwareupdateFsuAction',
'Remove-OCIFleetsoftwareupdateFsuCollection',
'Remove-OCIFleetsoftwareupdateFsuCollectionTargets',
'Remove-OCIFleetsoftwareupdateFsuCycle',
'Remove-OCIFleetsoftwareupdateFsuDiscovery',
'Remove-OCIFleetsoftwareupdateFsuJob',
'Stop-OCIFleetsoftwareupdateFsuAction',
'Stop-OCIFleetsoftwareupdateFsuDiscovery',
'Update-OCIFleetsoftwareupdateFsuAction',
'Update-OCIFleetsoftwareupdateFsuCollection',
'Update-OCIFleetsoftwareupdateFsuCycle',
'Update-OCIFleetsoftwareupdateFsuDiscovery',
'Update-OCIFleetsoftwareupdateFsuJob'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Fleetsoftwareupdate'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/1497.ps1
|
1497.ps1
|
function Assert-Error
{
[CmdletBinding(DefaultParameterSetName='Default')]
param(
[Parameter(Mandatory=$true,ParameterSetName='CheckLastError')]
[Switch]
$Last,
[Parameter(Mandatory=$true,ParameterSetName='CheckFirstError')]
[Switch]
$First,
[Parameter(Mandatory=$true,Position=0,ParameterSetName='CheckSpecificError')]
[int]
$Index,
[int]
$Count,
[Parameter(Mandatory=$true,Position=0,ParameterSetName='CheckLastError')]
[Parameter(Mandatory=$true,Position=0,ParameterSetName='CheckFirstError')]
[Parameter(Mandatory=$true,Position=1,ParameterSetName='CheckSpecificError')]
[Regex]
$Regex,
[Parameter(Position=0,ParameterSetName='Default')]
[Parameter(Position=1,ParameterSetName='CheckLastError')]
[Parameter(Position=1,ParameterSetName='CheckFirstError')]
[Parameter(Position=2,ParameterSetName='CheckSpecificError')]
[string]
$Message
)
Set-StrictMode -Version 'Latest'
Assert-GreaterThan $Global:Error.Count 0 'Expected there to be errors, but there aren''t any.'
if( $PSBoundParameters.ContainsKey('Count') )
{
Assert-Equal $Count $Global:Error.Count ('Expected ''{0}'' errors, but found ''{1}''' -f $Count,$Global:Error.Count)
}
if( $PSCmdlet.ParameterSetName -like 'Check*Error' )
{
if( $PSCmdlet.ParameterSetName -eq 'CheckFirstError' )
{
$Index = -1
}
elseif( $PSCmdlet.ParameterSetName -eq 'CheckLastError' )
{
$Index = 0
}
Assert-True ($Index -lt $Global:Error.Count) ('Expected there to be at least {0} errors, but there are only {1}. {2}' -f ($Index + 1),$Global:Error.Count,$Message)
Assert-Match -Haystack $Global:Error[$Index].Exception.Message -Regex $Regex -Message $Message
}
}
|
combined_dataset/train/non-malicious/3084.ps1
|
3084.ps1
|
function global:Test-Error {
Write-Error "This is an error" -ErrorAction SilentlyContinue
}
Given "we mock Write-Error" {
Mock Write-Error { } -Verifiable
}
When "we call a function that writes an error" {
Test-Error
}
Then "we can verify the mock" {
Assert-MockCalled Write-Error
Assert-VerifiableMock
}
Then "we cannot verify the mock" {
try {
Assert-MockCalled Write-Error
}
catch {
return
}
throw "Write-Error not called"
}
|
combined_dataset/train/non-malicious/sample_33_56.ps1
|
sample_33_56.ps1
|
#
# Module manifest for module 'OCI.PSModules.Announcementsservice'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Announcementsservice.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = '4260cf9c-0dfb-4f1c-ac46-7d08fcbebbf2'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Announcementsservice Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '75.1.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Announcementsservice.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIAnnouncementsserviceAnnouncement',
'Get-OCIAnnouncementsserviceAnnouncementsList',
'Get-OCIAnnouncementsserviceAnnouncementsPreference',
'Get-OCIAnnouncementsserviceAnnouncementsPreferencesList',
'Get-OCIAnnouncementsserviceAnnouncementSubscription',
'Get-OCIAnnouncementsserviceAnnouncementSubscriptionsList',
'Get-OCIAnnouncementsserviceAnnouncementUserStatus',
'Move-OCIAnnouncementsserviceAnnouncementSubscriptionCompartment',
'New-OCIAnnouncementsserviceAnnouncementsPreference',
'New-OCIAnnouncementsserviceAnnouncementSubscription',
'New-OCIAnnouncementsserviceFilterGroup',
'Remove-OCIAnnouncementsserviceAnnouncementSubscription',
'Remove-OCIAnnouncementsserviceFilterGroup',
'Update-OCIAnnouncementsserviceAnnouncementsPreference',
'Update-OCIAnnouncementsserviceAnnouncementSubscription',
'Update-OCIAnnouncementsserviceAnnouncementUserStatus',
'Update-OCIAnnouncementsserviceFilterGroup'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Announcementsservice'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/2290.ps1
|
2290.ps1
|
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$false, ParameterSetName="List", HelpMessage="List user accounts eligible for removal instead of being removed")]
[ValidateNotNullOrEmpty()]
[switch]$List,
[parameter(Mandatory=$false, ParameterSetName="Purge", HelpMessage="Removed user accounts will be removed from the Recycle Bin")]
[ValidateNotNullOrEmpty()]
[switch]$Purge,
[parameter(Mandatory=$false, ParameterSetName="List", HelpMessage="Show a progressbar displaying the current operation")]
[parameter(Mandatory=$false, ParameterSetName="Purge")]
[ValidateNotNullOrEmpty()]
[switch]$ShowProgress
)
Begin {
try {
Import-Module -Name MSOnline -ErrorAction Stop -Verbose:$false
}
catch [System.Exception] {
Write-Warning -Message $_.Exception.Message ; break
}
if (($Credentials = Get-Credential -Message "Enter the username and password for a Microsoft Online Service") -eq $null) {
Write-Warning -Message "Please specify a Global Administrator account and password" ; break
}
try {
Connect-MsolService -Credential $Credentials -ErrorAction Stop -Verbose:$false
}
catch [System.Exception] {
Write-Warning -Message $_.Exception.Message ; break
}
}
Process {
if ($PSBoundParameters["ShowProgress"]) {
$UserCount = 0
}
try {
$SynchronizedUsers = Get-MsolUser -Synchronized -All -ErrorAction Stop
$SyncedUserCount = ($SynchronizedUsers | Measure-Object).Count
foreach ($User in $SynchronizedUsers) {
if ($PSBoundParameters["ShowProgress"]) {
$UserCount++
Write-Progress -Activity "Removing synchronized users from Azure Active Directory" -Status "$($UserCount) / $($SyncedUserCount)" -CurrentOperation "User: $($User.UserPrincipalName)" -PercentComplete (($UserCount / $SyncedUserCount) * 100)
}
if ($PSBoundParameters["List"] -eq $true) {
$PSObject = [PSCustomObject]@{
UserPrincipalName = $User.UserPrincipalName
DisplayName = $User.DisplayName
}
Write-Output -InputObject $PSObject
}
else {
try {
Write-Verbose -Message "Attempting to remove user account '$($User.UserPrincipalName)'"
Remove-MsolUser -UserPrincipalName $User.UserPrincipalName -Force -ErrorAction Stop
Write-Verbose -Message "Successfully removed user account '$($User.UserPrincipalName)'"
}
catch [System.Exception] {
Write-Warning -Message "Unable to remove synchronized user account '$($User.UserPrincipalName)'"
}
try {
if ($PSBoundParameters["Purge"]) {
Write-Verbose -Message "Attempting to remove deleted user account '$($User.UserPrincipalName)'"
Get-MsolUser -ReturnDeletedUsers | Where-Object { $_.UserPrincipalName -like $User.UserPrincipalName } | Remove-MsolUser -RemoveFromRecycleBin -Force -ErrorAction Stop
Write-Verbose -Message "Successfully removed deleted user account '$($User.UserPrincipalName)'"
}
}
catch [System.Exception] {
Write-Warning -Message "There was a problem when attempting to remove deleted user account '$($User.UserPrincipalName)' from the recycle bin"
}
}
Start-Sleep -Seconds 3
}
}
catch [System.Exception] {
Write-Warning -Message $_.Exception.Message ; break
}
}
|
combined_dataset/train/non-malicious/Get Twitter RSS Feed_7.ps1
|
Get Twitter RSS Feed_7.ps1
|
param ([String] $ScreenName)
$client = New-Object System.Net.WebClient
$idUrl = "https://api.twitter.com/1/users/show.json?screen_name=$ScreenName"
$data = $client.DownloadString($idUrl)
$start = 0
$findStr = '"id":'
do {
$start = $data.IndexOf($findStr, $start + 1)
if ($start -gt 0) {
$start += $findStr.Length
$end = $data.IndexOf(',', $start)
$userId = $data.SubString($start, $end-$start)
}
} while ($start -le $data.Length -and $start -gt 0)
$feed = "http://twitter.com/statuses/user_timeline/$userId.rss"
$feed
|
combined_dataset/train/non-malicious/4154.ps1
|
4154.ps1
|
param
(
[Parameter(Mandatory = $true)][string]$BIOSPassword
)
Function BitLockerSAK {
[cmdletBinding()]
Param (
[Switch]$IsTPMActivated,
[Switch]$IsTPMEnabled,
[Switch]$IsTPMOwnerShipAllowed,
[Switch]$ResumeEncryption,
[Switch]$GetEncryptionState,
[Switch]$GetProtectionStatus,
[switch]$Encrypt,
[Parameter(ParameterSetName = 'OwnerShip')][switch]$TakeTPMOwnerShip,
[Parameter(ParameterSetName = 'OwnerShip')][int]$pin,
[switch]$IsTPMOwned,
[Switch]$GetKeyProtectorIds,
[switch]$GetEncryptionMethod,
[ValidateScript({
if ($_ -match '^[A-Z]{1}[:]') {
return $true
} else {
Write-Warning 'The drive letter parameter has to respect the following case: DriverLetter+Colomn EG: --> C: --> D: --> E: '
return $false
}
})][string]$DriveLetter = 'C:',
[switch]$GetKeyProtectorTypeAndID,
[switch]$DeleteKeyProtectors,
[String[]]$ProtectorIDs,
[switch]$DeleteKeyProtector,
[switch]$PauseEncryption,
[switch]$PauseDecryption,
[switch]$Decrytp,
[Parameter(ParameterSetName = 'NumericalPassword')][Switch]$GetKeyProtectorNumericalPassword,
[Parameter(ParameterSetName = 'NumericalPassword', Mandatory = $true)][String]$VolumeKeyProtectorID
)
Begin {
try {
$Tpm = Get-WmiObject -Namespace ROOT\CIMV2\Security\MicrosoftTpm -Class Win32_Tpm -ErrorAction Stop
} catch [System.Management.ManagementException]{
write-warning 'Could not access the WMI methods. Verify that you run the script with elevated rights and try again.'
continue
}
}
Process {
switch ($PSBoundParameters.keys) {
'IsTPMActivated'{ $return = if ($Tpm) { $tpm.IsActivated().isactivated }; break }
'IsTPMEnabled'{ $return = if ($Tpm) { $tpm.IsEnabled().isenabled }; break }
'IsTPMOwnerShipAllowed'{ $return = if ($Tpm) { $tpm.IsOwnerShipAllowed().IsOwnerShipAllowed }; break }
'IsTPMOwned'{ $return = if ($Tpm) { $Tpm.isowned().isowned }; break }
'GetEncryptionState'{
write-verbose "Getting the encryptionstate of drive $($driveletter)"
$EncryptionData = Get-WmiObject -Namespace ROOT\CIMV2\Security\Microsoftvolumeencryption -Class Win32_encryptablevolume -Filter "DriveLetter = '$DriveLetter'"
$protectionState = $EncryptionData.GetConversionStatus()
$CurrentEncryptionProgress = $protectionState.EncryptionPercentage
switch ($ProtectionState.Conversionstatus) {
'0' {
$Properties = @{ 'EncryptionState' = 'FullyDecrypted'; 'CurrentEncryptionProgress' = $CurrentEncryptionProgress }
$Return = New-Object psobject -Property $Properties
}
'1' {
$Properties = @{ 'EncryptionState' = 'FullyEncrypted'; 'CurrentEncryptionProgress' = $CurrentEncryptionProgress }
$Return = New-Object psobject -Property $Properties
}
'2' {
$Properties = @{ 'EncryptionState' = 'EncryptionInProgress'; 'CurrentEncryptionProgress' = $CurrentEncryptionProgress }
$Return = New-Object psobject -Property $Properties
}
'3' {
$Properties = @{ 'EncryptionState' = 'DecryptionInProgress'; 'CurrentEncryptionProgress' = $CurrentEncryptionProgress }
$Return = New-Object psobject -Property $Properties
}
'4' {
$Properties = @{ 'EncryptionState' = 'EncryptionPaused'; 'CurrentEncryptionProgress' = $CurrentEncryptionProgress }
$Return = New-Object psobject -Property $Properties
}
'5' {
$Properties = @{ 'EncryptionState' = 'DecryptionPaused'; 'CurrentEncryptionProgress' = $CurrentEncryptionProgress }
$Return = New-Object psobject -Property $Properties
}
default {
write-verbose "Couldn't retrieve an encryption state."
$Properties = @{ 'EncryptionState' = $false; 'CurrentEncryptionProgress' = $false }
$Return = New-Object psobject -Property $Properties
}
}
}
'ResumeEncryption'{
write-verbose 'Resuming encryption'
$ProtectionState = Get-WmiObject -Namespace ROOT\CIMV2\Security\Microsoftvolumeencryption -Class Win32_encryptablevolume -Filter "DriveLetter = '$DriveLetter'"
$Ret = $protectionState.ResumeConversion()
$ReturnCode = $ret.ReturnValue
switch ($ReturnCode) {
('0') { $Message = 'The Method Resume Conversion was called succesfully.' }
('2150694912') { $message = 'The volume is locked' }
default { $message = 'The resume operation failed with an uknowned return code.' }
}
$Properties = @{ 'ReturnCode' = $ReturnCode; 'ErrorMessage' = $message }
$Return = New-Object psobject -Property $Properties
}
'GetProtectionStatus'{
$ProtectionState = Get-WmiObject -Namespace ROOT\CIMV2\Security\Microsoftvolumeencryption -Class Win32_encryptablevolume -Filter "DriveLetter = '$DriveLetter'"
write-verbose 'Gathering BitLocker protection status infos.'
switch ($ProtectionState.GetProtectionStatus().protectionStatus) {
('0') { $return = 'Unprotected' }
('1') { $return = 'Protected' }
('2') { $return = 'Uknowned' }
default { $return = 'NoReturn' }
}
}
'Encrypt'{
$ProtectionState = Get-WmiObject -Namespace ROOT\CIMV2\Security\Microsoftvolumeencryption -Class Win32_encryptablevolume -Filter "DriveLetter = '$DriveLetter'"
write-verbose 'Launching drive encryption.'
$ProtectorKey = $protectionState.ProtectKeyWithTPMAndPIN('ProtectKeyWithTPMAndPin', '', $pin)
Start-Sleep -Seconds 3
$NumericalPasswordReturn = $protectionState.ProtectKeyWithNumericalPassword()
$Return = $protectionState.Encrypt()
$returnCode = $return.returnvalue
switch ($ReturnCode) {
('0') { $message = 'Operation successfully started.' }
('2147942487') { $message = 'The EncryptionMethod parameter is provided but is not within the known range or does not match the current Group Policy setting.' }
('2150694958') { $message = 'No encryption key exists for the volume' }
('2150694957') { $message = 'The provided encryption method does not match that of the partially or fully encrypted volume.' }
('2150694942') { $message = 'The volume cannot be encrypted because this computer is configured to be part of a server cluster.' }
('2150694956') { $message = 'No key protectors of the type Numerical Password are specified. The Group Policy requires a backup of recovery information to Active Directory Domain Services' }
default {
$message = 'An unknown status was returned by the Encryption action.'
}
}
$Properties = @{ 'ReturnCode' = $ReturnCode; 'ErrorMessage' = $message }
$Return = New-Object psobject -Property $Properties
}
'GetKeyProtectorIds'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$return = $BitLocker.GetKeyProtectors('0').VolumeKeyProtectorID
}
'GetEncryptionMethod'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$EncryptMethod = $BitLocker.GetEncryptionMethod().encryptionmethod
switch ($EncryptMethod) {
'0'{ $Return = 'None'; break }
'1'{ $Return = 'AES_128_WITH_DIFFUSER'; break }
'2'{ $Return = 'AES_256_WITH_DIFFUSER'; break }
'3'{ $Return = 'AES_128'; break }
'4'{ $Return = 'AES_256'; break }
'5'{ $Return = 'HARDWARE_ENCRYPTION'; break }
default { $Return = 'UNKNOWN'; break }
}
}
'GetKeyProtectorTypeAndID'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$ProtectorIds = $BitLocker.GetKeyProtectors('0').volumekeyprotectorID
$return = @()
foreach ($ProtectorID in $ProtectorIds) {
$KeyProtectorType = $BitLocker.GetKeyProtectorType($ProtectorID).KeyProtectorType
$keyType = ''
switch ($KeyProtectorType) {
'0'{ $Keytype = 'Unknown or other protector type'; break }
'1'{ $Keytype = 'Trusted Platform Module (TPM)'; break }
'2'{ $Keytype = 'External key'; break }
'3'{ $Keytype = 'Numerical password'; break }
'4'{ $Keytype = 'TPM And PIN'; break }
'5'{ $Keytype = 'TPM And Startup Key'; break }
'6'{ $Keytype = 'TPM And PIN And Startup Key'; break }
'7'{ $Keytype = 'Public Key'; break }
'8'{ $Keytype = 'Passphrase'; break }
'9'{ $Keytype = 'TPM Certificate'; break }
'10'{ $Keytype = 'CryptoAPI Next Generation (CNG) Protector'; break }
}
$Properties = @{ 'KeyProtectorID' = $ProtectorID; 'KeyProtectorType' = $Keytype }
$Return += New-Object -TypeName psobject -Property $Properties
}
}
'DeleteKeyProtectors'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$Return = $BitLocker.DeleteKeyProtectors()
}
'TakeTPMOwnerShip'{
$Tpm.takeOwnership()
}
'DeleteKeyProtector'{
if ($PSBoundParameters.ContainsKey('ProtectorIDs')) {
$Return = @()
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
foreach ($ProtID in $ProtectorIDs) {
$Return += $BitLocker.DeleteKeyProtector($ProtID)
}
} else {
write-warning 'Could not delete the key protector. Missing ProtectorID parameter.'
$Return = 'Could not delete the key protector. Missing ProtectorID parameter.'
}
}
'PauseEncryption'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$ReturnCode = $BitLocker.PauseConversion()
switch ($ReturnCode.ReturnValue) {
'0'{ $Return = 'Paused sucessfully.'; break }
'2150694912'{ $Return = 'The volume is locked.'; Break }
default { $Return = 'Uknown return code.'; break }
}
}
'PauseDecryption'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$ReturnCode = $BitLocker.PauseConversion()
switch ($ReturnCode.ReturnValue) {
'0'{ $Return = 'Paused sucessfully.'; break }
'2150694912'{ $Return = 'The volume is locked.'; Break }
default { $Return = 'Uknown return code.'; break }
}
}
'Decrytp'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$ReturnCode = $BitLocker.Decrypt()
switch ($ReturnCode.ReturnValue) {
'0'{ $Return = 'Uncryption started successfully.'; break }
'2150694912'{ $Return = 'The volume is locked.'; Break }
'2150694953' { $Return = 'This volume cannot be decrypted because keys used to automatically unlock data volumes are available.'; Break }
default { $Return = 'Uknown return code.'; break }
}
}
'GetKeyProtectorNumericalPassword'{
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
$Return = @()
$KeyProtectorReturn = $BitLocker.GetKeyProtectorNumericalPassword($VolumeKeyProtectorID)
switch ($KeyProtectorReturn.ReturnValue) {
'0' { $msg = 'The method was successful.' }
'2150694912' { $msg = 'The volume is locked.'; Break }
'2147942487' { $msg = "The VolumeKeyProtectorID parameter does not refer to a key protector of the type 'Numerical Password'."; Break }
'2150694920' { $msg = 'BitLocker is not enabled on the volume. Add a key protector to enable BitLocker.'; Break }
default { $msg = "Unknown return value: $($KeyProtectorReturn.ReturnValue)" }
}
$Properties = @{ 'KeyProtectorNumericalPassword' = $KeyProtectorReturn.NumericalPassword; 'VolumeKeyProtectorID' = $VolumeKeyProtectorID; 'Message' = $msg }
$Return += New-Object -TypeName psobject -Property $Properties
}
}
if ($PSBoundParameters.Keys.Count -eq 0) {
write-verbose 'Returning bitlocker main status'
$Tpm = Get-WmiObject -Namespace ROOT\CIMV2\Security\MicrosoftTpm -Class Win32_Tpm
$BitLocker = Get-WmiObject -Namespace 'Root\cimv2\Security\MicrosoftVolumeEncryption' -Class 'Win32_EncryptableVolume' -Filter "DriveLetter = '$DriveLetter'"
if ($tpm) {
$TpmActivated = $tpm.IsActivated().isactivated
$TPMEnabled = $tpm.IsEnabled().isenabled
$TPMOwnerShipAllowed = $Tpm.IsOwnershipAllowed().IsOwnerShipAllowed
$TPMOwned = $Tpm.isowned().isowned
}
$ProtectorIds = $BitLocker.GetKeyProtectors('0').volumekeyprotectorID
$CurrentEncryptionState = BitLockerSAK -GetEncryptionState
$EncryptionMethod = BitLockerSAK -GetEncryptionMethod
$KeyProtectorTypeAndID = BitLockerSAK -GetKeyProtectorTypeAndID
$properties = @{
'IsTPMActivated' = $TpmActivated;`
'IsTPMEnabled' = $TPMEnabled;`
'IsTPMOwnerShipAllowed' = $TPMOwnerShipAllowed;`
'IsTPMOwned' = $TPMOwned;`
'CurrentEncryptionPercentage' = $CurrentEncryptionState.CurrentEncryptionProgress;`
'EncryptionState' = $CurrentEncryptionState.encryptionState; `
'EncryptionMethod' = $EncryptionMethod;`
'KeyProtectorTypesAndIDs' = $KeyProtectorTypeAndID
}
$Return = New-Object psobject -Property $Properties
}
}
End {
return $return
}
}
Function Get-Architecture {
Set-Variable -Name Architecture -Scope Local -Force
$Architecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture
$Architecture = $Architecture.OSArchitecture
Return $Architecture
Remove-Variable -Name Architecture -Scope Local -Force
}
function Get-BiosStatus {
param ([String]$Option)
Set-Variable -Name Architecture -Scope Local -Force
Set-Variable -Name Argument -Scope Local -Force
Set-Variable -Name CCTK -Scope Local -Force
Set-Variable -Name Output -Scope Local -Force
$Architecture = Get-Architecture
If ($Architecture -eq "32-bit") {
$CCTK = $env:ProgramFiles + "\Dell\Command Configure\X86\cctk.exe"
} else {
$CCTK = ${env:ProgramFiles(x86)} + "\Dell\Command Configure\X86_64\cctk.exe"
}
$Argument = "--" + $Option
$Output = [string] (& $CCTK $Argument)
$Output = $Output.Split('=')
Return $Output[1]
Remove-Variable -Name Architecture -Scope Local -Force
Remove-Variable -Name Argument -Scope Local -Force
Remove-Variable -Name CCTK -Scope Local -Force
Remove-Variable -Name Output -Scope Local -Force
}
Function Install-EXE {
Param ([String]$DisplayName,
[String]$Executable,
[String]$Switches)
Set-Variable -Name ErrCode -Scope Local -Force
Write-Host "Install"$DisplayName"....." -NoNewline
If ((Test-Path $Executable) -eq $true) {
$ErrCode = (Start-Process -FilePath $Executable -ArgumentList $Switches -Wait -Passthru).ExitCode
} else {
$ErrCode = 1
}
If (($ErrCode -eq 0) -or ($ErrCode -eq 3010)) {
Write-Host "Success" -ForegroundColor Yellow
} else {
Write-Host "Failed with error code "$ErrCode -ForegroundColor Red
}
Remove-Variable -Name ErrCode -Scope Local -Force
}
Function Get-BitLockerRecoveryKeyId {
[cmdletBinding()]
Param (
[Parameter(Mandatory = $false, ValueFromPipeLine = $false)][ValidateSet("Alltypes", "TPM", "ExternalKey", "NumericPassword", "TPMAndPin", "TPMAndStartUpdKey", "TPMAndPinAndStartUpKey", "PublicKey", "PassPhrase", "TpmCertificate", "SID")]$KeyProtectorType
)
$BitLocker = Get-WmiObject -Namespace "Root\cimv2\Security\MicrosoftVolumeEncryption" -Class "Win32_EncryptableVolume"
switch ($KeyProtectorType) {
("Alltypes") { $Value = "0" }
("TPM") { $Value = "1" }
("ExternalKey") { $Value = "2" }
("NumericPassword") { $Value = "3" }
("TPMAndPin") { $Value = "4" }
("TPMAndStartUpdKey") { $Value = "5" }
("TPMAndPinAndStartUpKey") { $Value = "6" }
("PublicKey") { $Value = "7" }
("PassPhrase") { $Value = "8" }
("TpmCertificate") { $Value = "9" }
("SID") { $Value = "10" }
default { $Value = "0" }
}
$Ids = $BitLocker.GetKeyProtectors($Value).volumekeyprotectorID
return $ids
}
Function Remove-RegistryKey {
Param ([String]$RegistryKey,
[Boolean]$Recurse)
Set-Variable -Name i -Scope Local -Force
Set-Variable -Name RegKey -Scope Local -Force
Set-Variable -Name RegistryKey1 -Scope Local -Force
Set-Variable -Name tempdrive -Scope Local -Force
$tempdrive = New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
$RegistryKey1 = $RegistryKey.split("\")
switch ($RegistryKey1[0]) {
"HKEY_CLASSES_ROOT" { $RegistryKey1[0] = "HKCR" }
"HKEY_CURRENT_USER" { $RegistryKey1[0] = "HKCU" }
"HKEY_LOCAL_MACHINE" { $RegistryKey1[0] = "HKLM" }
"HKEY_USERS" { $RegistryKey1[0] = "HKU" }
"HKEY_CURRENT_CONFIG" { $RegistryKey1[0] = "HKCC" }
}
For ($i = 0; $i -lt $RegistryKey1.Count; $i++) {
$RegKey = $RegKey + $RegistryKey1[$i]
If ($i -eq 0) {
$RegKey = $RegKey + ":\"
} elseif ($i -ne $RegistryKey1.Count - 1) {
$RegKey = $RegKey + "\"
} else {
$RegKey = $RegKey
}
}
Write-Host "Delete"$RegKey"....." -NoNewline
If (Test-Path $RegKey) {
If (($Recurse -eq $false) -or ($Recurse -eq $null)) {
Remove-Item -Path $RegKey -Force
} elseIf ($Recurse -eq $true) {
Remove-Item -Path $RegKey -Recurse -Force
}
if ((Test-Path $RegKey) -eq $false) {
Write-Host "Success" -ForegroundColor Yellow
} else {
Write-Host "Failed" -ForegroundColor Yellow
}
} else {
Write-Host "Not Present" -ForegroundColor Green
}
Remove-Variable -Name i -Scope Local -Force
Remove-Variable -Name RegKey -Scope Local -Force
Remove-Variable -Name RegistryKey1 -Scope Local -Force
Remove-Variable -Name tempdrive -Scope Local -Force
}
Set-Variable -Name BitlockerID -Scope Local -Force
Set-Variable -Name ManageBDE -Value $env:windir"\System32\manage-bde.exe" -Scope Local -Force
Set-Variable -Name Switches -Scope Local -Force
Set-Variable -Name TPMActivated -Scope Local -Force
Set-Variable -Name TPMEnabled -Scope Local -Force
Set-Variable -Name TPMOwnershipAllowed -Scope Local -Force
cls
$TPMEnabled = Get-BiosStatus -Option "tpm"
Write-Host "TPM Enabled:"$TPMEnabled
$TPMActivated = Get-BiosStatus -Option "tpmactivation"
Write-Host "TPM Activated:"$TPMActivated
$TPMOwnershipAllowed = BitLockerSAK -IsTPMOwnerShipAllowed
Write-Host "TPM Ownership Allowed:"$TPMOwnershipAllowed
$TPMOwned = BitLockerSAK -IsTPMOwned
Write-Host "TPM Owned:"$TPMOwned
If (($TPMEnabled -eq "on") -and ($TPMActivated -eq "activate") -and ($TPMOwnershipAllowed -eq $true) -and ($TPMOwned -eq $false)) {
Remove-RegistryKey -RegistryKey "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FVE" -Recurse $true
Remove-RegistryKey -RegistryKey "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\TPM" -Recurse $true
$Switches = "-tpm -takeownership" + [char]32 + $BIOSPassword
Install-EXE -DisplayName "Take TPM Ownership" -Executable $ManageBDE -Switches $Switches
$Switches = "-on" + [char]32 + $env:HOMEDRIVE + [char]32 + "-recoverypassword"
Install-EXE -DisplayName "Enable Bitlocker" -Executable $ManageBDE -Switches $Switches
Install-EXE -DisplayName "GPUpdate" -Executable $env:windir"\System32\gpupdate.exe" -Switches " "
$BitlockerID = Get-BitLockerRecoveryKeyId -KeyProtectorType NumericPassword
$Switches = "-protectors -adbackup" + [char]32 + $env:HOMEDRIVE + [char]32 + "-id" + [char]32 + $BitlockerID
Install-EXE -DisplayName "Backup Recovery Key to AD" -Executable $ManageBDE -Switches $Switches
}
Remove-Variable -Name BitlockerID -Scope Local -Force
Remove-Variable -Name ManageBDE -Scope Local -Force
Remove-Variable -Name Switches -Scope Local -Force
Remove-Variable -Name TPMActivated -Scope Local -Force
Remove-Variable -Name TPMEnabled -Scope Local -Force
Remove-Variable -Name TPMOwnershipAllowed -Scope Local -Force
|
combined_dataset/train/non-malicious/sample_38_21.ps1
|
sample_38_21.ps1
|
#
# Module manifest for module 'OCI.PSModules.Nosql'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Nosql.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = '6350988d-a08e-4817-bfff-d79172f60809'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Nosql Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '81.0.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Nosql.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCINosqlIndex', 'Get-OCINosqlIndexesList', 'Get-OCINosqlRow',
'Get-OCINosqlTable', 'Get-OCINosqlTablesList',
'Get-OCINosqlTableUsageList', 'Get-OCINosqlWorkRequest',
'Get-OCINosqlWorkRequestErrorsList',
'Get-OCINosqlWorkRequestLogsList', 'Get-OCINosqlWorkRequestsList',
'Invoke-OCINosqlPrepareStatement', 'Invoke-OCINosqlQuery',
'Invoke-OCINosqlSummarizeStatement',
'Move-OCINosqlTableCompartment', 'New-OCINosqlIndex',
'New-OCINosqlReplica', 'New-OCINosqlTable', 'Remove-OCINosqlIndex',
'Remove-OCINosqlReplica', 'Remove-OCINosqlRow',
'Remove-OCINosqlTable', 'Remove-OCINosqlWorkRequest',
'Update-OCINosqlRow', 'Update-OCINosqlTable'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Nosql'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/1268.ps1
|
1268.ps1
|
function Get-CIisVersion
{
[CmdletBinding()]
param(
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$props = Get-ItemProperty hklm:\Software\Microsoft\InetStp
return $props.MajorVersion.ToString() + "." + $props.MinorVersion.ToString()
}
|
combined_dataset/train/non-malicious/2367.ps1
|
2367.ps1
|
$aOutput = @();
$aDisabledGpos = Get-GPO -All | Where-Object { $_.GpoStatus -eq 'AllSettingsDisabled' };
foreach ($oGpo in $aDisabledGpos) {
$oOutput = New-Object System.Object;
$oOutput | Add-Member -type NoteProperty -Name 'Status' -Value 'Disabled';
$oOutput | Add-Member -type NoteProperty -Name 'Name' -Value $oGpo.DisplayName;
$aOutput += $oOutput;
}
$aAllGpos = Get-Gpo -All;
$aUnlinkedGpos = @();
foreach ($oGpo in $aAllGpos) {
[xml]$oGpoReport = Get-GPOReport -Guid $oGpo.ID -ReportType xml;
if (!(Test-Member $oGpoReport.GPO LinksTo)) {
$oOutput = New-Object System.Object;
$oOutput | Add-Member -type NoteProperty -Name 'Status' -Value 'Unlinked';
$oOutput | Add-Member -type NoteProperty -Name 'Name' -Value $oGpo.DisplayName;
$aOutput += $oOutput;
}
}
$aOutput.Count
$aOutput | Sort-Object Name | Format-Table -AutoSize
|
combined_dataset/train/non-malicious/2292.ps1
|
2292.ps1
|
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Specify the user principal name to amend the password expire policy on")]
[ValidateNotNullOrEmpty()]
[ValidatePattern("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$")]
[string]$UserPrincipalName,
[parameter(Mandatory=$true, HelpMessage="Specify whether the password expire policy should be true or false")]
[ValidateNotNullOrEmpty()]
[bool]$PasswordNeverExpires
)
Begin {
try {
Import-Module -Name MSOnline -ErrorAction Stop -Verbose:$false
}
catch [System.Exception] {
Write-Warning -Message $_.Exception.Message ; break
}
if (($Credentials = Get-Credential -Message "Enter the username and password for a Microsoft Online Service") -eq $null) {
Write-Warning -Message "Please specify a Global Administrator account and password" ; break
}
try {
Connect-MsolService -Credential $Credentials -ErrorAction Stop -Verbose:$false
}
catch [System.Exception] {
Write-Warning -Message $_.Exception.Message ; break
}
}
Process {
$User = Get-MsolUser -UserPrincipalName $UserPrincipalName -ErrorAction Stop
if ($User -ne $null) {
try {
Set-MsolUser -UserPrincipalName $UserPrincipalName -PasswordNeverExpires $PasswordNeverExpires -ErrorAction Stop
}
catch [System.Exception] {
Write-Warning -Message "Unable to change the password expires policy for user '$($UserPrincipalName)'" ; break
}
$UserPasswordNeverExpires = Get-MsolUser -UserPrincipalName $UserPrincipalName -ErrorAction Stop | Select-Object -Property PasswordNeverExpires
$PSObject = [PSCustomObject]@{
UserPrincipalName = $UserPrincipalName
DisplayName = $User.DisplayName
PasswordNeverExpires = $UserPasswordNeverExpires.PasswordNeverExpires
}
Write-Output -InputObject $PSObject
}
else {
Write-Warning -Message "Specified user principal name was not found" ; break
}
}
|
combined_dataset/train/non-malicious/Import-Certificate_2.ps1
|
Import-Certificate_2.ps1
|
#requires -Version 2.0
function Import-Certificate
{
param
(
[IO.FileInfo] $CertFile = $(throw "Paramerter -CertFile [System.IO.FileInfo] is required."),
[string[]] $StoreNames = $(throw "Paramerter -StoreNames [System.String] is required."),
[switch] $LocalMachine,
[switch] $CurrentUser,
[string] $CertPassword,
[switch] $Verbose
)
begin
{
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Security")
}
process
{
if ($Verbose)
{
$VerbosePreference = 'Continue'
}
if (-not $LocalMachine -and -not $CurrentUser)
{
Write-Warning "One or both of the following parameters are required: '-LocalMachine' '-CurrentUser'. Skipping certificate '$CertFile'."
}
try
{
if ($_)
{
$certfile = $_
}
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $certfile,$CertPassword
}
catch
{
Write-Error ("Error importing '$certfile': $_ .") -ErrorAction:Continue
}
if ($cert -and $LocalMachine)
{
$StoreScope = "LocalMachine"
$StoreNames | ForEach-Object {
$StoreName = $_
if (Test-Path "cert:\\$StoreScope\\$StoreName")
{
try
{
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store $StoreName, $StoreScope
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)
$store.Add($cert)
$store.Close()
Write-Verbose "Successfully added '$certfile' to 'cert:\\$StoreScope\\$StoreName'."
}
catch
{
Write-Error ("Error adding '$certfile' to 'cert:\\$StoreScope\\$StoreName': $_ .") -ErrorAction:Continue
}
}
else
{
Write-Warning "Certificate store '$StoreName' does not exist. Skipping..."
}
}
}
if ($cert -and $CurrentUser)
{
$StoreScope = "CurrentUser"
$StoreNames | ForEach-Object {
$StoreName = $_
if (Test-Path "cert:\\$StoreScope\\$StoreName")
{
try
{
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store $StoreName, $StoreScope
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)
$store.Add($cert)
$store.Close()
Write-Verbose "Successfully added '$certfile' to 'cert:\\$StoreScope\\$StoreName'."
}
catch
{
Write-Error ("Error adding '$certfile' to 'cert:\\$StoreScope\\$StoreName': $_ .") -ErrorAction:Continue
}
}
else
{
Write-Warning "Certificate store '$StoreName' does not exist. Skipping..."
}
}
}
}
end
{ }
}
|
combined_dataset/train/non-malicious/sample_41_37.ps1
|
sample_41_37.ps1
|
#########################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# Localized PackageManagement.Resources.psd1
#
#########################################################################################
ConvertFrom-StringData @'
###PSLOC
OldPowerShellCoreVersion=PackageManagement no longer supports PowerShell Core '{0}'. Please install the latest version of PowerShell Core from 'https://aka.ms/i6t6o3' and try again.
###PSLOC
'@
# SIG # Begin signature block
# MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBIBsoYrH/WngZG
# wcwl3oPmFWjeg9nVV4OusKRd1BszsaCCDXYwggX0MIID3KADAgECAhMzAAADrzBA
# DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA
# hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG
# 0W8Sb0vx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K34cjBddOVxblBNOuHcL4VYl9TrjR2iyZI
# PKHHbP4+YGrmgiUqjAbOwVC9mkU86rKt/IxVEfwzk+HgkILurNvMxckTI5qE82vZ
# xCBvK+d63Mr+gGUOtvwVEQFzO1xctfVsRxXBYYF/pBYCP6a2S5HVHpz5VOwnvZbT
# txzI/anLyWz4mvfB/u61xce7ePg4BDXHMLXTm6MKHjO2Ese8ebRLleOPeKVh3M8h
# zZegWi9sBjlbhh6jO/04Njve/zUUTi6cVo34K16i8YUG9yXzKlRv9afNE7K3YQw4
# nphGXnSFPi28f0wkYgagA7PRq+1KQHcGaW8n0F7S+9kbP/qWoZ7382Bv7gGr9Ygw
# 18la
# SIG # End signature block
|
combined_dataset/train/non-malicious/sample_16_5.ps1
|
sample_16_5.ps1
|
#
# Module manifest for module 'OCI.PSModules.Ailanguage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = 'f9edfadc-7cd9-4f7a-8258-fc0671fb808f'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Ailanguage Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '75.1.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Ailanguage.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIAilanguageEndpoint', 'Get-OCIAilanguageEndpointsList',
'Get-OCIAilanguageEvaluationResultsList', 'Get-OCIAilanguageModel',
'Get-OCIAilanguageModelsList', 'Get-OCIAilanguageModelType',
'Get-OCIAilanguageProject', 'Get-OCIAilanguageProjectsList',
'Get-OCIAilanguageWorkRequest',
'Get-OCIAilanguageWorkRequestErrorsList',
'Get-OCIAilanguageWorkRequestLogsList',
'Get-OCIAilanguageWorkRequestsList',
'Invoke-OCIAilanguageBatchDetectDominantLanguage',
'Invoke-OCIAilanguageBatchDetectLanguageEntities',
'Invoke-OCIAilanguageBatchDetectLanguageKeyPhrases',
'Invoke-OCIAilanguageBatchDetectLanguagePiiEntities',
'Invoke-OCIAilanguageBatchDetectLanguageSentiments',
'Invoke-OCIAilanguageBatchDetectLanguageTextClassification',
'Invoke-OCIAilanguageBatchLanguageTranslation',
'Invoke-OCIAilanguageDetectDominantLanguage',
'Invoke-OCIAilanguageDetectLanguageEntities',
'Invoke-OCIAilanguageDetectLanguageKeyPhrases',
'Invoke-OCIAilanguageDetectLanguageSentiments',
'Invoke-OCIAilanguageDetectLanguageTextClassification',
'Move-OCIAilanguageEndpointCompartment',
'Move-OCIAilanguageModelCompartment',
'Move-OCIAilanguageProjectCompartment', 'New-OCIAilanguageEndpoint',
'New-OCIAilanguageModel', 'New-OCIAilanguageProject',
'Remove-OCIAilanguageEndpoint', 'Remove-OCIAilanguageModel',
'Remove-OCIAilanguageProject', 'Update-OCIAilanguageEndpoint',
'Update-OCIAilanguageModel', 'Update-OCIAilanguageProject'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Ailanguage'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/ISEFun.psm1.ps1
|
ISEFun.psm1.ps1
|
# Module version 0.1
# Author: Bartek Bielawski (@bielawb on twitter)
# Purpose: Add functionality to PowerShell ISE
# Description: Adds Add-ons menu 'ISEFun' with all functions included.
# User can add any action there using Add-MyMenuItem function
# One of functions (Copy item from history) was build using WPK - won't work if the latter is not loaded.
# There is also pretty large code for Windows Forms form (change token colors using ColorDialog
# Edit-Function will allow you modify any function in ISE editor
# Expand-Alias will expand aliases in current file
# Have ISE - Fun! ;)
if (-not ($MyISEMenu = $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus | Where-Object { $_.DisplayName -eq 'ISEFun'} ) ) {
$MyISEMenu = $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add('ISEFun',$null,$null)
}
# Helper function to add menu items, exported cause it can be used also for other stuff. :>
function Add-MyMenuItem {
<#
.Synopsis
Adds items to ISEFun Add-Ons sub-menu
.Description
Function can be used to add menu items to ISEFun menu. All you need is command, name and hotkey - we will take care of the rest for you. ;)
.Example
Add-MyMenuItem 'Write-Host fooo' 'Fooo!' 'CTRL+9'
Description
-----------
This command will add item 'Fooo!' to ISEFun menu. This item will write 'fooo' to the host and can be launched using shortcut CTRL + 9
#>
PARAM (
# Script that will be launched when menu item will be selected
[Parameter(Mandatory = $true, HelpMessage = 'Command that you want to add to menu')]
[string]$Command,
# Title for the command in the menu
[string]$DisplayName,
# Hot key to use given item
[string]$HotKey = $null
)
if (!$DisplayName) {
$DisplayName = $Command -replace '-',' '
}
if ( -not ($MyISEMenu.Submenus | Where-Object { $_.DisplayName -eq $DisplayName} ) ) {
try {
[void]$Script:MyISEMenu.Submenus.Add($DisplayName,[scriptblock]::Create($Command),$HotKey)
} catch {
# Probably hotkey already use, adding item without it
[void]$Script:MyISEMenu.Submenus.Add($DisplayName,[scriptblock]::Create($Command),$null)
}
}
}
Add-MyMenuItem Add-MyMenuItem 'Add items'
# Next few lines are just garbage you get when you wanna be smart and create GUI in the script.
# Forgive me for adding this stuff here, I could probably compile it in some dll and skip this but...
# ... well - it gives impression that my module is bigger than it actually is. ;)
#
# Our form to change colours... :)
$handler_bClose_Click=
{
$Main.Hide()
}
$handler_bColor_Click=
{
$Dialog = New-Object Windows.Forms.ColorDialog -Property @{
Color = [drawing.color]::FromArgb($psISE.Options.TokenColors.Item($Combo.SelectedItem).ToString())
FullOpen = $true
}
if ($Dialog.ShowDialog() -eq 'OK') {
$psISE.Options.TokenColors.Item($Combo.SelectedItem) = [windows.media.color]::FromRgb($Dialog.Color.R, $Dialog.Color.G, $Dialog.Color.B)
$Combo.ForeColor = $Dialog.Color
}
}
$handler_selectedValue = {
$Combo.ForeColor = [drawing.color]::FromArgb($psISE.Options.TokenColors.Item($Combo.SelectedItem).ToString())
$bColor.Focus()
}
$OnLoadForm_StateCorrection = {
$Main.WindowState = $InitialFormWindowState
}
$Script:Main = New-Object Windows.Forms.Form -Property @{
Text = "Token colors selector"
MaximizeBox = $False
Name = "Main"
HelpButton = $True
MinimizeBox = $False
ClientSize = New-Object System.Drawing.Size 426, 36
}
$Main.DataBindings.DefaultDataSourceUpdateMode = 0
$Combo = New-Object Windows.Forms.ComboBox -Property @{
FormattingEnabled = $True
Size = New-Object System.Drawing.Size 239, 23
Name = "Combo"
Location = New-Object System.Drawing.Point 12, 7
Font = New-Object System.Drawing.Font("Lucida Console",11.25,0,3,238)
TabIndex = 4
}
$Combo.DataBindings.DefaultDataSourceUpdateMode = 0
$Combo.Items.AddRange($psISE.Options.TokenColors.Keys)
$Combo.Add_SelectedValueChanged($handler_SelectedValue)
$InitialFormWindowState = New-Object Windows.Forms.FormWindowState
$bClose = New-Object Windows.Forms.Button -Property @{
TabIndex = 2
Name = "bClose"
Size = New-Object System.Drawing.Size 75, 23
UseVisualStyleBackColor = $True
Text = "Close"
Location = New-Object System.Drawing.Point 338, 7
}
$bClose.DataBindings.DefaultDataSourceUpdateMode = 0
$bClose.add_Click($handler_bClose_Click)
$bColor = New-Object Windows.Forms.Button -Property @{
TabIndex = 1
Name = "bColor"
Size = New-Object System.Drawing.Size 75, 23
UseVisualStyleBackColor = $True
Text = "Color"
Location = New-Object System.Drawing.Point 257, 7
}
$bColor.DataBindings.DefaultDataSourceUpdateMode = 0
$bColor.add_Click($handler_bColor_Click)
$Main.Controls.AddRange(@($bColor,$bClose,$Combo))
$InitialFormWindowState = $Main.WindowState
$Main.add_Load($OnLoadForm_StateCorrection)
$HelpMessage = @'
This GUI will help you change you token colors.
It's updating text color as you select tokens that you want to modify.
Button 'Color' opens up color dialog.
I won't describe actions performed by 'Close' button. I hope you are able to guess it... ;)
'@
$Main.add_HelpButtonClicked( { [void][windows.forms.MessageBox]::Show($HelpMessage,'Help','OK','Information')})
function Set-TokenColor {
<#
.Synopsis
GUI to add some Token Colors.
.Description
Really. It is just that. No more to it. Seriously!
OK. GUI is pretty smart. You can select tokens that are available, color will change and match the one you currently have. See for yourself. ;)
.Example
Can show you click-click-click example :)
#>
$Script:Main.ShowDialog()| Out-Null
}
Add-MyMenuItem Set-TokenColor
function Expand-Alias {
<#
.Synopsis
Function to expand all command aliases in current script.
.Description
If you want to expand all aliases in a script/ module that you write in PowerShell ISE - this function will help you with that.
It's using Tokenizer to find all commands, Get-Alias to find aliases and their definition, and simply replace alias with command hidden by it.
.Example
Expand-Alias
#>
# Read in current file
if (!$psISE.CurrentFile) {
throw 'No files opened!'
}
if ( -not ($Script = $psISE.CurrentFile.Editor.Text) ) {
throw 'No code!'
}
$line = $psISE.CurrentFile.Editor.CaretLine
$column = $psISE.CurrentFile.Editor.CaretColumn
if ( -not ($commands = [System.Management.Automation.PsParser]::Tokenize($Script, [ref]$null) | Where-Object { $_.Type -eq 'Command' } | Sort-Object -Property Start -Descending) ) {
return
}
foreach ($command in $commands) {
if (Get-Alias $command.Content -ErrorAction SilentlyContinue) {
# $command
$psISE.CurrentFile.Editor.Select($command.StartLine, $command.StartColumn, $command.EndLine, $command.EndColumn)
$psISE.CurrentFile.Editor.InsertText($(Get-Alias $command.Content | Select-Object -ExpandProperty Definition))
}
}
$psISE.CurrentFile.Editor.SetCaretPosition($line, $column)
}
Add-MyMenuItem Expand-Alias
function Edit-Function {
<#
.Synopsis
Simpe function to edit functions in ISE.
.Description
Need to edit function on-the-fly? Want to see how a given function looks like to change it a bit and rename it?
Or maybe just preparing module and you want to change functions you define to make sure changes will work as expected?
Well, with Edit-Function, which is very simple (thank you PowerShell team!) you can do it. :)
.Example
Edit-Function Edit-Function
Description
-----------
You can open any function that exists in your current session, including the function that you reading help to now.
Be careful with that one though. If you change it in wrong direction you may not be able to open it again and fix it.
At least not in the way you could originaly, with Edit-Function. :)
#>
[CmdletBinding()]
param (
[Parameter(Mandatory=$true,HelpMessage='Function name is mandatory parameter.')]
[ValidateScript({Get-Command -CommandType function $_})]
[string]
$Name
)
if (!$psISE) {
Throw 'Implemented for PowerShell ISE only!'
}
$file = $psISE.CurrentPowerShellTab.Files.Add()
$file.Editor.InsertText("function $name {`n")
$file.Editor.InsertText($(Get-Command -CommandType function $name | Select-Object -ExpandProperty definition))
$file.Editor.InsertText("}")
}
Add-MyMenuItem Edit-Function
function Copy-HistoryItem {
<#
.Synopsis
Function build using WPK to give you functionality similar to one you already have in PowerShell.exe
.Description
Display you command history and let you choose from it. Copies selected command to you commandPane.
.Example
Copy-HistoryItem
GUI, so it's not easy to show examples...
#>
try {
New-Window -Width 800 -Height 100 {
New-ListBox -On_PreviewMouseDoubleClick {
$psISE.CurrentPowerShellTab.CommandPane.InsertText($this.SelectedValue)
$this.parent.close()
} -Items $(Get-History | Select-Object -ExpandProperty CommandLine)
} -Show
} catch {
throw 'Requires WPK to work, will be rewritten soon...'
}
}
Add-MyMenuItem Copy-HistoryItem 'Copy item from History' F7
New-Alias -Name edfun -Value Edit-Function
New-Alias -Name expa -Value Expand-Alias
New-Alias -Name cphi -Value Copy-HistoryItem
Export-ModuleMember -Function * -Alias *
# Get rid off menu if module is going to be unloaded.
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
[void]$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Remove($MyISEMenu)
}
|
combined_dataset/train/non-malicious/sample_14_85.ps1
|
sample_14_85.ps1
|
#
# Module manifest for module 'OCI.PSModules.Database'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Database.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = 'e1b520e7-13c2-41a0-be48-3eacc401dff5'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Database Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '81.0.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Database.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Add-OCIDatabaseStorageCapacityCloudExadataInfrastructure',
'Add-OCIDatabaseStorageCapacityExadataInfrastructure',
'Add-OCIDatabaseVirtualMachineToCloudVmCluster',
'Add-OCIDatabaseVirtualMachineToVmCluster',
'Complete-OCIDatabaseExternalBackupJob',
'Confirm-OCIDatabaseVmClusterNetwork',
'Disable-OCIDatabaseAutonomousDatabaseManagement',
'Disable-OCIDatabaseAutonomousDatabaseOperationsInsights',
'Disable-OCIDatabaseExternalContainerDatabaseDatabaseManagement',
'Disable-OCIDatabaseExternalContainerDatabaseStackMonitoring',
'Disable-OCIDatabaseExternalNonContainerDatabaseDatabaseManagement',
'Disable-OCIDatabaseExternalNonContainerDatabaseOperationsInsights',
'Disable-OCIDatabaseExternalNonContainerDatabaseStackMonitoring',
'Disable-OCIDatabaseExternalPluggableDatabaseDatabaseManagement',
'Disable-OCIDatabaseExternalPluggableDatabaseOperationsInsights',
'Disable-OCIDatabaseExternalPluggableDatabaseStackMonitoring',
'Disable-OCIDatabaseManagement',
'Disable-OCIDatabasePluggableDatabaseManagement',
'Edit-OCIDatabaseManagement',
'Edit-OCIDatabasePluggableDatabaseManagement',
'Enable-OCIDatabaseAutonomousDatabaseManagement',
'Enable-OCIDatabaseAutonomousDatabaseOperationsInsights',
'Enable-OCIDatabaseExadataInfrastructure',
'Enable-OCIDatabaseExternalContainerDatabaseDatabaseManagement',
'Enable-OCIDatabaseExternalContainerDatabaseStackMonitoring',
'Enable-OCIDatabaseExternalNonContainerDatabaseDatabaseManagement',
'Enable-OCIDatabaseExternalNonContainerDatabaseOperationsInsights',
'Enable-OCIDatabaseExternalNonContainerDatabaseStackMonitoring',
'Enable-OCIDatabaseExternalPluggableDatabaseDatabaseManagement',
'Enable-OCIDatabaseExternalPluggableDatabaseOperationsInsights',
'Enable-OCIDatabaseExternalPluggableDatabaseStackMonitoring',
'Enable-OCIDatabaseManagement',
'Enable-OCIDatabasePluggableDatabaseManagement', 'Get-OCIDatabase',
'Get-OCIDatabaseApplicationVip',
'Get-OCIDatabaseApplicationVipsList',
'Get-OCIDatabaseAutonomousContainerDatabase',
'Get-OCIDatabaseAutonomousContainerDatabaseDataguardAssociation',
'Get-OCIDatabaseAutonomousContainerDatabaseDataguardAssociationsList',
'Get-OCIDatabaseAutonomousContainerDatabaseResourceUsage',
'Get-OCIDatabaseAutonomousContainerDatabasesList',
'Get-OCIDatabaseAutonomousContainerDatabaseVersionsList',
'Get-OCIDatabaseAutonomousDatabase',
'Get-OCIDatabaseAutonomousDatabaseBackup',
'Get-OCIDatabaseAutonomousDatabaseBackupsList',
'Get-OCIDatabaseAutonomousDatabaseCharacterSetsList',
'Get-OCIDatabaseAutonomousDatabaseClonesList',
'Get-OCIDatabaseAutonomousDatabaseDataguardAssociation',
'Get-OCIDatabaseAutonomousDatabaseDataguardAssociationsList',
'Get-OCIDatabaseAutonomousDatabaseRefreshableClonesList',
'Get-OCIDatabaseAutonomousDatabaseRegionalWallet',
'Get-OCIDatabaseAutonomousDatabasesList',
'Get-OCIDatabaseAutonomousDatabaseWallet',
'Get-OCIDatabaseAutonomousDbPreviewVersionsList',
'Get-OCIDatabaseAutonomousDbVersionsList',
'Get-OCIDatabaseAutonomousExadataInfrastructure',
'Get-OCIDatabaseAutonomousExadataInfrastructureShapesList',
'Get-OCIDatabaseAutonomousExadataInfrastructuresList',
'Get-OCIDatabaseAutonomousPatch',
'Get-OCIDatabaseAutonomousVirtualMachine',
'Get-OCIDatabaseAutonomousVirtualMachinesList',
'Get-OCIDatabaseAutonomousVmCluster',
'Get-OCIDatabaseAutonomousVmClusterAcdResourceUsageList',
'Get-OCIDatabaseAutonomousVmClusterResourceUsage',
'Get-OCIDatabaseAutonomousVmClustersList', 'Get-OCIDatabaseBackup',
'Get-OCIDatabaseBackupDestination',
'Get-OCIDatabaseBackupDestinationList',
'Get-OCIDatabaseBackupsList',
'Get-OCIDatabaseCloudAutonomousVmCluster',
'Get-OCIDatabaseCloudAutonomousVmClusterAcdResourceUsageList',
'Get-OCIDatabaseCloudAutonomousVmClusterResourceUsage',
'Get-OCIDatabaseCloudAutonomousVmClustersList',
'Get-OCIDatabaseCloudExadataInfrastructure',
'Get-OCIDatabaseCloudExadataInfrastructuresList',
'Get-OCIDatabaseCloudExadataInfrastructureUnallocatedResources',
'Get-OCIDatabaseCloudVmCluster',
'Get-OCIDatabaseCloudVmClusterIormConfig',
'Get-OCIDatabaseCloudVmClustersList',
'Get-OCIDatabaseCloudVmClusterUpdate',
'Get-OCIDatabaseCloudVmClusterUpdateHistoryEntriesList',
'Get-OCIDatabaseCloudVmClusterUpdateHistoryEntry',
'Get-OCIDatabaseCloudVmClusterUpdatesList',
'Get-OCIDatabaseConsoleConnection',
'Get-OCIDatabaseConsoleConnectionsList',
'Get-OCIDatabaseConsoleHistoriesList',
'Get-OCIDatabaseConsoleHistory',
'Get-OCIDatabaseConsoleHistoryContent',
'Get-OCIDatabaseContainerDatabasePatchesList',
'Get-OCIDatabaseDataGuardAssociation',
'Get-OCIDatabaseDataGuardAssociationsList', 'Get-OCIDatabaseDbHome',
'Get-OCIDatabaseDbHomePatch', 'Get-OCIDatabaseDbHomePatchesList',
'Get-OCIDatabaseDbHomePatchHistoryEntriesList',
'Get-OCIDatabaseDbHomePatchHistoryEntry',
'Get-OCIDatabaseDbHomesList', 'Get-OCIDatabaseDbNode',
'Get-OCIDatabaseDbNodesList', 'Get-OCIDatabaseDbServer',
'Get-OCIDatabaseDbServersList', 'Get-OCIDatabaseDbSystem',
'Get-OCIDatabaseDbSystemComputePerformancesList',
'Get-OCIDatabaseDbSystemPatch',
'Get-OCIDatabaseDbSystemPatchesList',
'Get-OCIDatabaseDbSystemPatchHistoryEntriesList',
'Get-OCIDatabaseDbSystemPatchHistoryEntry',
'Get-OCIDatabaseDbSystemShapesList', 'Get-OCIDatabaseDbSystemsList',
'Get-OCIDatabaseDbSystemStoragePerformancesList',
'Get-OCIDatabaseDbSystemUpgradeHistoryEntriesList',
'Get-OCIDatabaseDbSystemUpgradeHistoryEntry',
'Get-OCIDatabaseDbVersionsList',
'Get-OCIDatabaseExadataInfrastructure',
'Get-OCIDatabaseExadataInfrastructureOcpus',
'Get-OCIDatabaseExadataInfrastructuresList',
'Get-OCIDatabaseExadataInfrastructureUnAllocatedResources',
'Get-OCIDatabaseExadataIormConfig',
'Get-OCIDatabaseExternalBackupJob',
'Get-OCIDatabaseExternalContainerDatabase',
'Get-OCIDatabaseExternalContainerDatabasesList',
'Get-OCIDatabaseExternalDatabaseConnector',
'Get-OCIDatabaseExternalDatabaseConnectorsList',
'Get-OCIDatabaseExternalNonContainerDatabase',
'Get-OCIDatabaseExternalNonContainerDatabasesList',
'Get-OCIDatabaseExternalPluggableDatabase',
'Get-OCIDatabaseExternalPluggableDatabasesList',
'Get-OCIDatabaseFlexComponentsList',
'Get-OCIDatabaseGiVersionsList',
'Get-OCIDatabaseInfrastructureTargetVersions',
'Get-OCIDatabaseKeyStore', 'Get-OCIDatabaseKeyStoresList',
'Get-OCIDatabaseMaintenanceRun',
'Get-OCIDatabaseMaintenanceRunHistory',
'Get-OCIDatabaseMaintenanceRunHistoryList',
'Get-OCIDatabaseMaintenanceRunsList', 'Get-OCIDatabaseOneoffPatch',
'Get-OCIDatabaseOneoffPatchesList',
'Get-OCIDatabasePdbConversionHistoryEntriesList',
'Get-OCIDatabasePdbConversionHistoryEntry',
'Get-OCIDatabasePluggableDatabase',
'Get-OCIDatabasePluggableDatabasesList', 'Get-OCIDatabasesList',
'Get-OCIDatabaseSoftwareImage', 'Get-OCIDatabaseSoftwareImagesList',
'Get-OCIDatabaseSystemVersionsList',
'Get-OCIDatabaseUpgradeHistoryEntriesList',
'Get-OCIDatabaseUpgradeHistoryEntry', 'Get-OCIDatabaseVmCluster',
'Get-OCIDatabaseVmClusterNetwork',
'Get-OCIDatabaseVmClusterNetworksList',
'Get-OCIDatabaseVmClusterPatch',
'Get-OCIDatabaseVmClusterPatchesList',
'Get-OCIDatabaseVmClusterPatchHistoryEntriesList',
'Get-OCIDatabaseVmClusterPatchHistoryEntry',
'Get-OCIDatabaseVmClustersList', 'Get-OCIDatabaseVmClusterUpdate',
'Get-OCIDatabaseVmClusterUpdateHistoryEntriesList',
'Get-OCIDatabaseVmClusterUpdateHistoryEntry',
'Get-OCIDatabaseVmClusterUpdatesList',
'Invoke-OCIDatabaseAutonomousDatabaseManualRefresh',
'Invoke-OCIDatabaseCheckExternalDatabaseConnectorConnectionStatus',
'Invoke-OCIDatabaseConfigureAutonomousDatabaseVaultKey',
'Invoke-OCIDatabaseConfigureSaasAdminUser',
'Invoke-OCIDatabaseConvertToPdb',
'Invoke-OCIDatabaseConvertToRegularPluggableDatabase',
'Invoke-OCIDatabaseDbNodeAction',
'Invoke-OCIDatabaseDownloadExadataInfrastructureConfigFile',
'Invoke-OCIDatabaseDownloadOneoffPatch',
'Invoke-OCIDatabaseDownloadValidationReport',
'Invoke-OCIDatabaseDownloadVmClusterNetworkConfigFile',
'Invoke-OCIDatabaseFailoverAutonomousContainerDatabaseDataguardAssociation',
'Invoke-OCIDatabaseFailOverAutonomousDatabase',
'Invoke-OCIDatabaseFailoverDataGuardAssociation',
'Invoke-OCIDatabaseLaunchAutonomousExadataInfrastructure',
'Invoke-OCIDatabaseLocalClonePluggableDatabase',
'Invoke-OCIDatabaseMigrateExadataDbSystemResourceModel',
'Invoke-OCIDatabaseMigrateVaultKey',
'Invoke-OCIDatabaseRefreshPluggableDatabase',
'Invoke-OCIDatabaseReinstateAutonomousContainerDatabaseDataguardAssociation',
'Invoke-OCIDatabaseReinstateDataGuardAssociation',
'Invoke-OCIDatabaseRemoteClonePluggableDatabase',
'Invoke-OCIDatabaseResizeVmClusterNetwork',
'Invoke-OCIDatabaseResourcePoolShapes',
'Invoke-OCIDatabaseRotateAutonomousContainerDatabaseEncryptionKey',
'Invoke-OCIDatabaseRotateAutonomousDatabaseEncryptionKey',
'Invoke-OCIDatabaseRotateAutonomousVmClusterOrdsCerts',
'Invoke-OCIDatabaseRotateAutonomousVmClusterSslCerts',
'Invoke-OCIDatabaseRotateCloudAutonomousVmClusterOrdsCerts',
'Invoke-OCIDatabaseRotateCloudAutonomousVmClusterSslCerts',
'Invoke-OCIDatabaseRotateOrdsCerts',
'Invoke-OCIDatabaseRotatePluggableDatabaseEncryptionKey',
'Invoke-OCIDatabaseRotateSslCerts',
'Invoke-OCIDatabaseRotateVaultKey',
'Invoke-OCIDatabaseSaasAdminUserStatus',
'Invoke-OCIDatabaseScanExternalContainerDatabasePluggableDatabases',
'Invoke-OCIDatabaseShrinkAutonomousDatabase',
'Invoke-OCIDatabaseSwitchoverAutonomousContainerDatabaseDataguardAssociation',
'Invoke-OCIDatabaseSwitchoverAutonomousDatabase',
'Invoke-OCIDatabaseSwitchoverDataGuardAssociation',
'Invoke-OCIDatabaseTerminateAutonomousContainerDatabase',
'Invoke-OCIDatabaseTerminateAutonomousExadataInfrastructure',
'Invoke-OCIDatabaseTerminateDbSystem',
'Invoke-OCIDatabaseUpgradeDatabase',
'Invoke-OCIDatabaseUpgradeDbSystem',
'Move-OCIDatabaseAutonomousContainerDatabaseCompartment',
'Move-OCIDatabaseAutonomousDatabaseCompartment',
'Move-OCIDatabaseAutonomousExadataInfrastructureCompartment',
'Move-OCIDatabaseAutonomousVmClusterCompartment',
'Move-OCIDatabaseBackupDestinationCompartment',
'Move-OCIDatabaseCloudAutonomousVmClusterCompartment',
'Move-OCIDatabaseCloudExadataInfrastructureCompartment',
'Move-OCIDatabaseCloudVmClusterCompartment',
'Move-OCIDatabaseDataguardRole',
'Move-OCIDatabaseDbSystemCompartment',
'Move-OCIDatabaseDisasterRecoveryConfiguration',
'Move-OCIDatabaseExadataInfrastructureCompartment',
'Move-OCIDatabaseExternalContainerDatabaseCompartment',
'Move-OCIDatabaseExternalNonContainerDatabaseCompartment',
'Move-OCIDatabaseExternalPluggableDatabaseCompartment',
'Move-OCIDatabaseKeyStoreCompartment',
'Move-OCIDatabaseKeyStoreType',
'Move-OCIDatabaseOneoffPatchCompartment',
'Move-OCIDatabaseSoftwareImageCompartment',
'Move-OCIDatabaseVmClusterCompartment', 'New-OCIDatabase',
'New-OCIDatabaseApplicationVip',
'New-OCIDatabaseAutonomousContainerDatabase',
'New-OCIDatabaseAutonomousContainerDatabaseDataguardAssociation',
'New-OCIDatabaseAutonomousDatabase',
'New-OCIDatabaseAutonomousDatabaseBackup',
'New-OCIDatabaseAutonomousDatabaseWallet',
'New-OCIDatabaseAutonomousVmCluster', 'New-OCIDatabaseBackup',
'New-OCIDatabaseBackupDestination',
'New-OCIDatabaseCloudAutonomousVmCluster',
'New-OCIDatabaseCloudExadataInfrastructure',
'New-OCIDatabaseCloudVmCluster', 'New-OCIDatabaseConsoleConnection',
'New-OCIDatabaseConsoleHistory',
'New-OCIDatabaseDataGuardAssociation', 'New-OCIDatabaseDbHome',
'New-OCIDatabaseDbSystem', 'New-OCIDatabaseExadataInfrastructure',
'New-OCIDatabaseExternalBackupJob',
'New-OCIDatabaseExternalContainerDatabase',
'New-OCIDatabaseExternalDatabaseConnector',
'New-OCIDatabaseExternalNonContainerDatabase',
'New-OCIDatabaseExternalPluggableDatabase',
'New-OCIDatabaseKeyStore', 'New-OCIDatabaseMaintenanceRun',
'New-OCIDatabaseOneoffPatch', 'New-OCIDatabasePluggableDatabase',
'New-OCIDatabaseRecommendedVmClusterNetwork',
'New-OCIDatabaseSoftwareImage', 'New-OCIDatabaseVmCluster',
'New-OCIDatabaseVmClusterNetwork',
'Register-OCIDatabaseAutonomousDatabaseDataSafe',
'Remove-OCIDatabase', 'Remove-OCIDatabaseApplicationVip',
'Remove-OCIDatabaseAutonomousDatabase',
'Remove-OCIDatabaseAutonomousDatabaseBackup',
'Remove-OCIDatabaseAutonomousVmCluster', 'Remove-OCIDatabaseBackup',
'Remove-OCIDatabaseBackupDestination',
'Remove-OCIDatabaseCloudAutonomousVmCluster',
'Remove-OCIDatabaseCloudExadataInfrastructure',
'Remove-OCIDatabaseCloudVmCluster',
'Remove-OCIDatabaseConsoleConnection',
'Remove-OCIDatabaseConsoleHistory', 'Remove-OCIDatabaseDbHome',
'Remove-OCIDatabaseExadataInfrastructure',
'Remove-OCIDatabaseExternalContainerDatabase',
'Remove-OCIDatabaseExternalDatabaseConnector',
'Remove-OCIDatabaseExternalNonContainerDatabase',
'Remove-OCIDatabaseExternalPluggableDatabase',
'Remove-OCIDatabaseKeyStore', 'Remove-OCIDatabaseOneoffPatch',
'Remove-OCIDatabasePluggableDatabase',
'Remove-OCIDatabaseSoftwareImage',
'Remove-OCIDatabaseVirtualMachineFromCloudVmCluster',
'Remove-OCIDatabaseVirtualMachineFromVmCluster',
'Remove-OCIDatabaseVmCluster', 'Remove-OCIDatabaseVmClusterNetwork',
'Restart-OCIDatabaseAutonomousContainerDatabase',
'Restart-OCIDatabaseAutonomousDatabase', 'Restore-OCIDatabase',
'Restore-OCIDatabaseAutonomousDatabase',
'Start-OCIDatabaseAutonomousDatabase',
'Start-OCIDatabasePluggableDatabase',
'Stop-OCIDatabaseAutonomousDatabase', 'Stop-OCIDatabaseBackup',
'Stop-OCIDatabasePluggableDatabase',
'Unregister-OCIDatabaseAutonomousDatabaseDataSafe',
'Update-OCIDatabase',
'Update-OCIDatabaseAutonomousContainerDatabase',
'Update-OCIDatabaseAutonomousContainerDatabaseDataguardAssociation',
'Update-OCIDatabaseAutonomousDatabase',
'Update-OCIDatabaseAutonomousDatabaseBackup',
'Update-OCIDatabaseAutonomousDatabaseRegionalWallet',
'Update-OCIDatabaseAutonomousDatabaseWallet',
'Update-OCIDatabaseAutonomousExadataInfrastructure',
'Update-OCIDatabaseAutonomousVmCluster',
'Update-OCIDatabaseBackupDestination',
'Update-OCIDatabaseCloudAutonomousVmCluster',
'Update-OCIDatabaseCloudExadataInfrastructure',
'Update-OCIDatabaseCloudVmCluster',
'Update-OCIDatabaseCloudVmClusterIormConfig',
'Update-OCIDatabaseConsoleConnection',
'Update-OCIDatabaseConsoleHistory',
'Update-OCIDatabaseDataGuardAssociation',
'Update-OCIDatabaseDbHome', 'Update-OCIDatabaseDbNode',
'Update-OCIDatabaseDbSystem',
'Update-OCIDatabaseExadataInfrastructure',
'Update-OCIDatabaseExadataIormConfig',
'Update-OCIDatabaseExternalContainerDatabase',
'Update-OCIDatabaseExternalDatabaseConnector',
'Update-OCIDatabaseExternalNonContainerDatabase',
'Update-OCIDatabaseExternalPluggableDatabase',
'Update-OCIDatabaseKeyStore', 'Update-OCIDatabaseMaintenanceRun',
'Update-OCIDatabaseOneoffPatch',
'Update-OCIDatabasePluggableDatabase',
'Update-OCIDatabaseSoftwareImage', 'Update-OCIDatabaseVmCluster',
'Update-OCIDatabaseVmClusterNetwork'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Database'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/sample_41_34.ps1
|
sample_41_34.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 required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create an in-memory object for MetricSettings.
.Description
Create an in-memory object for MetricSettings.
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.MetricSettings
.Link
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzDiagnosticSettingMetricSettingsObject
#>
function New-AzDiagnosticSettingMetricSettingsObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.MetricSettings')]
[CmdletBinding(PositionalBinding=$false)]
Param(
[Parameter(HelpMessage="Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.")]
[string]
$Category,
[Parameter(Mandatory, HelpMessage="a value indicating whether this category is enabled.")]
[bool]
$Enabled,
[Parameter(HelpMessage="the number of days for the retention in days. A value of 0 will retain the events indefinitely.")]
[int]
$RetentionPolicyDay,
[Parameter(HelpMessage="a value indicating whether the retention policy is enabled.")]
[bool]
$RetentionPolicyEnabled,
[Parameter(HelpMessage="the timegrain of the metric in ISO8601 format.")]
[System.TimeSpan]
$TimeGrain
)
process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.MetricSettings]::New()
if ($PSBoundParameters.ContainsKey('Category')) {
$Object.Category = $Category
}
if ($PSBoundParameters.ContainsKey('Enabled')) {
$Object.Enabled = $Enabled
}
if ($PSBoundParameters.ContainsKey('RetentionPolicyDay')) {
$Object.RetentionPolicyDay = $RetentionPolicyDay
}
if ($PSBoundParameters.ContainsKey('RetentionPolicyEnabled')) {
$Object.RetentionPolicyEnabled = $RetentionPolicyEnabled
}
if ($PSBoundParameters.ContainsKey('TimeGrain')) {
$Object.TimeGrain = $TimeGrain
}
return $Object
}
}
# SIG # Begin signature block
# MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDg76HURQvzJgnY
# gRtOfUG+ccGZ/WdbNJ5PzFMJNnyhhqCCDXYwggX0MIID3KADAgECAhMzAAADrzBA
# DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+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B/Njt/w2/Oiimxc65J+WOq+waK6Sq+Dd96wQGiEqHr3fb55ZNsFzLRrC
# MzEnnlDV7FNBMwIsmzqfoP2m6wixLU9N6t7bnJw9eMp/bv2G6z8mJO+gqwi6zac2
# hCzM4jiXeFJXH1C4F6XYXBIqgdm1tnOxaV3gYoeaiFmc6g9NfkLUmVd1FSyIvUY8
# /zhuA+ynIflfYC4ruqKW3fDRKIMxJecRG4Aw9ZJM8iv1elQEfdwNCx5KW+yP6Pn2
# LLII9DiBHLWOZmDdkdjJBXOoFMwgFN4mJo2apof5CnYZ//9wPYfkRnn0CW22Hllv
# QeXlhtObgy/N54uDQ9JC7gDJdhIHmajfvfZsxWGftmrNKvvXoMdukpX+iJftZIm8
# VT2UXUHqI35+2199A99S3JvpGc7iHJAI3G/FMvxR7g06WpaihTbKwrDGOsKPhqOK
# 9sfQ
# SIG # End signature block
|
combined_dataset/train/non-malicious/sample_8_24.ps1
|
sample_8_24.ps1
|
ConvertFrom-StringData @'
id_printdevmodes2countcheck_st=There are several printers listed under HKU\\.DEFAULT\\Printers\\DevModes2
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCpI8RSzDRSa3og
# oOHqv3EUpkgdAs7DOLRiMKuRSauNPaCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0
# Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENB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jAcBgNVBAoTFU1pY3Jvc29mdCBD
# b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw
# MTACEzMAAAHt4V/L1felXXMAAQAAAe0wIgQgJHwmHNb0a877pzs9GGBhooAWbWEx
# ml1o498sDW/Bg5wwDQYJKoZIhvcNAQELBQAEggIAJg9OkdHH68x3LTzWcIl8FoEE
# d2R+KRnvJDpUlQDyTz/ye2inTNMXS20JILJTpx0wNEcU8+GYTvmQYw9oEORRbpBa
# Iv08BYoMvSCifwZGLa8xHi/5aGGQtJZTqaiMvnRZHjCdjOLVRxvuSDehj18gcp6O
# YydLNInnr8MISWAQn3w6ZHLcRV/aJsWcl8RFyB2rcyl3VqRppky8KNoXQtkFrM4m
# xLE6S5qHRUWNHu/qY45TSn4YGu0k5brIWiaKTGGy3uKwGqabYlC9gsD+5zoUgg1i
# jxGo5tkNduxxnWXWWdVzO9lYy90+ECMKnSv5XVIf0+OqAqoeFKUgzAImex26N94K
# HaWX0xT/JJGSnFojOrQdJGqXRqjBuW0kN7VQOodRbw0bvw/fE5Nt36jdyq/FpTl/
# sxOLP45I0+L/gdtWG8uUqqKxU7uZQL/45rNXGbbLl5FXhoVFQsM3SNyansAo5REX
# fWzwPk5C5Vu7pq9lcRjPIiHw5YgVw20VkXP69/P3pLnsVW+M64vGaf1Df9CJGU3V
# 8U5kNGIEEahWx6JR23xJxcYiTdqixAVcZz6p9y4E+zsg7ZMs6LGIF/49fSuQKGlK
# fKjAQ77k6eEfi9bTNcwBiX38DxV2M8z3JcJRYIWfVcwGCFmm5U+bSpQ+4FUhyny9
# c/d965vjC9D0JkzLUCY=
# SIG # End signature block
|
combined_dataset/train/non-malicious/3560.ps1
|
3560.ps1
|
$suffix="v2avm1"
$JobQueryWaitTimeInSeconds = 0
$PrimaryFabricName = "V2A-W2K12-400"
$PrimaryNetworkFriendlyName = "corp"
$RecoveryNetworkFriendlyName = "corp"
$NetworkMappingName = "corp96map"
$RecoveryPlanName = "RPSwag96" + $suffix
$policyName1 = "V2aTest" + $suffix
$policyName2 = "V2aTest"+ $suffix+"-failback"
$PrimaryProtectionContainerMapping = "pcmmapping" + $suffix
$reverseMapping = "reverseMap" + $suffix
$pcName = "V2A-W2K12-400"
$rpiName = "V2ATest-rpi-" + $suffix
$RecoveryAzureStorageAccountId = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/canaryexproute/providers/Microsoft.Storage/storageAccounts/ev2teststorage"
$RecoveryResourceGroupId = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/canaryexproute"
$AzureVmNetworkId = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/ERNetwork/providers/Microsoft.Network/virtualNetworks/ASRCanaryTestSub3-CORP-SEA-VNET-1"
$rpiNameNew = "V2ATest-CentOS6U7-400-new"
$vCenterIpOrHostName = "10.150.209.216"
$vCenterName = "BCDR"
$Subnet = "Subnet-1"
$piName = "v2avm1"
$vmIp = "10.150.208.125"
$VmNameList = "v2avm1,win-4002,win-4003"
function WaitForJobCompletion
{
param(
[string] $JobId,
[int] $JobQueryWaitTimeInSeconds =$JobQueryWaitTimeInSeconds
)
$isJobLeftForProcessing = $true;
do
{
$Job = Get-AzRecoveryServicesAsrJob -Name $JobId
$Job
if($Job.State -eq "InProgress" -or $Job.State -eq "NotStarted")
{
$isJobLeftForProcessing = $true
}
else
{
$isJobLeftForProcessing = $false
}
if($isJobLeftForProcessing)
{
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait($JobQueryWaitTimeInSeconds * 1000)
}
}While($isJobLeftForProcessing)
}
Function WaitForIRCompletion
{
param(
[PSObject] $TargetObjectId,
[int] $JobQueryWaitTimeInSeconds = $JobQueryWaitTimeInSeconds
)
$isProcessingLeft = $true
$IRjobs = $null
do
{
$IRjobs = Get-AzRecoveryServicesAsrJob -TargetObjectId $TargetObjectId | Sort-Object StartTime -Descending | select -First 1 | Where-Object{$_.JobType -eq "IrCompletion"}
if($IRjobs -eq $null -or $IRjobs.Count -lt 1)
{
$isProcessingLeft = $true
}
else
{
$isProcessingLeft = $false
}
if($isProcessingLeft)
{
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait($JobQueryWaitTimeInSeconds * 1000)
}
}While($isProcessingLeft)
$IRjobs
WaitForJobCompletion -JobId $IRjobs[0].Name -JobQueryWaitTimeInSeconds $JobQueryWaitTimeInSeconds
}
function Test-vCenter
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$job = New-ASRvCenter -Fabric $fabric -Name $vCenterName -IpOrHostName $vCenterIporHostName -Port 443 -Account $fabric.FabricSpecificDetails.RunAsAccounts[0]
WaitForJobCompletion -JobId $job.name
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$vCenterList = Get-ASRvCenter -Fabric $fabric
Assert-NotNull($vCenterList[0])
$vCenter = Get-ASRvCenter -Fabric $fabric -Name $vCenterName
Assert-NotNull($vCenter)
$updateJob = Update-AzRecoveryServicesAsrvCenter -InputObject $vCenter -Port 444
WaitForJobCompletion -JobId $updatejob.name
$job = Remove-ASRvCenter -InputObject $vCenter
WaitForJobCompletion -JobId $job.name
}
function Test-SiteRecoveryFabricTest
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabricList = Get-AsrFabric
Assert-NotNull($fabricList)
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
Assert-NotNull($fabric)
Assert-NotNull($fabric.FriendlyName)
Assert-NotNull($fabric.name)
Assert-NotNull($fabric.ID)
Assert-NotNull($fabric.FabricSpecificDetails)
$fabricDetails = $fabric.FabricSpecificDetails
Assert-NotNull($fabricDetails.HostName)
Assert-NotNull($fabricDetails.IpAddress)
Assert-NotNull($fabricDetails.AgentVersion)
Assert-NotNull($fabricDetails.ProtectedServers)
Assert-NotNull($fabricDetails.LastHeartbeat)
Assert-NotNull($fabricDetails.ProcessServers)
Assert-NotNull($fabricDetails.MasterTargetServers)
Assert-NotNull($fabricDetails.RunAsAccounts)
Assert-NotNull($fabricDetails.IpAddress)
$ProcessServer = $fabricDetails.ProcessServers
Assert-NotNull($ProcessServer.FriendlyName)
Assert-NotNull($ProcessServer.Id)
Assert-NotNull($ProcessServer.IpAddress)
}
function Test-PC
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$ProtectionContainerList = Get-ASRProtectionContainer -Fabric $fabric
Assert-NotNull($ProtectionContainerList)
$ProtectionContainer = $ProtectionContainerList[0]
Assert-NotNull($ProtectionContainer)
Assert-NotNull($ProtectionContainer.id)
Assert-AreEQUAL -actual $ProtectionContainer.FabricType -expected "VMware"
$ProtectionContainer = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
Assert-NotNull($ProtectionContainer)
Assert-NotNull($ProtectionContainer.id)
Assert-AreEQUAL -actual $ProtectionContainer.FabricType -expected "VMware"
$ProtectionContainer = Get-ASRProtectionContainer -Name $ProtectionContainer.Name -Fabric $fabric
Assert-NotNull($ProtectionContainer)
Assert-NotNull($ProtectionContainer.id)
Assert-AreEQUAL -actual $ProtectionContainer.FabricType -expected "VMware"
}
function Test-SiteRecoveryPolicy
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$Job = New-AzRecoveryServicesAsrPolicy -Name $policyName1 -VmwareToAzure -RecoveryPointRetentionInHours 40 -RPOWarningThresholdInMinutes 5 -ApplicationConsistentSnapshotFrequencyInHours 15
WaitForJobCompletion -JobId $Job.Name
$Policy1 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName1
Assert-True { $Policy1.Count -gt 0 }
Assert-NotNull($Policy1)
$Job = New-AzRecoveryServicesAsrPolicy -Name $policyName2 -AzureToVmware -RecoveryPointRetentionInHours 40 -RPOWarningThresholdInMinutes 5 -ApplicationConsistentSnapshotFrequencyInHours 15
WaitForJobCompletion -JobId $Job.Name
$Policy2 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName2
Assert-True { $Policy2.Count -gt 0 }
Assert-NotNull($Policy2)
$RemoveJob = Remove-ASRPolicy -InputObject $Policy1
$RemoveJob = Remove-ASRPolicy -InputObject $Policy2
}
function Test-V2AAddPI
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$job = New-AzRecoveryServicesAsrProtectableItem -IPAddress $vmIp -FriendlyName $piName -OSType Windows -ProtectionContainer $pc
waitForJobCompletion -JobId $job.name
}
function Test-PCM
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$Job1 = New-AzRecoveryServicesAsrPolicy -Name $policyName1 -VmwaretoAzure -RecoveryPointRetentionInHours 40 -RPOWarningThresholdInMinutes 5 -ApplicationConsistentSnapshotFrequencyInHours 15
$Job2 = New-AzRecoveryServicesAsrPolicy -Name $policyName2 -AzureToVmware -RecoveryPointRetentionInHours 40 -RPOWarningThresholdInMinutes 5 -ApplicationConsistentSnapshotFrequencyInHours 15
waitForJobCompletion -JobId $job1.name
waitForJobCompletion -JobId $job2.name
$Policy1 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName1
$Policy2 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName2
$pcmjob = New-AzRecoveryServicesAsrProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -policy $Policy1 -PrimaryProtectionContainer $pc
WaitForJobCompletion -JobId $pcmjob.Name
$pcm = Get-ASRProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -ProtectionContainer $pc
Assert-NotNull($pcm)
$Removepcm = Remove-AzRecoveryServicesAsrProtectionContainerMapping -InputObject $pcm
WaitForJobCompletion -JobId $Removepcm.Name
}
function V2ACreateRPI
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$Job1 = New-AzRecoveryServicesAsrPolicy -VmwareToAzure -Name $policyName1 -RecoveryPointRetentionInHours 40 -RPOWarningThresholdInMinutes 5 -ApplicationConsistentSnapshotFrequencyInHours 15 -MultiVmSyncStatus "Enable"
$Job2 = New-AzRecoveryServicesAsrPolicy -AzureToVmware -Name $policyName2 -RecoveryPointRetentionInHours 40 -RPOWarningThresholdInMinutes 5 -ApplicationConsistentSnapshotFrequencyInHours 15 -MultiVmSyncStatus "Enable"
WaitForJobCompletion -JobId $Job1.Name
WaitForJobCompletion -JobId $Job2.Name
$Policy1 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName1
$Policy2 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName2
$pcmjob = New-AzRecoveryServicesAsrProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -policy $Policy1 -PrimaryProtectionContainer $pc
WaitForJobCompletion -JobId $pcmjob.Name
$pcm = Get-ASRProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -ProtectionContainer $pc
$pi = Get-ASRProtectableItem -ProtectionContainer $pc -FriendlyName $piName
$EnableDRjob = New-AzRecoveryServicesAsrReplicationProtectedItem -vmwaretoazure -ProtectableItem $pi -Name $rpiName -ProtectionContainerMapping $pcm -RecoveryAzureStorageAccountId $RecoveryAzureStorageAccountId -RecoveryResourceGroupId $RecoveryResourceGroupId -ProcessServer $fabric.fabricSpecificDetails.ProcessServers[0] -Account $fabric.fabricSpecificDetails.RunAsAccounts[0] -RecoveryAzureNetworkId $AzureVmNetworkId -RecoveryAzureSubnetName $Subnet
}
function Test-RPJobReverse
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -Name $rpiName
$Policy2 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName2
$pcmjob = New-AzRecoveryServicesAsrProtectionContainerMapping -Name $reverseMapping -policy $Policy2 -PrimaryProtectionContainer $pc -RecoveryProtectionContainer $pc
WaitForJobCompletion -JobId $pcmjob.Name
$pcm = Get-ASRProtectionContainerMapping -Name $reverseMapping -ProtectionContainer $pc
$job = Update-AzRecoveryServicesAsrProtectionDirection -AzureToVMware`
-Account $fabric.FabricSpecificDetails.RunAsAccounts[0] -DataStore $fabric.FabricSpecificDetails.MasterTargetServers[0].DataStores[3] `
-Direction RecoveryToPrimary -MasterTarget $fabric.FabricSpecificDetails.MasterTargetServers[0] `
-ProcessServer $fabric.FabricSpecificDetails.ProcessServers[0] -ProtectionContainerMapping $pcm `
-ReplicationProtectedItem $RPI -RetentionVolume $fabric.FabricSpecificDetails.MasterTargetServers[0].RetentionVolumes[0]
WaitForJobCompletion -JobId $Job.Name
$RP = Get-AzRecoveryServicesAsrRecoveryPlan -Name $RecoveryPlanName
$foJob = Start-AzRecoveryServicesAsrUnPlannedFailoverJob -RecoveryPlan $RP -Direction RecoveryToPrimary
WaitForJobCompletion -JobId $foJob.Name
$commitJob = Start-AzRecoveryServicesAsrCommitFailoverJob -RecoveryPlan $RP
WaitForJobCompletion -JobId $commitJob.Name
}
function V2ATestResync
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -Name $rpiName
$job = Start-AzRecoveryServicesAsrResynchronizeReplicationJob -ReplicationProtectedItem $rpi
WaitForJobCompletion -JobId $Job.Name
}
function V2AUpdateMobilityService
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -Name $rpiName
$job = Update-AzRecoveryServicesAsrMobilityService -ReplicationProtectedItem $rpi -Account $fabric.fabricSpecificDetails.RunAsAccounts[0]
WaitForJobCompletion -JobId $Job.Name
}
function V2AUpdateServiceProvider
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$splist = Get-ASRServicesProvider -Fabric $fabric
$job = Update-ASRServicesProvider -InputObject $splist[0]
WaitForJobCompletion -JobId $Job.Name
}
function V2ASwitchProcessServer
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$RPIList = Get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc
$job = Start-AzRecoveryServicesAsrSwitchProcessServerJob -Fabric $fabric -SourceProcessServer $fabric.FabricSpecificDetails.ProcessServers[0] -TargetProcessServer $fabric.FabricSpecificDetails.ProcessServers[1] -ReplicatedItem $RPIList
WaitForJobCompletion -JobId $Job.Name
$job = Start-AzRecoveryServicesAsrSwitchProcessServerJob -Fabric $fabric -SourceProcessServer $fabric.FabricSpecificDetails.ProcessServers[0] -TargetProcessServer $fabric.FabricSpecificDetails.ProcessServers[1]
WaitForJobCompletion -JobId $Job.Name
}
function V2ATestFailoverJob
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -Name $rpiName
do
{
$rPoints = Get-ASRRecoveryPoint -ReplicationProtectedItem $rpi
if($rpoints -and $rpoints.count -eq 0) {
}
else
{
break
}
}while ($rpoints.count -lt 0)
$tfoJob = Start-AzRecoveryServicesAsrTestFailoverJob -ReplicationProtectedItem $rpi -Direction PrimaryToRecovery -AzureVMNetworkId $AzureVMNetworkId -RecoveryPoint $rpoints[0]
WaitForJobCompletion -JobId $tfoJob.Name
$cleanupJob = Start-AzRecoveryServicesAsrTestFailoverCleanupJob -ReplicationProtectedItem $rpi -Comment "testing done"
WaitForJobCompletion -JobId $cleanupJob.Name
}
function V2AFailoverJob
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -Name "9a72155b61d09325a02ba0311dea55df3a7135b65558b43c9ff540b9e7be084f"
$pcName = "cloud_a5441e09-275c-4f15-a1b9-450a22c89d7b"
$pc = Get-ASRProtectionContainer -Name $pcName -Fabric $fabric
$rpiName = "win-4003"
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -FriendlyName $rpiName
$foJob = Start-AzRecoveryServicesAsrUnPlannedFailoverJob -ReplicationProtectedItem $rpi -Direction PrimaryToRecovery
WaitForJobCompletion -JobId $foJob.Name
$commitJob = Start-AzRecoveryServicesAsrCommitFailoverJob -ReplicationProtectedItem $rpi
WaitForJobCompletion -JobId $commitJob.Name
}
function V2ATestReprotect
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -Name "9a72155b61d09325a02ba0311dea55df3a7135b65558b43c9ff540b9e7be084f"
$pcName = "cloud_a5441e09-275c-4f15-a1b9-450a22c89d7b"
$pc = Get-ASRProtectionContainer -Name $pcName -Fabric $fabric
$rpiName = "win-4003"
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -FriendlyName $rpiName
$Policy2 = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName2
$pcmjob = New-AzRecoveryServicesAsrProtectionContainerMapping -Name $reverseMapping -policy $Policy2 -PrimaryProtectionContainer $pc -RecoveryProtectionContainer $pc
WaitForJobCompletion -JobId $pcmjob.Name
$pcm = Get-ASRProtectionContainerMapping -Name $reverseMapping -ProtectionContainer $pc
$job = Update-AzRecoveryServicesAsrProtectionDirection `
-AzureToVmware `
-Account $fabric.FabricSpecificDetails.RunAsAccounts[0] `
-DataStore $fabric.FabricSpecificDetails.MasterTargetServers[1].DataStores[3] `
-Direction RecoveryToPrimary -MasterTarget $fabric.FabricSpecificDetails.MasterTargetServers[1] `
-ProcessServer $fabric.FabricSpecificDetails.ProcessServers[1] `
-ProtectionContainerMapping $pcm `
-ReplicationProtectedItem $RPI `
-RetentionVolume $fabric.FabricSpecificDetails.MasterTargetServers[1].RetentionVolumes[0]
}
function v2aFailbackReprotect
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -Name "9a72155b61d09325a02ba0311dea55df3a7135b65558b43c9ff540b9e7be084f"
$pcName = "cloud_a5441e09-275c-4f15-a1b9-450a22c89d7b"
$pc = Get-ASRProtectionContainer -Name $pcName -Fabric $fabric
$rpiName = "win-4002"
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -FriendlyName $rpiName
$job = Start-AzRecoveryServicesAsrUnPlannedFailoverJob -ReplicationProtectedItem $rpi -Direction PrimaryToRecovery
WaitForJobCompletion -JobId $Job.Name
$job = Start-AzRecoveryServicesAsrCommitFailoverJob -ReplicationProtectedItem $rpi
WaitForJobCompletion -JobId $Job.Name
$pcm = Get-ASRProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -ProtectionContainer $pc
$job = Update-AzRecoveryServicesAsrProtectionDirection `
-VMwareToAzure`
-Account $fabric.FabricSpecificDetails.RunAsAccounts[1]`
-Direction RecoveryToPrimary`
-ProcessServer $fabric.FabricSpecificDetails.ProcessServers[1]`
-ProtectionContainerMapping $pcm `
-ReplicationProtectedItem $rpi
}
function v2aUpdatePolicy
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$po = get-asrpolicy -Name V2aTestPolicy2
Update-AzRecoveryServicesAsrPolicy -VMwareToAzure -ApplicationConsistentSnapshotFrequencyInHours 5 -InputObject $po -MultiVmSyncStatus "Enable"
Update-AzRecoveryServicesAsrPolicy -VMwareToAzure -ApplicationConsistentSnapshotFrequencyInHours 5 -InputObject $po
}
function Test-SetRPI
{
param([string] $vaultSettingsFilePath)
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
$rpi = get-AzRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -Name "-RPI"
Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -Name "VSPS212" -PrimaryNic $rpi.nicDetailsList[0].nicId -RecoveryNetworkId `
$AzureVmNetworkId -RecoveryNicStaticIPAddress "10.151.128.205" -RecoveryNicSubnetName "Subnet-2" -UseManagedDisk "True"
}
|
combined_dataset/train/non-malicious/LibraryMSCS_2.ps1
|
LibraryMSCS_2.ps1
|
# ------------------------------------------------------------------------
### <Script>
### <Author>
### Chad Miller
### </Author>
### <Description>
### Defines functions for working with Microsoft Cluster Service (MSCS)
### </Description>
### <Usage>
### . ./LibraryMSCS.ps1
### </Usage>
### </Script>
# ------------------------------------------------------------------------
#######################
function Get-Cluster
{
param($cluster)
gwmi -class "MSCluster_Cluster" -namespace "root\\mscluster" -computername $cluster
} #Get-Cluster
#######################
function Get-ClusterName
{
param($cluster)
Get-Cluster $cluster | select -ExpandProperty name
} #Get-ClusterName
#######################
function Get-ClusterNode
{
param($cluster)
gwmi -class MSCluster_Node -namespace "root\\mscluster" -computername $cluster | add-member -pass NoteProperty Cluster $cluster
} #Get-ClusterNode
#######################
function Get-ClusterSQLVirtual
{
param($cluster)
gwmi -class "MSCluster_Resource" -namespace "root\\mscluster" -computername $cluster | where {$_.type -eq "SQL Server"} | Select @{n='Cluster';e={$cluster}}, Name, State, @{n='VirtualServerName';e={$_.PrivateProperties.VirtualServerName}}, @{n='InstanceName';e={$_.PrivateProperties.InstanceName}}, `
@{n='ServerInstance';e={("{0}\\{1}" -f $_.PrivateProperties.VirtualServerName,$_.PrivateProperties.InstanceName).TrimEnd('\\')}}, `
@{n='Node';e={$(gwmi -namespace "root\\mscluster" -computerName $cluster -query "ASSOCIATORS OF {MSCluster_Resource.Name='$($_.Name)'} WHERE AssocClass = MSCluster_NodeToActiveResource" | Select -ExpandProperty Name)}}
} #Get-ClusterSQLVirtual
#######################
function Get-ClusterNetworkName
{
param($cluster)
gwmi -class "MSCluster_Resource" -namespace "root\\mscluster" -computername $cluster | where {$_.type -eq "Network Name"} | Select @{n='Cluster';e={$cluster}}, Name, State, @{n='NetworkName';e={$_.PrivateProperties.Name}}, `
@{n='Node';e={$(gwmi -namespace "root\\mscluster" -computerName $cluster -query "ASSOCIATORS OF {MSCluster_Resource.Name='$($_.Name)'} WHERE AssocClass = MSCluster_NodeToActiveResource" | Select -ExpandProperty Name)}}
} #Get-ClusterNetworkName
#######################
function Get-ClusterResource
{
param($cluster)
gwmi -ComputerName $cluster -Namespace "root\\mscluster" -Class MSCluster_Resource | add-member -pass NoteProperty Cluster $cluster |
add-member -pass ScriptProperty Node `
{ gwmi -namespace "root\\mscluster" -computerName $cluster -query "ASSOCIATORS OF {MSCluster_Resource.Name='$($this.Name)'} WHERE AssocClass = MSCluster_NodeToActiveResource" | Select -ExpandProperty Name } |
add-member -pass ScriptProperty Group `
{ gwmi -ComputerName $cluster -Namespace "root\\mscluster" -query "ASSOCIATORS OF {MSCluster_Resource.Name='$($this.Name)'} WHERE AssocClass = MSCluster_ResourceGroupToResource" | Select -ExpandProperty Name }
} #Get-ClusterResource
#######################
function Get-ClusterGroup
{
param($cluster)
gwmi -class MSCluster_ResourceGroup -namespace "root\\mscluster" -computername $cluster | add-member -pass NoteProperty Cluster $cluster |
add-member -pass ScriptProperty Node `
{ gwmi -namespace "root\\mscluster" -computerName $cluster -query "ASSOCIATORS OF {MSCluster_ResourceGroup.Name='$($this.Name)'} WHERE AssocClass = MSCluster_NodeToActiveGroup" | Select -ExpandProperty Name } |
add-member -pass ScriptProperty PreferredNodes `
{ @(,(gwmi -namespace "root\\mscluster" -computerName $cluster -query "ASSOCIATORS OF {MSCluster_ResourceGroup.Name='$($this.Name)'} WHERE AssocClass = MSCluster_ResourceGroupToPreferredNode" | Select -ExpandProperty Name)) }
} #Get-ClusterGroup
|
combined_dataset/train/non-malicious/442.ps1
|
442.ps1
|
Register-PSFConfigValidation -Name "consolecolor" -ScriptBlock {
Param (
$Value
)
$Result = New-Object PSObject -Property @{
Success = $True
Value = $null
Message = ""
}
try { [System.ConsoleColor]$color = $Value }
catch
{
$Result.Message = "Not a console color: $Value"
$Result.Success = $False
return $Result
}
$Result.Value = $color
return $Result
}
|
combined_dataset/train/non-malicious/sample_40_42.ps1
|
sample_40_42.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 = '82.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core'
# ID used to uniquely identify this module
GUID = 'fc85f17d-35f9-4106-a77a-ccaa291877f6'
# Author of this module
Author = 'Oracle Cloud Infrastructure'
# Company or vendor of this module
CompanyName = 'Oracle Corporation'
# Copyright statement for this module
Copyright = '(c) Oracle Cloud Infrastructure. All rights reserved.'
# Description of the functionality provided by this module
Description = 'This modules provides Cmdlets for OCI Ocicontrolcenter Service'
# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'
# Name of the PowerShell host required by this module
# PowerShellHostName = ''
# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''
# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '82.0.0'; })
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Ocicontrolcenter.dll'
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-OCIOcicontrolcenterMetricPropertiesList',
'Get-OCIOcicontrolcenterNamespacesList',
'Invoke-OCIOcicontrolcenterRequestSummarizedMetricData'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PSEdition_Core','Windows','Linux','macOS','Oracle','OCI','Cloud','OracleCloudInfrastructure','Ocicontrolcenter'
# A URL to the license for this module.
LicenseUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/LICENSE.txt'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/oracle/oci-powershell-modules/'
# A URL to an icon representing this module.
IconUri = 'https://github.com/oracle/oci-powershell-modules/blob/master/icon.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/oracle/oci-powershell-modules/blob/master/CHANGELOG.md'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
|
combined_dataset/train/non-malicious/0ddea161-baf2-439c-b797-afb5c636692f.ps1
|
0ddea161-baf2-439c-b797-afb5c636692f.ps1
|
#Variables
$Date = Get-Date
$TempReport = $env:TEMP + "\\temp.csv"
$FinalReport = $env:USERPROFILE + "\\" + $Date.Year + "_" + $Date.Month + "_" + $Date.Day + "_" + $Date.Hour + ":" + $Date.Minute + "_Scheduled_Task_Report.csv"
$title = Write-Host "Scheduled Task Reporter" -ForegroundColor green
$message = Write-Host "Which servers would you like to report on?" -ForegroundColor yellow
$EXIT = New-Object System.Management.Automation.Host.ChoiceDescription "&Exit", `
"Exits the script. . . "
$ALL = New-Object System.Management.Automation.Host.ChoiceDescription "&All Server Report", `
"Queries for all SERVERS in the domain and reports on their scheduled tasks."
$SRV = New-Object System.Management.Automation.Host.ChoiceDescription "&Single Host Report", `
"Queries for the exact server or workstation name entered."
$OTHR = New-Object System.Management.Automation.Host.ChoiceDescription "A&NR Report", `
"Peforms an ANR (Ambiguous Name Request) lookup. ANR allows you to do a report against one or more computers by typing part of the computer name."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($EXIT, $ALL, $SRV, $OTHR)
$result = $host.ui.PromptForChoice($title, $message, $options, 0)
switch ($result)
{
0 {Write-Host "No selection made. Exiting script. . ."}
1 {Get-QADComputer -sizelimit 0| Where {$_.osname -like "*Server*"} | Sort | % {schtasks /query /s $_.name /FO CSV /V | where {$_.length -gt 0} > $TempReport }}
2 {$Computer = Read-Host -Prompt "Enter the server name"
Get-QADComputer $Computer | Sort | % {schtasks /query /s $_.name /FO CSV /V | where {$_.length -gt 0} > $TempReport}} # | set-content 'export-csv $outputdestination'}}
3 {$Search = Read-Host -Prompt "Type all or part of the computer name"
Get-QADComputer -ANR $Search | ForEach-Object {schtasks /query /s $_.name /FO CSV /V | where {$_.length -gt 0} > $TempReport}}
|
combined_dataset/train/non-malicious/sample_64_65.ps1
|
sample_64_65.ps1
|
# dot-source all function files
Get-ChildItem -Path $PSScriptRoot | Unblock-File
Get-ChildItem -Path $PSScriptRoot\*.ps1 -Exclude ServiceFabricSDK.ps1 | Foreach-Object{ . $_.FullName }
# SIG # Begin signature block
# MIInkwYJKoZIhvcNAQcCoIInhDCCJ4ACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBAD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rkg6tgYHeSgIsN3opR2z7EExWA0YkirkvVY
# STBgdtQwgZgwgYCkfjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3Rv
# bjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0
# aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAA
# AcE+oIOc4AmvxQABAAABwTAiBCD63vRfvzO9mZRBN93AhOi8UtC0RwZaMQTxosCv
# w4ZH2zANBgkqhkiG9w0BAQsFAASCAgAN5bmE+77qR6VvOMIfpOqfGz1iFgPeq6Ym
# 64BEYyaKMhsbgGc0oHiIdeoXtEC0kKIVNp0ZmSJX5O5M8fxbMH3YqDI1Va1wtAwv
# iwB/vkkuEsMAEFkJCrc2mFzQ+4Vs3xRzCm1XUPvGj+HB5T/pj6GFTI3+DXA2rKKg
# El9pA9tD1cRDYgCRGnLlv1Y/AHctrGeJoVUtKNk79gvB8gK6a8wrzzeBEj2t9lHT
# LEg76PQKi06tiRCmzagvIbj0kYhap/IxNWUF8fEk0fSFdlcLOPvySqOk9axAqXIO
# ctd5+dymfXlnuPpy4abPieFnjyDBLSi1GFmpVLk9/qvwn4mNS0bIu6Xz6CtYxhXp
# Acyka4DNRv14Np4O9c77k9PpcGV33DHjShMFk044PFsfIk+lDOtTvxulBa9WaQ96
# Xfrnlr+4L096FtKBLSz7F9chqVOp3cZtO0pMuJlji5lO2TeF6CojDfMUs+pqut5t
# D8GxH1pVGx2yKwFfDd0KnG1wmPmIJrUIn+nkFv5WJhLA669X6wxZLVWkgg+ss9Md
# imTdQXC4pydSdYgkHKr5axvbu/MkBZr+pfMudihNy7ckB7v0n+GrFZxlW/1qh22x
# lia4HsX4UffjeXNIYQn2Y24dXhd0s0YlT1eCt6creUtLqJsDIsgu5oTyzUcEFrY1
# DaYgakhELg==
# SIG # End signature block
|
combined_dataset/train/non-malicious/1649.ps1
|
1649.ps1
|
| : |
| : |
$ a = " < |