full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/685.ps1
685.ps1
function Set-RsDatabaseCredentials { [cmdletbinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] param( [Parameter(Mandatory = $true)] [Alias('Authentication')] [Microsoft.ReportingServicesTools.SqlServerAuthenticationType] $DatabaseCredentialType, [System.Management.Automation.PSCredential] $DatabaseCredential, [switch] $IsRemoteDatabaseServer, [Alias('SqlServerInstance')] [string] $ReportServerInstance, [Alias('SqlServerVersion')] [Microsoft.ReportingServicesTools.SqlServerVersion] $ReportServerVersion, [string] $ComputerName, [System.Management.Automation.PSCredential] $Credential, [int] $QueryTimeout = 30 ) if ($PSCmdlet.ShouldProcess((Get-ShouldProcessTargetWmi -BoundParameters $PSBoundParameters), "Configure to use $DatabaseCredentialType authentication")) { $rsWmiObject = New-RsConfigurationSettingObjectHelper -BoundParameters $PSBoundParameters $username = '' $password = $null if ($DatabaseCredentialType -like 'serviceaccount') { $username = $rsWmiObject.WindowsServiceIdentityActual $password = '' } else { if ($DatabaseCredential -eq $null) { throw "No Database Credential specified! Database credential must be specified when configuring $DatabaseCredentialType authentication." } $username = $DatabaseCredential.UserName $password = $DatabaseCredential.GetNetworkCredential().Password } $databaseName = $rsWmiObject.DatabaseName $databaseServerName = $rsWmiObject.DatabaseServerName Write-Verbose "Generating database rights script..." $isWindowsAccount = ($DatabaseCredentialType -like "Windows") -or ($DatabaseCredentialType -like "ServiceAccount") $result = $rsWmiObject.GenerateDatabaseRightsScript($username, $databaseName, $IsRemoteDatabaseServer, $isWindowsAccount) if ($result.HRESULT -ne 0) { Write-Verbose "Generating database rights script... Failed!" throw "Failed to generate the database rights script from the report server using WMI. Errorcode: $($result.HRESULT)" } else { $SQLscript = $result.Script Write-Verbose "Generating database rights script... Complete!" } Write-Verbose "Executing database rights script..." try { Invoke-Sqlcmd -ServerInstance $DatabaseServerName -Query $SQLscript -QueryTimeout $QueryTimeout -ErrorAction Stop } catch { Write-Verbose "Executing database rights script... Failed!" throw } Write-Verbose "Executing database rights script... Complete!" Write-Verbose "Updating Reporting Services to connect to new database..." $result = $rsWmiObject.SetDatabaseConnection($DatabaseServerName, $databaseName, $DatabaseCredentialType.Value__, $username, $password) if ($result.HRESULT -ne 0) { Write-Verbose "Updating Reporting Services to connect to new database... Failed!" throw "Failed to update the reporting services to connect to the new database using WMI! Errorcode: $($result.HRESULT)" } else { Write-Verbose "Updating Reporting Services to connect to new database... Complete!" } } }
combined_dataset/train/non-malicious/sample_64_40.ps1
sample_64_40.ps1
data LocalizedData { # culture="en-US" ConvertFrom-StringData @' PathNotFoundError=The path '{0}' either does not exist or is not a valid file system path. ExpandArchiveInValidDestinationPath=The path '{0}' is not a valid file system directory path. InvalidZipFileExtensionError={0} is not a supported archive file format. {1} is the only supported archive file format. ArchiveFileIsReadOnly=The attributes of the archive file {0} is set to 'ReadOnly' hence it cannot be updated. If you intend to update the existing archive file, remove the 'ReadOnly' attribute on the archive file else use -Force parameter to override and create a new archive file. ZipFileExistError=The archive file {0} already exists. Use the -Update parameter to update the existing archive file or use the -Force parameter to overwrite the existing archive file. DuplicatePathFoundError=The input to {0} parameter contains a duplicate path '{1}'. Provide a unique set of paths as input to {2} parameter. ArchiveFileIsEmpty=The archive file {0} is empty. CompressProgressBarText=The archive file '{0}' creation is in progress... ExpandProgressBarText=The archive file '{0}' expansion is in progress... AppendArchiveFileExtensionMessage=The archive file path '{0}' supplied to the DestinationPath parameter does not include .zip extension. Hence .zip is appended to the supplied DestinationPath path and the archive file would be created at '{1}'. AddItemtoArchiveFile=Adding '{0}'. BadArchiveEntry=Can not process invalid archive entry '{0}'. CreateFileAtExpandedPath=Created '{0}'. InvalidArchiveFilePathError=The archive file path '{0}' specified as input to the {1} parameter is resolving to multiple file system paths. Provide a unique path to the {2} parameter where the archive file has to be created. InvalidExpandedDirPathError=The directory path '{0}' specified as input to the DestinationPath parameter is resolving to multiple file system paths. Provide a unique path to the Destination parameter where the archive file contents have to be expanded. FileExistsError=Failed to create file '{0}' while expanding the archive file '{1}' contents as the file '{2}' already exists. Use the -Force parameter if you want to overwrite the existing directory '{3}' contents when expanding the archive file. DeleteArchiveFile=The partially created archive file '{0}' is deleted as it is not usable. InvalidDestinationPath=The destination path '{0}' does not contain a valid archive file name. PreparingToCompressVerboseMessage=Preparing to compress... PreparingToExpandVerboseMessage=Preparing to expand... ItemDoesNotAppearToBeAValidZipArchive=File '{0}' does not appear to be a valid zip archive. '@ } Import-LocalizedData LocalizedData -filename ArchiveResources -ErrorAction Ignore $zipFileExtension = ".zip" <############################################################################################ # The Compress-Archive cmdlet can be used to zip/compress one or more files/directories. ############################################################################################> function Compress-Archive { [CmdletBinding( DefaultParameterSetName="Path", SupportsShouldProcess=$true, HelpUri="https://go.microsoft.com/fwlink/?linkid=2096473")] [OutputType([System.IO.File])] param ( [parameter (mandatory=$true, Position=0, ParameterSetName="Path", ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [parameter (mandatory=$true, Position=0, ParameterSetName="PathWithForce", ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [parameter (mandatory=$true, Position=0, ParameterSetName="PathWithUpdate", ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true, ParameterSetName="LiteralPath", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$true)] [parameter (mandatory=$true, ParameterSetName="LiteralPathWithForce", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$true)] [parameter (mandatory=$true, ParameterSetName="LiteralPathWithUpdate", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("PSPath")] [string[]] $LiteralPath, [parameter (mandatory=$true, Position=1, ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [ValidateNotNullOrEmpty()] [string] $DestinationPath, [parameter ( mandatory=$false, ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [ValidateSet("Optimal","NoCompression","Fastest")] [string] $CompressionLevel = "Optimal", [parameter(mandatory=$true, ParameterSetName="PathWithUpdate", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [parameter(mandatory=$true, ParameterSetName="LiteralPathWithUpdate", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [switch] $Update = $false, [parameter(mandatory=$true, ParameterSetName="PathWithForce", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [parameter(mandatory=$true, ParameterSetName="LiteralPathWithForce", ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [switch] $Force = $false, [switch] $PassThru = $false ) BEGIN { # Ensure the destination path is in a non-PS-specific format $DestinationPath = $PSCmdlet.GetUnresolvedProviderPathFromPSPath($DestinationPath) $inputPaths = @() $destinationParentDir = [system.IO.Path]::GetDirectoryName($DestinationPath) if($null -eq $destinationParentDir) { $errorMessage = ($LocalizedData.InvalidDestinationPath -f $DestinationPath) ThrowTerminatingErrorHelper "InvalidArchiveFilePath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $DestinationPath } if($destinationParentDir -eq [string]::Empty) { $destinationParentDir = '.' } $archiveFileName = [system.IO.Path]::GetFileName($DestinationPath) $destinationParentDir = GetResolvedPathHelper $destinationParentDir $false $PSCmdlet if($destinationParentDir.Count -gt 1) { $errorMessage = ($LocalizedData.InvalidArchiveFilePathError -f $DestinationPath, "DestinationPath", "DestinationPath") ThrowTerminatingErrorHelper "InvalidArchiveFilePath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $DestinationPath } IsValidFileSystemPath $destinationParentDir | Out-Null $DestinationPath = Join-Path -Path $destinationParentDir -ChildPath $archiveFileName # GetExtension API does not validate for the actual existence of the path. $extension = [system.IO.Path]::GetExtension($DestinationPath) # If user does not specify an extension, we append the .zip extension automatically. If($extension -eq [string]::Empty) { $DestinationPathWithOutExtension = $DestinationPath $DestinationPath = $DestinationPathWithOutExtension + $zipFileExtension $appendArchiveFileExtensionMessage = ($LocalizedData.AppendArchiveFileExtensionMessage -f $DestinationPathWithOutExtension, $DestinationPath) Write-Verbose $appendArchiveFileExtensionMessage } $archiveFileExist = Test-Path -LiteralPath $DestinationPath -PathType Leaf if($archiveFileExist -and ($Update -eq $false -and $Force -eq $false)) { $errorMessage = ($LocalizedData.ZipFileExistError -f $DestinationPath) ThrowTerminatingErrorHelper "ArchiveFileExists" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $DestinationPath } # If archive file already exists and if -Update is specified, then we check to see # if we have write access permission to update the existing archive file. if($archiveFileExist -and $Update -eq $true) { $item = Get-Item -Path $DestinationPath if($item.Attributes.ToString().Contains("ReadOnly")) { $errorMessage = ($LocalizedData.ArchiveFileIsReadOnly -f $DestinationPath) ThrowTerminatingErrorHelper "ArchiveFileIsReadOnly" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidOperation) $DestinationPath } } $isWhatIf = $psboundparameters.ContainsKey("WhatIf") if(!$isWhatIf) { $preparingToCompressVerboseMessage = ($LocalizedData.PreparingToCompressVerboseMessage) Write-Verbose $preparingToCompressVerboseMessage $progressBarStatus = ($LocalizedData.CompressProgressBarText -f $DestinationPath) ProgressBarHelper "Compress-Archive" $progressBarStatus 0 100 100 1 } } PROCESS { if($PsCmdlet.ParameterSetName -eq "Path" -or $PsCmdlet.ParameterSetName -eq "PathWithForce" -or $PsCmdlet.ParameterSetName -eq "PathWithUpdate") { $inputPaths += $Path } if($PsCmdlet.ParameterSetName -eq "LiteralPath" -or $PsCmdlet.ParameterSetName -eq "LiteralPathWithForce" -or $PsCmdlet.ParameterSetName -eq "LiteralPathWithUpdate") { $inputPaths += $LiteralPath } } END { # If archive file already exists and if -Force is specified, we delete the # existing archive file and create a brand new one. if(($PsCmdlet.ParameterSetName -eq "PathWithForce" -or $PsCmdlet.ParameterSetName -eq "LiteralPathWithForce") -and $archiveFileExist) { Remove-Item -Path $DestinationPath -Force -ErrorAction Stop } # Validate Source Path depending on parameter set being used. # The specified source path contains one or more files or directories that needs # to be compressed. $isLiteralPathUsed = $false if($PsCmdlet.ParameterSetName -eq "LiteralPath" -or $PsCmdlet.ParameterSetName -eq "LiteralPathWithForce" -or $PsCmdlet.ParameterSetName -eq "LiteralPathWithUpdate") { $isLiteralPathUsed = $true } ValidateDuplicateFileSystemPath $PsCmdlet.ParameterSetName $inputPaths $resolvedPaths = GetResolvedPathHelper $inputPaths $isLiteralPathUsed $PSCmdlet IsValidFileSystemPath $resolvedPaths | Out-Null $sourcePath = $resolvedPaths; # CSVHelper: This is a helper function used to append comma after each path specified by # the $sourcePath array. The comma separated paths are displayed in the -WhatIf message. $sourcePathInCsvFormat = CSVHelper $sourcePath if($pscmdlet.ShouldProcess($sourcePathInCsvFormat)) { try { # StopProcessing is not available in Script cmdlets. However the pipeline execution # is terminated when ever 'CTRL + C' is entered by user to terminate the cmdlet execution. # The finally block is executed whenever pipeline is terminated. # $isArchiveFileProcessingComplete variable is used to track if 'CTRL + C' is entered by the # user. $isArchiveFileProcessingComplete = $false $numberOfItemsArchived = CompressArchiveHelper $sourcePath $DestinationPath $CompressionLevel $Update $isArchiveFileProcessingComplete = $true } finally { # The $isArchiveFileProcessingComplete would be set to $false if user has typed 'CTRL + C' to # terminate the cmdlet execution or if an unhandled exception is thrown. # $numberOfItemsArchived contains the count of number of files or directories add to the archive file. # If the newly created archive file is empty then we delete it as it's not usable. if(($isArchiveFileProcessingComplete -eq $false) -or ($numberOfItemsArchived -eq 0)) { $DeleteArchiveFileMessage = ($LocalizedData.DeleteArchiveFile -f $DestinationPath) Write-Verbose $DeleteArchiveFileMessage # delete the partial archive file created. if (Test-Path $DestinationPath) { Remove-Item -LiteralPath $DestinationPath -Force -Recurse -ErrorAction SilentlyContinue } } elseif ($PassThru) { Get-Item -LiteralPath $DestinationPath } } } } } <############################################################################################ # The Expand-Archive cmdlet can be used to expand/extract an zip file. ############################################################################################> function Expand-Archive { [CmdletBinding( DefaultParameterSetName="Path", SupportsShouldProcess=$true, HelpUri="https://go.microsoft.com/fwlink/?linkid=2096769")] [OutputType([System.IO.FileSystemInfo])] param ( [parameter ( mandatory=$true, Position=0, ParameterSetName="Path", ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [string] $Path, [parameter ( mandatory=$true, ParameterSetName="LiteralPath", ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [Alias("PSPath")] [string] $LiteralPath, [parameter (mandatory=$false, Position=1, ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [ValidateNotNullOrEmpty()] [string] $DestinationPath, [parameter (mandatory=$false, ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false)] [switch] $Force, [switch] $PassThru = $false ) BEGIN { $isVerbose = $psboundparameters.ContainsKey("Verbose") $isConfirm = $psboundparameters.ContainsKey("Confirm") $isDestinationPathProvided = $true if($DestinationPath -eq [string]::Empty) { $resolvedDestinationPath = (Get-Location).ProviderPath $isDestinationPathProvided = $false } else { $destinationPathExists = Test-Path -Path $DestinationPath -PathType Container if($destinationPathExists) { $resolvedDestinationPath = GetResolvedPathHelper $DestinationPath $false $PSCmdlet if($resolvedDestinationPath.Count -gt 1) { $errorMessage = ($LocalizedData.InvalidExpandedDirPathError -f $DestinationPath) ThrowTerminatingErrorHelper "InvalidDestinationPath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $DestinationPath } # At this point we are sure that the provided path resolves to a valid single path. # Calling Resolve-Path again to get the underlying provider name. $suppliedDestinationPath = Resolve-Path -Path $DestinationPath if($suppliedDestinationPath.Provider.Name-ne "FileSystem") { $errorMessage = ($LocalizedData.ExpandArchiveInValidDestinationPath -f $DestinationPath) ThrowTerminatingErrorHelper "InvalidDirectoryPath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $DestinationPath } } else { $createdItem = New-Item -Path $DestinationPath -ItemType Directory -Confirm:$isConfirm -Verbose:$isVerbose -ErrorAction Stop if($createdItem -ne $null -and $createdItem.PSProvider.Name -ne "FileSystem") { Remove-Item "$DestinationPath" -Force -Recurse -ErrorAction SilentlyContinue $errorMessage = ($LocalizedData.ExpandArchiveInValidDestinationPath -f $DestinationPath) ThrowTerminatingErrorHelper "InvalidDirectoryPath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $DestinationPath } $resolvedDestinationPath = GetResolvedPathHelper $DestinationPath $true $PSCmdlet } } $isWhatIf = $psboundparameters.ContainsKey("WhatIf") if(!$isWhatIf) { $preparingToExpandVerboseMessage = ($LocalizedData.PreparingToExpandVerboseMessage) Write-Verbose $preparingToExpandVerboseMessage $progressBarStatus = ($LocalizedData.ExpandProgressBarText -f $DestinationPath) ProgressBarHelper "Expand-Archive" $progressBarStatus 0 100 100 1 } } PROCESS { switch($PsCmdlet.ParameterSetName) { "Path" { $resolvedSourcePaths = GetResolvedPathHelper $Path $false $PSCmdlet if($resolvedSourcePaths.Count -gt 1) { $errorMessage = ($LocalizedData.InvalidArchiveFilePathError -f $Path, $PsCmdlet.ParameterSetName, $PsCmdlet.ParameterSetName) ThrowTerminatingErrorHelper "InvalidArchiveFilePath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $Path } } "LiteralPath" { $resolvedSourcePaths = GetResolvedPathHelper $LiteralPath $true $PSCmdlet if($resolvedSourcePaths.Count -gt 1) { $errorMessage = ($LocalizedData.InvalidArchiveFilePathError -f $LiteralPath, $PsCmdlet.ParameterSetName, $PsCmdlet.ParameterSetName) ThrowTerminatingErrorHelper "InvalidArchiveFilePath" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $LiteralPath } } } ValidateArchivePathHelper $resolvedSourcePaths if($pscmdlet.ShouldProcess($resolvedSourcePaths)) { $expandedItems = @() try { # StopProcessing is not available in Script cmdlets. However the pipeline execution # is terminated when ever 'CTRL + C' is entered by user to terminate the cmdlet execution. # The finally block is executed whenever pipeline is terminated. # $isArchiveFileProcessingComplete variable is used to track if 'CTRL + C' is entered by the # user. $isArchiveFileProcessingComplete = $false # The User has not provided a destination path, hence we use '$pwd\ArchiveFileName' as the directory where the # archive file contents would be expanded. If the path '$pwd\ArchiveFileName' already exists then we use the # Windows default mechanism of appending a counter value at the end of the directory name where the contents # would be expanded. if(!$isDestinationPathProvided) { $archiveFile = New-Object System.IO.FileInfo $resolvedSourcePaths $resolvedDestinationPath = Join-Path -Path $resolvedDestinationPath -ChildPath $archiveFile.BaseName $destinationPathExists = Test-Path -LiteralPath $resolvedDestinationPath -PathType Container if(!$destinationPathExists) { New-Item -Path $resolvedDestinationPath -ItemType Directory -Confirm:$isConfirm -Verbose:$isVerbose -ErrorAction Stop | Out-Null } } ExpandArchiveHelper $resolvedSourcePaths $resolvedDestinationPath ([ref]$expandedItems) $Force $isVerbose $isConfirm $isArchiveFileProcessingComplete = $true } finally { # The $isArchiveFileProcessingComplete would be set to $false if user has typed 'CTRL + C' to # terminate the cmdlet execution or if an unhandled exception is thrown. if($isArchiveFileProcessingComplete -eq $false) { if($expandedItems.Count -gt 0) { # delete the expanded file/directory as the archive # file was not completely expanded. $expandedItems | % { Remove-Item "$_" -Force -Recurse } } } elseif ($PassThru -and $expandedItems.Count -gt 0) { # Return the expanded items, being careful to remove trailing directory separators from # any folder paths for consistency $trailingDirSeparators = '\' + [System.IO.Path]::DirectorySeparatorChar + '+$' Get-Item -LiteralPath ($expandedItems -replace $trailingDirSeparators) } } } } } <############################################################################################ # GetResolvedPathHelper: This is a helper function used to resolve the user specified Path. # The path can either be absolute or relative path. ############################################################################################> function GetResolvedPathHelper { param ( [string[]] $path, [boolean] $isLiteralPath, [System.Management.Automation.PSCmdlet] $callerPSCmdlet ) $resolvedPaths =@() # null and empty check are are already done on Path parameter at the cmdlet layer. foreach($currentPath in $path) { try { if($isLiteralPath) { $currentResolvedPaths = Resolve-Path -LiteralPath $currentPath -ErrorAction Stop } else { $currentResolvedPaths = Resolve-Path -Path $currentPath -ErrorAction Stop } } catch { $errorMessage = ($LocalizedData.PathNotFoundError -f $currentPath) $exception = New-Object System.InvalidOperationException $errorMessage, $_.Exception $errorRecord = CreateErrorRecordHelper "ArchiveCmdletPathNotFound" $null ([System.Management.Automation.ErrorCategory]::InvalidArgument) $exception $currentPath $callerPSCmdlet.ThrowTerminatingError($errorRecord) } foreach($currentResolvedPath in $currentResolvedPaths) { $resolvedPaths += $currentResolvedPath.ProviderPath } } $resolvedPaths } function Add-CompressionAssemblies { Add-Type -AssemblyName System.IO.Compression if ($psedition -eq "Core") { Add-Type -AssemblyName System.IO.Compression.ZipFile } else { Add-Type -AssemblyName System.IO.Compression.FileSystem } } function IsValidFileSystemPath { param ( [string[]] $path ) $result = $true; # null and empty check are are already done on Path parameter at the cmdlet layer. foreach($currentPath in $path) { if(!([System.IO.File]::Exists($currentPath) -or [System.IO.Directory]::Exists($currentPath))) { $errorMessage = ($LocalizedData.PathNotFoundError -f $currentPath) ThrowTerminatingErrorHelper "PathNotFound" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $currentPath } } return $result; } function ValidateDuplicateFileSystemPath { param ( [string] $inputParameter, [string[]] $path ) $uniqueInputPaths = @() # null and empty check are are already done on Path parameter at the cmdlet layer. foreach($currentPath in $path) { $currentInputPath = $currentPath.ToUpper() if($uniqueInputPaths.Contains($currentInputPath)) { $errorMessage = ($LocalizedData.DuplicatePathFoundError -f $inputParameter, $currentPath, $inputParameter) ThrowTerminatingErrorHelper "DuplicatePathFound" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $currentPath } else { $uniqueInputPaths += $currentInputPath } } } function CompressionLevelMapper { param ( [string] $compressionLevel ) $compressionLevelFormat = [System.IO.Compression.CompressionLevel]::Optimal # CompressionLevel format is already validated at the cmdlet layer. switch($compressionLevel.ToString()) { "Fastest" { $compressionLevelFormat = [System.IO.Compression.CompressionLevel]::Fastest } "NoCompression" { $compressionLevelFormat = [System.IO.Compression.CompressionLevel]::NoCompression } } return $compressionLevelFormat } function CompressArchiveHelper { param ( [string[]] $sourcePath, [string] $destinationPath, [string] $compressionLevel, [bool] $isUpdateMode ) $numberOfItemsArchived = 0 $sourceFilePaths = @() $sourceDirPaths = @() foreach($currentPath in $sourcePath) { $result = Test-Path -LiteralPath $currentPath -Type Leaf if($result -eq $true) { $sourceFilePaths += $currentPath } else { $sourceDirPaths += $currentPath } } # The Source Path contains one or more directory (this directory can have files under it) and no files to be compressed. if($sourceFilePaths.Count -eq 0 -and $sourceDirPaths.Count -gt 0) { $currentSegmentWeight = 100/[double]$sourceDirPaths.Count $previousSegmentWeight = 0 foreach($currentSourceDirPath in $sourceDirPaths) { $count = CompressSingleDirHelper $currentSourceDirPath $destinationPath $compressionLevel $true $isUpdateMode $previousSegmentWeight $currentSegmentWeight $numberOfItemsArchived += $count $previousSegmentWeight += $currentSegmentWeight } } # The Source Path contains only files to be compressed. elseIf($sourceFilePaths.Count -gt 0 -and $sourceDirPaths.Count -eq 0) { # $previousSegmentWeight is equal to 0 as there are no prior segments. # $currentSegmentWeight is set to 100 as all files have equal weightage. $previousSegmentWeight = 0 $currentSegmentWeight = 100 $numberOfItemsArchived = CompressFilesHelper $sourceFilePaths $destinationPath $compressionLevel $isUpdateMode $previousSegmentWeight $currentSegmentWeight } # The Source Path contains one or more files and one or more directories (this directory can have files under it) to be compressed. elseif($sourceFilePaths.Count -gt 0 -and $sourceDirPaths.Count -gt 0) { # each directory is considered as an individual segments & all the individual files are clubed in to a separate segment. $currentSegmentWeight = 100/[double]($sourceDirPaths.Count +1) $previousSegmentWeight = 0 foreach($currentSourceDirPath in $sourceDirPaths) { $count = CompressSingleDirHelper $currentSourceDirPath $destinationPath $compressionLevel $true $isUpdateMode $previousSegmentWeight $currentSegmentWeight $numberOfItemsArchived += $count $previousSegmentWeight += $currentSegmentWeight } $count = CompressFilesHelper $sourceFilePaths $destinationPath $compressionLevel $isUpdateMode $previousSegmentWeight $currentSegmentWeight $numberOfItemsArchived += $count } return $numberOfItemsArchived } function CompressFilesHelper { param ( [string[]] $sourceFilePaths, [string] $destinationPath, [string] $compressionLevel, [bool] $isUpdateMode, [double] $previousSegmentWeight, [double] $currentSegmentWeight ) $numberOfItemsArchived = ZipArchiveHelper $sourceFilePaths $destinationPath $compressionLevel $isUpdateMode $null $previousSegmentWeight $currentSegmentWeight return $numberOfItemsArchived } function CompressSingleDirHelper { param ( [string] $sourceDirPath, [string] $destinationPath, [string] $compressionLevel, [bool] $useParentDirAsRoot, [bool] $isUpdateMode, [double] $previousSegmentWeight, [double] $currentSegmentWeight ) [System.Collections.Generic.List[System.String]]$subDirFiles = @() if($useParentDirAsRoot) { $sourceDirInfo = New-Object -TypeName System.IO.DirectoryInfo -ArgumentList $sourceDirPath $sourceDirFullName = $sourceDirInfo.Parent.FullName # If the directory is present at the drive level the DirectoryInfo.Parent include directory separator. example: C:\ # On the other hand if the directory exists at a deper level then DirectoryInfo.Parent # has just the path (without an ending directory separator). example C:\source if($sourceDirFullName.Length -eq 3) { $modifiedSourceDirFullName = $sourceDirFullName } else { $modifiedSourceDirFullName = $sourceDirFullName + [System.IO.Path]::DirectorySeparatorChar } } else { $sourceDirFullName = $sourceDirPath $modifiedSourceDirFullName = $sourceDirFullName + [System.IO.Path]::DirectorySeparatorChar } $dirContents = Get-ChildItem -LiteralPath $sourceDirPath -Recurse foreach($currentContent in $dirContents) { $isContainer = $currentContent -is [System.IO.DirectoryInfo] if(!$isContainer) { $subDirFiles.Add($currentContent.FullName) } else { # The currentContent points to a directory. # We need to check if the directory is an empty directory, if so such a # directory has to be explicitly added to the archive file. # if there are no files in the directory the GetFiles() API returns an empty array. $files = $currentContent.GetFiles() if($files.Count -eq 0) { $subDirFiles.Add($currentContent.FullName + [System.IO.Path]::DirectorySeparatorChar) } } } $numberOfItemsArchived = ZipArchiveHelper $subDirFiles.ToArray() $destinationPath $compressionLevel $isUpdateMode $modifiedSourceDirFullName $previousSegmentWeight $currentSegmentWeight return $numberOfItemsArchived } function ZipArchiveHelper { param ( [System.Collections.Generic.List[System.String]] $sourcePaths, [string] $destinationPath, [string] $compressionLevel, [bool] $isUpdateMode, [string] $modifiedSourceDirFullName, [double] $previousSegmentWeight, [double] $currentSegmentWeight ) $numberOfItemsArchived = 0 $fileMode = [System.IO.FileMode]::Create $result = Test-Path -LiteralPath $DestinationPath -Type Leaf if($result -eq $true) { $fileMode = [System.IO.FileMode]::Open } Add-CompressionAssemblies try { # At this point we are sure that the archive file has write access. $archiveFileStreamArgs = @($destinationPath, $fileMode) $archiveFileStream = New-Object -TypeName System.IO.FileStream -ArgumentList $archiveFileStreamArgs $zipArchiveArgs = @($archiveFileStream, [System.IO.Compression.ZipArchiveMode]::Update, $false) $zipArchive = New-Object -TypeName System.IO.Compression.ZipArchive -ArgumentList $zipArchiveArgs $currentEntryCount = 0 $progressBarStatus = ($LocalizedData.CompressProgressBarText -f $destinationPath) $bufferSize = 4kb $buffer = New-Object Byte[] $bufferSize foreach($currentFilePath in $sourcePaths) { if($modifiedSourceDirFullName -ne $null -and $modifiedSourceDirFullName.Length -gt 0) { $index = $currentFilePath.IndexOf($modifiedSourceDirFullName, [System.StringComparison]::OrdinalIgnoreCase) $currentFilePathSubString = $currentFilePath.Substring($index, $modifiedSourceDirFullName.Length) $relativeFilePath = $currentFilePath.Replace($currentFilePathSubString, "").Trim() } else { $relativeFilePath = [System.IO.Path]::GetFileName($currentFilePath) } # Update mode is selected. # Check to see if archive file already contains one or more zip files in it. if($isUpdateMode -eq $true -and $zipArchive.Entries.Count -gt 0) { $entryToBeUpdated = $null # Check if the file already exists in the archive file. # If so replace it with new file from the input source. # If the file does not exist in the archive file then default to # create mode and create the entry in the archive file. foreach($currentArchiveEntry in $zipArchive.Entries) { if(ArchivePathCompareHelper $currentArchiveEntry.FullName $relativeFilePath) { $entryToBeUpdated = $currentArchiveEntry break } } if($entryToBeUpdated -ne $null) { $addItemtoArchiveFileMessage = ($LocalizedData.AddItemtoArchiveFile -f $currentFilePath) $entryToBeUpdated.Delete() } } $compression = CompressionLevelMapper $compressionLevel # If a directory needs to be added to an archive file, # by convention the .Net API's expect the path of the directory # to end with directory separator to detect the path as an directory. if(!$relativeFilePath.EndsWith([System.IO.Path]::DirectorySeparatorChar, [StringComparison]::OrdinalIgnoreCase)) { try { try { $currentFileStream = [System.IO.File]::Open($currentFilePath, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileShare]::Read) } catch { # Failed to access the file. Write a non terminating error to the pipeline # and move on with the remaining files. $exception = $_.Exception if($null -ne $_.Exception -and $null -ne $_.Exception.InnerException) { $exception = $_.Exception.InnerException } $errorRecord = CreateErrorRecordHelper "CompressArchiveUnauthorizedAccessError" $null ([System.Management.Automation.ErrorCategory]::PermissionDenied) $exception $currentFilePath Write-Error -ErrorRecord $errorRecord } if($null -ne $currentFileStream) { $srcStream = New-Object System.IO.BinaryReader $currentFileStream $entryPath = DirectorySeparatorNormalizeHelper $relativeFilePath $currentArchiveEntry = $zipArchive.CreateEntry($entryPath, $compression) # Updating the File Creation time so that the same timestamp would be retained after expanding the compressed file. # At this point we are sure that Get-ChildItem would succeed. $lastWriteTime = (Get-Item -LiteralPath $currentFilePath).LastWriteTime if ($lastWriteTime.Year -lt 1980) { Write-Warning "'$currentFilePath' has LastWriteTime earlier than 1980. Compress-Archive will store any files with LastWriteTime values earlier than 1980 as 1/1/1980 00:00." $lastWriteTime = [DateTime]::Parse('1980-01-01T00:00:00') } $currentArchiveEntry.LastWriteTime = $lastWriteTime $destStream = New-Object System.IO.BinaryWriter $currentArchiveEntry.Open() while($numberOfBytesRead = $srcStream.Read($buffer, 0, $bufferSize)) { $destStream.Write($buffer, 0, $numberOfBytesRead) $destStream.Flush() } $numberOfItemsArchived += 1 $addItemtoArchiveFileMessage = ($LocalizedData.AddItemtoArchiveFile -f $currentFilePath) } } finally { If($null -ne $currentFileStream) { $currentFileStream.Dispose() } If($null -ne $srcStream) { $srcStream.Dispose() } If($null -ne $destStream) { $destStream.Dispose() } } } else { $entryPath = DirectorySeparatorNormalizeHelper $relativeFilePath $currentArchiveEntry = $zipArchive.CreateEntry($entryPath, $compression) $numberOfItemsArchived += 1 $addItemtoArchiveFileMessage = ($LocalizedData.AddItemtoArchiveFile -f $currentFilePath) } if($null -ne $addItemtoArchiveFileMessage) { Write-Verbose $addItemtoArchiveFileMessage } $currentEntryCount += 1 ProgressBarHelper "Compress-Archive" $progressBarStatus $previousSegmentWeight $currentSegmentWeight $sourcePaths.Count $currentEntryCount } } finally { If($null -ne $zipArchive) { $zipArchive.Dispose() } If($null -ne $archiveFileStream) { $archiveFileStream.Dispose() } # Complete writing progress. Write-Progress -Activity "Compress-Archive" -Completed } return $numberOfItemsArchived } <############################################################################################ # ValidateArchivePathHelper: This is a helper function used to validate the archive file # path & its file format. The only supported archive file format is .zip ############################################################################################> function ValidateArchivePathHelper { param ( [string] $archiveFile ) if(-not [System.IO.File]::Exists($archiveFile)) { $errorMessage = ($LocalizedData.PathNotFoundError -f $archiveFile) ThrowTerminatingErrorHelper "PathNotFound" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidArgument) $archiveFile } } <############################################################################################ # ExpandArchiveHelper: This is a helper function used to expand the archive file contents # to the specified directory. ############################################################################################> function ExpandArchiveHelper { param ( [string] $archiveFile, [string] $expandedDir, [ref] $expandedItems, [boolean] $force, [boolean] $isVerbose, [boolean] $isConfirm ) Add-CompressionAssemblies try { # The existence of archive file has already been validated by ValidateArchivePathHelper # before calling this helper function. $archiveFileStreamArgs = @($archiveFile, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read) $archiveFileStream = New-Object -TypeName System.IO.FileStream -ArgumentList $archiveFileStreamArgs $zipArchiveArgs = @($archiveFileStream, [System.IO.Compression.ZipArchiveMode]::Read, $false) try { $zipArchive = New-Object -TypeName System.IO.Compression.ZipArchive -ArgumentList $zipArchiveArgs } catch [System.IO.InvalidDataException] { # Failed to open the file for reading as a zip archive. Wrap the exception # and re-throw it indicating it does not appear to be a valid zip file. $exception = $_.Exception if($null -ne $_.Exception -and $null -ne $_.Exception.InnerException) { $exception = $_.Exception.InnerException } # Load the WindowsBase.dll assembly to get access to the System.IO.FileFormatException class [System.Reflection.Assembly]::Load('WindowsBase,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35') $invalidFileFormatException = New-Object -TypeName System.IO.FileFormatException -ArgumentList @( ($LocalizedData.ItemDoesNotAppearToBeAValidZipArchive -f $archiveFile) $exception ) throw $invalidFileFormatException } if($zipArchive.Entries.Count -eq 0) { $archiveFileIsEmpty = ($LocalizedData.ArchiveFileIsEmpty -f $archiveFile) Write-Verbose $archiveFileIsEmpty return } $currentEntryCount = 0 $progressBarStatus = ($LocalizedData.ExpandProgressBarText -f $archiveFile) # Ensures that the last character on the extraction path is the directory separator char. # Without this, a bad zip file could try to traverse outside of the expected extraction path. # At this point $expandedDir is a fully qualified path without any relative segments. if (-not $expandedDir.EndsWith([System.IO.Path]::DirectorySeparatorChar)) { $expandedDir += [System.IO.Path]::DirectorySeparatorChar } # The archive entries can either be empty directories or files. foreach($currentArchiveEntry in $zipArchive.Entries) { # Windows filesystem provider will internally convert from `/` to `\` $currentArchiveEntryPath = Join-Path -Path $expandedDir -ChildPath $currentArchiveEntry.FullName # Remove possible relative segments from target # This is similar to [System.IO.Path]::GetFullPath($currentArchiveEntryPath) but uses PS current dir instead of process-wide current dir $currentArchiveEntryPath = $PSCmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath($currentArchiveEntryPath) # Check that expanded relative paths and absolute paths from the archive are Not going outside of target directory # Ordinal match is safest, case-sensitive volumes can be mounted within volumes that are case-insensitive. if (-not ($currentArchiveEntryPath.StartsWith($expandedDir, [System.StringComparison]::Ordinal))) { $BadArchiveEntryMessage = ($LocalizedData.BadArchiveEntry -f $currentArchiveEntry.FullName) # notify user of bad archive entry Write-Error $BadArchiveEntryMessage # move on to the next entry in the archive continue } $extension = [system.IO.Path]::GetExtension($currentArchiveEntryPath) # The current archive entry is an empty directory # The FullName of the Archive Entry representing a directory would end with a trailing directory separator. if($extension -eq [string]::Empty -and $currentArchiveEntryPath.EndsWith([System.IO.Path]::DirectorySeparatorChar, [StringComparison]::OrdinalIgnoreCase)) { $pathExists = Test-Path -LiteralPath $currentArchiveEntryPath # The current archive entry expects an empty directory. # Check if the existing directory is empty. If it's not empty # then it means that user has added this directory by other means. if($pathExists -eq $false) { New-Item $currentArchiveEntryPath -Type Directory -Confirm:$isConfirm | Out-Null if(Test-Path -LiteralPath $currentArchiveEntryPath -PathType Container) { $addEmptyDirectorytoExpandedPathMessage = ($LocalizedData.AddItemtoArchiveFile -f $currentArchiveEntryPath) Write-Verbose $addEmptyDirectorytoExpandedPathMessage $expandedItems.Value += $currentArchiveEntryPath } } } else { try { $currentArchiveEntryFileInfo = New-Object -TypeName System.IO.FileInfo -ArgumentList $currentArchiveEntryPath $parentDirExists = Test-Path -LiteralPath $currentArchiveEntryFileInfo.DirectoryName -PathType Container # If the Parent directory of the current entry in the archive file does not exist, then create it. if($parentDirExists -eq $false) { # note that if any ancestor of this directory doesn't exist, we don't recursively create each one as New-Item # takes care of this already, so only one DirectoryInfo is returned instead of one for each parent directory # that only contains directories New-Item $currentArchiveEntryFileInfo.DirectoryName -Type Directory -Confirm:$isConfirm | Out-Null if(!(Test-Path -LiteralPath $currentArchiveEntryFileInfo.DirectoryName -PathType Container)) { # The directory referred by $currentArchiveEntryFileInfo.DirectoryName was not successfully created. # This could be because the user has specified -Confirm parameter when Expand-Archive was invoked # and authorization was not provided when confirmation was prompted. In such a scenario, # we skip the current file in the archive and continue with the remaining archive file contents. Continue } $expandedItems.Value += $currentArchiveEntryFileInfo.DirectoryName } $hasNonTerminatingError = $false # Check if the file in to which the current archive entry contents # would be expanded already exists. if($currentArchiveEntryFileInfo.Exists) { if($force) { Remove-Item -LiteralPath $currentArchiveEntryFileInfo.FullName -Force -ErrorVariable ev -Verbose:$isVerbose -Confirm:$isConfirm if($ev -ne $null) { $hasNonTerminatingError = $true } if(Test-Path -LiteralPath $currentArchiveEntryFileInfo.FullName -PathType Leaf) { # The file referred by $currentArchiveEntryFileInfo.FullName was not successfully removed. # This could be because the user has specified -Confirm parameter when Expand-Archive was invoked # and authorization was not provided when confirmation was prompted. In such a scenario, # we skip the current file in the archive and continue with the remaining archive file contents. Continue } } else { # Write non-terminating error to the pipeline. $errorMessage = ($LocalizedData.FileExistsError -f $currentArchiveEntryFileInfo.FullName, $archiveFile, $currentArchiveEntryFileInfo.FullName, $currentArchiveEntryFileInfo.FullName) $errorRecord = CreateErrorRecordHelper "ExpandArchiveFileExists" $errorMessage ([System.Management.Automation.ErrorCategory]::InvalidOperation) $null $currentArchiveEntryFileInfo.FullName Write-Error -ErrorRecord $errorRecord $hasNonTerminatingError = $true } } if(!$hasNonTerminatingError) { # The ExtractToFile() method doesn't handle whitespace correctly, strip whitespace which is consistent with how Explorer handles archives # There is an edge case where an archive contains files whose only difference is whitespace, but this is uncommon and likely not legitimate [string[]] $parts = $currentArchiveEntryPath.Split([System.IO.Path]::DirectorySeparatorChar) | % { $_.Trim() } $currentArchiveEntryPath = [string]::Join([System.IO.Path]::DirectorySeparatorChar, $parts) [System.IO.Compression.ZipFileExtensions]::ExtractToFile($currentArchiveEntry, $currentArchiveEntryPath, $false) # Add the expanded file path to the $expandedItems array, # to keep track of all the expanded files created while expanding the archive file. # If user enters CTRL + C then at that point of time, all these expanded files # would be deleted as part of the clean up process. $expandedItems.Value += $currentArchiveEntryPath $addFiletoExpandedPathMessage = ($LocalizedData.CreateFileAtExpandedPath -f $currentArchiveEntryPath) Write-Verbose $addFiletoExpandedPathMessage } } finally { If($null -ne $destStream) { $destStream.Dispose() } If($null -ne $srcStream) { $srcStream.Dispose() } } } $currentEntryCount += 1 # $currentSegmentWeight is Set to 100 giving equal weightage to each file that is getting expanded. # $previousSegmentWeight is set to 0 as there are no prior segments. $previousSegmentWeight = 0 $currentSegmentWeight = 100 ProgressBarHelper "Expand-Archive" $progressBarStatus $previousSegmentWeight $currentSegmentWeight $zipArchive.Entries.Count $currentEntryCount } } finally { If($null -ne $zipArchive) { $zipArchive.Dispose() } If($null -ne $archiveFileStream) { $archiveFileStream.Dispose() } # Complete writing progress. Write-Progress -Activity "Expand-Archive" -Completed } } <############################################################################################ # ProgressBarHelper: This is a helper function used to display progress message. # This function is used by both Compress-Archive & Expand-Archive to display archive file # creation/expansion progress. ############################################################################################> function ProgressBarHelper { param ( [string] $cmdletName, [string] $status, [double] $previousSegmentWeight, [double] $currentSegmentWeight, [int] $totalNumberofEntries, [int] $currentEntryCount ) if($currentEntryCount -gt 0 -and $totalNumberofEntries -gt 0 -and $previousSegmentWeight -ge 0 -and $currentSegmentWeight -gt 0) { $entryDefaultWeight = $currentSegmentWeight/[double]$totalNumberofEntries $percentComplete = $previousSegmentWeight + ($entryDefaultWeight * $currentEntryCount) Write-Progress -Activity $cmdletName -Status $status -PercentComplete $percentComplete } } <############################################################################################ # CSVHelper: This is a helper function used to append comma after each path specified by # the SourcePath array. This helper function is used to display all the user supplied paths # in the WhatIf message. ############################################################################################> function CSVHelper { param ( [string[]] $sourcePath ) # SourcePath has already been validated by the calling function. if($sourcePath.Count -gt 1) { $sourcePathInCsvFormat = "`n" for($currentIndex=0; $currentIndex -lt $sourcePath.Count; $currentIndex++) { if($currentIndex -eq $sourcePath.Count - 1) { $sourcePathInCsvFormat += $sourcePath[$currentIndex] } else { $sourcePathInCsvFormat += $sourcePath[$currentIndex] + "`n" } } } else { $sourcePathInCsvFormat = $sourcePath } return $sourcePathInCsvFormat } <############################################################################################ # ThrowTerminatingErrorHelper: This is a helper function used to throw terminating error. ############################################################################################> function ThrowTerminatingErrorHelper { param ( [string] $errorId, [string] $errorMessage, [System.Management.Automation.ErrorCategory] $errorCategory, [object] $targetObject, [Exception] $innerException ) if($innerException -eq $null) { $exception = New-object System.IO.IOException $errorMessage } else { $exception = New-Object System.IO.IOException $errorMessage, $innerException } $exception = New-Object System.IO.IOException $errorMessage $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $targetObject $PSCmdlet.ThrowTerminatingError($errorRecord) } <############################################################################################ # CreateErrorRecordHelper: This is a helper function used to create an ErrorRecord ############################################################################################> function CreateErrorRecordHelper { param ( [string] $errorId, [string] $errorMessage, [System.Management.Automation.ErrorCategory] $errorCategory, [Exception] $exception, [object] $targetObject ) if($null -eq $exception) { $exception = New-Object System.IO.IOException $errorMessage } $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $targetObject return $errorRecord } <############################################################################################ # DirectorySeparatorNormalizeHelper: This is a helper function used to normalize separators # when compressing archives, creating cross platform archives. # # The approach taken is leveraging the fact that .net on Windows all the way back to # Framework 1.1 specifies `\` as DirectoryPathSeparatorChar and `/` as # AltDirectoryPathSeparatorChar, while other platforms in .net Core use `/` for # DirectoryPathSeparatorChar and AltDirectoryPathSeparatorChar. When using a *nix platform, # the replacements will be no-ops, while Windows will convert all `\` to `/` for the # purposes of the ZipEntry FullName. ############################################################################################> function DirectorySeparatorNormalizeHelper { param ( [string] $archivePath ) if($null -eq $archivePath) { return $archivePath } return $archivePath.replace([System.IO.Path]::DirectorySeparatorChar, [System.IO.Path]::AltDirectorySeparatorChar) } <############################################################################################ # ArchivePathCompareHelper: This is a helper function used to compare with normalized # separators. ############################################################################################> function ArchivePathCompareHelper { param ( [string] $pathArgA, [string] $pathArgB ) $normalizedPathArgA = DirectorySeparatorNormalizeHelper $pathArgA $normalizedPathArgB = DirectorySeparatorNormalizeHelper $pathArgB return $normalizedPathArgA -eq $normalizedPathArgB } # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCxWUVaNUPabUNe # T6XgWNeKW3CfCVc/X+PBlTJ8w9y52qCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQ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lQjG2ojCBmDCBgKR+ # MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS # ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT # HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB9oMvJmpUXSLBAAEA # AAH2MCIEIHjfpx+K3HpP7EaSyfXd50Nmm4qZ9J3R0KCJ1Axy9nVMMA0GCSqGSIb3 # DQEBCwUABIICAGISPwFtIpd52yaP2tIlonNrS1QXMFnqvVfFFxMC4hx7/BXwfe2w # Lm51UZoHKhRpVcGsH4EHb5b+NxnPZMAktGqdr8QcHxf+o5bCgpBZW4MKmTc3MZbi # KAjSjAmTyreQKaih9ymsqDKPxJI/93m2tEoWsNn9qy/Ez2uFzGMWLvQ4VfG11Y0b # pUhk1EwAgkZbdFb4haYYKTEtB1n9iB1KNf56roq+e1YrcWhyP2rWqRkCT9E1XMma # CaJkZ+w7Sdy5NqVWe40aZdjwBhKwslxXytIIB516FcA4t4fJg2lr8LN/efJA5WVN # A8k07Nmy4EO4TLP+nSonr8nxYEK5H0Z7umpVCxgQc3DuJfIeOC2lPZI+vOYA864w # 2FkdZLA+dedz1Pf6Uvy5zSZNL5lVM5ty9/l7sFVYDy49enunGMoHe6SPMrLlvSQ3 # LU+EDamoLGDVA2n8QRSlgsDaWV2FWznqHWqrf3hKAvek3jLT24x1uisnfMoLgHBv # gdb6sYXAC6sR4vhJ4mh8DMRr3J1biFvZQ7COEbuwDWR5MhI2valxLmls6qtpTaiH # tGdY70HjhwmMpDxfaEbSp0Ey/HuHir7WbJKVz5Q4rZFPdFq6pspKQeotZyvadi25 # g+qF65IHrFOwcA+ZPpHfzopXWdCiCetYMT/uAgAprhEhsGqXUYDf8n2D # SIG # End signature block
combined_dataset/train/non-malicious/1844.ps1
1844.ps1
Describe 'Get-WinEvent' -Tags "CI" { BeforeAll { if ( ! $IsWindows ) { $origDefaults = $PSDefaultParameterValues.Clone() $PSDefaultParameterValues['it:skip'] = $true } } AfterAll { if ( ! $IsWindows ){ $global:PSDefaultParameterValues = $origDefaults } } Context "Get-WinEvent ListProvider parameter" { It 'Get-WinEvent can list the providers' { $result = Get-WinEvent -listprovider * -erroraction ignore $result | Should -Not -BeNullOrEmpty } It 'Get-WinEvent can get a provider by name' { $providers = Get-WinEvent -listprovider * -erroraction ignore $result = Get-WinEvent -listprovider ($providers[0].name) $result | Should -Not -BeNullOrEmpty } } Context "Get-WinEvent can retrieve events" { BeforeAll { if ( ! $IsWindows ) { return } $foundEvents = $false $providers = Get-WinEvent -listprovider * -erroraction ignore foreach($provider in $providers) { $events = Get-WinEvent -provider $provider.name -erroraction ignore if ( $events.Count -gt 2 ) { $providerForTests = $provider $foundEvents = $true break } } } It 'Get-WinEvent can get events from a provider' { $results = Get-WinEvent -provider $providerForTests.Name -max 20 foreach($event in $results ) { $event.providername | Should -BeExactly $providerForTests.name } } It 'Get-WinEvent can get events via logname' { $results = get-winevent -logname $providerForTests.LogLinks.LogName -MaxEvents 10 $results | Should -Not -BeNullOrEmpty } It 'Throw if count of lognames exceeds Windows API limit' { if ([System.Environment]::OSVersion.Version.Major -ge 10) { { get-winevent -logname * } | Should -Throw -ErrorId "LogCountLimitExceeded,Microsoft.PowerShell.Commands.GetWinEventCommand" } } It 'Get-WinEvent can use the simplest of filters' { $filter = @{ ProviderName = $providerForTests.Name } $testEvents = Get-WinEvent -filterhashtable $filter $testEventDict = [System.Collections.Generic.Dictionary[int, System.Diagnostics.Eventing.Reader.EventLogRecord]]::new() foreach ($te in $testEvents) { $testEventDict.TryAdd($te.Id, $te) } foreach ($e in $events) { if (-not $testEventDict.ContainsKey($e.Id)) { throw new "Unexpected event log: $e" } } $testEvents.Count | Should -Be $events.Count } It 'Get-WinEvent can use a filter which includes two items' { $filter = @{ ProviderName = $providerForTests.Name; Id = $events[0].Id} $results = Get-WinEvent -filterHashtable $filter $results | Should -Not -BeNullOrEmpty } It 'Get-WinEvent can retrieve event via XmlQuery' { $level = $events[0].Level $logname = $providerForTests.loglinks.logname $filter = "<QueryList><Query><Select Path='${logname}'>*[System[Level=${level}]]</Select></Query></QueryList>" $results = Get-WinEvent -filterXml $filter -max 3 $results | Should -Not -BeNullOrEmpty } It 'Get-WinEvent can retrieve event via XPath' { $level = $events[0].Level $logname = $providerForTests.loglinks.logname $xpathFilter = "*[System[Level=$level]]" $results = Get-WinEvent -logname $logname -filterXPath $xpathFilter -max 3 $results | Should -Not -BeNullOrEmpty } } Context "Get-WinEvent UserData Queries" { It 'Get-WinEvent can retrieve events with UserData queries using FilterXml' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = "<QueryList><Query><Select Path='file://$eventLogFile'>*[UserData/*/Param2='Windows x64']</Select></Query></QueryList>" $results = Get-WinEvent -FilterXml $filter -ErrorAction silentlycontinue @($results).Count | Should -Be 1 $results.RecordId | Should -Be 10 } It 'Get-WinEvent can retrieve events with UserData queries using FilterHashtable (one value)' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = @{ path = "$eventLogFile"; Param2 = "Windows x64"} $results = Get-WinEvent -filterHashtable $filter -ErrorAction silentlycontinue @($results).Count | Should -Be 1 $results.RecordId | Should -Be 10 } It 'Get-WinEvent can retrieve events with UserData queries using FilterHashtable (array of values)' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = @{ path = "$eventLogFile"; DriverName = "Remote Desktop Easy Print", "Microsoft enhanced Point and Print compatibility driver" } $results = Get-WinEvent -filterHashtable $filter -ErrorAction silentlycontinue @($results).Count | Should -Be 2 ($results.RecordId -contains 9) | Should -BeTrue ($results.RecordId -contains 11) | Should -BeTrue } It 'Get-WinEvent can retrieve events with UserData queries using FilterHashtable (multiple named params)' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = @{ path = "$eventLogFile"; PackageAware="Not package aware"; DriverName = "Remote Desktop Easy Print", "Microsoft enhanced Point and Print compatibility driver" } $results = Get-WinEvent -filterHashtable $filter -ErrorAction silentlycontinue @($results).Count | Should -Be 2 ($results.RecordId -contains 9) | Should -BeTrue ($results.RecordId -contains 11) | Should -BeTrue } It 'Get-WinEvent can retrieve events with UserData queries using FilterXPath' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = "*/UserData/*/Param2='Windows x64'" $results = Get-WinEvent -path $eventLogFile -filterXPath $filter -ErrorAction silentlycontinue @($results).Count | Should -Be 1 $results.RecordId | Should -Be 10 } } Context "Get-WinEvent Queries with SuppressHashFilter" { It 'Get-WinEvent can suppress events by Id' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = @{ path = "$eventLogFile"} $results = Get-WinEvent -filterHashtable $filter -ErrorAction silentlycontinue $filterSuppress = @{ path = "$eventLogFile"; SuppressHashFilter=@{Id=370}} $resultsSuppress = Get-WinEvent -filterHashtable $filterSuppress -ErrorAction silentlycontinue @($results).Count | Should -Be 3 @($resultsSuppress).Count | Should -Be 2 } It 'Get-WinEvent can suppress events by UserData' { $eventLogFile = [io.path]::Combine($PSScriptRoot, "assets", "Saved-Events.evtx") $filter = @{ path = "$eventLogFile"} $results = Get-WinEvent -filterHashtable $filter -ErrorAction silentlycontinue $filterSuppress = @{ path = "$eventLogFile"; SuppressHashFilter=@{Param2 = "Windows x64"}} $resultsSuppress = Get-WinEvent -filterHashtable $filterSuppress -ErrorAction silentlycontinue @($results).Count | Should -Be 3 @($resultsSuppress).Count | Should -Be 2 } } It 'can query a System log' { Get-WinEvent -LogName System -MaxEvents 1 | Should -Not -BeNullOrEmpty } }
combined_dataset/train/non-malicious/sample_28_37.ps1
sample_28_37.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Aks.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Aks.internal.psm1' if(Test-Path $internalModulePath) { $null = Import-Module -Name $internalModulePath } # Export nothing to clear implicit exports Export-ModuleMember # Export script cmdlets Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias) # endregion # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAjLVuo4g/cj5uq # GcqpOyNTV8BK6X89yctIQBf20afMh6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6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o7/RBJ3Su1vWCkA/Y3YzN83E3ZjUXF # z7u0w1g/ygmLnN94PIeEPIWGPHrWl8iTvab5dqMmY5zX++KZ+Ym3ZcLmv+IyD4Bv # PYLDbfA2CEjLSigOCNgrVHgjRHpCwCJwNS5SehuNTxDoGYr5a0GzJf8pPIVj5srE # +zTy/H7hkQv1QppWK4/3S/9y1lxoEFBJJRoxFRLLgtmYOqBUzmz+kOwTngztJkcD # Z2u+hRd81R4vf9Ln1X/fUW5GpBjTjrfSBTTHJS272G7Gh/UVDIKVCtsS+ey1VPUC # kXz16irOamUoTIlh+9PrHTAIBM8TXvqlEofPhx5edjRbcvnVWk1XJyl5Wnjpr8Ef # tQc2PtIdRUDE5ujFc+Vchuk= # SIG # End signature block
combined_dataset/train/non-malicious/450.ps1
450.ps1
Register-PSFConfigValidation -Name "integer" -ScriptBlock { Param ( $Value ) $Result = New-Object PSOBject -Property @{ Success = $True Value = $null Message = "" } try { [int]$number = $Value } catch { $Result.Message = "Not an integer: $Value" $Result.Success = $False return $Result } $Result.Value = $number return $Result }
combined_dataset/train/non-malicious/sample_34_29.ps1
sample_34_29.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 Lists all of the available REST API operations of the Microsoft.SignalRService provider. .Description Lists all of the available REST API operations of the Microsoft.SignalRService provider. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IOperation .Link https://learn.microsoft.com/powershell/module/az.signalr/get-azoperation #> function Get-AzOperation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ List = 'Az.SignalR.private\Get-AzOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Create or update a custom domain. .Description Create or update a custom domain. .Example $cert = Get-AzWebPubSubCustomCertificate -Name mycustomcert -ResourceGroupName rg -ResourceName wps New-AzWebPubSubCustomDomain -Name mydomain -ResourceGroupName rg -ResourceName wps -DomainName wps.manual-test.dev.signalr.azure.com -CustomCertificateId $cert.Id .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/az.signalr/new-azwebpubsubcustomdomain #> function New-AzWebPubSubCustomDomain { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # Custom domain name. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # The name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # The name of the resource. ${ResourceName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Gets subscription Id which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.String] # The custom domain name. ${DomainName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.String] # Resource ID. ${CustomCertificateId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'Az.SignalR.private\New-AzWebPubSubCustomDomain_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. .Description Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. .Example New-AzWebPubSubKey -ResourceGroupName psdemo -ResourceName psdemo-wps -KeyType 'Primary' | Format-List .Example $wps = Get-AzWebPubSub -Name psdemo-wps -ResourceGroupName psdemo $wps | New-AzWebPubSubKey -KeyType Primary | Format-List .Inputs Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.IWebPubSubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IWebPubSubIdentity>: Identity Parameter [CertificateName <String>]: Custom certificate name [HubName <String>]: The hub name. [Id <String>]: Resource identity path [Location <String>]: the region [Name <String>]: Custom domain name. [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection [ResourceGroupName <String>]: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. [ResourceName <String>]: The name of the resource. [SharedPrivateLinkResourceName <String>]: The name of the shared private link resource [SubscriptionId <String>]: Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.signalr/new-azwebpubsubkey #> function New-AzWebPubSubKey { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='RegenerateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='RegenerateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # The name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter(ParameterSetName='RegenerateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # The name of the resource. ${ResourceName}, [Parameter(ParameterSetName='RegenerateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Gets subscription Id which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='RegenerateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.IWebPubSubIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.KeyType])] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.KeyType] # The type of access key. ${KeyType}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ RegenerateExpanded = 'Az.SignalR.private\New-AzWebPubSubKey_RegenerateExpanded'; RegenerateViaIdentityExpanded = 'Az.SignalR.private\New-AzWebPubSubKey_RegenerateViaIdentityExpanded'; } if (('RegenerateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Create or update a resource. .Description Create or update a resource. .Example New-AzWebPubSub -ResourceGroupName psdemo -Name psdemo-wps -Location eastus -SkuName Standard_S1 .Example $wps = New-AzWebPubSub -ResourceGroupName psdemo -Name psdemo-wps ` -Location eastus -SkuName Standard_S1 -IdentityType SystemAssigned -LiveTraceEnabled true ` -LiveTraceCategory @{ Name='ConnectivityLogs' ; Enabled = 'true' }, @{ Name='MessageLogs' ; Enabled = 'true' } .Outputs Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IWebPubSubResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. LIVETRACECATEGORY <ILiveTraceCategory[]>: Gets or sets the list of category configurations. [Enabled <String>]: Indicates whether or the live trace category is enabled. Available values: true, false. Case insensitive. [Name <String>]: Gets or sets the live trace category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive. PRIVATEENDPOINTACL <IPrivateEndpointAcl[]>: ACLs for requests from private endpoints Name <String>: Name of the private endpoint connection [Allow <WebPubSubRequestType[]>]: Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. [Deny <WebPubSubRequestType[]>]: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. RESOURCELOGCATEGORY <IResourceLogCategory[]>: Gets or sets the list of category configurations. [Enabled <String>]: Indicates whether or the resource log category is enabled. Available values: true, false. Case insensitive. [Name <String>]: Gets or sets the resource log category's name. Available values: ConnectivityLogs, MessagingLogs. Case insensitive. .Link https://learn.microsoft.com/powershell/module/az.signalr/new-azwebpubsub #> function New-AzWebPubSub { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IWebPubSubResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('ResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # The name of the resource. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [System.String] # The name of the resource group that contains the resource. # You can obtain this value from the Azure Resource Manager API or the portal. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # Gets subscription Id which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.Management.Automation.SwitchParameter] # DisableLocalAuthEnable or disable aad authWhen set as true, connection with AuthType=aad won't work. ${DisableAadAuth}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.Management.Automation.SwitchParameter] # DisableLocalAuthEnable or disable local auth with AccessKeyWhen set as true, connection with AccessKey=xxx won't work. ${DisableLocalAuth}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.Management.Automation.SwitchParameter] # Request client certificate during TLS handshake if enabled ${EnableTlsClientCert}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.ManagedIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.ManagedIdentityType] # Represents the identity type: systemAssigned, userAssigned, None ${IdentityType}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.ILiveTraceCategory[]] # Gets or sets the list of category configurations. # To construct, see NOTES section for LIVETRACECATEGORY properties and create a hash table. ${LiveTraceCategory}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.String] # Indicates whether or not enable live trace.When it's set to true, live trace client can connect to the service.Otherwise, live trace client can't connect to the service, so that you are unable to receive any log, no matter what you configure in "categories".Available values: true, false.Case insensitive. ${LiveTraceEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.String] # The GEO location of the resource. # e.g. # West US | East US | North Central US | South Central US. ${Location}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.AclAction])] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.AclAction] # Azure Networking ACL Action. ${NetworkAcLDefaultAction}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IPrivateEndpointAcl[]] # ACLs for requests from private endpoints # To construct, see NOTES section for PRIVATEENDPOINTACL properties and create a hash table. ${PrivateEndpointAcl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.String] # Enable or disable public network access. # Default to "Enabled".When it's Enabled, network ACLs still apply.When it's Disabled, public network access is always disabled no matter what you set in network ACLs. ${PublicNetworkAccess}, [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.WebPubSubRequestType])] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.WebPubSubRequestType[]] # Allowed request types. # The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. ${PublicNetworkAllow}, [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.WebPubSubRequestType])] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.WebPubSubRequestType[]] # Denied request types. # The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. ${PublicNetworkDeny}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IResourceLogCategory[]] # Gets or sets the list of category configurations. # To construct, see NOTES section for RESOURCELOGCATEGORY properties and create a hash table. ${ResourceLogCategory}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.Int32] # Optional, integer. # The unit count of the resource. # 1 by default.If present, following values are allowed: Free: 1; Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; ${SkuCapacity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [System.String] # The name of the SKU. # Required.Allowed values: Standard_S1, Free_F1, Premium_P1 ${SkuName}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.WebPubSubSkuTier])] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Support.WebPubSubSkuTier] # Optional tier of this particular SKU. # 'Standard' or 'Free'. # `Basic` is deprecated, use `Standard` instead. ${SkuTier}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.ITrackedResourceTags]))] [System.Collections.Hashtable] # Tags of the service which is a list of key value pairs that describe the resource. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.IManagedIdentityUserAssignedIdentities]))] [System.Collections.Hashtable] # Get or set the user assigned identities ${UserAssignedIdentity}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'Az.SignalR.private\New-AzWebPubSub_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # SIG # Begin signature block # MIIn0QYJKoZIhvcNAQcCoIInwjCCJ74CAQExDzANBglghkgBZQMEAgEFADB5Bgor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AJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1w # IFBDQSAyMDEwAhMzAAAB4pmZlfHc4yDrAAEAAAHiMCIEIFI9jHTsM+FSP6FMwP2O # 6Yu7/zJ0dHmtmWF4o2meBeYsMA0GCSqGSIb3DQEBCwUABIICAElXjGDtW785TaTO # Ma6VF+hXwdzi0SV7NIQtasMzZYwl3vlfoc5wobOHqWLgPP6q61JfOQ68xMpfUf4u # 3GNuBYXbOn9IyR4R2OEDoTdmj/Cu+68SX+BUa1bmCsM33LGigCJDzEeOiAvQ4F5/ # RegQ0y0dI61Jxpr1mU776zRLyFhW8gAkuY9pYMLZylo2s3qRWOQkDsnx6t62dgam # XqSphP1KS/mkHWjrkqDAei/MwRjviWPk+Oao/fMml+VA9W5OH7Edq+XWba5Y7512 # ywvvPumyjV/0hxG0mLXbziqcoIB79SEdGJ7J1WQiyg66vLF1JhP3UomRBwFP3IMF # quTkFOGQT3VNWPNU6jNXclMsn29ltXlTiAubgMxTtI7Ha2Ycu/GMkPPzZRo/esbt # 1GhDrSEmnGQXN2jmgILTEeSwmkQNkhAJC4IFrY/+H1QmXIoQOWLE/07BoWD+4x6b # wgs0S0nWFIHX4dO9gJUgYJ2geck33Nvaoqoirb3arK9yem04n8zRD5QoNsSV74fk # L5R6CLoY7bpEWfUQSF635RItbkAMuWAtolvhSzhRuiVZGPdD+D5gS94G31qV9iYH # C4xgsGV/4Pqqocur8CJyG71qb7MdWKcvhRWqNUIEOKa8Hd6zM6yIiUYn7gE0gsIw # /6BBCDzmjrCW3wYzSbWk6Wi2EVZK # SIG # End signature block
combined_dataset/train/non-malicious/2034.ps1
2034.ps1
Describe "Verify approved aliases list" -Tags "CI" { BeforeAll { $FullCLR = !$isCoreCLR $CoreWindows = $isCoreCLR -and $IsWindows $CoreUnix = $isCoreCLR -and !$IsWindows $isPreview = $PSVersionTable.GitCommitId.Contains("preview") if ($IsWindows) { $configPath = Join-Path -Path $env:USERPROFILE -ChildPath 'Documents' -AdditionalChildPath 'PowerShell' } else { $configPath = Join-Path -Path $env:HOME -ChildPath '.config' -AdditionalChildPath 'powershell' } if (Test-Path "$configPath/powershell.config.json") { Move-Item -Path "$configPath/powershell.config.json" -Destination "$configPath/powershell.config.json.backup" } $AllScope = '[System.Management.Automation.ScopedItemOptions]::AllScope' $ReadOnly = '[System.Management.Automation.ScopedItemOptions]::ReadOnly' $None = '[System.Management.Automation.ScopedItemOptions]::None' $commandString = @" "CommandType", "Name", "Definition", "Present", "ReadOnlyOption", "AllScopeOption", "ConfirmImpact" "Alias", "%", "ForEach-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope", "" "Alias", "?", "Where-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope", "" "Alias", "ac", "Add-Content", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "asnp", "Add-PSSnapIn", $($FullCLR ), "ReadOnly", "", "" "Alias", "cat", "Get-Content", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "cd", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "CFS", "ConvertFrom-String", $($FullCLR ), "ReadOnly", "", "" "Alias", "chdir", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "clc", "Clear-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "clear", "Clear-Host", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "clhy", "Clear-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "cli", "Clear-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "clp", "Clear-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "cls", "Clear-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "clv", "Clear-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "cnsn", "Connect-PSSession", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "compare", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "copy", "Copy-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "cp", "Copy-Item", $($FullCLR -or $CoreWindows ), "", "AllScope", "" "Alias", "cpi", "Copy-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "cpp", "Copy-ItemProperty", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "curl", "Invoke-WebRequest", $($FullCLR ), "ReadOnly", "", "" "Alias", "cvpa", "Convert-Path", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "dbp", "Disable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "del", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "diff", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "dir", "Get-ChildItem", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "dnsn", "Disconnect-PSSession", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "ebp", "Enable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "echo", "Write-Output", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "epal", "Export-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "epcsv", "Export-Csv", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "epsn", "Export-PSSession", $($FullCLR ), "", "", "" "Alias", "erase", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "etsn", "Enter-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "exsn", "Exit-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "fc", "Format-Custom", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "fhx", "Format-Hex", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "fl", "Format-List", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "foreach", "ForEach-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope", "" "Alias", "ft", "Format-Table", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "fw", "Format-Wide", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gal", "Get-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gbp", "Get-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gc", "Get-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gcb", "Get-Clipboard", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "gci", "Get-ChildItem", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gcm", "Get-Command", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gcs", "Get-PSCallStack", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gdr", "Get-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gerr", "Get-Error", $( $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ghy", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gi", "Get-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gin", "Get-ComputerInfo", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "gjb", "Get-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "gl", "Get-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gm", "Get-Member", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gmo", "Get-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gp", "Get-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gps", "Get-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gpv", "Get-ItemPropertyValue", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "group", "Group-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gsn", "Get-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "gsnp", "Get-PSSnapIn", $($FullCLR ), "ReadOnly", "", "" "Alias", "gsv", "Get-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "gtz", "Get-TimeZone", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "gu", "Get-Unique", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gv", "Get-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "gwmi", "Get-WmiObject", $($FullCLR ), "ReadOnly", "", "" "Alias", "h", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "history", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "icm", "Invoke-Command", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "iex", "Invoke-Expression", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ihy", "Invoke-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ii", "Invoke-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ipal", "Import-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ipcsv", "Import-Csv", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ipmo", "Import-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ipsn", "Import-PSSession", $($FullCLR ), "", "", "" "Alias", "irm", "Invoke-RestMethod", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ise", "powershell_ise.exe", $($FullCLR ), "ReadOnly", "", "" "Alias", "iwmi", "Invoke-WMIMethod", $($FullCLR ), "ReadOnly", "", "" "Alias", "iwr", "Invoke-WebRequest", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "kill", "Stop-Process", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "lp", "Out-Printer", $($FullCLR ), "ReadOnly", "", "" "Alias", "ls", "Get-ChildItem", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "man", "help", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "md", "mkdir", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "measure", "Measure-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "mi", "Move-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "mount", "New-PSDrive", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "move", "Move-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "mp", "Move-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "mv", "Move-Item", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "nal", "New-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ndr", "New-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ni", "New-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "nmo", "New-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "npssc", "New-PSSessionConfigurationFile", $($FullCLR ), "ReadOnly", "", "" "Alias", "nsn", "New-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "nv", "New-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "nwsn", "New-PSWorkflowSession", $($FullCLR ), "ReadOnly", "", "" "Alias", "ogv", "Out-GridView", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "oh", "Out-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "popd", "Pop-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "ps", "Get-Process", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "pushd", "Push-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope", "" "Alias", "pwd", "Get-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "r", "Invoke-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "rbp", "Remove-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rcjb", "Receive-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "rcsn", "Receive-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rd", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "rdr", "Remove-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "ren", "Rename-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "ri", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rjb", "Remove-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "rm", "Remove-Item", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "rmdir", "Remove-Item", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "rmo", "Remove-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rni", "Rename-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rnp", "Rename-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rp", "Remove-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rsn", "Remove-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "rsnp", "Remove-PSSnapin", $($FullCLR ), "", "", "" "Alias", "rujb", "Resume-Job", $($FullCLR ), "", "", "" "Alias", "rv", "Remove-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rvpa", "Resolve-Path", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "rwmi", "Remove-WMIObject", $($FullCLR ), "ReadOnly", "", "" "Alias", "sajb", "Start-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "sal", "Set-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "saps", "Start-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "sasv", "Start-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "sbp", "Set-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "sc", "Set-Content", $($FullCLR ), "ReadOnly", "", "" "Alias", "scb", "Set-Clipboard", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "select", "Select-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope", "" "Alias", "set", "Set-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "shcm", "Show-Command", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "si", "Set-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "sl", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "sleep", "Start-Sleep", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "sls", "Select-String", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "sort", "Sort-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "sp", "Set-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "spjb", "Stop-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "spps", "Stop-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "spsv", "Stop-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "start", "Start-Process", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "stz", "Set-TimeZone", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "sujb", "Suspend-Job", $($FullCLR ), "", "", "" "Alias", "sv", "Set-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "swmi", "Set-WMIInstance", $($FullCLR ), "ReadOnly", "", "" "Alias", "tee", "Tee-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Alias", "trcm", "Trace-Command", $($FullCLR ), "ReadOnly", "", "" "Alias", "type", "Get-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "wget", "Invoke-WebRequest", $($FullCLR ), "ReadOnly", "", "" "Alias", "where", "Where-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope", "" "Alias", "wjb", "Wait-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "write", "Write-Output", $($FullCLR -or $CoreWindows ), "ReadOnly", "", "" "Cmdlet", "Add-Computer", "", $($FullCLR ), "", "", "" "Cmdlet", "Add-Content", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Add-History", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Add-Member", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Add-PSSnapin", "", $($FullCLR ), "", "", "" "Cmdlet", "Add-Type", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Checkpoint-Computer", "", $($FullCLR ), "", "", "" "Cmdlet", "Clear-Content", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Clear-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "Clear-History", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Clear-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Clear-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Clear-RecycleBin", "", $($FullCLR -or $CoreWindows ), "", "", "High" "Cmdlet", "Clear-Variable", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Compare-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Complete-Transaction", "", $($FullCLR ), "", "", "" "Cmdlet", "Connect-PSSession", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Connect-WSMan", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "ConvertFrom-Csv", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertFrom-Json", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertFrom-Markdown", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertFrom-SddlString", "", $( $CoreWindows ), "", "", "None" "Cmdlet", "ConvertFrom-SecureString", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertFrom-String", "", $($FullCLR ), "", "", "" "Cmdlet", "ConvertFrom-StringData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Convert-Path", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Convert-String", "", $($FullCLR ), "", "", "" "Cmdlet", "ConvertTo-Csv", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertTo-Html", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertTo-Json", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertTo-SecureString", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ConvertTo-Xml", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Copy-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Copy-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Debug-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Debug-Process", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Debug-Runspace", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Disable-ComputerRestore", "", $($FullCLR ), "", "", "" "Cmdlet", "Disable-ExperimentalFeature", "", $( $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Disable-PSBreakpoint", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Disable-PSRemoting", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Disable-PSSessionConfiguration", "", $($FullCLR -or $CoreWindows ), "", "", "Low" "Cmdlet", "Disable-RunspaceDebug", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Disable-WSManCredSSP", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Disconnect-PSSession", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Disconnect-WSMan", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Enable-ComputerRestore", "", $($FullCLR ), "", "", "" "Cmdlet", "Enable-ExperimentalFeature", "", $( $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Enable-PSBreakpoint", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Enable-PSRemoting", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Enable-PSSessionConfiguration", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Enable-RunspaceDebug", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Enable-WSManCredSSP", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Enter-PSHostProcess", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Enter-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Exit-PSHostProcess", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Exit-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Export-Alias", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Export-Clixml", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Export-Console", "", $($FullCLR ), "", "", "" "Cmdlet", "Export-Counter", "", $($FullCLR ), "", "", "" "Cmdlet", "Export-Csv", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Export-FormatData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Export-ModuleMember", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Export-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "ForEach-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "Format-Custom", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Format-Default", "", $($FullCLR ), "", "", "" "Cmdlet", "Format-Hex", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Format-List", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Format-Table", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Format-Wide", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Acl", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-Alias", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-AuthenticodeSignature", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-ChildItem", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Clipboard", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-CmsMessage", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-Command", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-ComputerInfo", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-ComputerRestorePoint", "", $($FullCLR ), "", "", "" "Cmdlet", "Get-Content", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-ControlPanelItem", "", $($FullCLR ), "", "", "" "Cmdlet", "Get-Counter", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-Credential", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Culture", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Date", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Error", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Event", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "Get-EventSubscriber", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-ExecutionPolicy", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-ExperimentalFeature", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-FileHash", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-FormatData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Help", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-History", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Host", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-HotFix", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-ItemPropertyValue", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Location", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-MarkdownOption", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Member", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Module", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PfxCertificate", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Process", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSBreakpoint", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSCallStack", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSDrive", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSHostProcessInfo", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSProvider", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-PSSessionCapability", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-PSSessionConfiguration", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-PSSnapin", "", $($FullCLR ), "", "", "" "Cmdlet", "Get-Random", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Runspace", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-RunspaceDebug", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Service", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-TimeZone", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-TraceSource", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Transaction", "", $($FullCLR ), "", "", "" "Cmdlet", "Get-TypeData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Uptime", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-UICulture", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Unique", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Variable", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-Verb", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Get-WinEvent", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-WmiObject", "", $($FullCLR ), "", "", "" "Cmdlet", "Get-WSManCredSSP", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Get-WSManInstance", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Group-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Import-Alias", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Import-Clixml", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Import-Counter", "", $($FullCLR ), "", "", "" "Cmdlet", "Import-Csv", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Import-LocalizedData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Import-Module", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Import-PowerShellDataFile", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Import-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Invoke-Command", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Invoke-Expression", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Invoke-History", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Invoke-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Invoke-RestMethod", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Invoke-WebRequest", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Invoke-WmiMethod", "", $($FullCLR ), "", "", "" "Cmdlet", "Invoke-WSManAction", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Join-Path", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Join-String", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Limit-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "Measure-Command", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Measure-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Move-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Move-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "New-Alias", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "New-Event", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "New-FileCatalog", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "New-GUID", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "New-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-Module", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "New-ModuleManifest", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "New-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-PSDrive", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "New-PSRoleCapabilityFile", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-PSSessionConfigurationFile", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "New-PSSessionOption", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-PSTransportOption", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "New-TemporaryFile", "", $( $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "New-TimeSpan", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "New-Variable", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "New-WebServiceProxy", "", $($FullCLR ), "", "", "" "Cmdlet", "New-WinEvent", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "New-WSManInstance", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "New-WSManSessionOption", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Out-Default", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Out-File", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Out-GridView", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Out-Host", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Out-LineOutput", "", $($FullCLR ), "", "", "" "Cmdlet", "Out-Null", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Out-Printer", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Out-String", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Pop-Location", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Protect-CmsMessage", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Push-Location", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Read-Host", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Receive-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Receive-PSSession", "", $($FullCLR -or $CoreWindows ), "", "", "Low" "Cmdlet", "Register-ArgumentCompleter", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Register-EngineEvent", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Register-ObjectEvent", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Register-PSSessionConfiguration", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Register-WmiEvent", "", $($FullCLR ), "", "", "" "Cmdlet", "Remove-Alias", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Remove-Computer", "", $($FullCLR ), "", "", "" "Cmdlet", "Remove-Event", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "Remove-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-Module", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-PSBreakpoint", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-PSDrive", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-PSSession", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-PSSnapin", "", $($FullCLR ), "", "", "" "Cmdlet", "Remove-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Remove-TypeData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-Variable", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Remove-WmiObject", "", $($FullCLR ), "", "", "" "Cmdlet", "Remove-WSManInstance", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Rename-Computer", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Rename-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Rename-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Reset-ComputerMachinePassword", "", $($FullCLR ), "", "", "" "Cmdlet", "Resolve-Path", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Restart-Computer", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Restart-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Restore-Computer", "", $($FullCLR ), "", "", "" "Cmdlet", "Resume-Job", "", $($FullCLR ), "", "", "" "Cmdlet", "Resume-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Save-Help", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Select-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Select-String", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Select-Xml", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Send-MailMessage", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Set-Acl", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Set-Alias", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-AuthenticodeSignature", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Set-Clipboard", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-Content", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-Date", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-ExecutionPolicy", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-Item", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-ItemProperty", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-Location", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Set-MarkdownOption", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Set-PSBreakpoint", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Set-PSDebug", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Set-PSSessionConfiguration", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Set-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Set-StrictMode", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Set-TimeZone", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Set-TraceSource", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-Variable", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Set-WmiInstance", "", $($FullCLR ), "", "", "" "Cmdlet", "Set-WSManInstance", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Set-WSManQuickConfig", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Show-Command", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Show-ControlPanelItem", "", $($FullCLR ), "", "", "" "Cmdlet", "Show-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "Show-Markdown", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Sort-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Split-Path", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Start-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Start-Process", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Start-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Start-Sleep", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Start-Transaction", "", $($FullCLR ), "", "", "" "Cmdlet", "Start-Transcript", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Stop-Computer", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Stop-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Stop-Process", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Stop-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Stop-Transcript", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Suspend-Job", "", $($FullCLR ), "", "", "" "Cmdlet", "Suspend-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Tee-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Test-Connection", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Test-ComputerSecureChannel", "", $($FullCLR ), "", "", "" "Cmdlet", "Test-FileCatalog", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Test-Json", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Test-ModuleManifest", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Test-Path", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Test-PSSessionConfigurationFile", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Test-WSMan", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Trace-Command", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Unblock-File", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" "Cmdlet", "Undo-Transaction", "", $($FullCLR ), "", "", "" "Cmdlet", "Unprotect-CmsMessage", "", $($FullCLR -or $CoreWindows ), "", "", "None" "Cmdlet", "Unregister-Event", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Unregister-PSSessionConfiguration","", $($FullCLR -or $CoreWindows ), "", "", "Low" "Cmdlet", "Update-FormatData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "Update-Help", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Update-List", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Update-TypeData", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Low" "Cmdlet", "Use-Transaction", "", $($FullCLR ), "", "", "" "Cmdlet", "Wait-Debugger", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Wait-Event", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Wait-Job", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Wait-Process", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Where-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Debug", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Error", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-EventLog", "", $($FullCLR ), "", "", "" "Cmdlet", "Write-Host", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Information", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Output", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Progress", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Verbose", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Write-Warning", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "@ $moduleList = @("Microsoft.PowerShell.Utility", "Microsoft.PowerShell.Management", "Microsoft.PowerShell.Security", "Microsoft.PowerShell.Host", "Microsoft.PowerShell.Diagnostics", "PSWorkflow", "Microsoft.WSMan.Management", "Microsoft.PowerShell.Core") $getAliases = { param($moduleList) if ($moduleList -is [string]) { $moduleList = $moduleList | ConvertFrom-Json } Import-Module -Name $moduleList -ErrorAction SilentlyContinue Get-Alias | Where-Object { $_.Source -eq "" -or $moduleList -contains $_.Source } } $getCommands = { param($moduleList) if ($moduleList -is [string]) { $moduleList = $moduleList | ConvertFrom-Json } Import-Module -Name $moduleList -ErrorAction SilentlyContinue Get-Command -CommandType Cmdlet | Where-Object { $moduleList -contains $_.Source } } if ($isPreview) { $emptyConfigPath = Join-Path -Path $TestDrive -ChildPath "test.config.json" Set-Content -Path $emptyConfigPath -Value "" -Force -ErrorAction Stop $currentAliasList = pwsh -NoProfile -OutputFormat XML -SettingsFile $emptyConfigPath -Command $getAliases -args ($moduleList | ConvertTo-Json) $currentCmdletList = pwsh -NoProfile -OutputFormat XML -SettingsFile $emptyConfigPath -Command $getCommands -args ($moduleList | ConvertTo-Json) } else { $currentAliasList = & $getAliases $moduleList $currentCmdletList = & $getCommands $moduleList } $commandList = $commandString | ConvertFrom-CSV -Delimiter "," $aliasFullList = $commandList | Where-Object { $_.Present -eq "True" -and $_.CommandType -eq "Alias" } } AfterAll { if (Test-Path "$configPath/powershell.config.json.backup") { Move-Item -Path "$configPath/powershell.config.json.backup" -Destination "$configPath/powershell.config.json" } } It "All approved aliases present (no new aliases added, no aliases removed)" { $currentDisplayNameAliasList = $currentAliasList | Select-Object -ExpandProperty DisplayName $aliasDisplayNameAliasList = $aliasFullList | ForEach-Object { "{0} -> {1}" -f $_.Name, $_.Definition} $result = Compare-Object -ReferenceObject $currentDisplayNameAliasList -DifferenceObject $aliasDisplayNameAliasList $result | Write-Host $result | Should -BeNullOrEmpty } It "All approved aliases have the correct 'AllScope' option" { $aliasAllScopeOptionList = $aliasFullList | Where-Object { $_.AllScopeOption -eq "AllScope"} | ForEach-Object { "{0} -> {1}" -f $_.Name, $_.Definition} $currentAllScopeOptionList = $currentAliasList | Where-Object { $_.Options -band [System.Management.Automation.ScopedItemOptions]::AllScope } | Select-Object -ExpandProperty DisplayName $result = Compare-Object -ReferenceObject $currentAllScopeOptionList -DifferenceObject $aliasAllScopeOptionList $result | Write-Host $result | Should -BeNullOrEmpty } It "All approved aliases have the correct 'ReadOnly' option" { $aliasReadOnlyOptionList = $aliasFullList | Where-Object { $_.ReadOnlyOption -eq "ReadOnly"} | ForEach-Object { "{0} -> {1}" -f $_.Name, $_.Definition} $currentReadOnlyOptionList = $currentAliasList | Where-Object { $_.Options -band [System.Management.Automation.ScopedItemOptions]::ReadOnly } | Select-Object -ExpandProperty DisplayName $result = Compare-Object -ReferenceObject $currentReadOnlyOptionList -DifferenceObject $aliasReadOnlyOptionList $result | Write-Host $result | Should -BeNullOrEmpty } It "All approved Cmdlets present (no new Cmdlets added, no Cmdlets removed)" { $cmdletList = $commandList | Where-Object { $_.Present -eq "True" -and $_.CommandType -eq "Cmdlet" } | Select-Object -ExpandProperty Name $result = (Compare-Object -ReferenceObject $currentCmdletList.Name -DifferenceObject $cmdletList).InputObject $result | Should -BeNullOrEmpty } It "All present Cmdlets should have the correct ConfirmImpact" { $CmdletList = $commandList | Where-Object { $_.Present -eq "True" -and $_.CommandType -eq "Cmdlet"} | Select-Object -Property Name, ConfirmImpact $currentCmdletList = $currentCmdletList | ForEach-Object { Get-Command $_.Name } | Where-Object { $moduleList -contains $_.Source -and $null -ne $_.ImplementingType } | Select-Object -Property Name, @{ Name = 'ConfirmImpact' Expression = { if (($t = $_.ImplementingType)) { $t.GetCustomAttributes($true).Where{$_.TypeId.Name -eq 'CmdletAttribute'}.ConfirmImpact } } } $result = Compare-Object -ReferenceObject $currentCmdletList -DifferenceObject $CmdletList -Property ConfirmImpact -PassThru $result | Should -BeNullOrEmpty } } Describe "PATHEXT defaults" -Tags 'CI' { It "PATHEXT contains .CPL" -Skip:(!$IsWindows) { $env:PATHEXT.Split(";") | Should -Contain ".CPL" } }
combined_dataset/train/non-malicious/2374.ps1
2374.ps1
function Copy-FileWithHashCheck { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $True)] [Alias('Fullname')] [string]$SourceFilePath, [Parameter(Mandatory = $true)] [ValidateScript({ Test-Path -Path $_ -PathType Container })] [string]$DestinationFolderPath, [Parameter()] [switch]$Force ) begin { function Test-HashEqual ($FilePath1, $FilePath2) { $SourceHash = Get-MyFileHash -Path $FilePath1 $DestHash = Get-MyFileHash -Path $FilePath2 if ($SourceHash.SHA256 -ne $DestHash.SHA256) { $false } else { $true } } function Get-MyFileHash { [CmdletBinding()] Param ( [Parameter(Position = 0, Mandatory = $true, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $True)] [Alias("PSPath", "FullName")] [string[]]$Path, [Parameter(Position = 1)] [ValidateSet("MD5", "SHA1", "SHA256", "SHA384", "SHA512", "RIPEMD160")] [string[]]$Algorithm = "SHA256" ) Process { ForEach ($item in $Path) { try { $item = (Resolve-Path $item).ProviderPath If (-Not ([uri]$item).IsAbsoluteUri) { Write-Verbose ("{0} is not a full path, using current directory: {1}" -f $item, $pwd) $item = (Join-Path $pwd ($item -replace "\.\\", "")) } If (Test-Path $item -Type Container) { Write-Warning ("Cannot calculate hash for directory: {0}" -f $item) Return } $object = New-Object PSObject -Property @{ Path = $item } $stream = ([IO.StreamReader]$item).BaseStream foreach ($Type in $Algorithm) { [string]$hash = -join ([Security.Cryptography.HashAlgorithm]::Create($Type).ComputeHash($stream) | ForEach { "{0:x2}" -f $_ }) $null = $stream.Seek(0, 0) $object = Add-Member -InputObject $Object -MemberType NoteProperty -Name $Type -Value $Hash -PassThru } $object.pstypenames.insert(0, 'System.IO.FileInfo.Hash') Write-Output $object $stream.Close() } catch { Write-Log -Message "Error: $($_.Exception.Message) - Line Number: $($_.InvocationInfo.ScriptLineNumber)" -LogLevel '3' $false } } } } } process { try { $CopyParams = @{ 'Path' = $SourceFilePath; 'Destination' = $DestinationFolderPath } $DestFilePath = "$DestinationFolderPath\$($SourceFilePath | Split-Path -Leaf)" if (Test-Path -Path $DestFilePath -PathType 'Leaf') { if (Test-HashEqual -FilePath1 $SourceFilePath -FilePath2 $DestFilePath) { Write-Verbose -Message "The file $SourceFilePath is already in $DestinationFolderPath and is the same. No need to copy" return $true } elseif (!$Force.IsPresent) { throw "A file called $SourceFilePath is already in $DestinationFolderPath but is not the same file being copied." } else { $CopyParams.Force = $true } } Write-Verbose "Copying file $SourceFilePath..." Copy-Item @CopyParams if (Test-HashEqual -FilePath1 $SourceFilePath -FilePath2 $DestFilePath) { Write-Verbose -Message "The file $SourceFilePath was successfully copied to $DestinationFolderPath" return $true } else { throw "Attempted to copy the file $SourceFilePath to $DestinationFolderPath but failed the hash check" } } catch { Write-Error -Message "Error: $($_.Exception.Message) - Line Number: $($_.InvocationInfo.ScriptLineNumber)" $false } } }
combined_dataset/train/non-malicious/sample_53_21.ps1
sample_53_21.ps1
# Copyright (C) Microsoft Corporation. All rights reserved. # ------------------------------------------------------------------------------------------------- # This script provides users the ability to download and launch different verision of native host. # It removes any exisiting version of outlook on the user's machine and downloads the # version and build specified by the users # ------------------------------------------------------------------------------------------------- Param ( [Parameter(Mandatory = $false, HelpMessage = "Please provide the version of native host you'd like to launch. Ex: 1.2001.209.000")] [Version]$Version, [Parameter(Mandatory = $false, HelpMessage = "Which processor architecture would you like to launch: x64, x86, or arm64?")] [ValidateSet('x64', 'x86', 'arm64', IgnoreCase = $false, ErrorMessage="Value '{0}' is invalid. Try one of: '{1}'")] [string]$ProcessorArchitecture, [Parameter(Mandatory = $false)] [switch]$Revert, [Parameter(Mandatory = $false)] [switch]$LaunchSpecificVersion, [Parameter(Mandatory = $false)] [switch]$SearchBuilds, [Parameter(Mandatory = $false)] [string]$StartDate, [Parameter(Mandatory = $false)] [string]$EndDate ) function Assert-ProcessorArchitecture( [Parameter(Mandatory = $true)][string]$ProcessorArchitecture ){ If (($ProcessorArchitecture -ne "x64") -and ($ProcessorArchitecture -ne "arm64") -and ($ProcessorArchitecture -ne "x86")){ Throw "$ProcessorArchitecture is an invalid build type." } } function Get-SystemProcessorArchitecture(){ $Architecture = $env:PROCESSOR_ARCHITECTURE if ($Architecture -eq "AMD64"){ return "x64" } elseif ($Architecture -eq "ARM64"){ return "arm64" } return $Architecture } function Get-CDNBasePath(){ return "https://res.cdn.office.net/nativehost/5mttl/installer/v2" } function Get-ReleasesUri(){ $CDNBasePath = Get-CDNBasePath [string]$ReleasesUri = "$CDNBasePath/releasesInfo.json" return $ReleasesUri } function Assert-Version( [Parameter(Mandatory = $true)][Version]$Version, [Parameter(Mandatory = $true)][PSCustomObject]$Releases ) { [string]$CDNBasePath = Get-CDNBasePath [string]$FullCDNPath = "$CDNBasePath/releasesInfo.json" If (!($Releases | where-Object{$_.Version -eq $Version})){ Throw "The version you specified, $Version, does not exist. Please enter a valid version. You can find a list of valid versions by following this link: $FullCDNPath" } } function Get-ReleaseJson(){ $JsonUri = Get-ReleasesUri $Response = Invoke-WebRequest -Uri $JsonUri if ($Response.StatusCode -ne 200) { $StatusCode = $Response.StatusCode Throw "Invoke-WebRequest returned the following status code: $StatusCode. The given URI was: $JsonUri." } $Releases = $Response | ConvertFrom-Json foreach($Release in $Releases){ [Version]$VersionTyped = $Release.Version $Release.Version = $VersionTyped [DateTime]$BuildDateTime = $Release.BuildTime $Release.BuildTime = $BuildDateTime } return $Releases } function Set-GlobalVariables(){ [Version]$UsersVerion = (Get-AppxPackage | Where-Object {$_.PackageFullName -like "*Microsoft.OutlookForWindows*"}).Version $global:usersPreviousVersion = $UsersVerion $global:versionsWhereRegressionWasNotFound = [System.Collections.ArrayList]@() } function Get-MostRecentVersionObject(){ $Releases = Get-ReleaseJson $MostRecentVersionObj = $Releases[-1] return $MostRecentVersionObj } # Check if the user already has native host downloaded on their machine, if so remove the exisiting version of native host function Remove-ExistingAppxPackage { Stop-Process -Name "olk" -ErrorAction Ignore [string]$FullPkgName = (Get-AppxPackage | Where-Object {$_.PackageFullName -like "*Microsoft.OutlookForWindows*"}).PackageFullName if ($FullPkgName -ne ""){ foreach($Package in $FullPkgName) { Remove-AppPackage -Package $FullPkgName } } } function Get-DownloadUri( [Parameter(Mandatory = $true)][Version]$Version, [Parameter(Mandatory = $true)][string]$ProcessorArchitecture ){ [string]$CDNBasePath = Get-CDNBasePath return "$CDNBasePath/$Version/Microsoft.OutlookForWindows_$ProcessorArchitecture.msix" } function Build-DownloadPath( [Parameter(Mandatory = $true)][Version]$Version, [Parameter(Mandatory = $true)][string]$ProcessorArchitecture, [Parameter(Mandatory = $false)][switch]$Download ){ $DownloadFolder = (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path $Path = Join-Path $DownloadFolder "Microsoft.OutlookForWindows_$Version`_$ProcessorArchitecture`_8wekyb3d8bbwe.msix" Write-Host "Version $Version of native host in now downloading to the following path: $Path" return $Path } function Install-OutlookPackage( [Parameter(Mandatory = $true)][string]$DownloadDirPath, [Parameter(Mandatory = $true)][string]$DownloadUrl ){ # Download the specifed version and build of native host the download path Invoke-WebRequest -Uri $DownloadUrl -Outfile $DownloadDirPath -ErrorAction Stop # Add the downloaded version of native host as a signed app package to the user's account Add-AppxPackage -Path $DownloadDirPath -ErrorAction Stop # Launch the downloaded version of native host. Start-Process -FilePath "olk.exe" Write-Host "You are now launching version $Version of native host." } function Start-Revert( [Parameter(Mandatory = $false)][switch]$Newest ){ if($Newest.IsPresent){ $LatestReleaseObj = Get-MostRecentVersionObject $RevertVersion = $LatestReleaseObj.Version } else{ $RevertVersion = $UsersPreviousVersion } $ProccArch = Get-SystemProcessorArchitecture $DownloadUri = Get-DownloadUri -Version $RevertVersion -ProcessorArchitecture $ProccArch $DownloadPath = Build-DownloadPath -Version $RevertVersion -ProcessorArchitecture $ProccArch -Download Stop-Process -Name "olk" -ErrorAction Ignore Install-OutlookPackage -DownloadDirPath $DownloadPath -DownloadUrl $DownloadUri } function Start-Version( [Parameter(Mandatory = $true)][Version]$Version, [Parameter(Mandatory = $false)][string]$ProcessorArchitecture ){ If($ProcessorArchitecture){ Assert-ProcessorArchitecture -ProcessorArchitecture $ProcessorArchitecture } Else { $ProcessorArchitecture = Get-SystemProcessorArchitecture } $Releases = Get-ReleaseJson Assert-Version -Version $Version -Releases $Releases Remove-ExistingAppxPackage $DownloadDirPath = Build-DownloadPath -Version $Version -ProcessorArchitecture $ProcessorArchitecture $DownloadUrl = Get-DownloadUri -Version $Version -ProcessorArchitecture $ProcessorArchitecture Install-OutlookPackage -DownloadDirPath $DownloadDirPath -DownloadUrl $DownloadUrl if (($Revert.IsPresent) -and ($LaunchSpecificVersion.IsPresent)){ [string] $RevertInput = Read-Host -Prompt "Choose from the following: [1]Update to the most recent verison of outlook [2]Revert to the version of outlook you were on last" if (($RevertInput -eq "1")){ Start-Revert -Newest } elseif($RevertInput -eq "2"){ Start-Revert } } } function Find-PositionInRleaseObject( [Parameter(Mandatory = $true)][string]$Date, [Parameter(Mandatory = $true)][Object]$Releases, [Parameter(Mandatory = $false)][switch]$Start ){ $Release = ($Releases | where-Object{$_.BuildTime -Like "*$Date*"}) if ($null -eq $Release){ try { $DateTypeDate = [datetime]::parseexact($Date, 'MM/dd/yyyy', $null) }catch{ $DateTypeDate = [datetime]::parseexact($Date, 'yyyy-MM-dd', $null) } $Release = $Releases | where-Object{$_.BuildTime.Ticks -CLE $DateTypeDate.Ticks} } [Int]$ReleaseObjectPosition = $Releases.IndexOf($Release[-1]) return $ReleaseObjectPosition } function Assert-RegressionFoundInVersion( [Parameter(Mandatory = $true)][Object]$Releases, [Parameter(Mandatory = $true)][Int]$Position ){ $Release = $Releases[$Position] [Version]$TestVersion = $Release.Version Start-Version -Version $TestVersion [string] $DoesRegressionExist = Read-Host -Prompt "Does the regression exisit in this version? [Y] Yes, [N] No" if ($DoesRegressionExist -eq "Y"){ Write-Host "Regression was found in version $TestVersion" return $true } elseif ($DoesRegressionExist -eq "N"){ Write-Host "Regression was not found in version $TestVersion" return $false } } function Confirm-VersionFound( [Parameter(Mandatory = $true)][Object]$Release ){ Write-Host "The build you are looking was found, please look below." Write-Host ($Release | Format-Table | Out-String) return $true } function Find-Versison( [Parameter(Mandatory = $true)][string]$StartDate, [Parameter(Mandatory = $true)][string]$EndDate, [Parameter(Mandatory = $true)][Object]$Releases ){ if ($Releases.Count -eq 1){ $ReleaseObjectFound = Confirm-VersionFound -Release $Releases[0] return $ReleaseObjectFound | Out-Null } elseif($Releases.Count -eq 2){ if ([string]$Releases[0].Version -notin $VersionsWhereRegressionWasNotFound){ $RegressionFound = Assert-RegressionFoundInVersion -Releases $Releases -Position 0 if ($RegressionFound -eq $true){ $ReleaseObjectFound = Confirm-VersionFound -Release $Releases[0] | Out-Null return $ReleaseObjectFound } }else{ $ReleaseObjectFound = Confirm-VersionFound -Release $Releases[1] | Out-Null return $ReleaseObjectFound } } [Int]$StartDatePos = Find-PositionInRleaseObject -Date $StartDate -Releases $Releases -Start [Int]$EndDatePos = (Find-PositionInRleaseObject -Date $EndDate -Releases $Releases) [Int]$MidPos = (($StartDatePos + $EndDatePos) / 2 ) [string]$ReleaseVersion = $Releases[$MidPos].Version $RegressionFoundInVersion = Assert-RegressionFoundInVersion -Releases $Releases -Position $MidPos if($RegressionFoundInVersion -eq $true){ $NewStartDate = $Releases[$StartDatePos].BuildTime $NewEndDate = $Releases[$MidPos].BuildTime $NewReleasesObject = $Releases[$StartDatePos..$MidPos] Find-Versison -StartDate $NewStartDate -EndDate $NewEndDate -Releases $NewReleasesObject }elseif($RegressionFoundInVersion -eq $false){ $VersionsWhereRegressionWasNotFound.Add($ReleaseVersion) $NewStartDate = $Releases[$MidPos].BuildTime $NewEndDate = $Releases[$EndDatePos].BuildTime $NewReleasesObject = $Releases[$MidPos..$EndDatePos] Find-Versison -StartDate $NewStartDate -EndDate $NewEndDate -Releases $NewReleasesObject } } function Assert-SearchDates( [Parameter(Mandatory = $true)][string]$StartDate, [Parameter(Mandatory = $true)][string]$EndDate ){ if (!($StartDate -as [DateTime]) -or !($EndDate -as [DateTime])){ Throw "Please provide proper inputs for 'StartDate' and 'EndDate'. Make sure to format your inputs as (mm/dd/yyyy)." } if ([DateTime]$StartDate -gt [DateTime]$EndDate){ Throw "The time frame you provided is invalid, Start Date = $StartDate and End Date = $EndDate, please try again." } } function Find-VersionFromDates( [Parameter(Mandatory = $true)][string]$StartDate, [Parameter(Mandatory = $true)][string]$EndDate ){ Assert-SearchDates -StartDate $StartDate -EndDate $EndDate Write-Host "Searching builds between $StartDate and $EndDate" $Releases = Get-ReleaseJson $ReleaseFound = Find-Versison -StartDate $StartDate -EndDate $EndDate -Releases $Releases return $ReleaseFound } function Start-SearchBuilds(){ if ($StartDate -eq ""){ [string] $StartDate = Read-Host -Prompt "Specify a start date (Ex:01/01/2023)" } if ($EndDate -eq ""){ [string] $EndDate = Read-Host -Prompt "Specify an end date (Ex:01/31/2023)" } Find-VersionFromDates -StartDate $StartDate -EndDate $EndDate | Out-Null if (($Revert.IsPresent) -and ($SearchBuilds.IsPresent)){ [string] $RevertInput = Read-Host -Prompt "Choose from the following: [1]Update to the most recent verison of outlook [2]Revert to the version of outlook you were on last" if (($RevertInput -eq "1")){ Start-Revert -Newest } elseif($RevertInput -eq "2"){ Start-Revert } } } function Start-LaunchSpecificVersion(){ if ($Version.IsPresent -eq $false){ $ReleasesUri = Get-ReleasesUri Write-Host "You can find a list of native host versions here: $ReleasesUri" [Version]$VesionValue = Read-Host -Prompt "Please provide the version of native host you'd like to launch. (Ex: 1.2001.209.000)" Start-Version -Version $VesionValue } else { Start-Version -Version $Version } } function Start-GiveUserLaunchOptions() { [string]$UserInput = Read-Host -Prompt "Please choose from the following: [1]Find a regression by dates, [2]Start a specific version" if ($UserInput -eq "1"){ Start-SearchBuilds }elseif($UserInput -eq "2"){ $ReleasesUri = Get-ReleasesUri Write-Host "You can find a list of native host versions here: $ReleasesUri" [Version] $VesionValue = Read-Host -Prompt "Please provide the version of native host you'd like to launch. (Ex: 1.2001.209.000)" Start-Version -Version $VesionValue }elseif($UserInput -eq ""){ Start-GiveUserLaunchOptions } } function Start-Script( ){ Write-Host "Native Host script tools intialzied, loading selected script..." Set-GlobalVariables | Out-Null if($LaunchSpecificVersion.IsPresent){ Start-LaunchSpecificVersion }elseif($SearchBuilds.IsPresent){ Start-SearchBuilds }else{ Start-GiveUserLaunchOptions } } Start-Script
combined_dataset/train/non-malicious/974.ps1
974.ps1
$SubscriptionId = '' $sourceResourceGroupName = "mySourceResourceGroup-$(Get-Random)" $sourceResourceGroupLocation = "westus2" $targetResourceGroupname = "myTargetResourceGroup-$(Get-Random)" $targetResourceGroupLocation = "eastus" $adminSqlLogin = "SqlAdmin" $password = "ChangeYourAdminPassword1" $sourceServerName = "source-server-$(Get-Random)" $targetServerName = "target-server-$(Get-Random)" $sourceDatabaseName = "mySampleDatabase" $targetDatabaseName = "CopyOfMySampleDatabase" $sourceStartIp = "0.0.0.0" $sourceEndIp = "0.0.0.0" $targetStartIp = "0.0.0.0" $targetEndIp = "0.0.0.0" Set-AzContext -SubscriptionId $subscriptionId $sourceResourceGroup = New-AzResourceGroup -Name $sourceResourceGroupName -Location $sourceResourceGroupLocation $targetResourceGroup = New-AzResourceGroup -Name $targetResourceGroupname -Location $targetResourceGroupLocation $sourceResourceGroup = New-AzSqlServer -ResourceGroupName $sourceResourceGroupName ` -ServerName $sourceServerName ` -Location $sourceResourceGroupLocation ` -SqlAdministratorCredentials $(New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $adminSqlLogin, $(ConvertTo-SecureString -String $password -AsPlainText -Force)) $targetResourceGroup = New-AzSqlServer -ResourceGroupName $targetResourceGroupname ` -ServerName $targetServerName ` -Location $targetResourceGroupLocation ` -SqlAdministratorCredentials $(New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $adminSqlLogin, $(ConvertTo-SecureString -String $password -AsPlainText -Force)) $sourceServerFirewallRule = New-AzSqlServerFirewallRule -ResourceGroupName $sourceResourceGroupName ` -ServerName $sourceServerName ` -FirewallRuleName "AllowedIPs" -StartIpAddress $sourcestartip -EndIpAddress $sourceEndIp $targetServerFirewallRule = New-AzSqlServerFirewallRule -ResourceGroupName $targetResourceGroupname ` -ServerName $targetServerName ` -FirewallRuleName "AllowedIPs" -StartIpAddress $targetStartIp -EndIpAddress $targetEndIp $sourceDatabase = New-AzSqlDatabase -ResourceGroupName $sourceResourceGroupName ` -ServerName $sourceServerName ` -DatabaseName $sourceDatabaseName -RequestedServiceObjectiveName "S0" $databaseCopy = New-AzSqlDatabaseCopy -ResourceGroupName $sourceResourceGroupName ` -ServerName $sourceServerName ` -DatabaseName $sourceDatabaseName ` -CopyResourceGroupName $targetResourceGroupname ` -CopyServerName $targetServerName ` -CopyDatabaseName $targetDatabaseName
combined_dataset/train/non-malicious/sample_55_30.ps1
sample_55_30.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 = '86.0.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 = '86.0.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-OCIAilanguageJob', 'Get-OCIAilanguageJobsList', 'Get-OCIAilanguageModel', 'Get-OCIAilanguageModelsList', 'Get-OCIAilanguageModelType', 'Get-OCIAilanguageProject', 'Get-OCIAilanguageProjectsList', 'Get-OCIAilanguageWorkRequest', 'Get-OCIAilanguageWorkRequestErrorsList', 'Get-OCIAilanguageWorkRequestLogsList', 'Get-OCIAilanguageWorkRequestsList', 'Invoke-OCIAilanguageBatchDetectDominantLanguage', 'Invoke-OCIAilanguageBatchDetectHealthEntity', '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-OCIAilanguageJobCompartment', 'Move-OCIAilanguageModelCompartment', 'Move-OCIAilanguageProjectCompartment', 'New-OCIAilanguageEndpoint', 'New-OCIAilanguageJob', 'New-OCIAilanguageModel', 'New-OCIAilanguageProject', 'Remove-OCIAilanguageEndpoint', 'Remove-OCIAilanguageJob', 'Remove-OCIAilanguageModel', 'Remove-OCIAilanguageProject', 'Stop-OCIAilanguageJob', 'Update-OCIAilanguageEndpoint', 'Update-OCIAilanguageJob', '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/sample_36_48.ps1
sample_36_48.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 Skips an occurrence of an action. .Description Skips an occurrence of an action. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IDevCenterdataIdentity>: Identity Parameter [Name <String>]: The name of an action that will take place on a Dev Box. [CatalogName <String>]: The name of the catalog [CustomizationGroupName <String>]: A customization group name. [CustomizationTaskId <String>]: A customization task ID. [DefinitionName <String>]: The name of the environment definition [DevBoxName <String>]: The name of a Dev Box. [EnvironmentName <String>]: The name of the environment. [Id <String>]: Resource identity path [OperationId <String>]: The id of the operation on a Dev Box. [PoolName <String>]: The name of a pool of Dev Boxes. [ProjectName <String>]: The DevCenter Project upon which to execute operations. [ScheduleName <String>]: The name of a schedule. [TaskName <String>]: A customization task name. [UserId <String>]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/skip-azdevcenteruserenvironmentaction #> function Skip-AzDevCenterUserEnvironmentAction { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Skip', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Skip', Mandatory)] [Parameter(ParameterSetName='SkipViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, [Parameter(ParameterSetName = 'SkipViaIdentityByDevCenter', Mandatory)] [Parameter(ParameterSetName = 'SkipByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, [Parameter(ParameterSetName='Skip', Mandatory)] [Parameter(ParameterSetName = 'SkipByDevCenter', Mandatory)] [Alias('ActionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The name of an action that will take place on an Environment. ${Name}, [Parameter(ParameterSetName='Skip', Mandatory)] [Parameter(ParameterSetName = 'SkipByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The name of the environment. ${EnvironmentName}, [Parameter(ParameterSetName='Skip', Mandatory)] [Parameter(ParameterSetName = 'SkipByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The DevCenter Project upon which to execute operations. ${ProjectName}, [Parameter(ParameterSetName='Skip')] [Parameter(ParameterSetName = 'SkipByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='SkipViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName = 'SkipViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process { if (-not $PSBoundParameters.ContainsKey('Endpoint')) { $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterName -Project $ProjectName $null = $PSBoundParameters.Add("Endpoint", $Endpoint) $null = $PSBoundParameters.Remove("DevCenterName") } else { $Endpoint = ValidateAndProcessEndpoint -Endpoint $Endpoint $PSBoundParameters["Endpoint"] = $Endpoint } Az.DevCenterdata.internal\Skip-AzDevCenterUserEnvironmentAction @PSBoundParameters } } # SIG # Begin signature block # MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBHzY9AlrxVxn17 # Jy2tnMcghGqboiabt8YJyJB5bmdqc6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YG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mhTxFbY+qKFCo8lHX # J/ItZo/FVGOeLoL7IfxprVKMF8TXJAX4O3/oTlktYJf9hd4BAYPT02OyX2w2KLs4 # 4ociu5lUWmoZHS0M+2yjCLzeNqyAqxxYzHAQUnRaEDeOpvqqq8uC9IyzlxNbiFbJ # k5U5PJKqngFwVkuyp80Awt7k/ygLE+zCRj5Z/qO/xeQtADK5oE3CSM34mFWQywh/ # I5azCROb+zRMKF75PAgPcZeeqtK2P1/sBI6yN3cKfiYiE7HbAbgPrDCDlGuLA8SQ # 9Tq9Dybl # SIG # End signature block
combined_dataset/train/non-malicious/sample_14_84.ps1
sample_14_84.ps1
<# Returns a certificate object that meets the following conditions: - Located in LocalMachine\TrustedPeople store - Subject is for the given computer name - Not expired - Has a private key #> function Find-TrustedCertificate([string] $ComputerName) { $result = $null $certs = @(Get-ChildItem Cert:\LocalMachine\TrustedPeople | Where-Object Subject -eq "CN=${ComputerName}") if ($certs.Length -gt 0) { $validCerts = @($certs | Where-Object { $_.Verify() -and $_.HasPrivateKey }) if ($validCerts.Length -gt 0) { $result = $validCerts[0] } } return $result } <# Creates a new self-signed wildcard certificate for the given computer name in the LocalMachine\My certificate store and then imports it into the LocalMachine\TrustedPeople certificate store. Returns the newly created certificate as well in case you need to utilize it in an SSL binding or pull out extra information from it. #> function New-TrustedCertificate([string] $ComputerName) { $certCreationParams = @{ DnsName = $ComputerName CertStoreLocation = 'Cert:\LocalMachine\My' NotAfter = (Get-Date).AddYears(100) ErrorAction = 'Stop' } $generatedCert = New-SelfSignedCertificate @certCreationParams $exportedCertificatePath = Join-Path $PSScriptRoot (New-Guid) $exportedCertificatePassword = ConvertTo-SecureString -String (New-Guid).Guid -AsPlainText -Force $null = Export-PfxCertificate -Cert $generatedCert -FilePath $exportedCertificatePath -Password $exportedCertificatePassword -ErrorAction Stop try { $importParams = @{ CertStoreLocation = 'Cert:\LocalMachine\TrustedPeople' FilePath = $exportedCertificatePath Password = $exportedCertificatePassword Exportable = $true ErrorAction = 'Stop' } $result = Import-PfxCertificate @importParams } finally { $null = Remove-Item -Path $exportedCertificatePath -Force -ErrorAction Ignore } return $result } <# Returns the first IPv4 address found on the Hyper-V VM network adapter for the given VM. #> function Get-IPv4Address([string] $ComputerName) { $address = Get-VMNetworkAdapter -VMName $ComputerName | Select-Object -ExpandProperty IPAddresses | Where-Object { $_ -Match "\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b" } | Select-Object -First 1 return $address } <# Creates a PSCredential object from a username and plaintext password and returns it to the user. #> function New-PlaintextCredential([string] $Username, [string] $Password) { $passwordString = ConvertTo-SecureString -String $Password -AsPlainText -Force $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username, $passwordString return $credential } <# Spins until the given VM reports an IPv4 address or until it times out. If an address is reported then it will return it; otherwise, it will throw. #> function Invoke-WaitForIPAddress([string] $ComputerName) { $MAX_ATTEMPTS = 10 $DELAY_BETWEEN_ATTEMPTS_SEC = 15 $remainingAttempts = $MAX_ATTEMPTS $computerIPAddress = Get-IPv4Address -ComputerName $ComputerName $remainingAttempts -= 1 while (-not $computerIPAddress -and $remainingAttempts -gt 0) { Write-Warning "($remainingAttempts) Could not find IPv4 address for '$ComputerName'; sleeping for $DELAY_BETWEEN_ATTEMPTS_SEC seconds and trying again" Start-Sleep -Seconds $DELAY_BETWEEN_ATTEMPTS_SEC $computerIPAddress = Get-IPv4Address -ComputerName $ComputerName $remainingAttempts -= 1 } if (-not $computerIPAddress) { throw "VM '$ComputerName' did not report IPv4 address within $($MAX_ATTEMPTS * $DELAY_BETWEEN_ATTEMPTS_SEC) seconds" } return $computerIPAddress }
combined_dataset/train/non-malicious/Get-2011SGScriptingScore.ps1
Get-2011SGScriptingScore.ps1
Function Get-2011SGScriptingScore ([Parameter(Mandatory=$True)][STRING]$Contestant) { $WebClient = New-Object System.Net.WebClient $Results = $WebClient.DownloadString("https://2011sg.poshcode.org/Reports/TopUsers?filter=Beginner")+$WebClient.DownloadString ("https://2011sg.poshcode.org/Reports/TopUsers?filter=Advanced") $meIndex = $results.indexof($Contestant) if($meIndex -eq -1) { write-output "Contestant name `"$Contestant`" not found" } else { $myName = $results.substring($meIndex,$Contestant.Length).trim() $remainingtext = $results.substring($meIndex + $Contestant.length) $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $myscore = $remainingtext.substring(0,$remainingtext.indexof("<")).trim() $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $myScripts = $remainingtext.substring(0,$remainingtext.indexof("<")).trim() $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $remainingtext = $remainingtext.substring($remainingtext.indexof(">")+1) $myRatings = $remainingtext.substring(0,$remainingtext.indexof("<")).trim() write-output "Contestant `"$Myname`" has scored $MyScore points from $MyScripts scripts that have accumulated $MyRatings ratings" } <# .Synopsis Retrieves Scripting Games score data for a given contestant .Description Retrieves HTML from the PoshCode.org site from both the beginning and advanced leaderboards and contatenates the full text output. The text is then searched for the name of the contestant, and relevant data is retrieved using horrible, horrible text matching code. .Parameter Contestant Contestant is a String parameter used to identify the participant in the scripting games. This is a case-insensitive match against the name under which the user registered for the Scripting Games .Example Get-2011SGScriptingScore "ScriptingWife" Contestant "ScriptingWife" has scored 20.88 points from 9 scripts that have accumulated 24 ratings .Example Get-2011SGScriptingScore "NoSuchPlayer" Contestant name "NoSuchPlayer" not found #> }
combined_dataset/train/non-malicious/Set vSphere CDP LinkDisc_1.ps1
Set vSphere CDP LinkDisc_1.ps1
function set-vSwitchLinkDiscovery { Param ( #Switch to enable vSwitch Discovery On [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string] $vSwitchName = "vSwitch0", #Host on which the vSwitch Resides [Parameter(Mandatory=$true,HelpMessage="Need Host Name to connect with")] [string] $VMHost = "NoHostPassed" ) #Param PROCESS{ #Variables $linkProtocol = "cdp" $linkOperation = "both" #Get the specification for the vSwitch $networkview = (get-vmhostnetwork -vmhost $VMHost | get-view) $vSwitchSpec = ($networkView.NetworkConfig.vSwitch | Where {$_.Name -eq $vSwitchName}).Spec #Set Protocol Type and Operation $vSwitchSpec.Bridge.LinkDiscoveryProtocolConfig.protocol = $linkProtocol $vSwitchSpec.Bridge.LinkDiscoveryProtocolConfig.operation = $linkOperation #Commit Changes $networkview.updateVirtualSwitch($vSwitchName,$vSwitchSpec) "Updated " + $VMHost + "'s virtual switch " + $vSwitchName + " to do CDP" } }
combined_dataset/train/non-malicious/sample_18_78.ps1
sample_18_78.ps1
Set-StrictMode -Version Latest Import-Module (Join-Path $PSScriptRoot "Events.psm1") Write-EventLog @EVL_CURTAINAPP -Message "Launching CurtainApp" & $PSScriptRoot\CurtainApp\CurtainApp.exe --timeout 300 --mode "outofpackage" & $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLaunch.ps1 ApplyConfig.ps1 -Arguments "-Context SkypeUser" # Define Constants Set-Variable -Option Constant -Name RetryDelay -Value ([TimeSpan]::FromSeconds(3)) Set-Variable -Option Constant -Name AppLaunchTimeOut -Value ([TimeSpan]::FromMinutes(6)) Set-Variable -Option Constant -Name RepairThresholdInAppLaunchTimeOut -Value ([TimeSpan]::FromMinutes(4)) Set-Variable -Option Constant -Name FirewallTimeOut -Value ([TimeSpan]::FromMinutes(1)) Set-Variable -Option Constant -Name DeviceIdTimeout -Value ([TimeSpan]::FromMinutes(1)) Set-Variable -Option Constant -Name TabTipTimeout -Value ([TimeSpan]::FromMinutes(3)) Set-Variable -Option Constant -Name TabTipRetryDelay -Value ([TimeSpan]::FromSeconds(10)) Set-Variable -Option Constant -Name SrsProcessName -Value "Microsoft.SkypeRoomSystem" Set-Variable -Option Constant -Name RS2_WINDOWS_VERSION_MAJOR -Value 10 Set-Variable -Option Constant -Name RS2_WINDOWS_VERSION_MINOR -Value 0 Set-Variable -Option Constant -Name RS2_WINDOWS_VERSION_BUILD -Value 15063 Set-Variable -Option Constant -Name RS2_WINDOWS_VERSION_REVISION -Value 0 Set-Variable -Option Constant -Name HRESULT_INVALIDOPERATION -Value 0x80131509 # Select the first non-null value from InstallLocation. # # Some Windows implementations of InstallLocation emit an array with a leading # $null value, which Path::Combine interprets as joining a space to the front # the path (which messes up the path's validity). This works around that issue. # # V3 of PowerShell apparently changed how $null is handled in the pipeline -- # try to be very specific about non-null, non-empty values, and picking only the # first one (if more than one happen to ever exist). $installLocation = (Get-AppxPackage Microsoft.SkypeRoomSystem).InstallLocation |? { ![string]::IsNullOrEmpty($_) } | Select-Object -First 1 $firewallRulesAdded = $false if (Test-Path HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem\HasRun) { $firewallRulesAdded = ((Get-Item HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem\HasRun).GetValue("AddTeamsFirewallRules") -ne $null) } $scriptStartTime = [DateTime]::Now while (!$firewallRulesAdded) { Start-Sleep -Milliseconds $RetryDelay.TotalMilliseconds if (Test-Path HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem\HasRun) { $firewallRulesAdded = ((Get-Item HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem\HasRun).GetValue("AddTeamsFirewallRules") -ne $null) } if ([DateTime]::Now.Subtract($scriptStartTime) -gt $FirewallTimeOut) { Write-EventLog @EVLFailure -Message “Firewall rules were never successfully added” break } } $deviceIdGenerated = $false if (Test-Path HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem) { $deviceIdGenerated = ((Get-Item HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem).GetValue("DeviceId") -ne $null) } $deviceIdLoopStartTime = [DateTime]::Now while (!$deviceIdGenerated) { Start-Sleep -Milliseconds $RetryDelay.TotalMilliseconds if (Test-Path HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem) { $deviceIdGenerated = ((Get-Item HKLM:\SOFTWARE\Microsoft\SkypeRoomSystem).GetValue("DeviceId") -ne $null) } if ([DateTime]::Now.Subtract($deviceIdLoopStartTime) -gt $DeviceIdTimeout) { Write-EventLog @EVLFailure -Message “Device Id is never successfully added” break } } if (!(Test-Path "HKCU:\Software\Microsoft\Narrator") -Or ((Get-Item "HKCU:\Software\Microsoft\Narrator").GetValue("KeyboardLayoutMigrationState") -ne "2")) { & reg.exe add "HKCU\Software\Microsoft\Narrator" /v KeyboardLayoutMigrationState /t REG_DWORD /d 2 /f & reg.exe add "HKCU\Software\Microsoft\Narrator" /v KeyboardLayout /t REG_DWORD /d 1 /f Write-EventLog @DisableNarratorPopup } if (!(Test-Path "HKCU:\Software\Microsoft\Narrator\QuickStart") -Or ((Get-Item "HKCU:\Software\Microsoft\Narrator\QuickStart").GetValue("SkipQuickStart") -ne "1")) { & reg.exe add "HKCU\Software\Microsoft\Narrator\QuickStart" /v SkipQuickStart /t REG_DWORD /d 1 /f Write-EventLog @DisableQuickStartNarratorPopup } # Make Sure Skype App is Registered to work around bug 11203792 in RS2 $osVer = [System.Environment]::OSVersion.Version; Write-EventLog @EVLInfo -Message "OS version is $osVer" if (($osVer.Major -eq $RS2_WINDOWS_VERSION_MAJOR) -and ($osVer.Minor -eq $RS2_WINDOWS_VERSION_MINOR) -and ($osVer.Build -eq $RS2_WINDOWS_VERSION_BUILD) -and ($osVer.Revision -eq $RS2_WINDOWS_VERSION_REVISION)) { Write-EventLog @EVLInfo -Message "Performing additional SkypeRoomSystem app registration for RS2" Add-AppxPackage -Register -Path "$($installLocation)\AppxManifest.xml" -DisableDevelopmentMode } # Await OEM script completion (and deletion) prior to starting the environment for the first time. while (Test-Path $Env:SystemDrive\Rigel\AdminHookScripts\OEMFirstRun.ps1) { Write-EventLog @AwaitingOemFirstRun Start-Sleep -Seconds 10 } # Execute OEM OOBE if (Test-Path $Env:SystemDrive\Rigel\AdminHookScripts\OEMOOBE.ps1) { & $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLaunch.ps1 ApplyOEMOOBE.ps1 } # Bring up SRS v2 Shell $skypeLaunched = $False $skypeLaunchedLoopStartTime = [DateTime]::Now while (!$skypeLaunched -and [DateTime]::Now.Subtract($skypeLaunchedLoopStartTime) -lt $AppLaunchTimeOut) { # Start/Restart Explorer gwmi win32_process | where { $_.Path -ieq ([System.IO.Path]::Combine($env:windir, "explorer.exe")) -and $_.getowner().user -ieq "skype" } | foreach-object { # Explorer will restart automatically after being killed Write-EventLog @EVLShellRestart -Message "Terminating current instance of Explorer. It will start back up automatically." Get-Process -Id $_.Handle | Stop-Process -Force & $Env:SystemDrive\Rigel\x64\Scripts\Provisioning\ScriptLaunch.ps1 Config\SetupShell\HideTaskbar.ps1 } # Launch Skype Write-EventLog @EVLAttempt try { start skype-mrx://launch -ErrorAction Stop $skypeLaunched = $True } catch { Write-EventLog @EVLRetry -Message ("App failed to launch error:" + $_.Exception.Message + " HRESULT: " + $_.Exception.HResult) # Attempt to fix app if registration error occurred if (($_.Exception.HResult -eq $HRESULT_INVALIDOPERATION) -and ([DateTime]::Now.Subtract($skypeLaunchedLoopStartTime) -gt $RepairThresholdInAppLaunchTimeOut)) { Write-EventLog @EVLRegistrationError -Message ("Detected app registration error. Attempting manual app registration...") Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.SkypeRoomSystem_8wekyb3d8bbwe Write-EventLog @EVLInfo -Message ("Manual app registration complete") } # Delay before retrying Start-Sleep -Milliseconds $RetryDelay.TotalMilliseconds } } # Verify the app got launched if (!$skypeLaunched) { Write-EventLog @EVLFailure -Message "App failed to successfully launch within the timeout period." & logoff Exit } # Wait for the app to actually start running (using the same overall time constraint for launching) $skypeRunning = $false do { Start-Sleep -Milliseconds $RetryDelay.TotalMilliseconds $skypeRunning = (Get-Process $SrsProcessName) -ne $null } while (!$skypeRunning -and [DateTime]::Now.Subtract($skypeLaunchedLoopStartTime) -lt $AppLaunchTimeOut) # Verify the app actually got to running if (!$skypeRunning) { Write-EventLog @EVLFailure -Message "App launched, but failed to remain up." & logoff Exit } # If the current OS is RS4 or earlier... if ([System.Environment]::OSVersion.Version -lt [version]"10.0.18362.0") { # Fix the TabTip situation. Start by verifying it's gone (or wait until it is) $TabTipWaitStart = [DateTime]::Now $TabTipProcess = (Get-Process TabTip -ErrorAction SilentlyContinue) while ($TabTipProcess -ne $null -and [DateTime]::Now.Subtract($TabTipWaitStart) -lt $TabTipTimeout) { Write-EventLog @EVLLaunchTabTipStillPresent Start-Sleep -Seconds $TabTipRetryDelay.TotalSeconds $TabTipProcess = (Get-Process TabTip -ErrorAction SilentlyContinue) } if ($TabTipProcess -ne $null) { Write-EventLog @EVLLaunchTabTipWaitTimeout Exit } # Restart TabTip.exe try { Start-Process "C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe" -ArgumentList @("/Crashed") -ErrorAction Stop Write-EventLog @EVLLaunchTabTipSucceeded } catch { Write-EventLog @EVLLaunchTabTipFailed Exit } } Write-EventLog @EVLSuccess # Don't terminate. This avoids attempts to re-launch this process, which the shell may try to do if we exit. While ($true) { Start-Sleep (60*60) }
combined_dataset/train/non-malicious/2387.ps1
2387.ps1
$Folder1Path = 'C:\Folder1' $Folder2Path = 'C:\Folder2' $Folder1Files = Get-ChildItem -Path $Folder1Path $Folder2Files = Get-ChildItem -Path $Folder2Path $FileDiffs = Compare-Object -ReferenceObject $Folder1Files -DifferenceObject $Folder2Files $FileDiffs | foreach { $removeParams = @{ 'Path' = $_.InputObject.FullName } if ($_.SideIndicator -eq '<=') { $removeParams.Destination = $Folder2Path } else { $removeParams.Destination = $Folder1Path } Copy-Item @removeParams } $Folder1Path = 'C:\Folder1' $Folder2Path = 'C:\Folder2' $Folder1Files = Get-ChildItem -Path $Folder1Path $Folder2Files = Get-ChildItem -Path $Folder2Path $FileDiffs = Compare-Object -ReferenceObject $Folder1Files -DifferenceObject $Folder2Files $FileDiffs | foreach { Remove-Item -Path $_.InputObject.FullName }
combined_dataset/train/non-malicious/Add-SqlTable_6.ps1
Add-SqlTable_6.ps1
try {add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop} catch {add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo"} try {add-type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop} catch {add-type -AssemblyName "Microsoft.SqlServer.Smo"} ####################### function Get-SqlType { param([string]$TypeName) switch ($TypeName) { 'Boolean' {[Data.SqlDbType]::Bit} 'Byte[]' {[Data.SqlDbType]::VarBinary} 'Byte' {[Data.SQLDbType]::VarBinary} 'Datetime' {[Data.SQLDbType]::DateTime} 'Decimal' {[Data.SqlDbType]::Decimal} 'Double' {[Data.SqlDbType]::Float} 'Guid' {[Data.SqlDbType]::UniqueIdentifier} 'Int16' {[Data.SQLDbType]::SmallInt} 'Int32' {[Data.SQLDbType]::Int} 'Int64' {[Data.SqlDbType]::BigInt} 'UInt16' {[Data.SQLDbType]::SmallInt} 'UInt32' {[Data.SQLDbType]::Int} 'UInt64' {[Data.SqlDbType]::BigInt} 'Single' {[Data.SqlDbType]::Decimal} default {[Data.SqlDbType]::VarChar} } } #Get-SqlType ####################### <# .SYNOPSIS Creates a SQL Server table from a DataTable .DESCRIPTION Creates a SQL Server table from a DataTable using SMO. .EXAMPLE $dt = Invoke-Sqlcmd2 -ServerInstance "Z003\\R2" -Database pubs "select * from authors"; Add-SqlTable -ServerInstance "Z003\\R2" -Database pubscopy -TableName authors -DataTable $dt This example loads a variable dt of type DataTable from a query and creates an empty SQL Server table .EXAMPLE $dt = Get-Alias | Out-DataTable; Add-SqlTable -ServerInstance "Z003\\R2" -Database pubscopy -TableName alias -DataTable $dt This example creates a DataTable from the properties of Get-Alias and creates an empty SQL Server table. .NOTES Add-SqlTable uses SQL Server Management Objects (SMO). SMO is installed with SQL Server Management Studio and is available as a separate download: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ceb4346f-657f-4d28-83f5-aae0c5c83d52 Version History v1.0 - Chad Miller - Initial Release v1.1 - Chad Miller - Updated documentation v1.2 - Chad Miller - Add loading Microsoft.SqlServer.ConnectionInfo v1.3 - Chad Miller - Added error handling v1.4 - Chad Miller - Add VarCharMax and VarBinaryMax handling v1.5 - Chad Miller - Added AsScript switch to output script instead of creating table v1.6 - Chad Miller - Updated Get-SqlType types #> function Add-SqlTable { [CmdletBinding()] param( [Parameter(Position=0, Mandatory=$true)] [string]$ServerInstance, [Parameter(Position=1, Mandatory=$true)] [string]$Database, [Parameter(Position=2, Mandatory=$true)] [String]$TableName, [Parameter(Position=3, Mandatory=$true)] [System.Data.DataTable]$DataTable, [Parameter(Position=4, Mandatory=$false)] [string]$Username, [Parameter(Position=5, Mandatory=$false)] [string]$Password, [ValidateRange(0,8000)] [Parameter(Position=6, Mandatory=$false)] [Int32]$MaxLength=1000, [Parameter(Position=7, Mandatory=$false)] [switch]$AsScript ) try { if($Username) { $con = new-object ("Microsoft.SqlServer.Management.Common.ServerConnection") $ServerInstance,$Username,$Password } else { $con = new-object ("Microsoft.SqlServer.Management.Common.ServerConnection") $ServerInstance } $con.Connect() $server = new-object ("Microsoft.SqlServer.Management.Smo.Server") $con $db = $server.Databases[$Database] $table = new-object ("Microsoft.SqlServer.Management.Smo.Table") $db, $TableName foreach ($column in $DataTable.Columns) { $sqlDbType = [Microsoft.SqlServer.Management.Smo.SqlDataType]"$(Get-SqlType $column.DataType.Name)" if ($sqlDbType -eq 'VarBinary' -or $sqlDbType -eq 'VarChar') { if ($MaxLength -gt 0) {$dataType = new-object ("Microsoft.SqlServer.Management.Smo.DataType") $sqlDbType, $MaxLength} else { $sqlDbType = [Microsoft.SqlServer.Management.Smo.SqlDataType]"$(Get-SqlType $column.DataType.Name)Max" $dataType = new-object ("Microsoft.SqlServer.Management.Smo.DataType") $sqlDbType } } else { $dataType = new-object ("Microsoft.SqlServer.Management.Smo.DataType") $sqlDbType } $col = new-object ("Microsoft.SqlServer.Management.Smo.Column") $table, $column.ColumnName, $dataType $col.Nullable = $column.AllowDBNull $table.Columns.Add($col) } if ($AsScript) { $table.Script() } else { $table.Create() } } catch { $message = $_.Exception.GetBaseException().Message Write-Error $message } } #Add-SqlTable
combined_dataset/train/non-malicious/PSTUtility_1.psm1.ps1
PSTUtility_1.psm1.ps1
#============================================================================= # # PST Utilities - For Discovery, Import, Removal # # Dan Thompson # dethompson71 at live dot com # # This collection of tools for importing PSTs has been pieced together # over many months of trial and error. # # Goal is to get PST files off the user's home share and into an archive mailbox. # # Throughout these scripts, what Microsoft calls a "Personal Archive" and # "Archive Mailbox," we call an "Online PST" or "Online Archive PST." # All these terms are the same thing. # # We used the name "Online PST" due to the user's fear of the word "Archive" # # They thought we were pushing their mail down some hole and they would # never see it again. "Online PST" is more friendly and helps them understand # the overall goal. Once we started importing PSTs for users, others saw the # increased quota, as well as seeing the mail in OWA, and many requests # started pouring in. # # All part of our evil plan to erradicate PST files. ;) # # The reason we created these scripts and made particular choices are detailed here: # http://powershellatwork.blogspot.com/2012/01/enterprise-wide-pst-import-beginnings.html # # Yes, we know about the tool PST Capture, but it just wasn't going to work for us. # # requires Quest Powershell Commands for Active Directory # (Active Roles Management Shell) # http://www.quest.com/powershell/activeroles-server.aspx # # I don't claim any of this to be perfect or work for every person out of the # box. You will certainly have to modify some settings to begin using this set # of tools in your environment. # # I hope someone can use this as a starting point if they are in a # similar situation. # # I also suggest you at least try PST Capture first. It did not work for me for # varous reasons. Your mileage may vary. # # #============================================================================= #============================================================================= # File Locations: PSTImportJobQueue; ReportJobQueue; PSTFileLogQueue #============================================================================= #====> TO DO -- add your servername and drive location $Script:PSTServer = '<ServerBIOSName>' # example 'Ex01' $Script:PSTDrive = '<drive>' # admin share example: 'd$' $Script:PSTShareDir = '\\\\' + $Script:PSTServer + '\\PSTImports' #Exchange servers must have rights to this share $Script:PSTUNCDir = '\\\\' + $Script:PSTServer + '\\' + $Script:PSTDrive + '\\Web\\Data\\pstimports' #UNC path to same share $Script:CASConnectLogDir = '\\\\' + $Script:PSTServer + '\\' + $Script:PSTDrive + '\\Web\\Data\\CASConnectLogs' # where 'Connect' logs are kept $Script:ReportsUNCDir = '\\\\' + $Script:PSTServer + '\\' + $Script:PSTDrive + '\\Web\\Data\\Current' #UNC path to report results $Script:PSTQueueFile = $Script:PSTShareDir + '\\PSTImportJobQueue.csv' $Script:PSTCompeletDir = $Script:PSTShareDir + '\\^Completed' # so it always shows at the top $Script:PSTCompleteFile = $Script:PSTShareDir + '\\PSTImportCompleteQueue.csv' # Completed PST Import Jobs $Script:NotifiedFile = $Script:PSTShareDir + '\\PSTImportJobNotified.txt' # Users who have been notified $Script:ArchReportFile = $Script:PSTUNCDir + '\\ArchiveReport.csv' # The daily archive report (also a webpage) $Script:ArchPSTFile = $Script:PSTUNCDir + '\\ArchivePSTHistory.csv' # history of PSTs owned by Archive Mailbox users $Script:MoveFileLog = $Script:PSTUNCDir + '\\MovePSTFIles-' + $Script:T + '.log' # the Move log created when run $Script:AllPSTFileLog = $Script:PSTUNCDir + '\\AllPSTHistory.csv' # the history of ALL PST files discovered # always shows at the bottom of directory listings $Script:ImportQueueFileBU = $Script:PSTShareDir + '\\ZZSavedQueueLogs\\PSTImportJobQueue' + "-" + $Script:TE + ".csv" # backup of ImportQueue $Script:CompleteQueueFileBU = $Script:PSTShareDir + '\\ZZSavedQueueLogs\\PSTImportCompleteQueue' + "-" + $Script:TE + ".csv" #backup of Completed Jobs $Script:ArchReportFileBU = $Script:PSTUNCDir + '\\ZZSavedQueueLogs\\ArchiveReport-' + $Script:TE + '.csv' #back up of a report that is generated daily? $Script:ArchPSTFileBU = $Script:PSTUNCDir + '\\ZZSavedQueueLogs\\ArchivePSTHistory-' + $Script:TE + '.csv' # back up of ArchiveMailboxOwners PSTs $Script:AllPSTFileLogBU = $Script:PSTUNCDir + '\\ZZSavedQueueLogs\\AllPSTHistory-' + $Script:TE + '.csv' # backup of history of ALL psts discovered #============================================================================= # Variables #============================================================================= # This site name is used to determine what tool is used to copy files. # Copy-item is used for local PST files; BITS is used for distant files. $Script:LocalADSite = 'HQ' $Script:PSTUtilityVersion = "14.1.20121015" $Script:MinRunJobs = 9 # minimum jobs running before we start more - 0 means no jobs can be running $Script:MaxRunJobs = 19 # how many job can run at once $Script:FreeSpaceLimit = 199471 # set in MB, the lowest you want free space to go on the Import Share $Script:T = Get-Date -Format yyyyMMdd # today $Script:TE = Get-Date -Format yyyyMMddhhmmss # today extended $Script:SMTPServer = "smtpserver.domain.com" # where to send $Script:AdminEmail = "admin1@domain.com, admin2@domain.com" # gets notified, sent daily summary report email $Script:BossEmail = "boss@domain.com" # send daily report on Wednesday only (Weekly Summary Report) $Script:FromEmail = "EmailTeam@domain.com" # from address of reports to porcessed users $Script:FromReportEmail = "PSTReports@domain.com" # from Address of manager's summary reports #============================================================================= # these are all the people that have applications which generate and process .PST files # but are Java configuration files. Not Mail. Ignore anything not in an "Outlook" directory # --> Add DisplayName of user... $Script:SpecialPeople = @("<DisplayName1>","<Displayname2>") #============================================================================= # These users will be ignored and not 'messed with' # There will be some ;) $Script:IgnoreUsers = @("<DisplayName1>","<DisplayName2>") #============================================================================= # Job Objects: PSTJob; ReportJob; PSTFileLog #============================================================================= Function New-PSTFileLogObject(){ <# .SYNOPSIS Return a new object to track a PST file. .DESCRIPTION Return a new object to track a PST file. This is created for each new PST discovered for any user #> $PSTObj = New-Object PSObject $PSTObj | Add-Member -type NoteProperty -name UNCFullPathName -value (0) $PSTObj | Add-Member -type NoteProperty -name LastWriteTime -value ("") $PSTObj | Add-Member -type NoteProperty -name Size -value (0) $PSTObj | Add-Member -type NoteProperty -name IgnoreFile -value ("FALSE") $PSTObj | Add-Member -type NoteProperty -name DateRemoved -value ("") $PSTObj | Add-Member -type NoteProperty -name BackupFolksNotified -value ("FALSE") $PSTObj | Add-Member -type NoteProperty -name AgeInDays -value (0) $PSTObj } Function Get-ArchPSTIndex ($PST=$null) { <# .SYNOPSIS Creates or finds an index number for PST name. .DESCRIPTION Creates or finds an index number for PST name. Uses the full UNC path for index building #> $Return = $null` If ($Script:PSTIndex.ContainsKey($PST.VersionInfo.FileName)) { # return the Index number $Return = $PSTIndex.Item($PST.VersionInfo.FileName) } Else { # not found so this is a never before see file # create the entry for the file $PSTLog = New-ArchPSTFileLogObject $PSTLog.UNCFullPathName = $PST.VersionInfo.FileName $Script:ArchPSTQueue += $PSTLog # create the index and add it to $Script:PSTIndex.Add($PSTLog.UNCFullPathName,$Script:ArchPSTQueue.Count) $Return = $Script:ArchPSTQueue.Count } $Return } Function New-ArchPSTFileLogObject(){ <# .SYNOPSIS Return a new object to track PST file. .DESCRIPTION Return a new object to track a PST file. This is created for each new PST discovered for any users with an Archive Mailbox #> $PSTObj = New-Object PSObject $PSTObj | Add-Member -type NoteProperty -name UNCFullPathName -value (0) $PSTObj | Add-Member -type NoteProperty -name LastWriteTime -value ("") $PSTObj | Add-Member -type NoteProperty -name Size -value (0) $PSTObj | Add-Member -type NoteProperty -name IgnoreFile -value ("FALSE") $PSTObj | Add-Member -type NoteProperty -name DateChecked -value ("") $PSTObj | Add-Member -type NoteProperty -name BackupFolksNotified -value ("FALSE") $PSTObj | Add-Member -type NoteProperty -name AgeInDays -value (0) $PSTObj | Add-Member -type NoteProperty -name AcctName -value ("") $PSTObj | Add-Member -type NoteProperty -name Dept -value ("") $PSTObj | Add-Member -type NoteProperty -name Server -value ("") $PSTObj | Add-Member -type NoteProperty -name DateDiscovered -value (Get-date) $PSTObj | Add-Member -type NoteProperty -name DateCreated -value ("") $PSTObj } Function Get-PSTFileIndex ($PST=$null) { <# .SYNOPSIS Creates or finds an index number for PST name. .DESCRIPTION Creates or finds an index number for PST name. Uses the full UNC path for index building #> $Return = $null` Write-Host "Enter [Get-PSTFileIndex]: $(($PST).VersionInfo.FileName) Count: $(($Script:AllPSTQueue).Count)" If ($Script:PSTIndex.ContainsKey($PST.VersionInfo.FileName)) { # return the Index number $Return = $Script:PSTIndex.Item($PST.VersionInfo.FileName) Write-Host "Found [Get-PSTFileIndex]: $($Return)" } Else { # not found so this is a never before seen file # create the entry for the file $PSTLog = New-PSTFileLogObject $PSTLog.UNCFullPathName = $PST.VersionInfo.FileName Write-Host "Fullname $(($PSTLog).UNCFullPathName)" Write-Host "Before: " $PSTLog $Script:AllPSTQueue += $PSTLog Write-host "After: " $Script:AllPSTQueue[-1] # create the index and add it to #$Script:PSTIndex.Add($_.UNCFullPathName,$i) $Script:PSTIndex.Add($PSTLog.UNCFullPathName,($Script:AllPSTQueue).Count-1) Write-Host "Added? : " $Script:PSTIndex.Get_item($PSTLog.UNCFullPathName) $Return = ($Script:AllPSTQueue).Count -1 Write-host "Try to reindex in: " $Script:AllPSTQueue[($Return)] Write-Host "Add [Get-PSTFileIndex]: $($Return)" } Write-Host "Leave [Get-PSTFileIndex]" $Return } Function New-PSTJobObject() { <# .SYNOPSIS Object for storing information about a PST Import Job. .DESCRIPTION Object for storing information about a PST Import Job. A user many have many Jobs, one for each PST file being imported. #> $PSTJob = New-Object PSObject # User Related $PSTJob | Add-Member -type NoteProperty -name JobName -value ("") # <userobj>-<filename> $PSTJob | Add-Member -type NoteProperty -name JobStatus -value ("") # <> $PSTJob | Add-Member -type NoteProperty -name UserMBX -value ("") # DisplayName $PSTJob | Add-Member -type NoteProperty -name UserEmail -value ("") # PrimarySMTPAddress $PSTJob | Add-Member -type NoteProperty -name UserObj -value ("") # NTAccopuntName $PSTJob | Add-Member -type NoteProperty -name HomeDir -value ("") # from QADuser $PSTJob | Add-Member -type NoteProperty -name ClientVer -value ("") # from CAS logs if found $PSTJob | Add-Member -type NoteProperty -name ClientVerOK -value ("") # True/False # User PC Related $PSTJob | Add-Member -type NoteProperty -name IP -value ("") # ComputerName, IP, or None (order of preference) $PSTJob | Add-Member -type NoteProperty -name OSname -value ("") # X, 7, or none # PST File Related $PSTJob | Add-Member -type NoteProperty -name ProcessFile -value ($True) # for potentially turning off one PST in a group $PSTJob | Add-Member -type NoteProperty -name OrgFileName -value ("") # should be file name only $PSTJob | Add-Member -type NoteProperty -name OrgUNCName -value ("") # UNC file name Original location $PSTJob | Add-Member -type NoteProperty -name TargetDir -value ("") # target directory for creation $PSTJob | Add-Member -type NoteProperty -name TargetUNCName -value ("") # UNC file name Target location $PSTJob | Add-Member -type NoteProperty -name FileSize -value (0) # file size in MB $PSTJob | Add-Member -type NoteProperty -name FileLastWrite -value ("") # last write time of file # Migration Related $PSTJob | Add-Member -type NoteProperty -name TargetDB -value ("") # target archive mailbox location $PSTJob | Add-Member -type NoteProperty -name MRServer -value ("") # which MRS server to use - depends on AD site $PSTJob | Add-Member -type NoteProperty -name LastNumBI -value (0) # from results, how many bad items did we encounter? $PSTJob | Add-Member -type NoteProperty -name UseTargetRootFolder -value ($true) # True/False $PSTJob | Add-Member -type NoteProperty -name TargetRootFolder -value ("") # True/False $PSTJob | Add-Member -type NoteProperty -name JobCreationTime -value ($null) # Update Related $PSTJob | Add-Member -type NoteProperty -name LastCheckTime -value ($null) # last time this entry processed $PSTJob | Add-Member -type NoteProperty -name InProgressTime -value ($null) # from results $PSTJob | Add-Member -type NoteProperty -name OverAllTime -value ($null) # from results $PSTJob | Add-Member -type NoteProperty -name ExpandedErrs -value ($null) # any encountered errors $PSTJob | Add-Member -type NoteProperty -name RegPSTGrow -value ($false) # has been added to group for GPO to PSTDisableGrow?- my signal this user is complete - check membership $PSTJob | Add-Member -type NoteProperty -name SkipReason -value ("") # when a file is skipped, Size, Age, or Failed $PSTJob } Function New-PSTReportObj (){ <# .SYNOPSIS PST Report Object for tracking the progress of PST migration. .DESCRIPTION PST Report Object for tracking the progress of users with an Archive Mailbox and their progress at removing PST files from their home drives. #> $ReportObj = New-Object PSObject # OverallUser Info $ReportObj | Add-Member -type NoteProperty -name DisplayName -value ("") # PST Information $ReportObj | Add-Member -type NoteProperty -name InUsePST -value (0) $ReportObj | Add-Member -type NoteProperty -name HDrvPST -value (0) $ReportObj | Add-Member -type NoteProperty -name HDrvSize -value (0) $ReportObj | Add-Member -type NoteProperty -name ImpPST -value (0) $ReportObj | Add-Member -type NoteProperty -name ImpSize -value (0) $ReportObj | Add-Member -type NoteProperty -name TotalSize -value (0) $ReportObj | Add-Member -type NoteProperty -name SkippedPST -value (0) $ReportObj | Add-Member -type NoteProperty -name DaysSinceImport -value (0) $ReportObj | Add-Member -type NoteProperty -name GPO -value ("") $ReportObj | Add-Member -type NoteProperty -name '-' -value ("") # General MBX INfo $ReportObj | Add-Member -type NoteProperty -name MBXDB -value ("") $ReportObj | Add-Member -type NoteProperty -name ArchDB -value ("") $ReportObj | Add-Member -type NoteProperty -name MBXSize -value (0) $ReportObj | Add-Member -type NoteProperty -name MBXQuota -value (0) $ReportObj | Add-Member -type NoteProperty -name ArchSize -value (0) $ReportObj | Add-Member -type NoteProperty -name ArchQuota -value (0) $ReportObj | Add-Member -type NoteProperty -name InitArchSize -value (0) $ReportObj | Add-Member -type NoteProperty -name ArchGrowth -value (0) $ReportObj | Add-Member -type NoteProperty -name DateCreated -value ((Get-Date)) $ReportObj } Function Reset-PSTBackupFileNames () { <# .SYNOPSIS Reset Backup file names to current time .DESCRIPTION Reset them all so that you'll be guaranteed to have the correct name each time #> $Script:TE = Get-Date -Format yyyyMMddhhmmss # today extended $Script:ImportQueueFileBU = $Script:PSTShareDir + '\\ZZSavedQueueLogs\\PSTImportJobQueue' + "-" + $Script:TE + ".csv" $Script:CompleteQueueFileBU = $Script:PSTShareDir + '\\ZZSavedQueueLogs\\PSTImportCompleteQueue' + "-" + $Script:TE + ".csv" $Script:ArchReportFileBU = $Script:PSTUNCDir + '\\ZZSavedQueueLogs\\ArchiveReport-' + $Script:TE + '.csv' $Script:ArchPSTFileBU = $Script:PSTUNCDir + '\\ZZSavedQueueLogs\\ArchivePSTHistory-' + $Script:TE + '.csv' $Script:AllPSTFileLogBU = $Script:PSTUNCDir + '\\ZZSavedQueueLogs\\AllPSTHistory-' + $Script:TE + '.csv' } #============================================================================= # Helper Functions #============================================================================= Function CC () { <# .SYNOPSIS a utility to return the count of members in a collection .DESCRIPTION a utility to return the count of members in a collection 0, 1, or many ... #> Param ( $Col ) if ($Col) { if ($Col.Count -eq $null) { $Cnt = 1 } Else { $Cnt = $Col.Count } } Else { $Cnt = 0 } $Cnt } Function isMemberOf() { <# .SYNOPSIS A utility to check if a mailbox is a member of a group. .DESCRIPTION A utility to check if a mailbox is a member of a group. #> Param ( [string] $groupName, [string] $MemberName # displayname ) $m = Get-QADGroupMember $groupName -SizeLimit 0 | where { $_.Displayname -eq $memberName } if($m) {$true} else {$false} } Function WhoAmI () { <# .SYNOPSIS sometimes you want to know who is running this job ;) .DESCRIPTION ometimes you want to know who is running this job ;) #> ([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name } Function Get-ISODayOfWeek { <# .SYNOPSIS Get the correct (according to ISO 8601) day of the week .DESCRIPTION For any given date you get the day of the week, according to ISO8610 .PARAMETER Date The date you want to analyze. Accepts dates on the pipeline #> Param([DateTime]$date=$(Get-Date)) Process { if($_){$date=$_} @(7,1,2,3,4,5,6)[$date.DayOfWeek] } } Function Get-FreeDiskSpace($drive,$computer) { <# .SYNOPSIS Utility to discover the free space of a drive .DESCRIPTION Utility to discover the free space of a drive Used to decide if there is enough space to copy a PST file to either the Temp processing area, or to the local PC for backup. #> $driveData = Get-WmiObject -class win32_LogicalDisk -computername $computer -filter "Name = '$drive'" #"$computer free disk space on drive $drive" "{0:n2}" -f ($driveData.FreeSpace/1MB) } Function ConvertTo-ComputerName() { <# .SYNOPSIS Resolve the IP to a computer name .DESCRIPTION CAS logs record IP address for a user, but those can change over time resolve the IP to a computer name to save in the PST Job Queue - try to look up in DNS - 90% of time this will be an IP #> Param ( $FindName ) $Return = $null $ErrorActionPreference = "SilentlyContinue" $c = [System.Net.Dns]::GetHostbyAddress($FindName).HostName $ErrorActionPreference = "Continue" if ($c) { $Return = ($c.Split(".")[0]).ToUpper() } Else { $Return = $FindName } $Return } Function ConvertTo-IP () { <# .SYNOPSIS Lookup IP using the ComputerName .DESCRIPTION CAS logs record IP address for a user, but those can change over time resolve the IP to a computer name to save in the PST Job Queue #> Param ($FindName) $Return = $null $ErrorActionPreference = "SilentlyContinue" $c = [System.Net.Dns]::GetHostEntry($FindName).Addresslist[0].ToString() $ErrorActionPreference = "Continue" if ($c) { $Return = ($c.Split(".")[0]).ToUpper() } Else { $Return = $FindName } $Return } Function Clean-OnlinePSTGPO(){ <# .SYNOPSIS Clear up GPO group and make sure it has only the correct members .DESCRIPTION Clear up GPO group and make sure it has only the correct members .Notes In our world, there are 2 types of PST file users: Controled and Non-Controlled Controled Users: New users created after a certain date (1FEB2012) and Users migrated to Online PSTs Non-Controlled Users: Those users created befor 1FEB2012 and not having been migrated. Eventually the Non-Controlled user will disappear. At least, we can hope. #> $GPO = get-group 'GPO-ReadOnlyPST' | select -ExpandProperty Members $GPO | %{ Write-Host "Working " $_.ToString() $Dumpable = $false $Reason = "None" $MBX = get-mailbox $_.ToString() # Does User even have a mailbox? if(! (($MBX).DataBase.Name)) { $Dumpable = $true $Reason = "NoMailbox" } Elseif (!(($MBX).ArchiveDataBase.Name)) { #Has Mailbox but No Archive if ((get-date '2/1/2012') -gt (get-date ($MBX).WhenMailboxCreated)){ $Dumpable = $true $Reason = "No archive and 2/1/2012 is greater than " + $(($MBX).WhenMailboxCreated) } } if ($Dumpable){ #remove them from the group (GPO). Write-Host "Removing: " ($MBX).Displayname " - " $Reason Remove-QADGroupMember -Identity 'GPO-ReadONlyPST' -Member $_.ToString() } } # "{0,30}`t{1,10}`t{2,25}" -f (($MBX).DataBase.Name), (($MBX).ArchiveDataBase.Name),((get-date '2/1/2012') -gt ($MBX).WhenMailboxCreated)} } #============================================================================= # User Obj Functions - Done #============================================================================= Function Add-ToGPO ($User = $null) { <# .SYNOPSIS Add user to a group that defines scope of GPO to Disallow PST Growth .DESCRIPTION In our organization our GPO that disallows PST growth is governed by a group during the transition, later we can apply that setting worldwide. For users to be comfortable, they need to Read their old PST files They can then check our work for themselves. #WarmAndFuzzyFactor These skipped users are legal discovery people that need to continue to create PSTs as they gather info for Lawyer types. #> if ($User) { if (-not ($Script:IgnoreUser -contains (get-mailbox $User).SamAccountName)) { Add-QADGroupMember -Identity 'gpo-ReadonlyPST' -Member (get-mailbox $User).SamAccountName } } } Function Adjust-Quota ($User = $null) { <# .SYNOPSIS Make sure people are not hit by a quota during their transition. .DESCRIPTION Make sure people are not hit by a quota during their transition Set new quota to 500MB -- unless theie quota is already huge #> if ($User) { $MBX = get-mailbox $User # what is current quota $UsingDBQuotas = $MBX.UseDatabaseQuotaDefaults if ($UsingDBQuotas -eq $True){ $Database = Get-MailboxDatabase -Identity $MBX.Database $ProhibitSendQuota = $Database.ProhibitSendQuota.value.ToMB() -as [Int] $IssueWarningQuota = $Database.IssueWarningQuota.value.ToMB() -as [Int] } Else { $ProhibitSendQuota = $MBX.ProhibitSendQuota.value.ToMB() -as [Int] $IssueWarningQuota = $MBX.IssueWarningQuota.value.ToMB() -as [Int] } $NewProhibitSendQuota = 500 -as [int] $NewIssueWarningQuota = 450 -as [int] # this has bit me b4, so changed it to "-as [int]" above for better results if($NewIssueWarningQuota -gt $IssueWarningQuota) { Set-Mailbox -Identity $MBX -UseDatabaseQuotaDefaults:$False -ProhibitSendQuota 500MB -IssueWarningQuota 450MB -ProhibitSendReceiveQuota "Unlimited" } } } Function Get-ClientAccessUserLog () { <# .SYNOPSIS Discover a user's Client and IP information. .DESCRIPTION Discover a user's client and IP information. Script uses this function too. There is also nightly process that runs which gets all the "connect" log entries for OUTLOOK.EXE. It's run overnight. Initially we were looking at all the logs and that was very teadious. Now we search an already created subset. It's best to pass in the LegacyExchangeDN and SAMAccountName from the mailbox object from testing it seems to get better results right now using both There is no way of knowing where this user logged in so we must search all CAS servers until we find a "connect" entry and pass the full line back Also users can log in from many PCs -- we only want the most used so look thru the full day and get all info you can, then group by IP and take the one with the most connects. alas, sometimes you won't find anything ... #> param ( $DisplayName = $null, $SamName = $null, $LegacyName = $null, $IP = $null, $SearchDays = 14, [switch]$Quiet ) #----------------------------------------------------------------- $Results = @() If($DisplayName) { #ignore all the other cmdline entries and use this to grab those $MB = Get-SingleMailboxObject $DisplayName $LegacyName = $MB.LegacyExchangeDN $SamName = $MB.SamAccountName } Elseif ($IP) { $LegacyName = $IP } $Days = -1 Do { $Y = Get-Date $((get-date).adddays($Days)) -Format yyyyMMdd if (!($Quiet)) {Write-Host "Searching "$Y} if(Test-path ($Script:CASConnectLogDir + "\\olConnect-"+$Y+"*")) { $tmpResults = gc (gci ($Script:CASConnectLogDir + "\\olConnect-"+$Y+"*")) | ?{($_ -match ($LegacyName + ",")) -and ($_ -match ",,Outlook") -and ($_ -match "Connect,")} #Write-Verbose "Found: [$($tmpResults.count)]" if($tmpResults) { $tmpResults | %{$Results += $_} } } $Days-- } While (!($Results) -And ($Days -gt ($SearchDays * (-1)))) if ($Results) { #split the line(s) found into Name, Version, and IP, and mode $c = $Results | %{"{0};{1};{2};{3}" -f $_.Split(",")[3],$_.Split(",")[6],$_.Split(",")[8],$_.Split(",")[7]} # this will sort the ips to the most common one, ie: users logs into 6 machines, # but 1 was 12 times and all the others was 1 each, we get the 12 times $d = $c | %{if($_.split(";")[2]){$_.Split(";")[2]}} | group -NoElement | sort -Descending if($d){ #Just give me the entries with my most common IP $e = $c | ?{$_ -match $d.Values} } #return what you found... if ($e.count) { # Returning 1st entry in array with ips $e[0] } Elseif ($e) { # Returning only entry with ip $e } Else { if ($c.count) { # Returning 1st entry in array with no IP $c[0] } Else { # Returning only entry with no IP $c } } } } Function Get-MRServer ($MBX = $null) { <# .SYNOPSIS Pick an MRSServer in the same AD Site as the destination MBX Database. .DESCRIPTION If you are using deticated CAS servers to import the PST files use this function to pick the correct one. Pick the wrong MRServer and the Import will never start - here I pick the an MR Server in the Same AD Site using the CAS as a guide we have dediticated "pst import" CAS servers. We are chosing the One CAS server we have designated to heap many request upon so we don't effect user's normal performance on production CAS servers. .NOTES We have since moved all our live copies of each Archive Mailboxdatabase to the same AD site. It is also possible to skip this step, and let exchange pick a cas server. Depends on how much you are moving and how you feel that will effect your users See "Import-PSTFromShare" #> #--------------------------------------------------------------------- $Return = $null # If ($MBX) { # if (((get-mailboxdatabase $mbx.database.Name).RpcClientAccessServer) -match "^ad01") { # $Return = "cas02.domain.com" # } Else { # $Return = "cas04.domain.com" # } # } # ====> TO DO ==== # you will need to replace this with your cas server # or adjust the code above to pick the correct one $Return = "cas02.domain.com" $Return } Function Get-OutlookEXEVersion () { <# .SYNOPSIS Discover the version of Outlook on a PC .DESCRIPTION Discover the version of Outlook on a PC There are many version and many people do not have a compatible version with Exchange 2010 Archive Mailbox #> param( $ComputerName = $null ) $OL = $Null if($ComputerName) { if (Test-Connection -ComputerName $ComputerName -Quiet -Count 1) { Write-Verbose "Trying $ComputerName" If ( Test-path ('\\\\' + $ComputerName + '\\C$\\Program Files (x86)\\Microsoft Office\\Office14\\outlook.exe')) {# office 2010 (32b) on 64bit Write-Verbose "Office 2010 on 64bit" $OL = gci ('\\\\' + $ComputerName + '\\c$\\Program Files (x86)\\Microsoft Office\\Office14\\outlook.exe') } ElseIf (Test-path ('\\\\' + $ComputerName + '\\c$\\Program Files\\Microsoft Office\\Office14\\outlook.exe')) { # office 2010 on 32bit Write-Verbose "Office 2010" $OL = gci ('\\\\' + $ComputerName + '\\c$\\Program Files\\Microsoft Office\\Office14\\outlook.exe') } ElseIf (Test-path ('\\\\' + $ComputerName + '\\c$\\Program Files\\Microsoft Office\\Office12\\outlook.exe')) { # office 2007 Write-Verbose "Office 2007" $OL = gci ('\\\\' + $ComputerName + '\\c$\\Program Files\\Microsoft Office\\Office12\\outlook.exe') } Else { #check to see if this is (oh my god!) a 2003 client if (Test-Path ('\\\\' + $ComputerName + '\\c$\\Program Files\\Microsoft Office\\OFFICE11\\outlook.exe')) { Write-Verbose "Office 2003" $OL = gci ('\\\\' + $ComputerName + '\\c$\\Program Files\\Microsoft Office\\OFFICE11\\outlook.exe') } Else { Write-Verbose "Can't determine Outlook version [$ComputerName]" } } } Else { Write-Warning "[$ComputerName] is not responding" } } Else { Write-Verbose "missing computername [$ComputerName]" } $OL.VersionInfo.ProductVersion } Function Get-SingleMailboxObject($Name = $null) { <# .SYNOPSIS Return a single mailbox .DESCRIPTION Since we are importing mail and humans can be error prone, make absolutely sure we only get one hit on the requested mailbox #> #----------------------------------------------------------------- $ReturnMBX = $null if ($Name) { $MBX = get-mailbox $Name -EA 0 if (!($MBX.Count)) { # is it less than two? if ($MBX) { # is it more than zero $ReturnMBX = $MBX # Return the one } } } $ReturnMBX } Function New-OnlineArchiveByJob($JobObj = $null) { <# .SYNOPSIS Based on Job information, give user Online PST feature. .DESCRIPTION If this job's user is not enabled for online archive then create one in the smallest database. The smallest DB was determined during the "add-PSTImportQueue" ($JobObj.TargetDB) #> $Return = $false if ($JobObj) { $MBXObj = Get-SingleMailboxObject $JobObj.UserEmail #Write-Verbose "User DisplayName : $($mbxObj).Displayname) Derived from $($JobObj.UserEmail)" # this will either fail, create, or do nothing ;) Enable-Mailbox -Archive -Identity $mbxObj -ArchiveDatabase ($JobObj.TargetDB) -ArchiveName $('Online PST - ' + ($mbxObj).Displayname) -ea 0 # just a buffer sleep -Seconds 5 # Adjust Quota so this user is not prohibited during migration Adjust-Quota $MBXObj # reload to capture changes $MBXObj = Get-SingleMailboxObject $JobObj.UserEmail If ($MBXObj.ArchiveDatabase) { $Return = $true #Write-Verbose "User has Archve!" } Else { $Return = $false #Write-Verbose "User has NO Archve!" } } $Return } Function Test-OutlookClientVersion ($V = $null) { <# .SYNOPSIS Test Oulook.exe version .DESCRIPTION older outlook clients can't see the "Online Archive" so flag those users who need an upgrade 12.0.6550.5000 is the minimum level - buggy 12.0.6607.xxxx is Office 2007 SP3 -- preferred level there are search bugs in earlier versions 14.0.6109.5005 is outlook 14 patched to Nov 8, 2011 14.0.6117.5xxx is patched thru April 2012 -- preferred #> $VOK = $False if($V) { if ($V.Split(".")[0] -eq 14) { # Outlook 2010 (32bit) 14.0.4760.1000 if ($V.Split(".")[2] -ge 4760) {$VOK = $true} } Elseif ($V.Split(".")[0] -eq 12) { # Outlook 2007 (32bit) 12.0.6550.5000 (or above) if ($V.Split(".")[2] -ge 6550) {$VOK = $true} } } $VOK } #============================================================================= # PST File Functions #============================================================================= Function Copy-PSTtoImportShare($Path=$Null, $Dest=$null){ <# .SYNOPSIS copy the pst to our share folder .DESCRIPTION Copy the pst to our share folder using Copy-item in the same local AD site works fine. Using BITS when copying over WAN lines #> $Result = "Fail" # Copied or Error(s) #Write-Verbose "Copy From: $Path To: $Dest" if($Path -and $Dest ) { $NewFile = Copy-Item -Path $Path -Destination $Dest -PassThru if ($NewFile){ $Result = "Copied" } Else { # return the last error $Result = $error[0].Exception Write-Verbose "Copy ResultFrom: $($error[0].Exception)" } } $Result } Function Copy-PSTusingBITS ($JobObj = $null) { <# .SYNOPSIS copy the pst to our share folder .DESCRIPTION Copy the pst to our share folder using Copy-item in the same local AD site works fine. Using BITS when copying over WAN lines #> $Result = $false if ($JobObj) { $params = @{ Source = ($Jobobj.OrgUNCName) Destination = ($Jobobj.TargetUNCName) Description = ("Online PST BITS Copy") DisplayName = ($JobObj.JobName) Asynchronous = $true Priority = "Normal" } $Result = Start-BitsTransfer @params } $Result = $null sleep 2 $Result = Get-BitsTransfer | Where-Object { $_.DisplayName -eq ($ThisJob.JobName) } $Result } Function Get-PSTFileList() { <# .SYNOPSIS Discover PST Files in folders .DESCRIPTION Discover PST Files in folders .NOTES - Some AD objects do not have a home directory - Allowed for some results of *.pst being directories #> param( $Homedir = $null, $PCIP = $null, $SearchPC = $false, $OS = $null, $UN = $null, $SourceDir=$null ) $HDFiles = $null $PCFIles = $null #Write-Verbose "Get-PSTFileList $HomeDir $PCIP $SearchPC $OS $UN" # assuming SourceDir is a specific target dir if(!($SearchPC) -and $SourceDir) { Write-host "`t-> Override HomeDir: $HomeDir to $SourceDir" $Homedir = $SourceDir } If ($Homedir){ if(Test-Path $HomeDir) { Write-Verbose "`t`t-> Searching $HomeDir" # ensure this is an array even if we have only one entry [array]$HDFiles = gci -path $HomeDir -Filter '*.pst' -Recurse -Force -EA 0 | ?{$_.PSIsContainer -eq $false} } } if($SearchPC -and $PCIP) { if(Test-Connection $PCIP -Count 1 -Quiet) { $PCDir = $null if($SourceDir) { $PCDir = $SourceDir } Else { if($OS -match "7") { Write-Verbose "`t`t-> Searching Windows7 PC $UN" $PCDir = $("\\\\" + $PCIP + "\\C$\\Users\\" + $UN + "\\AppData\\Local\\Microsoft\\Outlook") } Elseif ($OS -match "XP") { Write-Verbose "`t`t-> Searching WindowsXP PC $UN" $PCDir = $("\\\\" + $PCIP + "\\C$\\Documents And Settings\\" + $UN) } Else { #we don't know OS, so test them and see which flies Write-Verbose "`t`t-> OS not known, testing for OS :" if(Test-Path ("\\\\" + $PCIP + "\\C$\\Users\\" + $UN + "\\AppData\\Local\\Microsoft\\Outlook")) { Write-Verbose "`t`t-> Try Windows7" $PCDir = "\\\\" + $PCIP + "\\C$\\Users\\" + $UN + "\\AppData\\Local\\Microsoft\\Outlook" } Elseif (Test-Path ("\\\\" + $PCIP + "\\C$\\Documents And Settings\\" + $UN)){ Write-Verbose "`t`t-> Try WindowsXP" $PCDir = $("\\\\" + $PCIP + "\\C$\\Documents And Settings\\" + $UN) } Else { Write-Verbose "`t`t-> OS Unknown" $PCDir = $("\\\\" + $PCIP + "\\c$") } } } #if have a legit dir or just the whole c drive ... Write-Verbose "`t`t-> Searching $PCDir" If(Test-Path $PCDir) { [array]$PCFIles = gci -path ($PCDir) -Filter '*.pst' -Recurse -Force -EA 0 | ?{$_.PSIsContainer -eq $false} } } Else { Write-Output ("`t-> $PCIP is not responding.") } } if($HDFiles -and $PCFIles){ $Files = $HDFiles + $PCFIles } Elseif ($HDFiles -and (-not $PCFIles)){ $Files = $HDFiles } Elseif ((-not $HDFiles) -and $PCFIles){ $Files = $PCFIles } Else { $Files = $null } $Files } Function Import-PSTFromShare($JobObj){ <# .SYNOPSIS import into the Archive mailbox .DESCRIPTION import into the Archive mailbox .NOTES We found that 99% of the people wanted to keep their data separate after the import, just like it was in their PST files, so UseTargetRootFolder was defaulted to true in the NEw-PSTJobObject function We check here for false. #> $Return = "Failed" $Error.Clear | Out-Null $MBXName = $JobObj.UserObj $User = $JobObj.UserObj.Split("\\")[1] $File = $JobObj.TargetUNCName $JobName = $JobObj.JobName $CAS = $JobObj.MRServer if ($JobObj.TargetRootFolder) { $Folder = $JobObj.TargetRootFolder } Else { $Folder = $JobObj.OrgFileName } Write-Debug "$MBXName -Name $JobName -Batchname $USER -MRSServer $CAS -TargetDB $JobObj.TargetDB" # import the pst #======= TO DO ============ # remove the -MRSServer $CAS - if you want Exchange to choose the CAS server every time. if($JobObj.UseTargetRootFolder -eq "TRUE") { $PSTQueued = New-MailboxImportRequest -Name $JobName -BatchName $USER -Mailbox "$MBXName" -FilePath "$File" -IsArchive -MRSServer $CAS -BadItemLimit 9999 -AcceptLargeDataLoss -Confirm:$false -targetrootfolder $Folder } Else { $PSTQueued = New-MailboxImportRequest -Name $JobName -BatchName $USER -Mailbox "$MBXName" -FilePath "$File" -IsArchive -MRSServer $CAS -BadItemLimit 9999 -AcceptLargeDataLoss -Confirm:$false } If($PSTQueued) { $Return = $PSTQueued.Status } Else { $Return = $Error[0].ToString() } sleep -Seconds 5 $Return } Function Move-PSTToLocal ($IP=$null, $PSTFiles=$null, $SamAcct=$null, $IgnoreAge=$False) { <# .SYNOPSIS clear PST files off the Home shares .DESCRIPTION The botton line of this project is to clear PST files off the Home shares If the PST file has been imported the file itself has become a backup and as such is safe to put on the local PC of the user. .NOTES Move PSTs If this is a windows 7 box and has 2010 this might be the place to put them \\\\172.18.20.1\\c$\\Users\\<user>\\Documents\\Outlook Files but this is good for XP \\\\172.18.20.1\\c$\\D9ocuments and Settings\\<user>\\My Docuemtns\\Outlok Files If this user is in a far away place, then do NOT push the data back to the PC #> Write-Host "Starting = Who:($SamAcct), Count:($(($PSTFiles).Count)), Computer:($IP)" $HQUser = $true $Region = (get-mailbox $SamAcct).CustomAttribute2 If (($Region -eq "Asia") -or ($Region -eq "Europe")) {$HQUser = $false} if ($IP -eq "None") {$IP = $null} if($IP -and $PSTFIles -and $SamAcct -and $HQUser) { #make sure we can ping the PC Write-Host $("$SamAcct; Starting Move-PSTFiles $(get-date)") $("$SamAcct; Starting Move-PSTFiles $(get-date)") >> $Script:MoveFileLog if (Test-Connection -ComputerName $IP -Quiet){ Write-Host $("$SamAcct; Connect to $IP passed") $("$SamAcct; Connect to $IP passed") >> $Script:MoveFileLog # both return MB $AvailableSpace = [int](get-freediskspace 'c:' $IP)/2 $PSTFiles = $PSTFiles | Sort Length $PSTSize = (($PSTFIles | Measure-Object Length -sum).Sum)/(1024*1024) $OldPSTSize = ((($PSTFIles | ?{$_.LastWriteTime -le (get-date ((get-date).adddays(-90))) } | Measure-Object Length -sum).Sum)/(1024*1024)) $Continue = $false if (Test-Path $('\\\\' + $IP + '\\c$\\users\\' + $SamAcct)) { # Put them in this dir structure, create or use Outlook Files dir $LocalBU = $('\\\\' + $IP + '\\c$\\users\\' + $SamAcct+ '\\Documents\\Outlook Files') if (!(Test-Path $LocalBU)){ mkdir $LocalBU } $Continue = $true Write-Host $("$SamAcct; Connect to $IP passed") $("$SamAcct; LocalBU is $LocalBU") >> $Script:MoveFileLog } Elseif (Test-Path $('\\\\' + $IP + '\\c$\\documents and settings\\' + $SamAcct)) { # Put them in this dir structure, create or use Outlook Files dir $LocalBU = $('\\\\' + $IP + '\\c$\\documents and settings\\' + $SamAcct + '\\Outlook Files') if (!(Test-Path $LocalBU)){ mkdir $LocalBU } $Continue = $true Write-Host $("$SamAcct; LocalBU is $LocalBU") $("$SamAcct; LocalBU is $LocalBU") >> $Script:MoveFileLog } Else { # crap! i give up... #I hope i have the right IP -- log it Write-Host "Can not find a secure directory for $SamAcct" $Continue = $false $("$SamAcct; LocalBU is Can not find a secure directory; Fail") >> $Script:MoveFileLog } if ($Continue) { # move the files $FileNames = @() $PSTFiles | %{ $ThisPST = $_ $FN = $ThisPST.Name $PSTBackups = $LocalBU $FileAge = (((get-date) - ($ThisPST.LastWriteTime)).Days) Write-Host "Working: $FN" Write-Host "(($AvailableSpace) -gt ($PSTSize))" Write-Host "IgnoreAge is $IgnoreAge" if($AvailableSpace -gt $PSTSize) { # there is enough space on the drive to hanlde all the PSTs If($IgnoreAge) { # if we are moving a lot of files, many can be named the same, as in backups and crap like that # so allow by adding a random number to the filename if($FileNames -contains $FN -or (Test-Path $($PSTBackups + "\\" + $FN))){ #rename it in the move $rn = "{0:00}" -f (Get-Random -maximum 10000) [string]$FN = $ThisPST.Name.Split(".")[0] + "-" + $RN + "." + ($ThisPST.Name.Split(".")[1]) $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } Else { # Just Move It Move It $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } } Else { #don't move if younger than 30 days If ($ThisPST.LastWriteTime -le (get-date ((get-date).adddays(-30)))){ #meaning it's older, so move it # if we are moving a lot of files, many can be named the same, as in backups and crap like that # so allow by adding a random number to the filename if($FileNames -contains $FN -or (Test-Path $($PSTBackups + "\\" + $FN))){ #rename it in the move $rn = "{0:00}" -f (Get-Random -maximum 10000) [string]$FN = $ThisPST.Name.Split(".")[0] + "-" + $RN + "." + ($ThisPST.Name.Split(".")[1]) $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } Else { # Just Move It Move It $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct;Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } } Else { # file is too young $("$SamAcct; Age [$($FileAge)] Skipping due to Age<30 $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Skipping due to Age<30 $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" } } } Else { # there is NOT enough space on the drive to handle all the PSTs # Psts are sorted by smallest to largest so do what you can $AvailableSpace = [int](get-freediskspace 'c:' $IP)/2 $PSTSize = (($ThisPST | Measure-Object Length -sum).Sum)/(1024*1024) If($AvailableSpace -gt $PSTSize) { Write-Host "(($AvailableSpace) -gt ($PSTSize))" If($IgnoreAge) { # if we are moving a lot of files, many can be named the same, as in backups and crap like that # so allow by adding a random number to the filename if($FileNames -contains $FN -or (Test-Path $($PSTBackups + "\\" + $FN))){ #rename it in the move $rn = "{0:00}" -f (Get-Random -maximum 10000) [string]$FN = $ThisPST.Name.Split(".")[0] + "-" + $RN + "." + ($ThisPST.Name.Split(".")[1]) $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } Else { # Just Move It Move It $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } } Else { #don't move if younger than 90 days If ($ThisPST.LastWriteTime -le (get-date ((get-date).adddays(-30)))){ #meaning it's older, so move it # if we are moving a lot of files, many can be named the same, as in backups and crap like that # so allow by adding a random number to the filename if($FileNames -contains $FN -or (Test-Path $($PSTBackups + "\\" + $FN))){ #rename it in the move $rn = "{0:00}" -f (Get-Random -maximum 10000) [string]$FN = $ThisPST.Name.Split(".")[0] + "-" + $RN + "." + ($ThisPST.Name.Split(".")[1]) $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } Else { # Just Move It Move It $PSTBackups = $PSTBackups + "\\" + $FN $("$SamAcct; Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog Write-Host "Age [$($FileAge)] Moving $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)" #Read-Host "Continue" Move-Item -Path $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups) } } Else { # file is too young $("$SamAcct; Age [$($FileAge)] Skipping due to Age<30 $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog } } } Else { $("$SamAcct; Age [$($FileAge)] Skipping due to AvailableSpace $($ThisPST.VersionInfo.Filename) -Destination $($PSTBackups)") >> $Script:MoveFileLog } } $FileNames += $FN } } Else { Write-Host "No Files Moved." $("$SamAcct; No Files Moved.") >> $Script:MoveFileLog } } Else { Write-Host "Computer [$IP] seems dead" $("$SamAcct; Computer [$IP] seems dead.") >> $Script:MoveFileLog } } Else { if (!($PSTFiles)) { Write-Host "No PST Files found." $("$SamAcct; No PST Files found.") >> $Script:MoveFileLog } Else { Write-Host "Bad Parameters or Not CONUS User." $("$SamAcct; Bad Parameters or Not CONUS User.") >> $Script:MoveFileLog } } } #============================================================================= # PST Queue Functions #============================================================================= Function Format-JobStatus($JobObj) { <# .SYNOPSIS Query the queue for info on a particular user. .DESCRIPTION Query the queue for info on a particular user. Count the number of jobs in each status category, incoming JobObj is a collection. #> # # # # $JobsCount = 0 $StatusNew = 0 $StatusCopied = 0 $StatusBITS = 0 $StatusInQueue = 0 $StatusImported = 0 $StatusCleanedup = 0 $StatusNotified = 0 $LastError = $null $JobSize = 0 $StatusSkipped = 0 $JobObj | %{ $ClientOK = $_.ClientVerOK $UName = $_.UserMBX $TargetDB = $_.TargetDB $a = [int]($_.FileSize) $JobSize += $a $skip=$false if(($_.ProcessFile -eq "FALSE")){$Skip=$true} Switch ($_.JobStatus) { New { if(($Skip)){$StatusSkipped++} Else {$StatusNew++} } NewBits { if(($Skip)){$StatusSkipped++} Else {$StatusNew++} } Copied {$StatusCopied++} InBits {$StatusBITS++} InQueue {$StatusInQueue++} Imported {$StatusImported++} CleanedUp {$StatusCleanedup++} Notified {$StatusNotified++} } $JobsCount++ } $StatusEntry = New-Object PSObject $StatusEntry | Add-Member -type NoteProperty -name Name -value ($UName) $StatusEntry | Add-Member -type NoteProperty -name Client -value ($ClientOK) $StatusEntry | Add-Member -type NoteProperty -name Size -value ($JobSize) $StatusEntry | Add-Member -type NoteProperty -name Jobs -value ($JobsCount) $StatusEntry | Add-Member -type NoteProperty -name New -value ($StatusNew) $StatusEntry | Add-Member -type NoteProperty -name Skip -value ($StatusSkipped) $StatusEntry | Add-Member -type NoteProperty -name BITS -value ($StatusBITS) $StatusEntry | Add-Member -type NoteProperty -name Copied -value ($StatusCopied) $StatusEntry | Add-Member -type NoteProperty -name InQue -value ($StatusInQueue) $StatusEntry | Add-Member -type NoteProperty -name Imptd -value ($StatusImported) $StatusEntry | Add-Member -type NoteProperty -name ClndUp -value ($StatusCleanedup) $StatusEntry | Add-Member -type NoteProperty -name Notifd -value ($StatusNotified) $StatusEntry | Add-Member -type NoteProperty -name Target -value ($TargetDB) #$StatusEntry | Add-Member -type NoteProperty -name Errors -value ($LastError) $StatusEntry } Function Get-ArchDB() { <# .SYNOPSIS Find the smallest Archive mailbox database .DESCRIPTION Find the smallest Archive mailbox database, not necesarily the smallest now, but even after all the current jobs are processed #> #get current sizes - include or exclude certain DBs $ArchSize = @{} # get all database that Start with "arch", 3 digits, and end with character "b-z" like "Arch101B" for example # excluding arch102* for now, no more users there... (get-mailboxdatabase |?{$_.name -match 'arch\\d{3}[acdef]' -and $_.name -notmatch 'arch102'} | Get-MailboxDatabase -Status) | %{$ArchSize.Add($_.Name, $_.DatabaseSize.ToMB())} # need to account for pending items... if($OldJobQueue) { $OldJobQueue | %{ $tmp = $ArchSize.item($_.TargetDB) $Tmp += [int]$_.FileSize $ArchSize.remove($_.TargetDB) $ArchSize.add($_.TargetDB, $tmp) } } # return the smallest one ($ArchSize.GetEnumerator() | sort Value)[0].Name } Function Lock-PSTIQ() { <# .SYNOPSIS Signal the queue file is in use by creating a file. .DESCRIPTION Signal the queue file is in use by creating a file. #> if(!(Test-PSTIQLock)) {$a = New-Item $($Script:PSTUNCDir + '\\PSTImportQueue.Lock') -itemtype "file"} } Function New-TargetPSTDirectory($MBX = $null) { <# .SYNOPSIS Create a directory to hold the PST file while they are importing. .DESCRIPTION Create a directory to hold the PST file while they are importing. These psts are deleted at the end, but reports for each PST file are left in the directory. #> $Return = "Error" If ($MBX) { $dir = $Script:PSTShareDir + "\\" + $MBX.samaccountname if(!(Test-Path $dir)) { $newdir = ni -ItemType Directory -Path $dir } Else { $Return = $dir } } #Test new dir and make sure it's there If($newdir) { $Return = (resolve-path $newdir).ProviderPath } $Return } Function Test-PSTIQLock () { <# .SYNOPSIS Test to see if PST Import Queue is in use. .DESCRIPTION Test to see if PST Import Queue is in use. #> Test-Path $($Script:PSTUNCDir + '\\PSTImportQueue.Lock') } Function Unlock-PSTIQ() { <# .SYNOPSIS Remove the lock when the PST Import Queue is no longer in use. .DESCRIPTION Remove the lock when the PST Import Queue is no longer in use. #> if(Test-PSTIQLock) {Remove-Item $($Script:PSTUNCDir + '\\PSTImportQueue.Lock')} } #============================================================================= # Send Notification Functions #============================================================================= Function Send-NotificationInitialReport($JobObj) { <# .SYNOPSIS Send the User a notification of PST files found and the work to be done. .DESCRIPTION Send the User a notification of PST files found and the work to be done. Incoming JobObj will give us the information we needed to the report. #> $AllProcessFiles = $JobObj | ?{$_.ProcessFile -eq $true} $AllSkippedJobs = $JobObj | ?{$_.ProcessFile -ne $true} $JobObj | %{$User = $_.UserMBX; $CLOK = $_.ClientVerOK } Write-Host $User Write-Host $CLOK $Subject = "Requested PST Import: Initial Report for " + $User $From = "EmailTeam@domain.com" $Body = "Note: This process will not delete or alter your original PSTs in any way.`n" if ($JobObj.ClientVer -match "^14.") { $Body = $Body + "Your offline PST files will be copied into your new " + '"Archive - ' + $JogObj.UserEmail + '"' + " folder in Outlook.`n" } Else { $Body = $Body + "Your offline PST files will be copied into your new " + '"Online PST"' + " folder in Outlook.`n" } $Body = $Body + "`n" $Body = $Body + "The copy may take a few nights to complete. The process will start tonight about 7PM (1900). `n" $Body = $Body + "`t- Do not add any messages to your PSTs during this process.`n" $Body = $Body + "`t- Please shut down Outlook before leaving each night.`n" $Body = $Body + "`t- You do not need to turn off your PC.`n" $Body = $Body + "`n" $Body = $Body + "You will be notified when the copies are complete.`n" $Body = $Body + "`n" # you may want to comment this out, or create one of your own #$Body = $Body + "Click below to read the FAQ about Online PSTs." #$Body = $Body + "`n" #$Body = $Body + '"' + 'http://<link to self help doc on sharepoint> #$Body = $Body + "`n" $Body = $Body + "Once you see your new Online PST, use it as you would any PST.`n" $Body = $Body + "`n" $Body = $Body + "The procedure for finding your PST files has finished and found " + $JobObj.Count + " files. The ones scheduled for import, are:`n`n" #location of How to remove password on PST #"`n(http://office.microsoft.com/en-us/outlook-help/remove-a-password-from-a-personal-folders-file-pst-HA001151725.aspx)" if ($AllProcessFiles) { $NUm = 0 $tmp = $null $tmp = "{0,3}`t{1,-25}`t{2}`t`t{3}`n" -f ("Num"),("FileName"),("Size"),("Directory") $Body = $Body + $tmp $AllProcessFiles | %{ $NUm++ $To = $_.UserEmail $temp = '"' + (split-path $_.OrgUNCName) + '"' $temp1 = $_.OrgFileName $tempS = $_.FileSize $tmp = $null $tmp = "{0,3}`t{1,-25}`t({2,7} M)`t{3}`n" -f ($Num),($temp1),($tempS), ($temp) $Body = $Body + $tmp } } Else { $Body = $Body + "(None)" } $Body = $Body + "`n`nSkipped Files: `n" if($AllSkippedJobs) { $NUm = 0 $tmp = $null $tmp = "{0,3}`t{1,6}`t{2,-25}`t{3}`t`t{4}`n" -f ("Num"),("Reason"),("FileName"),("Size"),("Directory") $Body = $Body + $tmp $AllSkippedJobs | %{ $NUm++ $To = $_.UserEmail $temp = '"' + (split-path $_.OrgUNCName) + '"' $temp1 = $_.OrgFileName $tempS = $_.FileSize $skip = $_.SkipReason $tmp = $null $tmp = "{0,3}`t{1,6}`t{2,-25}`t({3,7} M)`t{4}`n" -f ($Num),($skip),($temp1),($tempS),($temp) $Body = $Body + $tmp } } Else { $Body = $Body + "(None)" } $Body = $Body + "`n`n" $Body = $Body + "Files are skipped due to either size (empty file) or not opened by Outlook in the last 2 years.`n" $Body = $Body + "Files also can be skipped if they look like Backups (BU) or Sharepoint Lists (SP).`n" $Body = $Body + "(Skipping files is just a suggestion. You can opt to include them.)`n" if($JobObj.Count){ $Body = $Body + "`n[Run on: " + $(Hostname) + "; Client is " + (($JobObj)[0].ClientVerOK) + " " + (($JobObj)[0].ClientVer) + "]["+(($JobObj)[0].IP)+"]["+(($JobObj)[0].OSName)+"]" } Else { $Body = $Body + "`n[Run on: " + $(Hostname) + "; Client is " + (($JobObj).ClientVerOK) + " " + (($JobObj).ClientVer) + "]["+(($JobObj).IP)+"]["+(($JobObj).OSName)+"]" } If ($NoNotify) { Send-MailMessage -Body $body -From $From -SmtpServer $Script:SMTPServer -Subject $Subject -To $Script:AdminEmail } Else { Send-MailMessage -Body $body -To $To -From $From -SmtpServer $Script:SMTPServer -Subject $Subject -cc $Script:AdminEmail #Send-MailMessage -Body $body -To $JobObj.UserEmail -From $From -SmtpServer $Script:SMTPServer -Subject $Subject } } Function Send-NotificationFinalReport($JobObj) { <# .SYNOPSIS Send User the Final report detailing the work done. .DESCRIPTION Send User the Final report detailing the work done. #> $AllProcessFiles = $JobObj | ?{$_.ProcessFile -eq "TRUE"} $AllSkippedJobs = $JobObj | ?{$_.ProcessFile -eq "FALSE"} if($JobObj.Count) { $Subject = "Requested PST Import: Final Results for: " + $JobObj[0].UserMBX $ClientVer = $JobObj[0].ClientVer $Email = $($JobObj[0].UserEmail.ToString()) } Else { $Subject = "Requested PST Import: Final Results for: " + $JobObj.UserMBX $ClientVer = $JobObj.ClientVer $Email = $($JobObj.UserEmail.ToString()) } $From = "EmailTeam@domain.com" $Body = "The process for copying your PST files has finished. Please take a few moments to complete the final steps:`n" $Body = $Body + "`n" if ($ClientVer -match "^14." -or $ClientVer -match "Ignore") { $Body = $Body + "`t1. Review messages in the " + '"Archive - ' + $Email + '"' + " folder in Outlook and confirm all have been copied correctly.`n" } Else { $Body = $Body + "`t1. Review messages in the " + '"Online PST"' + " folder in Outlook and confirm all have been copied correctly.`n" } #$Body = $Body + "`t1. Review messages in the " + '"Online PST - <yourname>" or "Archive - <yourname>"' + " folder in Outlook and confirm all have been copied correctly.`n" $Body = $Body + "`t2. Disconnect the old PSTs from Outlook. (right click the name and choose: Close <pstname>)`n" $Body = $Body + "`t3. Restart Outlook - to release the lock on the file.`n" $Body = $Body + "`t4. Move the old PST files from your Home Drive (H:\\) to a local drive. This will improve your Outlook performance!`n" $Body = $Body + "`t (For example, create a directory in " + '"My Documents"' + " called " + '"Outlook Files"' + " and move the files listed below from your H:\\ to the new Outlook Files directory.)`n" if ($ClientVer -match "^14." -or $ClientVer -match "Ignore") { $Body = $Body + "`t5. Begin storing messages in your " + '"Archive - ' + $Email + '"' + " folder instead of your old PSTs.`n" } Else { $Body = $Body + "`t5. Begin storing messages in your " + '"Online PST"' + " folder instead of your old PSTs.`n" } #$Body = $Body + "`n`tFor detailed instructions, click this link:`n" #$Body = $Body + "`n`t" + '"http://<sharepointsite>/Self-Help/Standard Application Issues/How do I Disconnect My Personal Folders.pdf"' + "`n" #$Body = $Body + "`n" $Body = $Body + "`tNote: Remember you can read your old PSTs at any time. In a few days you will not be able to add any new emails to these old PST files.`n" $Body = $Body + "`t You are now using the Online PST instead.`n" $Body = $Body + "`n" $Body = $Body + "`nThe files which can be moved off your home drive:`n" $Body = $Body + "`n" $Body = $Body + "`nIf you need assistance or have any questions, simply reply-all to this email.`n" $Body = $Body + "`n" $Body = $Body + "Imported Files:`n" $NUm = 0 $tmp = "{0,3}`t{1,-40}`t{2,-35}`t{3}`t{4}`n" -f ("Num"),("FileName"),("Target Folder"),("Size"),("Directory") $Body = $Body + $tmp $AllProcessFiles | %{ $NUm++ $To = $_.UserEmail $temp = '"' + (split-path $_.OrgUNCName) + '"' $temp1 = $_.OrgFileName $tempS = $_.FileSize $tempT = $_.TargetRootFolder $tmp = $null $tmp = "{0,3}`t{1,-40}`t{2,-35}`t({3,7} M)`t{4}`n" -f ($Num),($temp1),($tempT),($tempS),($temp) $Body = $Body + $tmp } $Body = $Body + "`n`nSkipped Files:`n" if($AllSkippedJobs) { $NUm = 0 $tmp = $null $tmp = "{0,3}`t{1,6}`t{2,-40}`t{3}`t`t{4}`n" -f ("Num"),("Reason"),("FileName"),("Size"),("Directory") $Body = $Body + $tmp $AllSkippedJobs | %{ $NUm++ $To = $_.UserEmail $temp = '"' + (split-path $_.OrgUNCName) + '"' $temp1 = $_.OrgFileName $tempS = $_.FileSize $skip = $_.SkipReason $tmp = $null $tmp = "{0,3}`t{1,6}`t{2,-40}`t({3,7} M)`t{4}`n" -f ($Num),($skip),($temp1),($tempS),($temp) $Body = $Body + $tmp } } Else { $Body = $Body + "(None) " } #$Body = $Body + "`n`nIf you have any questions, reply to this email." $Body = $Body + "`n" $Body = $Body + "`Thank You -- The Email Group" $Body = $Body + "`n" if($JobObj.Count){ $Body = $Body + "`n[Run on: " + $(Hostname) + "; Client is " + (($JobObj)[0].ClientVerOK) + " " + (($JobObj)[0].ClientVer) + "]["+(($JobObj)[0].IP)+"]["+(($JobObj)[0].OSName)+"]" } Else { $Body = $Body + "`n[Run on: " + $(Hostname) + "; Client is " + (($JobObj).ClientVerOK) + " " + (($JobObj).ClientVer) + "]["+(($JobObj).IP)+"]["+(($JobObj).OSName)+"]" } Send-MailMessage -Body $body -To $To -From $From -SmtpServer $Script:SMTPServer -Subject $Subject -Cc $Script:AdminEmail } Function Send-NotificationPSTRemoval() { <# .SYNOPSIS Send user a report showing the files that are still 'connected' to Outlook .DESCRIPTION Send user a report showing the files that are still 'connected' to Outlook Connected means the LastWriteTime was within the last 24 hours. User gets this email every 14 days as a reminder to disconnect their Old PST files and optionaly remove those PST files from Home Share. #> #------------------------------------------------------------------------ Param( $ArchObj, [array]$PSTFilesInUse, [array]$PSTFilesALL, [array]$PSTFilesMovable ) $Subject = "Online PST -- Possible Outlook Issue : " + $ArchObj.DisplayName + " (" + $ArchObj.DaysSinceImport + ")" $From = "EmailTeam@domain.com" $To = $((get-mailbox $ArchObj.DisplayName).PrimarySMTPAddress.ToString()) $CC = $Script:AdminEmail [int]$InUse = cc $PSTFilesInUse; Write-Verbose "[SendNotification] Inuse - $InUse" [int]$AllPSTs = cc $PSTFilesALL; Write-Verbose "[SendNotification] AllPST - $AllPSTs" [int]$Movable = cc $PSTFilesMovable; Write-Verbose "[SendNotification] AllPST - $AllPSTs" #grab this user's latest client version $Vers = (import-csv $Script:PSTCompleteFile | ?{$_.UserMBX -match ($ArchObj.DisplayName)} | sort LastCheckTime -Descending) If ($Vers.Count) { $ClientVer = $Vers[0].ClientVer } Else { If ($Vers){ $ClientVer = $Vers.ClientVer } Else { $ClientVer = "Ignore" } } Write-Verbose "[SendNotification] $(($ArchObj).DisplayName) : Client Ver is $($ClientVer)" If ($ClientVer -match "^14." -or $ClientVer -match "Ignore") { $Archive =
combined_dataset/train/non-malicious/sample_35_64.ps1
sample_35_64.ps1
# # Script module for module 'Az.ApiManagement' that is executed when 'Az.ApiManagement' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 05/16/2024 06:33:06 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { if ((Get-PSDrive 'HKLM' -ErrorAction Ignore) -and (-not (Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -ErrorAction Stop | Get-ItemPropertyValue -ErrorAction Stop -Name Release | Where-Object { $_ -ge 461808 }))) { throw ".NET Framework versions lower than 4.7.2 are not supported in Az. Please upgrade to .NET Framework 4.7.2 or higher." } } catch [System.Management.Automation.DriveNotFoundException] { Write-Verbose ".NET Framework version check failed." } } function Preload-Assembly { param ( [string] $AssemblyDirectory ) if($PSEdition -eq 'Desktop' -and (Test-Path $AssemblyDirectory -ErrorAction Ignore)) { try { Get-ChildItem -ErrorAction Stop -Path $AssemblyDirectory -Filter "*.dll" | ForEach-Object { try { Add-Type -Path $_.FullName -ErrorAction Ignore | Out-Null } catch { Write-Verbose $_ } } } catch {} } } if ($true -and ($PSEdition -eq 'Desktop')) { if ($PSVersionTable.PSVersion -lt [Version]'5.1') { throw "PowerShell versions lower than 5.1 are not supported in Az. Please upgrade to PowerShell 5.1 or higher." } Test-DotNet } if ($true -and ($PSEdition -eq 'Core')) { if ($PSVersionTable.PSVersion -lt [Version]'6.2.4') { throw "Current Az version doesn't support PowerShell Core versions lower than 6.2.4. Please upgrade to PowerShell Core 6.2.4 or higher." } } if (Test-Path -Path "$PSScriptRoot\StartupScripts" -ErrorAction Ignore) { Get-ChildItem "$PSScriptRoot\StartupScripts" -ErrorAction Stop | ForEach-Object { . $_.FullName } } # [windows powershell] preload assemblies # [windows powershell] preload module alc assemblies $preloadPath = (Join-Path $PSScriptRoot -ChildPath "ModuleAlcAssemblies") Preload-Assembly -AssemblyDirectory $preloadPath if (Get-Module AzureRM.profile -ErrorAction Ignore) { Write-Warning ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") throw ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") } $module = Get-Module Az.Accounts if ($module -ne $null -and $module.Version -lt [System.Version]"3.0.0") { Write-Error "This module requires Az.Accounts version 3.0.0. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for troubleshooting information." -ErrorAction Stop } elseif ($module -eq $null) { Import-Module Az.Accounts -MinimumVersion 3.0.0 -Scope Global } Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.dll) Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement.dll) if (Test-Path -Path "$PSScriptRoot\PostImportScripts" -ErrorAction Ignore) { Get-ChildItem "$PSScriptRoot\PostImportScripts" -ErrorAction Stop | ForEach-Object { . $_.FullName } } $FilteredCommands = @('Backup-AzApiManagement:ResourceGroupName','New-AzApiManagement:ResourceGroupName','Remove-AzApiManagement:ResourceGroupName','Restore-AzApiManagement:ResourceGroupName') if ($Env:ACC_CLOUD -eq $null) { $FilteredCommands | ForEach-Object { $existingDefault = $false foreach ($key in $global:PSDefaultParameterValues.Keys) { if ($_ -like "$key") { $existingDefault = $true } } if (!$existingDefault) { $global:PSDefaultParameterValues.Add($_, { if ((Get-Command Get-AzContext -ErrorAction Ignore) -eq $null) { $context = Get-AzureRmContext } else { $context = Get-AzContext } if (($context -ne $null) -and $context.ExtendedProperties.ContainsKey("Default Resource Group")) { $context.ExtendedProperties["Default Resource Group"] } }) } } } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD501exX+KjqCp1 # nLASjim95JC1CygEnkLZnk0o5TxNIqCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwA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g9Rm0vi24YNluHagjuUJDwUbAJdHI9VtNdxrVIouYEwTBRxf4a # TgTyr0yF0NC5dFPaB/4NpwD/QoWOhb8nZeyH2oG8GLtHXPKGeTUgCHveCoX/vQUp # i5HULJ9M/Oa5u2mXAB2r6/92ncklg4T18ISbG9u/CRsqQZ9kgUMB4fi2zjrlBgC+ # 2bpt7IyZj5bQXllQLJdyglF5Ma8A5fV3LHZHM41LEr87dj/bAJPASqBJEMut/Grs # o2kB7Jz+OlYiVddmXdF/GF2c2Z5250R20pMfCV8FatYrW+Nhk4y5X3XA4Ad+Jwd2 # MmvJ # SIG # End signature block
combined_dataset/train/non-malicious/sample_6_68.ps1
sample_6_68.ps1
#************************************************ # DC_ServerManagerLogs.ps1 # Version 1.0.1 # Date: 01-04-2011 # Author: Andre Teixeira - andret@microsoft.com # Description: This script can be used to obtain server manager related logs #************************************************ PARAM($MachineName=$ComputerName, $Path="") if($Path -ne "") { $SkipRunningExe =$true } else { $Path = $Env:windir } if ($OSVersion.Build -gt 6000) { Import-LocalizedData -BindingVariable ServerManagerStrings Write-DiagProgress -Activity $ServerManagerStrings.ID_ServerManagerInfo -Status $ServerManagerStrings.ID_ServerManagerObtaining if ((Get-CimInstance -Class Win32_ComputerSystem).DomainRole -gt 1) { #Server $sectionDescription = $ServerManagerStrings.ID_ServerManagerOutputDesc $filesToCollect = "$Path\logs\ServerManager.log" if (test-path $filesToCollect) { $filesDescription = $ServerManagerStrings.ID_ServerManagerLogOutput if (test-path $FilesToCollect) { CollectFiles -filesToCollect $filesToCollect -fileDescription $filesDescription -sectionDescription $sectionDescription -renameOutput $true -MachineNamePrefix $MachineName } } if($SkipRunningExe -ne $true) { if (test-path "$Path\system32\servermanagercmd.exe") { $OutputFile = $MachineName + "_ServerManagerCmdQuery" $CommandToExecute = "$Path\system32\cmd.exe /c $Env:windir\system32\servermanagercmd.exe -query $OutputFile.xml > $OutputFile.txt" $fileDescription = $ServerManagerStrings.ID_ServerManagerCMDOutput RunCmD -commandToRun $CommandToExecute -sectionDescription $sectionDescription -filesToCollect "$OutputFile.*" -fileDescription $fileDescription } if (test-path "$Path\system32\oclist.exe") { $OutputFile = $MachineName + "_OptionalComponents.txt" $CommandToExecute = "$Path\system32\cmd.exe /c $Path\system32\oclist.exe > $OutputFile" $fileDescription = $ServerManagerStrings.ID_ServerManagerOclist RunCmD -commandToRun $CommandToExecute -sectionDescription $sectionDescription -filesToCollect "$OutputFile.*" -fileDescription $fileDescription } } } } # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBECbCHyYlX9w1g # jticZnPcFIF4YEeL9qtNHMbaQfCpYaCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxMTE0WhcNMjUwOTExMjAxMTE0WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQC0KDfaY50MDqsEGdlIzDHBd6CqIMRQWW9Af1LHDDTuFjfDsvna0nEuDSYJmNyz # NB10jpbg0lhvkT1AzfX2TL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M11rYwCbEYj5fS+jsEOuh8RLELkWSOeZOabLtrQ7o # YPFwMXCq+g+nJZ/yCCuTLKFyysn7LnIAgN2l/gekQCGOWzJNsvzIbfzdNXZXZMha # o5/gm+9TWIweNE2HnFJk2ubMGygU3uwHydt2Qp4mf8ToerJi43tZ+7nKhE81DOCp # u1kln35WbgM8bEiH7SOKwvizs2PRmI0A0OWxO+wtVJkMBWw//cQfvAT04e6sFTtc # mToCGwRlMhzmZQ7oHeGOTVXKRVRasmUS1gecjou549zMUI8vqnkP2b4YSoLTfAgK # C2d7QW+wfxCGg3Ava1yQB/2CKhmzFZmP3Vk7V1fPjW3GETI1toCguPq+0yeAAdpv # 44POL0m3A+BCvaHX/b009IAMgqmpw5rlt78wU+T6dRsUVnOlZxCI # SIG # End signature block
combined_dataset/train/non-malicious/1699.ps1
1699.ps1
[CmdletBinding()] Param( [Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [PSCredential]$Credential ) If (-not $PSScriptRoot) {$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent} $Script:ThisCommand = $MyInvocation.MyCommand $ProjectRoot = Resolve-Path "$PSScriptRoot\.." $ModuleRoot = Split-Path (Resolve-Path "$ProjectRoot\*\*.psd1") $ModuleName = Split-Path $ModuleRoot -Leaf $ModulePsd = (Resolve-Path "$ProjectRoot\*\$ModuleName.psd1").Path $ModulePsm = (Resolve-Path "$ProjectRoot\*\$ModuleName.psm1").Path $DefaultsFile = Join-Path $ProjectRoot "Tests\$($ModuleName).Pester.Defaults.json" $ModuleLoaded = Get-Module $ModuleName If ($null -eq $ModuleLoaded) { Import-Module $ModulePSD -Force } ElseIf ($null -ne $ModuleLoaded -and $ModuleLoaded -ne $ModulePSM) { Remove-Module $ModuleName -Force -ErrorAction SilentlyContinue Import-Module $ModulePSD -Force } If (Test-Path $DefaultsFile) { $Script:Defaults = Get-Content $DefaultsFile -Raw | ConvertFrom-Json If ('testingurl.service-now.com' -eq $Defaults.ServiceNowUrl) { Throw 'Please populate the *.Pester.Defaults.json file with your values' } } Else { @{ ServiceNowURL = 'testingurl.service-now.com' TestCategory = 'Internal' TestUserGroup = '8a4dde73c6112278017a6a4baf547aa7' TestUser = '6816f79cc0a8016401c5a33be04be441' } | ConvertTo-Json | Set-Content $DefaultsFile Throw "$DefaultsFile does not exist. Created example file. Please populate with your values" } Describe "$ThisCommand" -Tag Attachment { $null = Set-ServiceNowAuth -Url $Defaults.ServiceNowUrl -Credentials $Credential It "Create incident with New-ServiceNowIncident" { $ShortDescription = "Testing Ticket Creation with Pester: $ThisCommand" $newServiceNowIncidentSplat = @{ Caller = $Defaults.TestUser ShortDescription = $ShortDescription Description = 'Long description' Comment = 'Test Comment' ServiceNowCredential = $Credential ServiceNowURL = $Defaults.ServiceNowURL } $Script:TestTicket = New-ServiceNowIncident @newServiceNowIncidentSplat $TestTicket.short_description | Should -Be $ShortDescription } It 'Attachment test file exist' { $FileValue = "{0}`t{1}" -f (Get-Date), $ThisCommand $FileName = "{0}.txt" -f ('GetServiceNowAttachment') $newItemSplat = @{ Name = $FileName ItemType = 'File' Value = $FileValue } $Script:File = New-Item @newItemSplat $File.FullName | Should -Exist } It "File is attached to $($TestTicket.Number)" { $addServiceNowAttachmentSplat = @{ Number = $TestTicket.Number Table = 'incident' File = $File.FullName Credential = $Credential ServiceNowURL = $Defaults.ServiceNowURL PassThru = $true } $Script:Attachment = Add-ServiceNowAttachment @addServiceNowAttachmentSplat $Attachment.file_name | Should -Be $File.Name } It 'Attachment test file removed' { Remove-Item $File.FullName -Force $File.FullName | Should -Not -Exist } $Script:FileName = 'DownloadServiceNowAttachment.txt' $Script:ExpectedOutput = "{0}_{1}{2}" -f [io.path]::GetFileNameWithoutExtension($FileName),$Attachment.sys_id, [io.path]::GetExtension($FileName) It 'Attachment download successful (Global Credentials, Append Name)' { $getServiceNowAttachmentSplat = @{ FileName = $FileName SysId = $Attachment.sys_id AppendNameWithSysID = $true } {Get-ServiceNowAttachment @getServiceNowAttachmentSplat} | Should -Not -Throw $ExpectedOutput | Should -Exist } It 'Attachment download successful (Specify Credentials, Allow Overwrite)' { $getServiceNowAttachmentSplat = @{ FileName = $FileName SysId = $Attachment.sys_id AppendNameWithSysID = $true AllowOverwrite = $true Credential = $Credential ServiceNowURL = $Defaults.ServiceNowURL } {Get-ServiceNowAttachment @getServiceNowAttachmentSplat} | Should -Not -Throw } It 'Attachment test file removed' { Try { Remove-Item $ExpectedOutput -Force -ErrorAction Stop } Catch { Write-Error $PSItem } $ExpectedOutput | Should -Not -Exist } $null = Remove-ServiceNowAuth }
combined_dataset/train/non-malicious/sample_35_3.ps1
sample_35_3.ps1
# # Module manifest for module 'OCI.PSModules.Vulnerabilityscanning' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vulnerabilityscanning.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '3a30f199-7c6d-48cf-8a14-f4fa8ff17785' # 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 Vulnerabilityscanning 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 = '79.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Vulnerabilityscanning.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 = 'Export-OCIVulnerabilityscanningHostAgentScanResultCsv', 'Export-OCIVulnerabilityscanningHostVulnerabilityCsv', 'Get-OCIVulnerabilityscanningContainerScanRecipe', 'Get-OCIVulnerabilityscanningContainerScanRecipesList', 'Get-OCIVulnerabilityscanningContainerScanResult', 'Get-OCIVulnerabilityscanningContainerScanResultsList', 'Get-OCIVulnerabilityscanningContainerScanTarget', 'Get-OCIVulnerabilityscanningContainerScanTargetsList', 'Get-OCIVulnerabilityscanningHostAgentScanResult', 'Get-OCIVulnerabilityscanningHostAgentScanResultsList', 'Get-OCIVulnerabilityscanningHostCisBenchmarkScanResult', 'Get-OCIVulnerabilityscanningHostCisBenchmarkScanResultsList', 'Get-OCIVulnerabilityscanningHostEndpointProtectionScanResult', 'Get-OCIVulnerabilityscanningHostEndpointProtectionScanResultsList', 'Get-OCIVulnerabilityscanningHostPortScanResult', 'Get-OCIVulnerabilityscanningHostPortScanResultsList', 'Get-OCIVulnerabilityscanningHostScanRecipe', 'Get-OCIVulnerabilityscanningHostScanRecipesList', 'Get-OCIVulnerabilityscanningHostScanTarget', 'Get-OCIVulnerabilityscanningHostScanTargetErrorsList', 'Get-OCIVulnerabilityscanningHostScanTargetsList', 'Get-OCIVulnerabilityscanningHostVulnerabilitiesList', 'Get-OCIVulnerabilityscanningHostVulnerability', 'Get-OCIVulnerabilityscanningHostVulnerabilityImpactedHostsList', 'Get-OCIVulnerabilityscanningVulnerabilitiesList', 'Get-OCIVulnerabilityscanningVulnerability', 'Get-OCIVulnerabilityscanningVulnerabilityImpactedContainersList', 'Get-OCIVulnerabilityscanningVulnerabilityImpactedHostsList', 'Get-OCIVulnerabilityscanningWorkRequest', 'Get-OCIVulnerabilityscanningWorkRequestErrorsList', 'Get-OCIVulnerabilityscanningWorkRequestLogsList', 'Get-OCIVulnerabilityscanningWorkRequestsList', 'Move-OCIVulnerabilityscanningContainerScanRecipeCompartment', 'Move-OCIVulnerabilityscanningContainerScanResultCompartment', 'Move-OCIVulnerabilityscanningContainerScanTargetCompartment', 'Move-OCIVulnerabilityscanningHostAgentScanResultCompartment', 'Move-OCIVulnerabilityscanningHostCisBenchmarkScanResultCompartment', 'Move-OCIVulnerabilityscanningHostEndpointProtectionScanResultCompartment', 'Move-OCIVulnerabilityscanningHostPortScanResultCompartment', 'Move-OCIVulnerabilityscanningHostScanRecipeCompartment', 'Move-OCIVulnerabilityscanningHostScanTargetCompartment', 'New-OCIVulnerabilityscanningContainerScanRecipe', 'New-OCIVulnerabilityscanningContainerScanTarget', 'New-OCIVulnerabilityscanningHostScanRecipe', 'New-OCIVulnerabilityscanningHostScanTarget', 'Remove-OCIVulnerabilityscanningContainerScanRecipe', 'Remove-OCIVulnerabilityscanningContainerScanResult', 'Remove-OCIVulnerabilityscanningContainerScanTarget', 'Remove-OCIVulnerabilityscanningHostAgentScanResult', 'Remove-OCIVulnerabilityscanningHostCisBenchmarkScanResult', 'Remove-OCIVulnerabilityscanningHostEndpointProtectionScanResult', 'Remove-OCIVulnerabilityscanningHostPortScanResult', 'Remove-OCIVulnerabilityscanningHostScanRecipe', 'Remove-OCIVulnerabilityscanningHostScanTarget', 'Update-OCIVulnerabilityscanningContainerScanRecipe', 'Update-OCIVulnerabilityscanningContainerScanTarget', 'Update-OCIVulnerabilityscanningHostScanRecipe', 'Update-OCIVulnerabilityscanningHostScanTarget' # 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','Vulnerabilityscanning' # 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/2616.ps1
2616.ps1
function New-MSFLabImage{ [CmdletBinding()] param([string]$ISO ,[string]$OutputPath ,[string]$ImageName ,[string]$Edition ,[string]$UnattendXML ,[string[]]$CustomModules ) $ErrorActionPreference = 'Stop' . C:\git-repositories\PowerShell\Convert-WindowsImage.ps1 Write-Verbose "Validating Build Paths..." if(!(Test-Path $ISO)){Write-Error "ISO Path invalid: $ISO"} if(!(Test-Path $OutputPath)){Write-Error "ISO Path invalid: $OutputPath"} $OutputFile = Join-Path -Path $OutputPath -ChildPath $ImageName if(Test-Path $OutputFile){Remove-Item $OutputFile} if($UnattendXML.Length -gt 0){ Write-Verbose "Creating image $ImageName using $UnattendXML" Convert-WindowsImage -SourcePath $ISO -VHDPath $OutputFile -VHDFormat VHDX -VHDType Dynamic -Edition $Edition -VHDPartitionStyle MBR -UnattendPath $UnattendXML } else{ Write-Verbose "Creating image $ImageName" Convert-WindowsImage -SourcePath $ISO -VHDPath $OutputFile -VHDFormat VHDX -VHDType Dynamic -Edition $Edition -VHDPartitionStyle MBR } if($CustomModules -and (Test-Path $OutputFile)){ Write-Verbose "Mounting $ImageName to load custome Powershell modules" $DriveLetter = (Mount-VHD $OutputFile –PassThru | Get-Disk | Get-Partition | Get-Volume).DriveLetter foreach($Module in $CustomModules){ if(Test-Path $Module){ Write-Verbose "Adding $Module" Copy-Item -Path $module -Destination "$DriveLetter`:\Program Files\WindowsPowershell\Modules" -Recurse } } Write-Verbose "Dismounting $ImageName" Dismount-VHD -Path $OutputFile } } $custom = @('C:\git-repositories\PowerShell\SqlConfiguration') New-MSFLabImage -ISO 'C:\VMS\ISOs\en_windows_server_2016_x64_dvd_9718492.ISO' -OutputPath 'C:\VMS\ISOs' -ImageName 'GM2016Core.vhdx' -Edition ServerStandardCore -CustomModules $custom -Verbose -UnattendXML C:\vms\ISOs\SERVER2016.xml New-MSFLabImage -ISO 'C:\VMS\ISOs\en_windows_server_2016_x64_dvd_9718492.ISO' -OutputPath 'C:\VMS\ISOs' -ImageName 'GM2016Full.vhdx' -Edition ServerStandard -CustomModules $custom -Verbose -UnattendXML C:\vms\ISOs\SERVER2016.xml
combined_dataset/train/non-malicious/Magister SOAP Webrequest.ps1
Magister SOAP Webrequest.ps1
# Execute-MagisterSOAP.ps1 # We are reading a list of students from a Magister SOAP webrequest. # 20120330 # Paul Wiegmans Clear Set-StrictMode -Version 2 $mijnpad = Split-Path -parent $MyInvocation.MyCommand.Definition Echo "Mijn pad is: $mijnpad " # This is the Magister webquery URL $layout = "Basis" $username = "user" $passwd = "pass" $WebqueryUrl = "https://bonhoeffer.swp.nl:8800/doc?Function=GetData"` +"&Library=Data&SessionToken=$username%3B$passwd&Layout=$layout"` +"&Parameters=leerjaar%3D1112&Type=CSV" function Doe-Webquery ($Url) { # .SYNOPSIS # Voert een SOAP webquery uit # .DESCRIPTION # Voert een SOAP webquery uit. # Retourneert het resultaat van de qebquery in een array met string # .PARAMETER Url # De URL van de webquery # .EXAMPLE # $lines = Doe-Webquery "https://bonhoeffer.swp.nl:8800/doc?Bladibla..." # .NOTES # Auteur: Paul Wiegmans # Datum: 30 mrt 2012 $request = [System.Net.WebRequest]::Create($Url) $response = $request.GetResponse() $requestStream = $response.GetResponseStream() $MagisterEncoding = [System.Text.Encoding]::UTF7 # We must read the Magister webquery in UTF7 to preserve the accents! $readStream = new-object System.IO.StreamReader( $requestStream, $MagisterEncoding ) $result = $readStream.ReadToEnd() -split "`n" # convert to array of strings $readStream.Close() $response.Close() return $result } $lines = Doe-Webquery $WebQueryUrl Echo "Webquery geeft $($lines.count) regels" $velden = $lines[0] -split ";" # list of fieldnames $lijst = $lines[1..$lines.Count] # # uitvoer naar file $lines | Out-File -FilePath "$mijnpad\\soap.csv" -Encoding utf8 # encoding is utf8 of ascii
combined_dataset/train/non-malicious/sample_59_24.ps1
sample_59_24.ps1
@{ GUID="eb74e8da-9ae2-482a-a648-e96550fb8733" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." Description='PowerShell module for working with ZIP archives.' ModuleVersion="1.2.5" PowerShellVersion="3.0" FunctionsToExport = @('Compress-Archive', 'Expand-Archive') DotNetFrameworkVersion = 4.5 CmdletsToExport = @() AliasesToExport = @() NestedModules="Microsoft.PowerShell.Archive.psm1" HelpInfoURI = 'https://go.microsoft.com/fwlink/?LinkId=2113631' } # SIG # Begin signature block # MIInzgYJKoZIhvcNAQcCoIInvzCCJ7sCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAI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4wHAYDVQQKExVNaWNyb3Nv # ZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBD # QSAyMDEwAhMzAAAB4pmZlfHc4yDrAAEAAAHiMCIEIEzppOLutUyk7lm4VM0gNFnE # x54UgQ5iD2FIhuPz8gj9MA0GCSqGSIb3DQEBCwUABIICAAzPGE2mPC6cNkKcifBA # /KKfAzv1SNLu5mFzj4wsgT02TJ251SU4/O1lRHmoUMOteUNlpXUbVHmcdaior/9w # AoaMNJFWBkDnQHLzXi4698fxt9ZJElpw7omiFt1PslXEde5UBu0gqWzVTzQajIvy # EwvNzk76dxFtnNsAe8/jsHfBUCnsZ/sExf5cW69KgkvvdUoSdAe7TQf7jfKF0BD6 # fHhaD2Cy75QDAhpkwKV7+lYTAHTSI/xeaoxAx4XHum2KGzEzuhdxi9oJZchNKbLz # 8U88xp8iFPZEP+BJZkeEHlBOyJxC8v/lS/cwOobCJZJ+Qe9Cgn0BYwSe/tgKUzKX # /pePwJyWsMfWnahLTXWN+L8tHFyxZCdyEg67OU7iAfnqyhpKE8CNoOkVOdo0MnWK # H6Mf5blNoV0hEiGEmGkw++6+dgmzKKaEkXts9pnK60AqMcpkghF6613Li/ln+xob # iYespUvYYlPYVfuRoh8ZzlqC/cds5hqHzDu5XzC9PrTtmqHHQf+M9tdOJItdaQji # 4qjpUyGytOHyLbmUrbh1P0E5dO5aae5+8QGPHt0NgyPAdk8c0DAQdpB00HcpkpGI # 9GCoaYuQVUe9oYpTqpkWmdc3ZqSlczcFpr0VQpMUkaOeizNuv3EzvqLP6JPRZxc4 # hjsGUIM7yjyDXEtbvVo2+cQ1 # SIG # End signature block
combined_dataset/train/non-malicious/Get-RemoteRegistry_1.ps1
Get-RemoteRegistry_1.ps1
## Get-RemoteRegistry ######################################################################################## ## Version: 2.0 ## + I added the "Properties" parameter so you can select specific registry values ## NOTE: you have to have access, and the remote registry service has to be running ######################################################################################## ## USAGE: ## Get-RemoteRegistry $RemotePC "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP" ## * Returns a list of subkeys (because this key has no properties) ## Get-RemoteRegistry $RemotePC "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727" ## * Returns a list of subkeys and all the other "properties" of the key ## Get-RemoteRegistry $RemotePC "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727\\Version" ## * Returns JUST the full version of the .Net SP2 as a STRING (to preserve prior behavior) ## Get-RemoteRegistry $RemotePC "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727" Version ## * Returns a custom object with the property "Version" = "2.0.50727.3053" (your version) ## Get-RemoteRegistry $RemotePC "HKLM\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727" Version,SP ## * Returns a custom object with "Version" and "SP" (Service Pack) properties ## ## For fun, get all versions (2.0 and greater) and return version + service pack: ## Get-RemoteRegistry $RemotePC "HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP" | ## Select -Expand Subkeys | ## ForEach-Object { Get-RemoteRegistry Duo "HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\$_" Version,SP } ## ######################################################################################## # Function Get-RemoteRegistry { param( [string]$computer = $(Read-Host "Remote Computer Name") ,[string]$Path = $(Read-Host "Remote Registry Path (must start with HKLM,HKCU,etc)") ,[string[]]$Properties ,[switch]$Verbose ) if ($Verbose) { $VerbosePreference = 2 } # Only affects this script. $root, $last = $Path.Split("\\") $last = $last[-1] $Path = $Path.Substring($root.Length + 1,$Path.Length - ( $last.Length + $root.Length + 2)) #split the path to get a list of subkeys that we will need to access # ClassesRoot, CurrentUser, LocalMachine, Users, PerformanceData, CurrentConfig, DynData switch($root) { "HKCR" { $root = "ClassesRoot"} "HKCU" { $root = "CurrentUser" } "HKLM" { $root = "LocalMachine" } "HKU" { $root = "Users" } "HKPD" { $root = "PerformanceData"} "HKCC" { $root = "CurrentConfig"} "HKDD" { $root = "DynData"} default { return "Path argument is not valid" } } #Access Remote Registry Key using the static OpenRemoteBaseKey method. Write-Verbose "Accessing $root from $computer" $rootkey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($root,$computer) if(-not $rootkey) { Write-Error "Can't open the remote $root registry hive" } Write-Verbose "Opening $Path" $key = $rootkey.OpenSubKey( $Path ) if(-not $key) { Write-Error "Can't open $($root + '\\' + $Path) on $computer" } $subkey = $key.OpenSubKey( $last ) $output = new-object object if($subkey -and $Properties -and $Properties.Count) { foreach($property in $Properties) { Add-Member -InputObject $output -Type NoteProperty -Name $property -Value $subkey.GetValue($property) } Write-Output $output } elseif($subkey) { Add-Member -InputObject $output -Type NoteProperty -Name "Subkeys" -Value @($subkey.GetSubKeyNames()) foreach($property in $subkey.GetValueNames()) { Add-Member -InputObject $output -Type NoteProperty -Name $property -Value $subkey.GetValue($property) } Write-Output $output } else { $key.GetValue($last) } # }
combined_dataset/train/non-malicious/Get-WebFile 3.1.ps1
Get-WebFile 3.1.ps1
## Get-WebFile.ps1 (aka wget for PowerShell) ############################################################################################################## ## Downloads a file or page from the web ## History: ## v3.1 - Unwrap the filename when it has quotes around it ## v3 - rewritten completely using HttpWebRequest + HttpWebResponse to figure out the file name, if possible ## v2 - adds a ton of parsing to make the output pretty ## - added measuring the scripts involved in the command, (uses Tokenizer) ############################################################################################################## #function wget { param( $url = (Read-Host "The URL to download"), $fileName ) $req = [System.Net.HttpWebRequest]::Create($url); $res = $req.GetResponse(); if($fileName -and !(Split-Path $fileName)) { $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName } elseif(($fileName -eq $null) -or (Test-Path -PathType "Container" $fileName)) { # if( -and !((Test-Path -PathType "Leaf" $fileName) -or ((Test-Path -PathType "Container" (Split-Path $fileName)) -and -not ))) [string]$fileName = ([regex]'(?i)filename=(.*)$').Match( $res.Headers["Content-Disposition"] ).Groups[1].Value $fileName = $fileName.trim("\\/""'") if(!$fileName) { $fileName = $res.ResponseUri.Segments[-1] $fileName = $fileName.trim("\\/") if(!$fileName) { $fileName = Read-Host "Please provide a file name" } $fileName = $fileName.trim("\\/") if(!([IO.FileInfo]$fileName).Extension) { $fileName = $fileName + "." + $res.ContentType.Split(";")[0].Split("/")[1] } } $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName } if($res.StatusCode -eq 200) { $reader = new-object System.IO.StreamReader $res.GetResponseStream() $writer = new-object System.IO.StreamWriter $fileName # TODO: stick this in a loop and give progress reports $writer.Write($reader.ReadToEnd()) $reader.Close(); $writer.Close(); } $res.Close(); ls $fileName #}
combined_dataset/train/non-malicious/New-ObjectRecursive_1.ps1
New-ObjectRecursive_1.ps1
<# .Synopsis Creates new object based on hashtable definition .Description Function is wrapper for New-Object that allows user to create nested objects using nested hashtable as definition. If you want to take advantage of type use 'Type' key within hashtable that defines object. .Example $obj = New-ObjectRecursive @{Test = @{ InnerTest = 'Value'; AnotherInner = 'Another'; InnerwithInner = @{ Deepest = 'It is very deep'}}; Flat = 'SomeValue'} $obj.Test.InnerwithInner.Deepest It is very deep Create simpe custom object with several inner psobjects, depending of hashtable structure. .Example (New-ObjectRecursive @{ Type = 'Windows.Forms.Form'; Size = @{ Type = 'Drawing.Size'; width = 400; Height = 400}; Text = 'Title of window'}).ShowDialog() Display windows form of size 400 x 400 and title 'Title of window', assuming Windows.Forms are loaded. #> param( $Property ) if ($Property -is [hashtable]) { if ($Type = $Property.Type) { $Property.Remove('Type') } else { $Type = 'PSObject' } $PropertyHash = @{} foreach ($key in $Property.keys) { $PropertyHash.Add($key, $(New-ObjectRecursive $Property[$key])) } Try { New-Object $Type -Property $PropertyHash -ErrorAction SilentlyContinue if (!$?) { Write-Host -ForegroundColor Red $Error[0].Exception.Message } } catch { Write-Host -ForegroundColor Red "Problems with creating object of type: $Type. Try to use PSObject instead . . ." New-Object PSObject -Property $PropertyHash -ErrorAction SilentlyContinue Write-Host -ForegroundColor Red "Error message:" $_.Exception.Message } } else { $Property }
combined_dataset/train/non-malicious/Send-FTP 1.0.ps1
Send-FTP 1.0.ps1
function Send-FTP { Param( $Server = "ilncenter.net" , $Credentials = $(Get-Credential) , [Parameter(ValueFromPipeline=$true)] $LocalFile , $Path = "/" , $RemoteFile = $(Split-Path $LocalFile -Leaf) , $ParentProgressId = -1 ## Just ignore this ;) , $ProgressActivity = "Uploading $LocalFile" ) Process { ## Assert the existence of the file in question if( -not (Test-Path $LocalFile) ) { Throw "File '$LocalFile' does not exist!" } ## Create the server string (and make sure it uses forward slashes and ftp://) $upload = "ftp://" + $Server + ( Join-Path (Join-Path "/" $Path) $RemoteFile ) -replace "\\\\", "/" #$Upload = $upload $total = (gci $LocalFile).Length Write-Debug $upload ## Create FTP request $request = [Net.FtpWebRequest]::Create($upload) ## NOTE: we do not create a folder here... # [System.Net.WebRequestMethods+Ftp]::MakeDirectory $request.Method = [System.Net.WebRequestMethods+Ftp]::UploadFile $request.Credentials = $Credentials.GetNetworkCredential() $request.UsePassive = $true $request.UseBinary = $true $request.KeepAlive = $false try { ## Load the file $read = [IO.File]::OpenRead( (Convert-Path $LocalFile) ) $write = $request.GetRequestStream(); $buffer = new-object byte[] 20KB $offset = 0 $progress = 0 do { $offset = $read.Read($buffer, 0, $buffer.Length) $progress += $offset $write.Write($buffer, 0, $offset); Write-Progress $ProgressActivity "Uploading" -Percent ([int]($progress/$total * 100)) -Parent $ParentProgressId } while($offset -gt 0) } finally { Write-Debug "Closing Handles" $read.Close() $write.Close() } } }
combined_dataset/train/non-malicious/Get-Entropy_1.ps1
Get-Entropy_1.ps1
## function Get-Entropy { <# .SYNOPSIS Calculate the entropy of a byte array. Author: Matthew Graeber (@mattifestation) .PARAMETER ByteArray Specifies the byte array containing the data from which entropy will be calculated. .EXAMPLE C:\\PS> $RandArray = New-Object Byte[](10000) C:\\PS> foreach ($Offset in 0..9999) { $RandArray[$Offset] = [Byte] (Get-Random -Min 0 -Max 256) } C:\\PS> $RandArray | Get-Entropy Description ----------- Calculates the entropy of a large array containing random bytes. .EXAMPLE C:\\PS> 0..255 | Get-Entropy Description ----------- Calculates the entropy of 0-255. This should equal exactly 8. .INPUTS System.Byte[] Get-Entropy accepts a byte array from the pipeline .OUTPUTS System.Double Get-Entropy outputs a double representing the entropy of the byte array. .LINK http://www.exploit-monday.com #> [CmdletBinding()] Param ( [Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)] [Byte[]] $ByteArray ) BEGIN { $FrequencyTable = @{} $ByteArrayLength = 0 } PROCESS { foreach ($Byte in $ByteArray) { $FrequencyTable[$Byte]++ $ByteArrayLength++ } } END { $Entropy = 0.0 foreach ($Byte in 0..255) { $ByteProbability = ([Double] $FrequencyTable[[Byte]$Byte]) / $ByteArrayLength if ($ByteProbability -gt 0) { $Entropy += -$ByteProbability * [Math]::Log($ByteProbability, 2) } } Write-Output $Entropy } }
combined_dataset/train/non-malicious/3340.ps1
3340.ps1
function Get-Group { [PoshBot.BotCommand( Aliases = ('gg', 'getgroup'), Permissions = 'view-group' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Position = 0)] [string]$Name ) if ($PSBoundParameters.ContainsKey('Name')) { $g = $Bot.RoleManager.GetGroup($Name) if (-not $g) { New-PoshBotCardResponse -Type Error -Text "Group [$Name] not found :(" -Title 'Rut row' -ThumbnailUrl $thumb.rutrow } else { $membership = [pscustomobject]@{ Users = $g.Users.Keys | foreach-object { $Bot.RoleManager.ResolveUserIdToUserName($_) } Roles = $g.Roles.Keys } $msg = [string]::Empty $msg += "`nDescription: $($g.Description)" $msg += "`nMembers:`n$($membership | Format-Table | Out-String)" New-PoshBotCardResponse -Type Normal -Title "Details for group [$Name]" -Text $msg } } else { $groups = foreach ($key in ($Bot.RoleManager.Groups.Keys | Sort-Object)) { [pscustomobject][ordered]@{ Name = $key Description = $Bot.RoleManager.Groups[$key].Description Users = $Bot.RoleManager.Groups[$key].Users.Keys | foreach-object { $Bot.RoleManager.ResolveUserIdToUserName($_) } Roles = $Bot.RoleManager.Groups[$key].Roles.Keys } } New-PoshBotCardResponse -Type Normal -Text ($groups | Format-List | Out-String) } }
combined_dataset/train/non-malicious/3801.ps1
3801.ps1
function Test-NoWaitParameter { $rgname = Get-ComputeTestResourceName try { $loc = Get-ComputeVMLocation; New-AzResourceGroup -Name $rgname -Location $loc -Force; $vmname = 'vm' + $rgname; $user = "Foo12"; $password = $PLACEHOLDER; $securePassword = ConvertTo-SecureString $password -AsPlainText -Force; $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); [string]$domainNameLabel = "$vmname-$vmname".tolower(); $vmobject = New-AzVm -Name $vmname -ResourceGroupName $rgname -Credential $cred -DomainNameLabel $domainNameLabel; $response = Start-AzVm -ResourceGroupName $rgname -Name $vmname -NoWait Assert-NotNull $response.RequestId } finally { Clean-ResourceGroup $rgname; } }
combined_dataset/train/non-malicious/sample_6_76.ps1
sample_6_76.ps1
#************************************************ # DC_COMCollect.ps1 # Version 1.0 # Date: 2009-2019 # Author: Walter Eder (waltere@microsoft.com) # Description: Collects .Net Framework nGen files # Called from: TS_AutoAddCommands_Apps.ps1 #******************************************************* Trap [Exception] { # Handle exception and throw it to the stdout log file. Then continue with function and script. $Script:ExceptionMessage = $_ "[info]: Exception occurred." | WriteTo-StdOut "[info]: Exception.Message $ExceptionMessage." | WriteTo-StdOut $Error.Clear() continue # later use return to return the exception message to an object: return $Script:ExceptionMessage } Write-verbose "$(Get-Date -UFormat "%R:%S") : Start of script DC_COMCollect.ps1" "\n\n==================== Starting COMCollect.ps1 script ====================\n\n" | WriteTo-StdOut #_# Import-LocalizedData -BindingVariable ScriptStrings # Registry keys "Getting COM Registry Keys" | WriteTo-StdOut Write-DiagProgress -Activity $ScriptStrings.ID_COMRegistryKeys_Title -Status $ScriptStrings.ID_COMRegistryKeys_Status $Regkeys = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole" $OutputFile = $ComputerName + "_reg_Ole_HKLM.txt" RegQuery -RegistryKeys $Regkeys -Recursive $true -OutputFile $OutputFile -fileDescription "HKLM Ole Registry Key" -SectionDescription "Software Registry keys" $Regkeys = "HKEY_CURRENT_USER\Software\Classes\Extensions","HKEY_LOCAL_MACHINE\Software\Classes\Extensions" $OutputFile = $ComputerName + "_reg_Extensions.txt" RegQuery -RegistryKeys $Regkeys -Recursive $true -OutputFile $OutputFile -fileDescription "Extensions Registry Key" -SectionDescription "Software Registry keys" $Regkeys = "HKEY_CURRENT_USER\Software\Classes\ActivatableClasses","HKEY_LOCAL_MACHINE\Software\Classes\ActivatableClasses" $OutputFile = $ComputerName + "_reg_ActivatableClasses.txt" RegQuery -RegistryKeys $Regkeys -Recursive $true -OutputFile $OutputFile -fileDescription "ActivatableClasses Registry Key" -SectionDescription "Software Registry keys" $Regkeys = "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\dcom" $OutputFile = $ComputerName + "_reg_DCOM_HKLM.txt" RegQuery -RegistryKeys $Regkeys -Recursive $true -OutputFile $OutputFile -fileDescription "DCOM HKLM Registry Key" -SectionDescription "Software Registry keys" # Saved Directories # Directory Listings # Permission Data # TO BE DONE # Event Logs # Other Logs "Getting COM Setup Log" | WriteTo-StdOut Write-DiagProgress -Activity $ScriptStrings.ID_COMSetupLog_Title -Status $ScriptStrings.ID_COMSetupLog_Status $sectionDescription = "COM Setup Log" if(test-path "$env:windir\Comsetup.log") { $OutputFile = $ComputerName + "_Comsetup.log" copy-item -Path "$env:windir\Comsetup.log" -Destination $OutputFile -Force CollectFiles -filesToCollect $OutputFile -fileDescription "COM Setup Log File" -sectionDescription $sectionDescription } Write-verbose "$(Get-Date -UFormat "%R:%S") : end of script DC_COMCollect.ps1" # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlA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QEJEAIvMYHqMIHnMIHkMIG9BCCAKEgNyUowvIfx/eDfYSupHkeF1p6GFwjKBs8l # RB4NRzCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9u # MRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRp # b24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB # /XP5aFrNDGHtAAEAAAH9MCIEILkYvpuRiODssJyAPH65EnrV3KtBv8aYFkft91FY # t/GwMA0GCSqGSIb3DQEBCwUABIICAJvecWVA4RuVB/X0g0srjs4wVtuUhwNJPJcw # 6OF+IOzFRQyk2KO0EBMyW7BPOGZMcKK+7uqJ4mzYR2Nu/HgNK42cfTsxkqeDlTbJ # j/36+SAoEHuKLSrEzBtvx2KUR4NI/gkHLsznK6+CPrHfQAu7xwnaAPNZonlbCFdG # rERAnvVSjDNKxsxooFi97lkYCJMvGaVRZPKTUIKcjeFZwWtAPT2zARwImg68jG8q # 4g+76FamyFg0hWEtReAqC/AcIrLeyO15git2W0Hg1G084UWn4X/fENDNe37kSer8 # 5louoTn0QGOU1q8EI36kKSt/f5rYUwIv0XVlyIeafaoxVaQ/EHqbKj6l088YzEpc # w69Ctg/TNgX16GhCyYTaoIqPH1l1fT8IuSJxdIrjUZox3nZgP+zVoKFMGpbABQkX # yPcq3l2Ih5boOaISe2zDQBh8IBJ4cLxb3V/xg58XyFpjKME+rPE0ozCo5zMyWQ/U # 7w1D9NatYETbXG29NnnNfqyym8GBVoAOfI6w64rwy0SJg1npwTUGpO2lenaASIrP # w6iOKU2gR8qaDIRZFPhdk1oDqJyksawXqfECZAVJX8Eng8Uafr4j7wgsWmlxrtAH # dI5nT8kvM1KcGRXjFyBKT2prfQcIWWCgcPq+kpgquovfBGFZwzP0/NbZzuXz+fqx # P3u+m7bM # SIG # End signature block
combined_dataset/train/non-malicious/sample_54_31.ps1
sample_54_31.ps1
Import-LocalizedData -BindingVariable lnTxt -FileName AzStackHci.ClusterWitness.Strings.psd1 function Test-WitnessFileShareWithCredential { [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Witness file share path.")] [ValidateNotNullOrEmpty()] [String] $WitnessPath, [Parameter(Mandatory=$true, HelpMessage="Witness file share credential.")] [ValidateNotNull()] [pscredential] $WitnessShareCredential ) try { Log-Info "Testing witness file share '$WitnessPath' with credential of '$($WitnessShareCredential.UserName)'" $psDriveName = 'TestWitnessFileShare' $testFileName = 'EnvChkrAccessTest' $status = '' $detail = '' try { # Create a temporary PS drive mapping to the witness file share with the credential Log-Info "Creating PS drive '$psDriveName'" New-PSDrive -Name $psDriveName -PSProvider 'FileSystem' -Root $WitnessPath -Credential $WitnessShareCredential -ErrorAction Stop | Out-Null Log-Info "Successfully created PS drive '$psDriveName'" # Test write access to the witness file share $testFilePath = Join-Path -Path "${psDriveName}:" -ChildPath $testFileName Log-Info "Creating test file '$testFilePath'" New-Item -Path $testFilePath -ItemType File -Force -ErrorAction Stop | Out-Null Log-Info "Successfully created test file '$testFilePath'" $status = 'SUCCESS' $detail = $lnTxt.TestWitnessFileSharePass -f $WitnessPath } catch { Log-Info "Failed to access witness file share '$WitnessPath' with credential of '$($WitnessShareCredential.UserName)', error: $_" -Type Warning $status = 'FAILURE' $detail = $lnTxt.TestWitnessFileShareFail -f $WitnessPath, $_.Exception.Message } finally { Remove-PSDrive -Name $psDriveName -ErrorAction Ignore | Out-Null } $params = @{ Name = 'AzStackHci_ClusterWitness_Test_Witness_FileShare_With_Credential' Title = 'Test Witness FileShare With Credential' DisplayName = 'Test Witness FileShare With Credential' Severity = 'CRITICAL' Description = 'Checking access to the witness file share with the credential provided' Tags = @{} Remediation = 'https://learn.microsoft.com/en-us/windows-server/failover-clustering/file-share-witness' TargetResourceID = 'FileShareWitness' TargetResourceName = $WitnessPath TargetResourceType = 'ClusterWitness' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $(hostname) Resource = $WitnessPath Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResult = New-AzStackHciResultObject @params return $instanceResult } catch { throw $_ } } function Test-WitnessCloudStorage { [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Cloud storage account name.")] [ValidateNotNullOrEmpty()] [String] $CloudAccountName, [Parameter(Mandatory=$true, HelpMessage="Cloud storage account key.")] [ValidateNotNull()] [securestring] $WitnessStorageKey, [Parameter(Mandatory=$true, HelpMessage="Cloud storage endpoint.")] [ValidateNotNullOrEmpty()] [String] $AzureServiceEndpoint ) try { Log-Info "Testing witness cloud storage '$CloudAccountName' with endpoint '$AzureServiceEndpoint'" $status = '' $detail = '' try { # Test access to the cloud storage account with the key Log-Info "Creating storage context" $ctx = New-AzStorageContext ` -StorageAccountName $CloudAccountName ` -StorageAccountKey ([System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($WitnessStorageKey))) ` -Endpoint $AzureServiceEndpoint ` -ErrorAction Stop Log-Info "Successfully created storage context" Log-Info "Accessing storage containers" Get-AzStorageContainer ` -Context $ctx ` -MaxCount 1 ` -ErrorAction Stop | Out-Null Log-Info "Successfully accessed storage containers" $status = 'SUCCESS' $detail = $lnTxt.TestWitnessCloudStoragePass -f $CloudAccountName } catch { Log-Info "Failed to access witness cloud storage '$CloudAccountName' with endpoint '$AzureServiceEndpoint', error: $_" -Type Warning $status = 'FAILURE' $detail = $lnTxt.TestWitnessCloudStorageFail -f $CloudAccountName, $_.Exception.Message } $params = @{ Name = 'AzStackHci_ClusterWitness_Test_Witness_CloudStorage' Title = 'Test Witness CloudStorage' DisplayName = 'Test Witness CloudStorage' Severity = 'CRITICAL' Description = 'Checking access to the witness cloud storage with the key provided' Tags = @{} Remediation = 'https://learn.microsoft.com/en-us/windows-server/failover-clustering/deploy-cloud-witness' TargetResourceID = 'CloudStorageWitness' TargetResourceName = "$CloudAccountName($AzureServiceEndpoint)" TargetResourceType = 'ClusterWitness' Timestamp = [datetime]::UtcNow Status = $status AdditionalData = @{ Source = $(hostname) Resource = "$CloudAccountName($AzureServiceEndpoint)" Detail = $detail Status = $status TimeStamp = [datetime]::UtcNow } HealthCheckSource = $ENV:EnvChkrId } $instanceResult = New-AzStackHciResultObject @params return $instanceResult } catch { throw $_ } } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAkInHVq0B504ff # mHqAhhaFQ0PaqM0Cb8YKeLlHb0LgqKCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/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a2gc/M8Bs+1X # B5AxYjYNk3hXm/wRDejgYyNPLyF7L3Ais8aBRT0ppqZ7qDE/coeVl2d16+bhLVID # eAbw7ee/WGPiUGLiadYe026XMj0q+5h4bJHI+w3Hh6zbQaR2fDzS3adxicEdxdUs # YOBO7Ut91uJEUMWdQLIrbklm5pQnjDtV/AR5B1QM5EI8Li9Mo83WDo6+WuAQYcQ+ # DeVD # SIG # End signature block
combined_dataset/train/non-malicious/sample_50_11.ps1
sample_50_11.ps1
# # Module manifest for module 'OCI.PSModules.Audit' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Audit.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '159ba3cf-8d7b-460e-bb56-36417d6f4316' # 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 Audit 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.Audit.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-OCIAuditConfiguration', 'Get-OCIAuditEventsList', 'Update-OCIAuditConfiguration' # 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','Audit' # 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_61_63.ps1
sample_61_63.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function Unpublish-ServiceFabricApplication { <# .SYNOPSIS Removes the specified service fabric application .DESCRIPTION This script removes the application. .NOTES This forcefully removes all the replicas for the specified service fabric application. .PARAMETER ApplicationName The name of the application to remove. .EXAMPLE Remove-Application.ps1 -ApplicationName 'fabric:/MyApplication' #> Param ( [Parameter(Mandatory=$true)] [String] $ApplicationName ) Write-Host "Removing application..." try { [void](Test-ServiceFabricClusterConnection) } catch { Write-Warning "Unable to Verify connection to Service Fabric cluster." throw } $app = Get-ServiceFabricApplication -ApplicationName $ApplicationName if ($app) { try { $app | Remove-ServiceFabricApplication -Force } catch [System.TimeoutException] { # Catch operation timeout and continue with force remove replica. } } foreach ($node in Get-ServiceFabricNode) { [void](Get-ServiceFabricDeployedReplica -NodeName $node.NodeName -ApplicationName $ApplicationName | Remove-ServiceFabricReplica -NodeName $node.NodeName -ForceRemove) } } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDf0p5XZ5kDz81y # E5omORNfSyeFeaAUWJaTQjMcud6hR6CCDXYwggX0MIID3KADAgECAhMzAAADTrU8 # esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1U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J5E2tCsRZyM # gs9n0wwHg5qOc6asoGT/EINs2H/vNj7iH2feewVE3Jlk3NwFoNSmR9MdgdI1k+lo # LH7rtBzknXvmcVUuXYNk2SAXoFg19K720RWYblSAjys1zpHvhoglHP2mXqifzui+ # tQSbRGe+3U4QOVfheE0y3nDdAbt3S+ixkxr4FFhuZIkV3wYPhztJsXoFMjbE8Gdl # pYu92U/MdtY1diC+8/H6V0RfKAie3gp0fDRXXJcDEylEwDilIcXruDKi5ICdsH2+ # l1kaFbt0DeDJO0Q/BxpAkW8qTQaVlx80N/K94SlKWV+f/aYtiuQSWlER6YrEAn+v # mjFVmWWjQtv2Kei8bH8mmZf71WcTn5EzsVFDTgGcjTcgKXzHahamEelJfximvenN # MuktbBEaFos97+bBtXcBdAV24Q0jfAMSGjjxNNSrBD8J1GHl92ht1RMmc2eK6NZF # YtnFH4Yz0ZWnjGpOy71vfoeRLYnRz7LRNmrBAnve45oH5pa3KS9U4KyoIQolcyoS # spON # SIG # End signature block
combined_dataset/train/non-malicious/Get-DefragAnalysis.ps1
Get-DefragAnalysis.ps1
# defrag_analysis.ps1 # # Displays Defrag Analysis Info for a remote server. # # Author: tojo2000@tojo2000.com Set-PSDebug -Strict` trap [Exception] { continue } function GenerateForm { [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null $form1 = New-Object System.Windows.Forms.Form $richTextBox1 = New-Object System.Windows.Forms.RichTextBox $textBox1 = New-Object System.Windows.Forms.TextBox $button1 = New-Object System.Windows.Forms.Button $handler_button1_Click = { $richTextBox1.Text = '' $volumes = @(gwmi Win32_Volume -ComputerName $textBox1.Text ` -Filter 'DriveType = 3') foreach ($volume in $volumes) { $analysis = $volume.DefragAnalysis().DefragAnalysis Write-TextBox "Drive : $($volume.DriveLetter)" Write-TextBox "Volume Name : $($analysis.VolumeName)" Write-TextBox ("Volume Size : " + "{0:0.00}GB" -f ($analysis.VolumeSize/1GB)) Write-TextBox "Total Fragmentation : $($analysis.TotalPercentFragmentation)%" Write-TextBox "" Write-TextBox "Free Space : $($analysis.FreeSpacePercent)%" Write-TextBox ("Free Space Frag. : " + "$($analysis.FreeSpacePercentFragmentation)%") Write-TextBox "" Write-TextBox "Files : $($analysis.TotalFiles)" Write-TextBox "Fragmented Files : $($analysis.TotalFragmentedFiles)" Write-TextBox "File Fragmentation : $($analysis.FilePercentFragmentation)%" Write-TextBox "" Write-TextBox "Folders : $($analysis.TotalFolders)" Write-TextBox "Fragmented Folders : $($analysis.FragmentedFolders)" Write-TextBox "" Write-TextBox "MFT Usage : $($analysis.MFTPercentInUse)%" Write-TextBox "MFT Fragments : $($analysis.TotalMFTFragments)" Write-TextBox "MFT Records : $($analysis.MFTRecordCount)" Write-TextBox "" Write-TextBox ("PageFile Size : " + "{0:0.00}GB" -f ($analysis.PageFileSize/1GB)) Write-TextBox "PageFile Fragments : $($analysis.TotalPageFileFragments)" Write-TextBox "" Write-TextBox "----------------------------" } } $handler_form1_Load = { $textBox1.Select() } $form1.Name = 'form1' $form1.Text = 'Defrag Info 1.0' $form1.BackColor = [System.Drawing.Color]::FromArgb(255,227,227,227) $form1.DataBindings.DefaultDataSourceUpdateMode = 0 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 428 $System_Drawing_Size.Height = 404 $form1.ClientSize = $System_Drawing_Size $form1.add_Load($handler_form1_Load) $richTextBox1.Text = '' $richTextBox1.TabIndex = 2 $richTextBox1.Name = 'richTextBox1' $richTextBox1.Font = New-Object System.Drawing.Font("Courier New",10,0,3,0) $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 343 $System_Drawing_Size.Height = 315 $richTextBox1.Size = $System_Drawing_Size $richTextBox1.DataBindings.DefaultDataSourceUpdateMode = 0 $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 40 $System_Drawing_Point.Y = 61 $richTextBox1.Location = $System_Drawing_Point $form1.Controls.Add($richTextBox1) $textBox1.Text = '<Enter Server Name>' $textBox1.Name = 'textBox1' $textBox1.TabIndex = 1 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 250 $System_Drawing_Size.Height = 20 $textBox1.Size = $System_Drawing_Size $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 40 $System_Drawing_Point.Y = 21 $textBox1.Location = $System_Drawing_Point $textBox1.DataBindings.DefaultDataSourceUpdateMode = 0 $form1.Controls.Add($textBox1) $button1.UseVisualStyleBackColor = $True $button1.Text = 'Analyze' $button1.DataBindings.DefaultDataSourceUpdateMode = 0 $button1.TabIndex = 0 $button1.Name = 'button1' $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 75 $System_Drawing_Size.Height = 23 $button1.Size = $System_Drawing_Size $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 308 $System_Drawing_Point.Y = 19 $button1.Location = $System_Drawing_Point $button1.add_Click($handler_button1_Click) $form1.Controls.Add($button1) $form1.ShowDialog()| Out-Null } function Write-TextBox { param([string]$text) $richTextBox1.Text += "$text`n" } # Launch the form GenerateForm
combined_dataset/train/non-malicious/3048.ps1
3048.ps1
function Should-FileContentMatchMultiline($ActualValue, $ExpectedContent, [switch] $Negate, [String] $Because) { $succeeded = [bool] ((& $SafeCommands['Get-Content'] $ActualValue -Delimiter ([char]0)) -match $ExpectedContent) if ($Negate) { $succeeded = -not $succeeded } $failureMessage = '' if (-not $succeeded) { if ($Negate) { $failureMessage = NotShouldFileContentMatchMultilineFailureMessage -ActualValue $ActualValue -ExpectedContent $ExpectedContent -Because $Because } else { $failureMessage = ShouldFileContentMatchMultilineFailureMessage -ActualValue $ActualValue -ExpectedContent $ExpectedContent -Because $Because } } return New-Object psobject -Property @{ Succeeded = $succeeded FailureMessage = $failureMessage } } function ShouldFileContentMatchMultilineFailureMessage($ActualValue, $ExpectedContent, $Because) { return "Expected $(Format-Nicely $ExpectedContent) to be found in file $(Format-Nicely $ActualValue),$(Format-Because $Because) but it was not found." } function NotShouldFileContentMatchMultilineFailureMessage($ActualValue, $ExpectedContent, $Because) { return "Expected $(Format-Nicely $ExpectedContent) to not be found in file $(Format-Nicely $ActualValue),$(Format-Because $Because) but it was found." } Add-AssertionOperator -Name FileContentMatchMultiline ` -InternalName Should-FileContentMatchMultiline ` -Test ${function:Should-FileContentMatchMultiline}
combined_dataset/train/non-malicious/Resolve-Url.ps1
Resolve-Url.ps1
################################### ## Figure out the real url behind those shortened forms function Resolve-URL([string[]]$urls) { [regex]$snip = "(?:https?://)?(?:snurl|snipr|snipurl)\\.com/([^?/ ]*)\\b" [regex]$tiny = "(?:https?://)?TinyURL.com/([^?/ ]*)\\b" [regex]$isgd = "(?:https?://)?is.gd/([^?/ ]*)\\b" [regex]$twurl = "(?:https?://)?twurl.nl/([^?/ ]*)\\b" switch -regex ($urls) { $snip { write-output $snip.Replace( $_, (new-object System.Net.WebClient ).DownloadString("http://snipurl.com/resolveurl?id=$($snip.match( $_ ).groups[1].value)")) } $tiny { $doc = ConvertFrom-Html "http://tinyurl.com/preview.php?num=$($tiny.match( $_ ).groups[1].value)" write-output $tiny.Replace( $_, "$($doc.SelectSingleNode(""//a[@id='redirecturl']"").href)" ) } $isgd { $doc = ConvertFrom-Html "http://is.gd/$($isgd.match( $_ ).groups[1].value)-" write-output $isgd.Replace( $_, "$($doc.SelectSingleNode(""//div[@id='main']/p/a"").href)") } $twurl { $doc = ConvertFrom-Html "http://tweetburner.com/links/$($twurl.match( $_ ).groups[1].value)" write-output $twurl.Replace($_, "$($doc.selectsingleNode(""//div[@id='main-content']/p/a"").href)" ) } default { write-output $_ } } }
combined_dataset/train/non-malicious/sample_3_92.ps1
sample_3_92.ps1
# # Module manifest for module 'OCI.PSModules.Common' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Common.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae' # 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 Corporation 2020. All rights reserved.' # Description of the functionality provided by this module Description = 'OCI Common module exports Cmdlets that manages features offered by OCI Modules for Powershell like History Store, OCI Configuration file setup and Per-Session Region/Config/Profile preferences. Common module also contains some functionalties that are common to all OCI Service modules, therefore all OCI Service modules depends on Common module.' # 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 = @() # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Common.dll', 'assemblies/BouncyCastle.Crypto.dll', 'assemblies/NLog.dll', 'assemblies/Polly.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 = 'OCI.PSModules.Common.format.ps1xml' # 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-OCICmdletHistory', 'Set-OCICmdletHistory', 'Clear-OCICmdletHistory', 'Get-OCIClientSession', 'Set-OCIClientSession', 'Set-OCIClientConfig', 'New-OCIClientKeys', 'Clear-OCIClientSession', 'Register-OCIRealm', 'Register-OCIRegion', 'Get-OCIRegion', 'Get-OCIRegionsList', 'Get-OCIRealm', 'Get-OCIRealmsList' # 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','Common' # 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_19_96.ps1
sample_19_96.ps1
# # Module manifest for module 'OCI.PSModules.Operatoraccesscontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Operatoraccesscontrol.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'd1ca9ba8-0f36-4759-8992-932d0bb2c9bb' # 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 Operatoraccesscontrol 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 = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Operatoraccesscontrol.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-OCIOperatoraccesscontrolAccessRequest', 'Get-OCIOperatoraccesscontrolAccessRequestHistoriesList', 'Get-OCIOperatoraccesscontrolAccessRequestsList', 'Get-OCIOperatoraccesscontrolInteractionsList', 'Get-OCIOperatoraccesscontrolOperatorAction', 'Get-OCIOperatoraccesscontrolOperatorActionsList', 'Get-OCIOperatoraccesscontrolOperatorControl', 'Get-OCIOperatoraccesscontrolOperatorControlAssignment', 'Get-OCIOperatoraccesscontrolOperatorControlAssignmentsList', 'Get-OCIOperatoraccesscontrolOperatorControlsList', 'Invoke-OCIOperatoraccesscontrolApproveAccessRequest', 'Invoke-OCIOperatoraccesscontrolInteractionRequest', 'Invoke-OCIOperatoraccesscontrolRejectAccessRequest', 'Invoke-OCIOperatoraccesscontrolReviewAccessRequest', 'Invoke-OCIOperatoraccesscontrolRevokeAccessRequest', 'Move-OCIOperatoraccesscontrolOperatorControlAssignmentCompartment', 'Move-OCIOperatoraccesscontrolOperatorControlCompartment', 'New-OCIOperatoraccesscontrolOperatorControl', 'New-OCIOperatoraccesscontrolOperatorControlAssignment', 'Remove-OCIOperatoraccesscontrolOperatorControl', 'Remove-OCIOperatoraccesscontrolOperatorControlAssignment', 'Update-OCIOperatoraccesscontrolOperatorControl', 'Update-OCIOperatoraccesscontrolOperatorControlAssignment' # 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','Operatoraccesscontrol' # 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/AddTo-HostsFile_1.ps1
AddTo-HostsFile_1.ps1
function AddTo-HostsFile{ <# .DESCRIPTION This function checks to see if an entry exists in the hosts file. If it does not, it attempts to add it and verifies the entry. .EXAMPLE Networkign.AddTo-Hosts -IPAddress 192.168.0.1 -HostName MyMachine .EXTERNALHELP None. .FORWARDHELPTARGETNAME None. .INPUTS System.String. .LINK None. .NOTES None. .OUTPUTS System.String. .PARAMETER IPAddress A string representing an IP address. .PARAMETER HostName A string representing a host name. .SYNOPSIS Add entries to the hosts file. #> param( [parameter(Mandatory=$true,position=0)] [string] $IPAddress, [parameter(Mandatory=$true,position=1)] [string] $HostName ) $HostsLocation = "$env:windir\\System32\\drivers\\etc\\hosts"; $NewHostEntry = "`t$IPAddress`t$HostName"; if((gc $HostsLocation) -contains $NewHostEntry) { Write-Host "$(Time-Stamp): The hosts file already contains the entry: $NewHostEntry. File not updated."; } else { Write-Host "$(Time-Stamp): The hosts file does not contain the entry: $NewHostEntry. Attempting to update."; Add-Content -Path $HostsLocation -Value $NewHostEntry; } # Validate entry if((gc $HostsLocation) -contains $NewHostEntry) { Write-Host "$(Time-Stamp): New entry, $NewHostEntry, added to $HostsLocation."; } else { Write-Host "$(Time-Stamp): The new entry, $NewHostEntry, was not added to $HostsLocation."; } }
combined_dataset/train/non-malicious/2613.ps1
2613.ps1
Import-Module C:\git-repositories\PowerShell\MSFVMLab\MSFVMLab.psm1 -Force $LabConfig = Get-Content C:\git-repositories\PowerShell\MSFVMLab\LabVMS.json | ConvertFrom-Json $WorkingDirectory = $LabConfig.WorkingDirectory If(-not (Test-Path $WorkingDirectory)){ Write-Error "$WorkingDirectory does not exist!" -ErrorAction Stop } foreach($network in $LabConfig.Switches){ If(!(Get-VMSwitch $network.Name -ErrorAction SilentlyContinue)){ New-VMSwitch -Name $network.Name -SwitchType $network.Type } } Get-Credential -Message 'Local Adminstrator Credential' -UserName 'localhost\administrator' | Export-Clixml "$WorkingDirectory\vmlab_localadmin.xml" Get-Credential -Message 'Domain Credential' -UserName "$($LabConfig.domain)\administrator" | Export-Clixml "$WorkingDirectory\vmlab_domainadmin.xml" Get-Credential -Message 'SQL Server Service credential' -UserName "$($LabConfig.domain)\sqlsvc" | Export-Clixml "$WorkingDirectory\vmlab_sqlsvc.xml"
combined_dataset/train/non-malicious/Get-Field_2.ps1
Get-Field_2.ps1
function Get-Field{ [CmdletBinding()] param ( [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$true)] $InputObject, [Parameter(Position=1,Mandatory=$false)] [string]$Name, [switch]$Force, [switch]$AsHashtable ) $publicNonPublic = [Reflection.BindingFlags]::Public -bor [Reflection.BindingFlags]::NonPublic $instance = $publicNonPublic -bor [Reflection.BindingFlags]::Instance $getField = $instance -bor [Reflection.BindingFlags]::GetField $type = $InputObject.gettype() $result = @() while ($type -ne [object] -and $type -ne [MarshalByRefObject] ) { $fields = $type.GetFields($instance) $result += $fields | Select-Object @{n="Name";e={$_.Name}},@{n="Value";e={$type.InvokeMember($_.Name, $getField, $null, $InputObject, $null)}} $type = $type.BaseType if (!$Force) { break; } } if (!$Name) { if ($AsHashtable) { $hash = @{} $result | Foreach-Object { $hash[$_.Name] = $_.Value } return $hash } else { return $result } } $result | ForEach-Object { if ($_.Name -eq $Name) { $_.Value } } } New-Alias -Name gf -Value Get-Field -Force
combined_dataset/train/non-malicious/Get-PDC09Videos.ps1
Get-PDC09Videos.ps1
#requires -version 2.0 PARAM ( [Parameter(Position=1, Mandatory=$true)] [ValidateSet("wmv","wmvhigh","ppt")] # the "mp4" files aren't there yet [String]$MediaType, [string]$Destination = $PWD ) Import-Module BitsTransfer $Extension = $(switch -wildcard($MediaType){"wmv*"{"wmv"} "mp4"{"mp4"} "ppt"{"pptx"}}) $xfer = Start-BitsTransfer -Suspended ` $("http://ecn.channel9.msdn.com/o9/pdc09/{0}/KYN01-PGM.{1}" -f $MediaType, $Extension), $("http://ecn.channel9.msdn.com/o9/pdc09/{0}/KYN02-PGM.{1}" -f $MediaType, $Extension) ` $(Join-Path $Destination "Keynote1.$Extension" ), $(Join-Path $Destination "Keynote2.$Extension" ) foreach( $session in "CL09","CL18","FT02","FT06","FT11","PR05","SVC01","SVC10","SVC20","SVR03", "CL30","CL33","FT30","FT31","PR31","SVC30","SVC37","SVR33","VTL30","VTL32","CL04","CL14","CL25", "FT18","FT19","FT25","PR02","SVC13","SVR01","SVR14","CL13","CL29","FT10","FT28","FT57","PR11", "SVC52","SVR15","SVR17","CL11","CL17","CL23","FT03","FT08","PR10","SVR16","VTL01","CL01","FT50", "FT52","FT55","FT59","PR13","SVC02","SVC03","SVC15","CL31","CL34","FT32","FT34","FT36","SVC31", "SVC32","SVR31","VTL31","CL15","FT12","FT17","FT58","SVC16","SVC28","SVC53","SVR11","VTL05", "CL06","FT04","FT07","FT29","PR06","SVC09","SVC17","SVR13","VTL04","CL12","CL22","FT22","FT23", "FT26","SVC04","SVC14","SVC19","SVC54","SVR12","CL02","CL05","CL16","FT21","FT56","PR03","SVC08", "SVC18","SVR10","VTL03","CL10","FT13","FT53","FT60","PR07","SVC06","SVC25","SVR07","SVR18", "VTL02","CL03","CL21","CL27","FT14","FT20","FT24","PR09","SVC12","SVR09","SVR19","CL32","CL35", "CL36","FT33","FT35","PR30","PR33","SVC33","SVC36","SVR32","CL07","CL24","CL28","FT09","FT16", "FT27","PR12","SVC27","SVR02","SVR06","CL26","FT05","FT54","PR01","PR14","SVC23","SVC26","SVR08") { Add-BitsFile $xfer $("http://ecn.channel9.msdn.com/o9/pdc09/{0}/{2}.{1}" -f $MediaType, $session, $Extension) $(Join-Path $Destination "${Session}.${Extension}") } Resume-BitsTransfer $xfer
combined_dataset/train/non-malicious/255.ps1
255.ps1
function Get-O365CalendarEvent { [CmdletBinding()] param ( [System.String]$EmailAddress, [System.datetime]$StartDateTime = (Get-Date), [System.datetime]$EndDateTime = ((Get-Date).adddays(7)), [System.Management.Automation.Credential()] [pscredential] $Credential = [System.Management.Automation.PSCredential]::Empty, [ValidateNotNullOrEmpty()] [ValidateRange(1, 50)] $PageResult = '10', [ValidateSet( 'Afghanistan Standard Time', 'Alaskan Standard Time', 'Arab Standard Time', 'Arabian Standard Time', 'Arabic Standard Time', 'Atlantic Standard Time', 'AUS Central Standard Time', 'AUS Eastern Standard Time', 'Azerbaijan Standard Time', 'Azores Standard Time', 'Canada Central Standard Time', 'Cape Verde Standard Time', 'Caucasus Standard Time', 'Cen. Australia Standard Time', 'Central America Standard Time', 'Central Asia Standard Time', 'Central Brazilian Standard Time', 'Central Europe Standard Time', 'Central European Standard Time', 'Central Pacific Standard Time', 'Central Standard Time', 'Central Standard Time (Mexico)', 'China Standard Time', 'Dateline Standard Time', 'E. Africa Standard Time', 'E. Australia Standard Time', 'E. Europe Standard Time', 'E. South America Standard Time', 'Eastern Standard Time', 'Egypt Standard Time', 'Ekaterinburg Standard Time', 'Fiji Standard Time', 'FLE Standard Time', 'Georgian Standard Time', 'GMT Standard Time', 'Greenland Standard Time', 'Greenwich Standard Time', 'GTB Standard Time', 'Hawaiian Standard Time', 'India Standard Time', 'Iran Standard Time', 'Israel Standard Time', 'Korea Standard Time', 'Mid-Atlantic Standard Time', 'Mountain Standard Time', 'Mountain Standard Time (Mexico)', 'Myanmar Standard Time', 'N. Central Asia Standard Time', 'Namibia Standard Time', 'Nepal Standard Time', 'New Zealand Standard Time', 'Newfoundland Standard Time', 'North Asia East Standard Time', 'North Asia Standard Time', 'Pacific SA Standard Time', 'Pacific Standard Time', 'Romance Standard Time', 'Russian Standard Time', 'SA Eastern Standard Time', 'SA Pacific Standard Time', 'SA Western Standard Time', 'Samoa Standard Time', 'SE Asia Standard Time', 'Singapore Standard Time', 'South Africa Standard Time', 'Sri Lanka Standard Time', 'Taipei Standard Time', 'Tasmania Standard Time', 'Tokyo Standard Time', 'Tonga Standard Time', 'US Eastern Standard Time', 'US Mountain Standard Time', 'Vladivostok Standard Time', 'W. Australia Standard Time', 'W. Central Africa Standard Time', 'W. Europe Standard Time', 'West Asia Standard Time', 'West Pacific Standard Time', 'Yakutsk Standard Time' )] [System.String]$Timezone ) PROCESS { TRY { $FunctionName = (Get-Variable -Name MyInvocation -Scope 0 -ValueOnly).MyCommand Write-Verbose -Message "[$FunctionName] Create splatting" $Splatting = @{ Credential = $Credential Uri = "https://outlook.office365.com/api/v1.0/users/$EmailAddress/calendarview?startDateTime=$StartDateTime&endDateTime=$($EndDateTime)&`$top=$PageResult" } if ($TimeZone) { Write-Verbose -Message "[$FunctionName] Add TimeZone" $headers = New-Object -TypeName 'System.Collections.Generic.Dictionary[[String],[String]]' $headers.Add('Prefer', "outlook.timezone=`"$TimeZone`"") $Splatting.Add('Headers', $headers) } if (-not $PSBoundParameters['EmailAddress']) { Write-Verbose -Message "[$FunctionName] EmailAddress not specified, updating URI" $Splatting.Uri = "https://outlook.office365.com/api/v1.0/me/calendarview?startDateTime=$StartDateTime&endDateTime=$($EndDateTime)&`$top=$PageResult" } Write-Verbose -Message "[$FunctionName] URI: $($Splatting.Uri)" Invoke-RestMethod @Splatting -ErrorAction Stop | Select-Object -ExpandProperty Value } CATCH { $PSCmdlet.ThrowTerminatingError($_) } } }
combined_dataset/train/non-malicious/New-Shortcut_2.ps1
New-Shortcut_2.ps1
[CmdletBinding()] param ( [parameter(Mandatory=$true)] [ValidateScript( {[IO.File]::Exists($_)} )] [System.IO.FileInfo] $Target, [ValidateScript( {[IO.Directory]::Exists($_)} )] [System.IO.DirectoryInfo] $OutputDirectory, [string] $Name, [string] $Description, [string] $Arguments, [System.IO.DirectoryInfo] $WorkingDirectory, [string] $HotKey, [int] $WindowStyle = 1, [string] $IconLocation, [switch] $Elevated ) try { #region Create Shortcut if ($Name) { [System.IO.FileInfo] $LinkFileName = [System.IO.Path]::ChangeExtension($Name, "lnk") } else { [System.IO.FileInfo] $LinkFileName = [System.IO.Path]::ChangeExtension($Target.Name, "lnk") } if ($OutputDirectory) { [System.IO.FileInfo] $LinkFile = [IO.Path]::Combine($OutputDirectory, $LinkFileName) } else { [System.IO.FileInfo] $LinkFile = [IO.Path]::Combine($Target.Directory, $LinkFileName) } $wshshell = New-Object -ComObject WScript.Shell $shortCut = $wshShell.CreateShortCut($LinkFile) $shortCut.TargetPath = $Target.Name $shortCut.WindowStyle = $WindowStyle $shortCut.Description = $Description $shortCut.WorkingDirectory = $WorkingDirectory $shortCut.HotKey = $HotKey $shortCut.Arguments = $Arguments if ($IconLocation) { $shortCut.IconLocation = $IconLocation } $shortCut.Save() #endregion #region Elevation Flag if ($Elevated) { $tempFileName = [IO.Path]::GetRandomFileName() $tempFile = [IO.FileInfo][IO.Path]::Combine($LinkFile.Directory, $tempFileName) $writer = new-object System.IO.FileStream $tempFile, ([System.IO.FileMode]::Create) $reader = $LinkFile.OpenRead() while ($reader.Position -lt $reader.Length) { $byte = $reader.ReadByte() if ($reader.Position -eq 22) { $byte = 34 } $writer.WriteByte($byte) } $reader.Close() $writer.Close() $LinkFile.Delete() Rename-Item -Path $tempFile -NewName $LinkFile.Name } #endregion } catch { Write-Error "Failed to create shortcut. The error was '$_'." return $null } return $LinkFile
combined_dataset/train/non-malicious/sample_4_10.ps1
sample_4_10.ps1
// Class: clpsvc1 => DCIM_CLPProvidesEndpoint => DCIM_CLPProtocolEndpoint [dynamic, provider("dcismprovider")] class DCIM_CLPProvidesEndpoint : CIM_ProvidesEndpoint { }; /* SIG # Begin signature block */ /* MIItDQYJKoZIhvcNAQcCoIIs/jCCLPoCAQExDzANBglghkgBZQMEAgEFADB5Bgor */ /* BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG */ /* KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBsQfv1TkshuQeJ */ /*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kgjKdwYc0WyY/m */ /* 0BvOK1H3NpXJQZ45/CVRXftQmyv6aRWDTE7YgEEZEhM51pWLZccZN9EMZyWObjTF */ /* raKFZbActqQJ4ro7S1DMiJlydUOhHvEG98hJNP16fCrkhDMBRGs5OlkrTQT4nUzb */ /* JUbXAU0R2G6V719Vmiy/hezQoosbHh8vIaMKxvnise6VR45DIVTnI5YaVvprvpJM */ /* oyyOqkPRMc/n9TzC/FtaGrU= */ /* SIG # End signature block */
combined_dataset/train/non-malicious/TabExpansion.ps1
TabExpansion.ps1
## Tab-Completion ################# ## Please dot souce this script file. ## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list. ## What this can do is: ## ## [datetime]::n<tab> ## [datetime]::now.d<tab> ## $foo[0].<tab> ## $foo[0].n.b<tab> ## $function:a<tab> ## $env:a<tab> ## [System.Type].a<tab> ## [datetime].Assembly.a<tab> ## ).a<tab> # shows System.Type properties and methods... ## #native command name expansion ## fsu<tab> ## #command option name expansion (for fsutil ipconfig net powershell only) ## fsutil <tab> ## ipconfig <tab> ## net <tab> ## powershell <tab> ## #TypeNames expansion ## [Dec<tab> ## [Microsoft.PowerShell.Com<tab> ## New-Object -TypeName IO.Dir<tab> ## New-Object System.Management.Auto<tab> ## #ProgIDs expansion ## New-Object -Com shel<tab> ## #Enum option expansion ## Set-ExecutionPolicy <tab> ## Set-ExecutionPolicy All<tab> ## Set-ExcusionPolisy -ex <tab> ## Get-TraceSourceÅ@Inte<tab> ## iex -Err <tab> -wa Sil<tab> ## #WmiClasses expansion ## Get-WmiObject -class Win32_<tab> ## gwmi __Instance<tab> ## #Encoding expansion ## [Out-File | Export-CSV | Select-String | Export-Clixml] -enc <tab> ## [Add-Content | Get-Content | Set-Content} -Encoding Big<tab> ## #PSProvider name expansion ## [Get-Location | Get-PSDrive | Get-PSProvider | New-PSDrive | Remove-PSDrive] [-PSProvider] <tab> ## Get-PSProvider <tab> ## pwd -psp al<tab> ## #PSDrive name expansion ## [Get-PSDrive | New-PSDrive | Remove-PSDrive] [-Name] <tab> ## Get-PSDrive <tab> ## pwd -psd <tab> ## #PSSnapin name expansion ## [Add-PSSnapin | Get-PSSnapin | Remove-PSSnapin ] [-Name] <tab> ## Get-Command -PSSnapin <tab> ## Remove-PSSnapin <tab> ## Get-PSSnapin M<tab> ## #Eventlog name and expansion ## Get-Eventlog -Log <tab> ## Get-Eventlog w<tab> ## #Eventlog's entrytype expansion ## Get-EventLog -EntryType <tab> ## Get-EventLog -EntryType Er<tab> ## Get-EventLog -Ent <tab> ## #Service name expansion ## [Get-Service | Restart-Service | Resume-Service | Start-Service | Stop-Service | Suspend-Service] [-Name] <tab> ## New-Service -DependsOn <tab> ## New-Service -Dep e<tab> ## Get-Service -n <tab> ## Get-Service <tab>,a<tab>,p<tab> ## gsv <tab> ## #Service display name expansion ## [Get-Service | Restart-Service | Resume-Service | Start-Service | Stop-Service | Suspend-Service] [-DisplayName] <tab> ## Get-Service -Dis <tab> ## gsv -Dis <tab>,w<tab>,b<tab> ## #Cmdlet and Topic name expansion ## Get-Help [-Name] about_<tab> ## Get-Help <tab> ## #Category name expansion ## Get-Help -Category c<tab>,<tab> ## #Command name expansion ## Get-Command [-Name] <tab> ## Get-Command -Name <tab> ## gcm a<tab>,<tab> ## #Scope expansion ## [Clear-Variable | Export-Alias | Get-Alias | Get-PSDrive | Get-Variable | Import-Alias ## New-Alias | New-PSDrive | New-Variable | Remove-Variable | Set-Alias | Set-Variable] -Scope <tab> ## Clear-Variable -Scope G<tab> ## Set-Alias -s <tab> ## #Process name expansion ## [Get-Process | Stop-Process] [-Name] <tab> ## Stop-Process -Name <tab> ## Stop-Process -N pow<tab> ## Get-Process <tab> ## ps power<tab> ## #Trace sources expansion ## [Trace-Command | Get-TraceSource | Set-TraceSource] [-Name] <tab>,a<tab>,p<tab> ## #Trace -ListenerOption expansion ## [Set-TraceSource | Trace-Command] -ListenerOption <tab> ## Set-TraceSource -Lis <tab>,n<tab> ## #Trace -Option expansion ## [Set-TraceSource | Trace-Command] -Option <tab> ## Set-TraceSource -op <tab>,con<tab> ## #ItemType expansion ## New-Item -Item <tab> ## ni -ItemType d<tab> ## #ErrorAction and WarningAction option expansion ## CMDLET [-ErrorAction | -WarningAction] <tab> ## CMDLET -Error s<tab> ## CMDLET -ea con<tab> ## CMDLET -wa <tab> ## #Continuous expansion with comma when parameter can treat multiple option ## # if there are spaces, occur display bug in the line ## # if strings contains '$' or '-', not work ## Get-Command -CommandType <tab>,<tab><tab>,cm<tab> ## pwd -psp <tab>,f<tab>,va<tab> ## Get-EventLog -EntryType <tab>,i<tab>,s<tab> ### Generate ProgIDs list... if ($_ProgID -eq $null) { $_HKCR = [Microsoft.Win32.Registry]::ClassesRoot.OpenSubKey("CLSID\\") [Object[]] $_ProgID = $null foreach ( $_subkey in $_HKCR.GetSubKeyNames() ) { foreach ( $_i in [Microsoft.Win32.Registry]::ClassesRoot.OpenSubKey("CLSID\\$_subkey\\ProgID") ) { if ($_i -ne $null) { $_ProgID += $_i.GetValue("") } } } '$_ProgID was updated...' | Out-Host $_ProgID = $_ProgID|sort -Unique Export-Clixml -InputObject $_TypeNames -Path $PSHOME\\ProgIDs.txt Add-Content -Path $PSHOME\\profile.ps1 -Value ';$_ProgID = Import-Clixml -Path C:\\WINDOWS\\system32\\windowspowershell\\v1.0\\ProgIDs.txt;' } ### Generate TypeNames list... if ( $_TypeNames -eq $null ) { [Object[]] $_TypeNames = $null foreach ( $_asm in [AppDomain]::CurrentDomain.GetAssemblies() ) { foreach ( $_type in $_asm.GetTypes() ) { $_TypeNames += $_type.FullName } } '$_TypeNames was updated...' | Out-Host $_TypeNames = $_TypeNames | sort -Unique Export-Clixml -InputObject $_TypeNames -Path $PSHOME\\TypeNames.txt Add-Content -Path $PSHOME\\profile.ps1 -Value ';$_TypeNames = Import-Clixml -Path $PSHOME\\TypeNames.txt;' } if ( $_TypeNames_System -eq $null ) { [Object[]] $_TypeNames_System = $null foreach ( $_type in $_TypeNames -like "System.*" ) { $_TypeNames_System += $_type.Substring(7) } '$_TypeNames_System was updated...' | Out-Host Export-Clixml -InputObject $_TypeNames_System -Path $PSHOME\\TypeNames_System.txt Add-Content -Path $PSHOME\\profile.ps1 -Value ';$_TypeNames_System = Import-Clixml -Path $PSHOME\\TypeNames_System.txt;' } ### Generate WMIClasses list... if ( $_WMIClasses -eq $null ) { [Object[]] $_WMIClasses = $null foreach ( $_class in gwmi -List ) { $_WMIClasses += $_class.Name } $_WMIClasses = $_WMIClasses | sort -Unique '$_WMIClasses was updated...' | Out-Host Set-Content -Value $_WMIClasses -Path $PSHOME\\WMIClasses.txt } $global:_snapin = $null function TabExpansion { # This is the default function to use for tab expansion. It handles simple # member expansion on variables, variable name expansion and parameter completion # on commands. It doesn't understand strings so strings containing ; | ( or { may # cause expansion to fail. param($line, $lastWord) & { # Helper function to write out the matching set of members. It depends # on dynamic scoping to get $_base, _$expression and $_pat function Write-Members ($sep='.') { # evaluate the expression to get the object to examine... Invoke-Expression ('$_val=' + $_expression) $_method = [Management.Automation.PSMemberTypes] ` 'Method,CodeMethod,ScriptMethod,ParameterizedProperty' if ($sep -eq '.') { $members = ( [Object[]](Get-Member -InputObject $_val.PSextended $_pat) + [Object[]](Get-Member -InputObject $_val.PSadapted $_pat) + [Object[]](Get-Member -InputObject $_val.PSbase $_pat) ) | sort MemberType,Name -Unique foreach ($_m in $members) { if ($_m.MemberType -band $_method) { # Return a method... $_base + $_expression + $sep + $_m.name + '(' } else { # Return a property... $_base + $_expression + $sep + $_m.name } } } else { foreach ($_m in Get-Member -Static -InputObject $_val $_pat | Sort-Object membertype,name) { if ($_m.MemberType -band $_method) { # Return a method... $_base + $_expression + $sep + $_m.name + '(' } else { # Return a property... $_base + $_expression + $sep + $_m.name } } } } switch -regex ($lastWord) { # Handle property and method expansion rooted at variables... # e.g. $a.b.<tab> '(^.*)(\\$(\\w|\\.)+)\\.(\\w*)$' { $_base = $matches[1] $_expression = $matches[2] [void] ( iex "$_expression.IsDataLanguageOnly" ) # for [ScriptBlock] $_pat = $matches[4] + '*' Write-Members break; } # Handle simple property and method expansion on static members... # e.g. [datetime]::n<tab> '(^.*)(\\[(\\w|\\.)+\\])\\:\\:(\\w*)$' { $_base = $matches[1] $_expression = $matches[2] $_pat = $matches[4] + '*' Write-Members '::' break; } # Handle complex property and method expansion on static members # where there are intermediate properties... # e.g. [datetime]::now.d<tab> '(^.*)(\\[(\\w|\\.)+\\]\\:\\:(\\w+\\.)+)(\\w*)$' { $_base = $matches[1] # everything before the expression $_expression = $matches[2].TrimEnd('.') # expression less trailing '.' $_pat = $matches[5] + '*' # the member to look for... Write-Members break; } # Handle variable name expansion... '(^.*\\$)(\\w+)$' { $_prefix = $matches[1] $_varName = $matches[2] foreach ($_v in Get-ChildItem ('variable:' + $_varName + '*')) { $_prefix + $_v.name } break; } # Handle env&function drives variable name expansion... '(^.*\\$)(.*\\:)(\\w+)$' { $_prefix = $matches[1] $_drive = $matches[2] $_varName = $matches[3] if ($_drive -eq "env:" -or $_drive -eq "function:") { foreach ($_v in Get-ChildItem ($_drive + $_varName + '*')) { $_prefix + $_drive + $_v.name } } break; } # Handle array's element property and method expansion... # e.g. foo[0].a<tab> '(^.*)(\\$(\\w|\\.)+\\[(\\w|\\.)+\\])\\.(\\w*)$' { $_base = $matches[1] $_expression = $matches[2] $_pat = $Matches[$matches.Count-1] + '*' Write-Members break; } # Handle array's element property and method expansion # where there are intermediate properties... # e.g. foo[0].n.b<tab> '(^.*)((\\$(\\w|\\.)+\\[(\\w|\\.)+\\])\\.(\\w+\\.)+)(\\w*)$' { $_base = $matches[1] $_expression = $matches[2].TrimEnd('.') $_pat = $Matches[$matches.Count-1] + '*' Write-Members break; } # Handle property and method expansion rooted at type object... # e.g. [System.Type].a<tab> '(^\\[(\\w|\\.)+\\])\\.(\\w*)$' { if ( $(iex $Matches[1]) -isnot [System.Type] ) { break; } $_expression = $Matches[1] $_pat = $Matches[$matches.Count-1] + '*' Write-Members break; } # Handle complex property and method expansion on type object members # where there are intermediate properties... # e.g. [datetime].Assembly.a<tab> '^(\\[(\\w|\\.)+\\]\\.(\\w+\\.)+)(\\w*)$' { $_expression = $matches[1].TrimEnd('.') # expression less trailing '.' $_pat = $matches[4] + '*' # the member to look for... if ( $(iex $_expression) -eq $null ) { break; } Write-Members break; } # Handle property and method expansion rooted at close parenthes... # e.g. (123).a<tab> '^(.*)\\)((\\w|\\.)*)\\.(\\w*)$' { $_base = $Matches[1] + ")" if ( $matches[3] -eq $null) { $_expression = '[System.Type]' } else { $_expression = '[System.Type]' + $Matches[2] } $_pat = $matches[4] + '*' iex "$_expression | Get-Member $_pat | sort MemberType,Name" | % { if ( $_.MemberType -like "*Method*" -or $_.MemberType -like "*Parameterized*" ) { $parenthes = "(" } if ( $Matches[2] -eq "" ) { $_base + "." + $_.Name + $parenthes } else { $_base + $Matches[2] + "." + $_.Name + $parenthes } } break; } # Handle .NET type name expansion ... # e.g. [Microsoft.PowerShell.Com<tab> '^\\[((\\w+\\.?)+)$' { $_opt = $matches[1] + '*' foreach ( $_exp in $_TypeNames_System -like $_opt ) { '[' + $_exp } foreach ( $_exp in $_TypeNames -like $_opt ) { '[' + $_exp } break; } # Do completion on parameters... '^-([\\w0-9]*)' { $_pat = $matches[1] + '*' # extract the command name from the string # first split the string into statements and pipeline elements # This doesn't handle strings however. $_cmdlet = [regex]::Split($line, '[|;=]')[-1] # Extract the trailing unclosed block e.g. ls | foreach { cp if ($_cmdlet -match '\\{([^\\{\\}]*)$') { $_cmdlet = $matches[1] } # Extract the longest unclosed parenthetical expression... if ($_cmdlet -match '\\(([^()]*)$') { $_cmdlet = $matches[1] } # take the first space separated token of the remaining string # as the command to look up. Trim any leading or trailing spaces # so you don't get leading empty elements. $_cmdlet = $_cmdlet.Trim().Split()[0] # now get the info object for it... $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet)[0] # loop resolving aliases... while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet.Definition)[0] } # expand the parameter sets and emit the matching elements foreach ($_n in $_cmdlet.ParameterSets | Select-Object -expand parameters | Sort-Object -Unique name) { $_n = $_n.name if ($_n -like $_pat) { '-' + $_n } } break; } # try to find a matching command... default { if ( $line[-1] -eq " " ) { $_cmdlet = $line.TrimEnd(" ").Split()[-1] # now get the info object for it... $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet)[0] # loop resolving aliases... while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet.Definition)[0] } if ( "Set-ExecutionPolicy" -eq $_cmdlet.Name ) { "Unrestricted", "RemoteSigned", "AllSigned", "Restricted", "Default" | sort break; } if ( "Trace-Command","Get-TraceSource","Set-TraceSource" -contains $_cmdlet.Name ) { Get-TraceSource | % { $_.Name } | sort -Unique break; } if ( "New-Object" -eq $_cmdlet.Name ) { $_TypeNames_System $_TypeNames break; } if ( $_cmdlet.Noun -like "*WMI*" ) { $_WMIClasses break; } if ( "Get-Process" -eq $_cmdlet.Name ) { Get-Process | % { $_.Name } | sort break; } if ( "Add-PSSnapin", "Get-PSSnapin", "Remove-PSSnapin" -contains $_cmdlet.Name ) { if ( $global:_snapin -ne $null ) { $global:_snapin break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin break; } } if ( "Get-PSDrive", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name -and "Name" ) { Get-PSDrive | sort break; } if ( "Get-Eventlog" -eq $_cmdlet.Name ) { Get-EventLog -List | % { $_base + ($_.Log -replace '\\s','` ') } break; } if ( "Get-Help" -eq $_cmdlet.Name ) { Get-Help -Category all | % { $_.Name } | sort -Unique break; } if ( "Get-Service", "Restart-Service", "Resume-Service", "Start-Service", "Stop-Service", "Suspend-Service" ` -contains $_cmdlet.Name ) { Get-Service | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Get-Command" -eq $_cmdlet.Name ) { Get-Command -CommandType All | % { $_base + ($_.Name -replace '\\s','` ') } break; } } if ( $line[-1] -eq " " ) { # extract the command name from the string # first split the string into statements and pipeline elements # This doesn't handle strings however. $_cmdlet = [regex]::Split($line, '[|;=]')[-1] # Extract the trailing unclosed block e.g. ls | foreach { cp if ($_cmdlet -match '\\{([^\\{\\}]*)$') { $_cmdlet = $matches[1] } # Extract the longest unclosed parenthetical expression... if ($_cmdlet -match '\\(([^()]*)$') { $_cmdlet = $matches[1] } # take the first space separated token of the remaining string # as the command to look up. Trim any leading or trailing spaces # so you don't get leading empty elements. $_cmdlet = $_cmdlet.Trim().Split()[0] # now get the info object for it... $_cmdlet = @(Get-Command -type 'Application' $_cmdlet)[0] if ( $_cmdlet.Name -eq "powershell.exe" ) { "-PSConsoleFile", "-Version", "-NoLogo", "-NoExit", "-Sta", "-NoProfile", "-NonInteractive", "-InputFormat", "-OutputFormat", "-EncodedCommand", "-File", "-Command" | sort break; } if ( $_cmdlet.Name -eq "fsutil.exe" ) { "behavior query", "behavior set", "dirty query", "dirty set", "file findbysid", "file queryallocranges", "file setshortname", "file setvaliddata", "file setzerodata", "file createnew", "fsinfo drives", "fsinfo drivetype", "fsinfo volumeinfo", "fsinfo ntfsinfo", "fsinfo statistics", "hardlink create", "objectid query", "objectid set", "objectid delete", "objectid create", "quota disable", "quota track", "quota enforce", "quota violations", "quota modify", "quota query", "reparsepoint query", "reparsepoint delete", "sparse setflag", "sparse queryflag", "sparse queryrange", "sparse setrange", "usn createjournal", "usn deletejournal", "usn enumdata", "usn queryjournal", "usn readdata", "volume dismount", "volume diskfree" | sort break; } if ( $_cmdlet.Name -eq "net.exe" ) { "ACCOUNTS ", " COMPUTER ", " CONFIG ", " CONTINUE ", " FILE ", " GROUP ", " HELP ", "HELPMSG ", " LOCALGROUP ", " NAME ", " PAUSE ", " PRINT ", " SEND ", " SESSION ", "SHARE ", " START ", " STATISTICS ", " STOP ", " TIME ", " USE ", " USER ", " VIEW" | sort break; } if ( $_cmdlet.Name -eq "ipconfig.exe" ) { "/?", "/all", "/renew", "/release", "/flushdns", "/displaydns", "/registerdns", "/showclassid", "/setclassid" break; } } if ( $line -match '\\s+(\\w+(\\.|[^\\s\\.])*)$' ) { #$_opt = $Matches[1] + '*' $_cmdlet = $line.TrimEnd(" ").Split()[-2] $_opt = $Matches[1].Split(" ,")[-1] + '*' $_base = $Matches[1].Substring(0,$Matches[1].Length-$Matches[1].Split(" ,")[-1].length) # now get the info object for it... $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet)[0] # loop resolving aliases... while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet.Definition)[0] } if ( "Set-ExecutionPolicy" -eq $_cmdlet.Name ) { "Unrestricted", "RemoteSigned", "AllSigned", "Restricted", "Default" -like $_opt | sort break; } if ( "Trace-Command","Get-TraceSource","Set-TraceSource" -contains $_cmdlet.Name ) { Get-TraceSource -Name $_opt | % { $_.Name } | sort -Unique | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "New-Object" -eq $_cmdlet.Name ) { $_TypeNames_System -like $_opt $_TypeNames -like $_opt break; } if ( $_cmdlet.Name -like "*WMI*" ) { $_WMIClasses -like $_opt break; } if ( "Get-Process" -eq $_cmdlet.Name ) { Get-Process $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Add-PSSnapin", "Get-PSSnapin", "Remove-PSSnapin" -contains $_cmdlet.Name ) { if ( $global:_snapin -ne $null ) { $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } } if ( "Get-PSDrive", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name -and "Name" ) { Get-PSDrive -Name $_opt | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-PSProvider" -eq $_cmdlet.Name ) { Get-PSProvider -PSProvider $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Eventlog" -eq $_cmdlet.Name ) { Get-EventLog -List | ? { $_.Log -like $_opt } | % { $_base + ($_.Log -replace '\\s','` ') } break; } if ( "Get-Help" -eq $_cmdlet.Name ) { Get-Help -Category all -Name $_opt | % { $_.Name } | sort -Unique break; } if ( "Get-Service", "Restart-Service", "Resume-Service", "Start-Service", "Stop-Service", "Suspend-Service" ` -contains $_cmdlet.Name ) { Get-Service -Name $_opt | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Get-Command" -eq $_cmdlet.Name ) { Get-Command -CommandType All -Name $_opt | % { $_base + ($_.Name -replace '\\s','` ') } break; } } if ( $line -match '(-(\\w+))\\s+([^-]*$)' ) { $_param = $matches[2] + '*' $_opt = $Matches[3].Split(" ,")[-1] + '*' $_base = $Matches[3].Substring(0,$Matches[3].Length-$Matches[3].Split(" ,")[-1].length) #$_opt = ($Matches[3] -replace '(^.*\\s*,?\\s*)\\w*$','$1') + '*' # extract the command name from the string # first split the string into statements and pipeline elements # This doesn't handle strings however. $_cmdlet = [regex]::Split($line, '[|;=]')[-1] # Extract the trailing unclosed block e.g. ls | foreach { cp if ($_cmdlet -match '\\{([^\\{\\}]*)$') { $_cmdlet = $matches[1] } # Extract the longest unclosed parenthetical expression... if ($_cmdlet -match '\\(([^()]*)$') { $_cmdlet = $matches[1] } # take the first space separated token of the remaining string # as the command to look up. Trim any leading or trailing spaces # so you don't get leading empty elements. $_cmdlet = $_cmdlet.Trim().Split()[0] # now get the info object for it... $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet)[0] # loop resolving aliases... while ($_cmdlet.CommandType -eq 'alias') { $_cmdlet = @(Get-Command -type 'cmdlet,alias' $_cmdlet.Definition)[0] } if ( $_param.TrimEnd("*") -eq "ea" -or $_param.TrimEnd("*") -eq "wa" ) { "SilentlyContinue", "Stop", "Continue", "Inquire" | ? { $_ -like $_opt } | sort -Unique break; } if ( "Out-File","Export-CSV","Select-String","Export-Clixml" -contains $_cmdlet.Name ` -and "Encoding" -like $_param) { "Unicode", "UTF7", "UTF8", "ASCII", "UTF32", "BigEndianUnicode", "Default", "OEM" | ? { $_ -like $_opt } | sort -Unique break; } if ( "Trace-Command","Get-TraceSource","Set-TraceSource" -contains $_cmdlet.Name ` -and "Name" -like $_param) { Get-TraceSource -Name $_opt | % { $_.Name } | sort -Unique | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "New-Object" -like $_cmdlet.Name ) { if ( "ComObject" -like $_param ) { $_ProgID -like $_opt | % { $_ -replace '\\s','` ' } break; } if ( "TypeName" -like $_param ) { $_TypeNames_System -like $_opt $_TypeNames -like $_opt break; } } if ( "New-Item" -eq $_cmdlet.Name ) { if ( "ItemType" -like $_param ) { "directory", "file" -like $_opt break; } } if ( "Get-Location", "Get-PSDrive", "Get-PSProvider", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name ` -and "PSProvider" -like $_param ) { Get-PSProvider -PSProvider $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Location" -eq $_cmdlet.Name -and "PSDrive" -like $_param ) { Get-PSDrive -Name $_opt | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-PSDrive", "New-PSDrive", "Remove-PSDrive" ` -contains $_cmdlet.Name -and "Name" -like $_param ) { Get-PSDrive -Name $_opt | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Command" -eq $_cmdlet.Name -and "PSSnapin" -like $_param) { if ( $global:_snapin -ne $null ) { $global:_snapin -like $_opt | % { $_base + $_ } break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } } if ( "Add-PSSnapin", "Get-PSSnapin", "Remove-PSSnapin" ` -contains $_cmdlet.Name -and "Name" -like $_param ) { if ( $global:_snapin -ne $null ) { $global:_snapin -like $_opt | % { $_base + ($_ -replace '\\s','` ') } break; } else { $global:_snapin = $(Get-PSSnapIn -Registered;Get-PSSnapIn)| sort Name -Unique; $global:_snapin -like $_opt | % { $_base + $_ } break; } } if ( "Clear-Variable", "Export-Alias", "Get-Alias", "Get-PSDrive", "Get-Variable", "Import-Alias", " New-Alias", "New-PSDrive", "New-Variable", "Remove-Variable", "Set-Alias", "Set-Variable" ` -contains $_cmdlet.Name -and "Scope" -like $_param ) { "Global", "Local", "Script" -like $_opt break; } if ( "Get-Process", "Stop-Process", "Wait-Process" -contains $_cmdlet.Name -and "Name" -like $_param ) { Get-Process $_opt | % { $_.Name } | sort | % { $_base + ($_ -replace '\\s','` ') } break; } if ( "Get-Eventlog" -eq $_cmdlet.Name -and "LogName" -like $_param ) { Get-EventLog -List | ? { $_.Log -like $_opt } | % { $_base + ($_.Log -replace '\\s','` ') } break; } if ( "Get-Help" -eq $_cmdlet.Name ) { if ( "Name" -like $_param ) { Get-Help -Category all -Name $_opt | % { $_.Name } | sort -Unique break; } if ( "Category" -like $_param ) { "Alias", "Cmdlet", "Provider", "General", "FAQ", "Glossary", "HelpFile", "All" -like $_opt | sort | % { $_base + $_ } break; } } if ( "Get-Service", "Restart-Service", "Resume-Service", "Start-Service", "Stop-Service", "Suspend-Service" ` -contains $_cmdlet.Name ) { if ( "Name" -like $_param ) { Get-Service -Name $_opt | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "DisplayName" -like $_param ) { Get-Service -Name $_opt | sort DisplayName | % { $_base + ($_.DisplayName -replace '\\s','` ') } break; } } if ( "New-Service" -eq $_cmdlet.Name -and "dependsOn" -like $_param ) { Get-Service -Name $_opt | sort Name | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( "Get-EventLog" -eq $_cmdlet.Name -and "EntryType" -like $_param ) { "Error", "Information", "FailureAudit", "SuccessAudit", "Warning" -like $_opt | sort | % { $_base + $_ } break; } if ( "Get-Command" -eq $_cmdlet.Name -and "Name" -like $_param ) { Get-Command -CommandType All -Name $_opt | % { $_base + ($_.Name -replace '\\s','` ') } break; } if ( $_cmdlet.Noun -like "*WMI*" ) { if ( "Class" -like $_param ) { $_WMIClasses -like $_opt break; } } select -InputObject $_cmdlet -ExpandProperty ParameterSets | select -ExpandProperty Parameters | ? { $_.Name -like $_param } | ? { $_.ParameterType.IsEnum } | % { [Enum]::GetNames($_.ParameterType) } | ? { $_ -like $_opt } | sort -Unique | % { $_base + $_ } } if ( $line[-1] -match "\\s" ) { break; } if ( $lastWord -ne $null -and $lastWord.IndexOfAny('/\\') -eq -1 ) { $command = $lastWord $pattern = $command + "*" gcm -Name $pattern -CommandType All | % { $_.Name } | sort -Unique } } } } }
combined_dataset/train/non-malicious/1631.ps1
1631.ps1
function Get-BitLockerInfo { param ( [string]$ComputerName = $env:COMPUTERNAME, [string]$PsExecPath = 'C:\pstools\psexec.exe' ) if (Test-Connection -ComputerName $ComputerName -Quiet -Count 2) { try{ $user = (Get-WmiObject -Class Win32_ComputerSystem -ComputerName $ComputerName ).UserName } catch { $user = 'UNKNOWN' } $hash = [ordered]@{ 'ComputerName' = $ComputerName 'User' = $user } $bitlockerinfo = (& $PsExecPath \\$ComputerName manage-bde -status c:) -replace ':','=' | Where-Object { $_ -match "^(\s{4})" } | ConvertFrom-StringData foreach ($key in $bitlockerinfo.Keys) { $hash.Add("$key", $bitlockerinfo."$key") } [PSCustomObject]$hash } else { Write-Error "Could not reach target computer: '$ComputerName'." } }
combined_dataset/train/non-malicious/2988.ps1
2988.ps1
function Get-ShouldOperator { [CmdletBinding()] param () DynamicParam { $ParameterName = 'Name' $RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary $AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute] $ParameterAttribute = New-Object System.Management.Automation.ParameterAttribute $AttributeCollection.Add($ParameterAttribute) $arrSet = $AssertionOperators.Values | Select-Object -Property Name, Alias | ForEach-Object { $_.Name; $_.Alias } $ValidateSetAttribute = New-Object System.Management.Automation.ValidateSetAttribute($arrSet) $AttributeCollection.Add($ValidateSetAttribute) $RuntimeParameter = New-Object System.Management.Automation.RuntimeDefinedParameter($ParameterName, [string], $AttributeCollection) $RuntimeParameterDictionary.Add($ParameterName, $RuntimeParameter) return $RuntimeParameterDictionary } BEGIN { $Name = $PsBoundParameters[$ParameterName] } END { if ($Name) { $operator = $AssertionOperators.Values | Where-Object { $Name -eq $_.Name -or $_.Alias -contains $Name } $help = Get-Help $operator.InternalName -Examples -ErrorAction SilentlyContinue if (($help | Measure-Object).Count -ne 1) { Write-Warning ("No help found for Should operator '{0}'" -f ((Get-AssertionOperatorEntry $Name).InternalName)) } else { $help } } else { $AssertionOperators.Keys | ForEach-Object { $aliases = (Get-AssertionOperatorEntry $_).Alias New-Object -TypeName PSObject -Property @{ Name = $_ Alias = $aliases -join ', ' } } } } }
combined_dataset/train/non-malicious/597.ps1
597.ps1
function Backup-AllSQLDBs{ [CmdletBinding()] param( [Parameter(Mandatory=$false)] [String] $Server = $env:COMPUTERNAME, [Parameter(Mandatory=$true)] [String] $Instance, [Parameter(Mandatory=$true)] [String] $Path ) if((Get-PSSnapin "SqlServerCmdletSnapin100" -ErrorAction SilentlyContinue) -eq $Null){ Add-PSSnapin "SqlServerCmdletSnapin100" } if((Get-PSSnapin "SqlServerProviderSnapin100" -ErrorAction SilentlyContinue) -eq $Null){ Add-PSSnapin "SqlServerProviderSnapin100" } Push-Location $SQLInstance = "SQLServer:\SQL\$Server\$Instance\Databases" set-Location $SQLInstance Get-ChildItem $SQLInstance | select name | %{ $BackupPath = $Path + "\" + $_.Name if(! (Test-Path $BackupPath)){ mkdir $BackupPath } } $SQLQuery = @" DECLARE @Name VARCHAR(250) DECLARE @Path VARCHAR(250) DECLARE @FileName VARCHAR(250) DECLARE @TimeStamp VARCHAR(30) SET @Path = '$Path' SELECT @TimeStamp = REPLACE(CONVERT(VARCHAR(26),getdate(),120),':','-') DECLARE db_cursor CURSOR FOR SELECT name FROM master.dbo.sysdatabases WHERE name NOT IN ('master','model','msdb','tempdb') OPEN db_cursor FETCH NEXT FROM db_cursor INTO @Name WHILE @@FETCH_STATUS = 0 BEGIN SET @FileName = @Path + '\' + @Name + '\' + @Name + ' PRINT @FileName BACKUP DATABASE @Name TO DISK = @FileName FETCH NEXT FROM db_cursor INTO @Name END CLOSE db_cursor DEALLOCATE db_cursor "@ Invoke-Sqlcmd -Query $SQLQuery -QueryTimeout 1000 Pop-Location }
combined_dataset/train/non-malicious/Is-Prime.ps1
Is-Prime.ps1
######################################################################### # # Is-Prime # #Written by Tynen # ######################################################################### function Is-Prime{ param ($number) if($number -is [int] -or $number -is [long] -or $number -is [double] -or $number -is [single]){ $i = 1 do { $math = $number / $i $i++ if(is-natural($math)){ $Result += @($math) } }while ($i -le $number) }else{return "Error: Did not receive an integer"} if($Result.Count -eq 2 -or $Result.Count -eq 1){ return $true }else{return $false} }
combined_dataset/train/non-malicious/sample_20_70.ps1
sample_20_70.ps1
# # Module manifest for module 'OCI.PSModules.Stackmonitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Stackmonitoring.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '72fd42de-2724-406e-9e11-bceb4c8ef8b6' # 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 Stackmonitoring 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 = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Stackmonitoring.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 = 'Disable-OCIStackmonitoringExternalDatabase', 'Disable-OCIStackmonitoringMetricExtension', 'Enable-OCIStackmonitoringMetricExtension', 'Export-OCIStackmonitoringMetricExtension', 'Get-OCIStackmonitoringBaselineableMetric', 'Get-OCIStackmonitoringBaselineableMetricsList', 'Get-OCIStackmonitoringConfig', 'Get-OCIStackmonitoringConfigsList', 'Get-OCIStackmonitoringDiscoveryJob', 'Get-OCIStackmonitoringDiscoveryJobLogsList', 'Get-OCIStackmonitoringDiscoveryJobsList', 'Get-OCIStackmonitoringMetricExtension', 'Get-OCIStackmonitoringMetricExtensionsList', 'Get-OCIStackmonitoringMonitoredResource', 'Get-OCIStackmonitoringMonitoredResourcesList', 'Get-OCIStackmonitoringMonitoredResourceTask', 'Get-OCIStackmonitoringMonitoredResourceTasksList', 'Get-OCIStackmonitoringMonitoredResourceType', 'Get-OCIStackmonitoringMonitoredResourceTypesList', 'Get-OCIStackmonitoringWorkRequest', 'Get-OCIStackmonitoringWorkRequestErrorsList', 'Get-OCIStackmonitoringWorkRequestLogsList', 'Get-OCIStackmonitoringWorkRequestsList', 'Invoke-OCIStackmonitoringAssociateMonitoredResources', 'Invoke-OCIStackmonitoringDisassociateMonitoredResources', 'Invoke-OCIStackmonitoringEvaluateBaselineableMetric', 'Invoke-OCIStackmonitoringManageLicense', 'Invoke-OCIStackmonitoringPublishMetricExtension', 'Invoke-OCIStackmonitoringRequestMonitoredResourcesSummarizedCount', 'Invoke-OCIStackmonitoringSearchAssociatedResources', 'Invoke-OCIStackmonitoringSearchMonitoredResourceAssociations', 'Invoke-OCIStackmonitoringSearchMonitoredResourceMembers', 'Invoke-OCIStackmonitoringSearchMonitoredResources', 'Invoke-OCIStackmonitoringTestMetricExtension', 'Move-OCIStackmonitoringConfigCompartment', 'Move-OCIStackmonitoringMetricExtensionCompartment', 'Move-OCIStackmonitoringMonitoredResourceCompartment', 'Move-OCIStackmonitoringMonitoredResourceTaskCompartment', 'New-OCIStackmonitoringBaselineableMetric', 'New-OCIStackmonitoringConfig', 'New-OCIStackmonitoringDiscoveryJob', 'New-OCIStackmonitoringMetricExtension', 'New-OCIStackmonitoringMonitoredResource', 'New-OCIStackmonitoringMonitoredResourceTask', 'New-OCIStackmonitoringMonitoredResourceType', 'Remove-OCIStackmonitoringBaselineableMetric', 'Remove-OCIStackmonitoringConfig', 'Remove-OCIStackmonitoringDiscoveryJob', 'Remove-OCIStackmonitoringMetricExtension', 'Remove-OCIStackmonitoringMonitoredResource', 'Remove-OCIStackmonitoringMonitoredResourceType', 'Update-OCIStackmonitoringAndPropagateTags', 'Update-OCIStackmonitoringBaselineableMetric', 'Update-OCIStackmonitoringConfig', 'Update-OCIStackmonitoringMetricExtension', 'Update-OCIStackmonitoringMonitoredResource', 'Update-OCIStackmonitoringMonitoredResourceTask', 'Update-OCIStackmonitoringMonitoredResourceType' # 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','Stackmonitoring' # 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_23_96.ps1
sample_23_96.ps1
define({"orrespo":{"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],"corresponda":[240,303,579],"corresponde":[240,358,359,381,401,474,582,626],"correspondido":[240],"correspondam":[339,441],},"orrespon":{"correspondentes":[40,238,241,407,415,418,419,421,614],"correspondente":[63,112,329,397,410,416,418,419,420,421,427,489,546,547,548,549,579,614],"correspondem":[63,549],"corresponder":[93,240,241,390,468],"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],"corresponda":[240,303,579],"corresponde":[240,358,359,381,401,474,582,626],"correspondido":[240],"correspondam":[339,441],},"orrespond":{"correspondentes":[40,238,241,407,415,418,419,421,614],"correspondente":[63,112,329,397,410,416,418,419,420,421,427,489,546,547,548,549,579,614],"correspondem":[63,549],"corresponder":[93,240,241,390,468],"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],"corresponda":[240,303,579],"corresponde":[240,358,359,381,401,474,582,626],"correspondido":[240],"correspondam":[339,441],},"orresponda":{"corresponda":[240,303,579],"correspondam":[339,441],},"orrespondam":{"correspondam":[339,441],},"orresponde":{"correspondentes":[40,238,241,407,415,418,419,421,614],"correspondente":[63,112,329,397,410,416,418,419,420,421,427,489,546,547,548,549,579,614],"correspondem":[63,549],"corresponder":[93,240,241,390,468],"corresponde":[240,358,359,381,401,474,582,626],},"orrespondem":{"correspondem":[63,549],},"orresponden":{"correspondentes":[40,238,241,407,415,418,419,421,614],"correspondente":[63,112,329,397,410,416,418,419,420,421,427,489,546,547,548,549,579,614],},"orrespondent":{"correspondentes":[40,238,241,407,415,418,419,421,614],"correspondente":[63,112,329,397,410,416,418,419,420,421,427,489,546,547,548,549,579,614],},"orrespondente":{"correspondentes":[40,238,241,407,415,418,419,421,614],"correspondente":[63,112,329,397,410,416,418,419,420,421,427,489,546,547,548,549,579,614],},"orrespondentes":{"correspondentes":[40,238,241,407,415,418,419,421,614],},"orresponder":{"corresponder":[93,240,241,390,468],},"orrespondi":{"correspondido":[240],},"orrespondid":{"correspondido":[240],},"orrespondido":{"correspondido":[240],},"orrespondê":{"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],},"orrespondên":{"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],},"orrespondênc":{"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],},"orrespondênci":{"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],},"orrespondência":{"correspondências":[134],"correspondência":[238,240,241,242,247,252,255,256,257,258,261,262,263,264,483,498,500,502,505],},"orrespondências":{"correspondências":[134],},"orret":{"correto":[13,59,162,184,463,487,559],"incorreto":[63,549],"incorretamente":[372],"correta":[400,496,516],"incorretos":[420],"corretamente":[491,496,583],"corretos":[496],},"orreta":{"incorretamente":[372],"correta":[400,496,516],"corretamente":[491,496,583],},"orretam":{"incorretamente":[372],"corretamente":[491,496,583],},"orretame":{"incorretamente":[372],"corretamente":[491,496,583],},"orretamen":{"incorretamente":[372],"corretamente":[491,496,583],},"orretament":{"incorretamente":[372],"corretamente":[491,496,583],},"orretamente":{"incorretamente":[372],"corretamente":[491,496,583],},"orreto":{"correto":[13,59,162,184,463,487,559],"incorreto":[63,549],"incorretos":[420],"corretos":[496],},"orretos":{"incorretos":[420],"corretos":[496],},"orreç":{"correções":[209],"correção":[209,408,418,419,420,421,476],},"orreçã":{"correção":[209,408,418,419,420,421,476],},"orreção":{"correção":[209,408,418,419,420,421,476],},"orreçõ":{"correções":[209],},"orreçõe":{"correções":[209],},"orreções":{"correções":[209],},"orri":{"corrigido":[296,299,300],"percorrida":[297,298],"corrigir":[408,418,419,420,421],"decorrido":[623],},"orrid":{"percorrida":[297,298],"decorrido":[623],},"orrida":{"percorrida":[297,298],},"orrido":{"decorrido":[623],},"orrig":{"corrigido":[296,299,300],"corrigir":[408,418,419,420,421],},"orrigi":{"corrigido":[296,299,300],"corrigir":[408,418,419,420,421],},"orrigid":{"corrigido":[296,299,300],},"orrigido":{"corrigido":[296,299,300],},"orrigir":{"corrigir":[408,418,419,420,421],},"orrê":{"ocorrência":[232,237],"ocorrências":[489],},"orrên":{"ocorrência":[232,237],"ocorrências":[489],},"orrênc":{"ocorrência":[232,237],"ocorrências":[489],},"orrênci":{"ocorrência":[232,237],"ocorrências":[489],},"orrência":{"ocorrência":[232,237],"ocorrências":[489],},"orrências":{"ocorrências":[489],},"orta":{"comportamento":[7,120,121,248,267,360],"importante":[9,305],"porta":[11,12,13,17,75,76,77,78,262,264,267,280,301,316,317,322,329,349,354,356,357,358,359,361,362,404,424,508,556,557,582,595],"portas":[13,17,79,155,166,264,267,288,289,295,297,298,329,404],"portanto":[45,105,106,509,570,630],"cortado":[63,546,548],"suportar":[63,109,358,359,394,455,549,643],"suportam":[70,71,155,178,179,312,403,622],"suportadas":[70,71,107,135,210,255,256,257,258],"suportado":[95,401,413,417,482,483,489,509],"suporta":[109,224,226,329,404],"reportada":[149],"suportados":[155,203,302,489,497],"cortar":[228],"comportamentos":[329],"exportar":[378,393],"reportados":[422],"comporta":[425,586],"suportada":[464,489,509],"importantes":[510,511],"exportados":[625],},"ortad":{"cortado":[63,546,548],"suportadas":[70,71,107,135,210,255,256,257,258],"suportado":[95,401,413,417,482,483,489,509],"reportada":[149],"suportados":[155,203,302,489,497],"reportados":[422],"suportada":[464,489,509],"exportados":[625],},"ortada":{"suportadas":[70,71,107,135,210,255,256,257,258],"reportada":[149],"suportada":[464,489,509],},"ortadas":{"suportadas":[70,71,107,135,210,255,256,257,258],},"ortado":{"cortado":[63,546,548],"suportado":[95,401,413,417,482,483,489,509],"suportados":[155,203,302,489,497],"reportados":[422],"exportados":[625],},"ortados":{"suportados":[155,203,302,489,497],"reportados":[422],"exportados":[625],},"ortam":{"comportamento":[7,120,121,248,267,360],"suportam":[70,71,155,178,179,312,403,622],"comportamentos":[329],},"ortame":{"comportamento":[7,120,121,248,267,360],"comportamentos":[329],},"ortamen":{"comportamento":[7,120,121,248,267,360],"comportamentos":[329],},"ortament":{"comportamento":[7,120,121,248,267,360],"comportamentos":[329],},"ortamento":{"comportamento":[7,120,121,248,267,360],"comportamentos":[329],},"ortamentos":{"comportamentos":[329],},"ortan":{"importante":[9,305],"portanto":[45,105,106,509,570,630],"importantes":[510,511],},"ortant":{"importante":[9,305],"portanto":[45,105,106,509,570,630],"importantes":[510,511],},"ortante":{"importante":[9,305],"importantes":[510,511],},"ortantes":{"importantes":[510,511],},"ortanto":{"portanto":[45,105,106,509,570,630],},"ortar":{"suportar":[63,109,358,359,394,455,549,643],"cortar":[228],"exportar":[378,393],},"ortas":{"portas":[13,17,79,155,166,264,267,288,289,295,297,298,329,404],},"orte":{"suporte":[16,123,309,372,378,539,583,593,643],"norte":[188,193],"comporte":[322],"reporte":[484],"fortemente":[486],"exporte":[631],},"ortem":{"fortemente":[486],},"orteme":{"fortemente":[486],},"ortemen":{"fortemente":[486],},"ortement":{"fortemente":[486],},"ortemente":{"fortemente":[486],},"orti":{"cortina":[302],"portions":[645],},"ortin":{"cortina":[302],},"ortina":{"cortina":[302],},"ortio":{"portions":[645],},"ortion":{"portions":[645],},"ortions":{"portions":[645],},"ortá":{"portátil":[400,428],"portáteis":[577,589],},"ortát":{"portátil":[400,428],"portáteis":[577,589],},"ortáte":{"portáteis":[577,589],},"ortátei":{"portáteis":[577,589],},"ortáteis":{"portáteis":[577,589],},"ortáti":{"portátil":[400,428],},"ortátil":{"portátil":[400,428],},"orvi":{"sensorview":[318,320,645],},"orvie":{"sensorview":[318,320,645],},"orview":{"sensorview":[318,320,645],},"orár":{"horário":[209,300,536],},"orári":{"horário":[209,300,536],},"orário":{"horário":[209,300,536],},"orça":{"força":[18,30,42,352],"forçada":[510,511],},"orçad":{"forçada":[510,511],},"orçada":{"forçada":[510,511],},"orço":{"esforço":[380],},"orçõ":{"porções":[642],},"orçõe":{"porções":[642],},"orções":{"porções":[642],},"orém":{"porém":[63,97,140,142,143,174,175,198,341,385,391,483,485,486,536,546,554,565,566,580],},"os":{"os":[0,1,6,7,10,11,12,13,16,18,19,20,21,22,23,27,32,33,34,40,41,45,47,48,52,53,54,55,59,63,64,65,79,86,88,97,105,106,108,110,113,118,120,121,123,124,126,127,128,129,131,132,134,136,137,140,141,142,143,144,146,147,148,152,155,158,159,160,161,162,163,166,167,168,169,170,171,173,174,178,179,183,184,185,187,189,191,192,197,201,202,203,205,206,207,209,210,211,212,214,217,218,219,220,226,227,228,230,231,237,239,240,241,243,251,265,270,272,277,279,289,292,293,297,298,302,309,310,312,313,314,324,325,328,329,330,331,334,340,341,344,346,347,349,350,351,352,367,368,369,370,371,378,379,381,383,384,386,388,389,390,391,392,393,394,396,397,398,400,401,402,404,405,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,424,426,427,428,430,431,433,434,440,442,446,447,448,449,450,451,452,453,457,458,459,462,466,467,468,469,474,475,476,479,480,481,483,484,486,487,488,489,491,496,497,498,500,501,502,508,510,511,512,513,517,518,519,520,522,526,528,529,530,532,533,534,535,536,537,539,545,548,549,550,551,552,553,554,555,556,557,565,568,579,580,585,587,588,589,591,599,607,608,609,613,616,625,627,628,629,630,631,632,633,634,635,638,639,640,641,642,643],},"osas":{"silenciosas":[416],},"osci":{"oscilando":[177],"oscilações":[177],},"oscil":{"oscilando":[177],"oscilações":[177],},"oscila":{"oscilando":[177],"oscilações":[177],},"oscilan":{"oscilando":[177],},"osciland":{"oscilando":[177],},"oscilando":{"oscilando":[177],},"oscilaç":{"oscilações":[177],},"oscilaçõ":{"oscilações":[177],},"oscilaçõe":{"oscilações":[177],},"oscilações":{"oscilações":[177],},"oscó":{"estroboscópio":[75,76],"estroboscópico":[79,282,288,289],"estroboscópica":[528,529],},"oscóp":{"estroboscópio":[75,76],"estroboscópico":[79,282,288,289],"estroboscópica":[528,529],},"oscópi":{"estroboscópio":[75,76],"estroboscópico":[79,282,288,289],"estroboscópica":[528,529],},"oscópic":{"estroboscópico":[79,282,288,289],"estroboscópica":[528,529],},"oscópica":{"estroboscópica":[528,529],},"oscópico":{"estroboscópico":[79,282,288,289],},"oscópio":{"estroboscópio":[75,76],},"osic":{"posiciono":[57,58],"posicione":[400],"posicionadas":[483],"posicionando":[631],},"osici":{"posiciono":[57,58],"posicione":[400],"posicionadas":[483],"posicionando":[631],},"osicio":{"posiciono":[57,58],"posicione":[400],"posicionadas":[483],"posicionando":[631],},"osicion":{"posiciono":[57,58],"posicione":[400],"posicionadas":[483],"posicionando":[631],},"osiciona":{"posicionadas":[483],"posicionando":[631],},"osicionad":{"posicionadas":[483],},"osicionada":{"posicionadas":[483],},"osicionadas":{"posicionadas":[483],},"osicionan":{"posicionando":[631],},"osicionand":{"posicionando":[631],},"osicionando":{"posicionando":[631],},"osicione":{"posicione":[400],},"osiciono":{"posiciono":[57,58],},"osid":{"ociosidade":[354,424,595],},"osida":{"ociosidade":[354,424,595],},"osidad":{"ociosidade":[354,424,595],},"osidade":{"ociosidade":[354,424,595],},"osit":{"dispositivo":[0,2,6,10,11,12,13,14,15,16,21,22,23,26,27,28,31,32,34,36,37,38,39,40,41,45,47,56,63,64,65,113,136,140,146,157,167,169,171,173,174,175,185,187,209,224,232,248,252,256,257,268,269,272,278,303,304,305,306,309,311,314,316,322,324,325,329,332,351,360,361,367,372,374,375,376,377,378,379,380,381,383,384,385,387,388,389,390,391,392,393,400,407,411,412,414,417,424,429,430,443,448,449,450,452,453,454,455,468,469,479,482,483,484,486,508,509,510,511,523,531,536,537,539,540,544,545,565,577,589,592,612,620,621,623,624,625,627,628,629,630,631,633,634,635,639,640,641],"dispositivos":[10,13,16,21,22,23,26,27,28,31,32,40,309,322,344,345,373,374,375,378,379,381,383,384,387,390,450,482,508,511,519,528,529,530,577,589,622,625,627,628,641],"composite":[116,117],"positivas":[209],"positiva":[300],"positivo":[498],},"osite":{"composite":[116,117],},"ositi":{"dispositivo":[0,2,6,10,11,12,13,14,15,16,21,22,23,26,27,28,31,32,34,36,37,38,39,40,41,45,47,56,63,64,65,113,136,140,146,157,167,169,171,173,174,175,185,187,209,224,232,248,252,256,257,268,269,272,278,303,304,305,306,309,311,314,316,322,324,325,329,332,351,360,361,367,372,374,375,376,377,378,379,380,381,383,384,385,387,388,389,390,391,392,393,400,407,411,412,414,417,424,429,430,443,448,449,450,452,453,454,455,468,469,479,482,483,484,486,508,509,510,511,523,531,536,537,539,540,544,545,565,577,589,592,612,620,621,623,624,625,627,628,629,630,631,633,634,635,639,640,641],"dispositivos":[10,13,16,21,22,23,26,27,28,31,32,40,309,322,344,345,373,374,375,378,379,381,383,384,387,390,450,482,508,511,519,528,529,530,577,589,622,625,627,628,641],"positivas":[209],"positiva":[300],"positivo":[498],},"ositiv":{"dispositivo":[0,2,6,10,11,12,13,14,15,16,21,22,23,26,27,28,31,32,34,36,37,38,39,40,41,45,47,56,63,64,65,113,136,140,146,157,167,169,171,173,174,175,185,187,209,224,232,248,252,256,257,268,269,272,278,303,304,305,306,309,311,314,316,322,324,325,329,332,351,360,361,367,372,374,375,376,377,378,379,380,381,383,384,385,387,388,389,390,391,392,393,400,407,411,412,414,417,424,429,430,443,448,449,450,452,453,454,455,468,469,479,482,483,484,486,508,509,510,511,523,531,536,537,539,540,544,545,565,577,589,592,612,620,621,623,624,625,627,628,629,630,631,633,634,635,639,640,641],"dispositivos":[10,13,16,21,22,23,26,27,28,31,32,40,309,322,344,345,373,374,375,378,379,381,383,384,387,390,450,482,508,511,519,528,529,530,577,589,622,625,627,628,641],"positivas":[209],"positiva":[300],"positivo":[498],},"ositiva":{"positivas":[209],"positiva":[300],},"ositivas":{"positivas":[209],},"ositivo":{"dispositivo":[0,2,6,10,11,12,13,14,15,16,21,22,23,26,27,28,31,32,34,36,37,38,39,40,41,45,47,56,63,64,65,113,136,140,146,157,167,169,171,173,174,175,185,187,209,224,232,248,252,256,257,268,269,272,278,303,304,305,306,309,311,314,316,322,324,325,329,332,351,360,361,367,372,374,375,376,377,378,379,380,381,383,384,385,387,388,389,390,391,392,393,400,407,411,412,414,417,424,429,430,443,448,449,450,452,453,454,455,468,469,479,482,483,484,486,508,509,510,511,523,531,536,537,539,540,544,545,565,577,589,592,612,620,621,623,624,625,627,628,629,630,631,633,634,635,639,640,641],"dispositivos":[10,13,16,21,22,23,26,27,28,31,32,40,309,322,344,345,373,374,375,378,379,381,383,384,387,390,450,482,508,511,519,528,529,530,577,589,622,625,627,628,641],"positivo":[498],},"ositivos":{"dispositivos":[10,13,16,21,22,23,26,27,28,31,32,40,309,322,344,345,373,374,375,378,379,381,383,384,387,390,450,482,508,511,519,528,529,530,577,589,622,625,627,628,641],},"osix":{"posix":[536],},"osiç":{"exposição":[4,5,36,38,39,40,50,51,52,73,150,151,152,155,163,166,180,181,182,183,194,195,252,283,528,529,539,600],"sobreposição":[14,15,16,162,184,376,377,409,535,553,554,555,588],"composição":[116],"posição":[117,134,144,146,209,217,303,466,483,501],"posições":[160,163,483,625],"disposição":[388,448,483,639],},"osiçã":{"exposição":[4,5,36,38,39,40,50,51,52,73,150,151,152,155,163,166,180,181,182,183,194,195,252,283,528,529,539,600],"sobreposição":[14,15,16,162,184,376,377,409,535,553,554,555,588],"composição":[116],"posição":[117,134,144,146,209,217,303,466,483,501],"disposição":[388,448,483,639],},"osição":{"exposição":[4,5,36,38,39,40,50,51,52,73,150,151,152,155,163,166,180,181,182,183,194,195,252,283,528,529,539,600],"sobreposição":[14,15,16,162,184,376,377,409,535,553,554,555,588],"composição":[116],"posição":[117,134,144,146,209,217,303,466,483,501],"disposição":[388,448,483,639],},"osiçõ":{"posições":[160,163,483,625],},"osiçõe":{"posições":[160,163,483,625],},"osições":{"posições":[160,163,483,625],},"osof":{"microsoft":[645],},"osoft":{"microsoft":[645],},"ossa":{"possa":[28,40,57,58,155,166,274,482,510],"possam":[110,483,484,511],"endossar":[643],},"ossam":{"possam":[110,483,484,511],},"ossar":{"endossar":[643],},"osse":{"microssegundos":[180,181,182,183],"fossem":[351,526],"fosse":[581],},"osseg":{"microssegundos":[180,181,182,183],},"ossegu":{"microssegundos":[180,181,182,183],},"ossegun":{"microssegundos":[180,181,182,183],},"ossegund":{"microssegundos":[180,181,182,183],},"ossegundo":{"microssegundos":[180,181,182,183],},"ossegundos":{"microssegundos":[180,181,182,183],},"ossem":{"fossem":[351,526],},"ossi":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],"possibilidade":[482,643],},"ossib":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],"possibilidade":[482,643],},"ossibi":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],"possibilidade":[482,643],},"ossibil":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],"possibilidade":[482,643],},"ossibili":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],"possibilidade":[482,643],},"ossibilid":{"possibilidade":[482,643],},"ossibilida":{"possibilidade":[482,643],},"ossibilidad":{"possibilidade":[482,643],},"ossibilidade":{"possibilidade":[482,643],},"ossibilit":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],},"ossibilita":{"possibilitando":[21],"possibilitam":[212,544,592],"possibilita":[357,556,560,603],},"ossibilitam":{"possibilitam":[212,544,592],},"ossibilitan":{"possibilitando":[21],},"ossibilitand":{"possibilitando":[21],},"ossibilitando":{"possibilitando":[21],},"osso":{"posso":[1,2,3,4,5,6,7,8,18,19,20,33,34,36,37,38,39,40,47,60,91,104,150,151,194,203,218,224,228,230,232,233,245,248,253,255,270,275,277,301,302,315,335,336,363,374,378,381,382,383,384,427,428,434,435,439,441,443,520,530,556,558,560,568,573,590,592,603,604,605,606,607,610,611,612,623,624,627,632],},"ossu":{"possui":[0,7,49,57,58,160,381,394,414,417,538,559],"possuem":[13,88,155,209,345,390,396,408,414,417,418,419,420,421,445,450,537,612,641],"possuam":[390,450,641],"possuir":[390,450,641],},"ossua":{"possuam":[390,450,641],},"ossuam":{"possuam":[390,450,641],},"ossue":{"possuem":[13,88,155,209,345,390,396,408,414,417,418,419,420,421,445,450,537,612,641],},"ossuem":{"possuem":[13,88,155,209,345,390,396,408,414,417,418,419,420,421,445,450,537,612,641],},"ossui":{"possui":[0,7,49,57,58,160,381,394,414,417,538,559],"possuir":[390,450,641],},"ossuir":{"possuir":[390,450,641],},"ossí":{"possível":[26,35,40,49,50,52,53,54,55,56,59,68,71,78,82,95,96,104,118,123,137,140,145,160,161,178,179,188,191,193,210,214,219,226,231,246,247,253,255,261,262,263,264,271,277,280,284,288,290,291,294,297,298,301,302,308,312,314,317,322,340,341,348,358,359,378,382,394,400,401,424,428,435,439,440,443,446,452,458,464,472,475,483,484,489,514,523,528,529,530,533,534,536,542,552,555,557,559,564,599,601,608,615,643],"possíveis":[63,116,261,262,263,264,550,634,638],},"ossív":{"possível":[26,35,40,49,50,52,53,54,55,56,59,68,71,78,82,95,96,104,118,123,137,140,145,160,161,178,179,188,191,193,210,214,219,226,231,246,247,253,255,261,262,263,264,271,277,280,284,288,290,291,294,297,298,301,302,308,312,314,317,322,340,341,348,358,359,378,382,394,400,401,424,428,435,439,440,443,446,452,458,464,472,475,483,484,489,514,523,528,529,530,533,534,536,542,552,555,557,559,564,599,601,608,615,643],"possíveis":[63,116,261,262,263,264,550,634,638],},"ossíve":{"possível":[26,35,40,49,50,52,53,54,55,56,59,68,71,78,82,95,96,104,118,123,137,140,145,160,161,178,179,188,191,193,210,214,219,226,231,246,247,253,255,261,262,263,264,271,277,280,284,288,290,291,294,297,298,301,302,308,312,314,317,322,340,341,348,358,359,378,382,394,400,401,424,428,435,439,440,443,446,452,458,464,472,475,483,484,489,514,523,528,529,530,533,534,536,542,552,555,557,559,564,599,601,608,615,643],"possíveis":[63,116,261,262,263,264,550,634,638],},"ossívei":{"possíveis":[63,116,261,262,263,264,550,634,638],},"ossíveis":{"possíveis":[63,116,261,262,263,264,550,634,638],},"ossível":{"possível":[26,35,40,49,50,52,53,54,55,56,59,68,71,78,82,95,96,104,118,123,137,140,145,160,161,178,179,188,191,193,210,214,219,226,231,246,247,253,255,261,262,263,264,271,277,280,284,288,290,291,294,297,298,301,302,308,312,314,317,322,340,341,348,358,359,378,382,394,400,401,424,428,435,439,440,443,446,452,458,464,472,475,483,484,489,514,523,528,529,530,533,534,536,542,552,555,557,559,564,599,601,608,615,643],},"osta":{"respostas":[56,383,387],"resposta":[64,65,115,135,138,152,155,166,177,525,551],"oposta":[113,136],"postais":[134,146],"postal":[134,146],"postal+4":[134],"gostaria":[200,520,604],"proposta":[643],},"ostai":{"postais":[134,146],},"ostais":{"postais":[134,146],},"ostal":{"postal":[134,146],"postal+4":[134],},"ostal+":{"postal+4":[134],},"ostal+4":{"postal+4":[134],},"ostar":{"gostaria":[200,520,604],},"ostari":{"gostaria":[200,520,604],},"ostaria":{"gostaria":[200,520,604],},"ostas":{"respostas":[56,383,387],},"oste":{"posterior":[19,279,307,308],"posteriores":[144],},"oster":{"posterior":[19,279,307,308],"posteriores":[144],},"osteri":{"posterior":[19,279,307,308],"posteriores":[144],},"osterio":{"posterior":[19,279,307,308],"posteriores":[144],},"osterior":{"posterior":[19,279,307,308],"posteriores":[144],},"osteriore":{"posteriores":[144],},"osteriores":{"posteriores":[144],},"ostn":{"postnet":[134],},"ostne":{"postnet":[134],},"ostnet":{"postnet":[134],},"osto":{"oposto":[140,217],"sobrepostos":[461],"opostos":[528,529],},"ostos":{"sobrepostos":[461],"opostos":[528,529],},"ostr":{"mostrando":[11,12,146,397],"mostra":[13,40,63,64,65,196,211,398,452,453,477,545,550],"mostrados":[22,636,637],"mostradas":[63,105,546,549],"subamostra":[64,65,551,552],"mostram":[123,637],"mostrarão":[142,143,555],"amostra":[424],"mostrará":[477,497],"mostrado":[506],"mostrar":[597],},"ostra":{"mostrando":[11,12,146,397],"mostra":[13,40,63,64,65,196,211,398,452,453,477,545,550],"mostrados":[22,636,637],"mostradas":[63,105,546,549],"subamostra":[64,65,551,552],"mostram":[123,637],"mostrarão":[142,143,555],"amostra":[424],"mostrará":[477,497],"mostrado":[506],"mostrar":[597],},"ostrad":{"mostrados":[22,636,637],"mostradas":[63,105,546,549],"mostrado":[506],},"ostrada":{"mostradas":[63,105,546,549],},"ostradas":{"mostradas":[63,105,546,549],},"ostrado":{"mostrados":[22,636,637],"mostrado":[506],},"ostrados":{"mostrados":[22,636,637],},"ostram":{"mostram":[123,637],},"ostran":{"mostrando":[11,12,146,397],},"ostrand":{"mostrando":[11,12,146,397],},"ostrando":{"mostrando":[11,12,146,397],},"ostrar":{"mostrarão":[142,143,555],"mostrará":[477,497],"mostrar":[597],},"ostrará":{"mostrará":[477,497],},"ostrarã":{"mostrarão":[142,143,555],},"ostrarão":{"mostrarão":[142,143,555],},"ostá":{"eletrostática":[318,320],},"ostát":{"eletrostática":[318,320],},"ostáti":{"eletrostática":[318,320],},"ostátic":{"eletrostática":[318,320],},"ostática":{"eletrostática":[318,320],},"osão":{"erosão":[476],},"otad":{"anotada":[503],"plotados":[625,634],"plotado":[630,631],},"otada":{"anotada":[503],},"otado":{"plotados":[625,634],"plotado":[630,631],},"otados":{"plotados":[625,634],},"otag":{"plotagens":[634],},"otage":{"plotagens":[634],},"otagen":{"plotagens":[634],},"otagens":{"plotagens":[634],},"otai":{"totais":[420],},"otais":{"totais":[420],},"otal":{"total":[64,65,142,143,155,164,166,209,437,520,527,537,552],"totalmente":[361,423],},"otalm":{"totalmente":[361,423],},"otalme":{"totalmente":[361,423],},"otalmen":{"totalmente":[361,423],},"otalment":{"totalmente":[361,423],},"otalmente":{"totalmente":[361,423],},"otan":{"denotando":[117],},"otand":{"denotando":[117],},"otando":{"denotando":[117],},"otas":{"notas":[210,305],},"otaç":{"rotações":[209],"rotação":[297,298,400],},"otaçã":{"rotação":[297,298,400],},"otação":{"rotação":[297,298,400],},"otaçõ":{"rotações":[209],},"otaçõe":{"rotações":[209],},"otações":{"rotações":[209],},"otba":{"hotbars":[645],},"otbar":{"hotbars":[645],},"otbars":{"hotbars":[645],},"otch":{"notchmax":[645],},"otchm":{"notchmax":[645],},"otchma":{"notchmax":[645],},"otchmax":{"notchmax":[645],},"otco":{"dotcode":[140,203,411,412,417,421],},"otcod":{"dotcode":[140,203,411,412,417,421],},"otcode":{"dotcode":[140,203,411,412,417,421],},"otea":{"roteamento":[328],"roteados":[328],},"otead":{"roteados":[328],},"oteado":{"roteados":[328],},"oteados":{"roteados":[328],},"oteam":{"roteamento":[328],},"oteame":{"roteamento":[328],},"oteamen":{"roteamento":[328],},"oteament":{"roteamento":[328],},"oteamento":{"roteamento":[328],},"oted":{"noted":[645],},"oteg":{"protegidos":[625,642],"protegido":[625],},"otegi":{"protegidos":[625,642],"protegido":[625],},"otegid":{"protegidos":[625,642],"protegido":[625],},"otegido":{"protegidos":[625,642],"protegido":[625],},"otegidos":{"protegidos":[625,642],},"otel":{"microtelefone":[13],},"otele":{"microtelefone":[13],},"otelef":{"microtelefone":[13],},"otelefo":{"microtelefone":[13],},"otelefon":{"microtelefone":[13],},"otelefone":{"microtelefone":[13],},"otes":{"pacotes":[602],},"othe":{"otherwise":[645],"other":[645],},"other":{"otherwise":[645],"other":[645],},"otherw":{"otherwise":[645],},"otherwi":{"otherwise":[645],},"otherwis":{"otherwise":[645],},"otherwise":{"otherwise":[645],},"otic":{"notices":[645],"notice":[645],},"otice":{"notices":[645],"notice":[645],},"otices":{"notices":[645],},"otif":{"notifica":[625],},"otifi":{"notifica":[625],},"otific":{"notifica":[625],},"otifica":{"notifica":[625],},"otim":{"otimizar":[2,34,40,44,50,52,53,54,56,75,77,78,93,94,180,181,182,247,255,256,257,258,261,262,263,264,433,460,538,539,620,622],"otimizado":[44,252],"otimização":[53,252,261,262,461,486],},"otimi":{"otimizar":[2,34,40,44,50,52,53,54,56,75,77,78,93,94,180,181,182,247,255,256,257,258,261,262,263,264,433,460,538,539,620,622],"otimizado":[44,252],"otimização":[53,252,261,262,461,486],},"otimiz":{"otimizar":[2,34,40,44,50,52,53,54,56,75,77,78,93,94,180,181,182,247,255,256,257,258,261,262,263,264,433,460,538,539,620,622],"otimizado":[44,252],"otimização":[53,252,261,262,461,486],},"otimiza":{"otimizar":[2,34,40,44,50,52,53,54,56,75,77,78,93,94,180,181,182,247,255,256,257,258,261,262,263,264,433,460,538,539,620,622],"otimizado":[44,252],"otimização":[53,252,261,262,461,486],},"otimizad":{"otimizado":[44,252],},"otimizado":{"otimizado":[44,252],},"otimizar":{"otimizar":[2,34,40,44,50,52,53,54,56,75,77,78,93,94,180,181,182,247,255,256,257,258,261,262,263,264,433,460,538,539,620,622],},"otimizaç":{"otimização":[53,252,261,262,461,486],},"otimizaçã":{"otimização":[53,252,261,262,461,486],},"otimização":{"otimização":[53,252,261,262,461,486],},"otiv":{"motivo":[215,306,318,320,331,334,356,357],"motivos":[443,625,631],},"otivo":{"motivo":[215,306,318,320,331,334,356,357],"motivos":[443,625,631],},"otivos":{"motivos":[443,625,631],},"otoc":{"protocolo":[222,352,353,528,594],"protocolos":[352,353],},"otoco":{"protocolo":[222,352,353,528,594],"protocolos":[352,353],},"otocol":{"protocolo":[222,352,353,528,594],"protocolos":[352,353],},"otocolo":{"protocolo":[222,352,353,528,594],"protocolos":[352,353],},"otocolos":{"protocolos":[352,353],},"otão":{"botão":[0,18,19,21,31,34,35,36,37,38,39,40,47,48,49,50,52,53,56,61,72,88,144,146,152,155,157,166,188,193,201,211,212,213,224,226,227,228,246,247,248,249,250,252,253,254,255,256,257,258,259,260,268,269,332,348,373,378,379,380,381,383,384,385,387,390,391,393,394,429,431,434,439,450,460,468,483,519,523,541,542,576,577,578,581,597,623,625,641],},"otên":{"potência":[467],},"otênc":{"potência":[467],},"otênci":{"potência":[467],},"otência":{"potência":[467],},"otõe":{"botões":[0,7,23,34,53,144,228,248,249,250,256,257,259,260,389,390,392,449,450,468,469,475,483,580,623,629,630,631,640,641],},"otões":{"botões":[0,7,23,34,53,144,228,248,249,250,256,257,259,260,389,390,392,449,450,468,469,475,483,580,623,629,630,631,640,641],},"ou":{"ou":[0,6,10,11,12,13,16,17,18,24,26,28,30,31,34,35,40,47,50,52,53,55,56,61,62,63,64,65,66,70,71,73,74,78,84,85,90,91,94,95,96,100,101,109,110,111,112,113,114,116,118,123,130,133,134,136,137,139,144,147,149,152,153,155,158,160,161,162,166,171,172,174,175,179,180,181,183,184,186,188,189,190,192,193,198,200,202,203,206,209,210,214,218,219,220,221,228,230,231,233,234,235,239,240,241,243,248,249,250,258,259,260,261,262,263,264,268,269,271,280,281,283,284,285,288,290,291,293,295,297,298,302,304,305,306,308,311,314,316,317,318,319,320,321,323,324,325,328,329,331,333,334,335,336,338,351,352,355,356,357,358,359,361,363,364,367,369,372,374,378,379,381,383,384,387,388,389,390,392,393,395,402,407,408,410,411,413,414,415,416,417,418,419,420,421,422,423,427,430,434,435,436,440,444,445,447,448,449,450,451,452,454,455,456,461,467,468,469,475,476,477,478,479,480,483,484,485,486,487,489,491,493,496,497,499,500,501,505,508,511,522,537,541,543,544,545,546,547,548,550,551,552,553,554,561,562,563,565,566,567,570,574,582,587,588,589,592,596,600,601,607,614,615,617,618,623,625,627,628,630,631,639,640,641,642,643,644],},"oube":{"souber":[28,41,146],},"ouber":{"souber":[28,41,146],},"ouca":{"pouca":[123],},"ouco":{"pouco":[113,136,140,476],},"ould":{"should":[645],},"ounc":{"debounce":[177,261,262,264,265,266],},"ounce":{"debounce":[177,261,262,264,265,266],},"ouro":{"estouro":[32,284,601,624,625],},"ouse":{"mouse":[21,61,62,72,188,193,224,227,228,338,389,449,483,638,640],},"outp":{"output":[210],},"outpu":{"output":[210],},"output":{"output":[210],},"outr":{"outros":[16,40,120,121,192,198,345,379,398,433,447,529,593,634,643],"outro":[29,45,324,325,329,338,342,352,360,367,390,416,450,454,455,456,468,478,484,528,529,630,631,641,642,643],"outras":[36,37,39,42,55,66,135,146,165,247,252,284,297,298,316,384,393,401,435,438,528,529,555,592,601,625,642],}});
combined_dataset/train/non-malicious/sample_34_77.ps1
sample_34_77.ps1
# # Module manifest for module 'OCI.PSModules.Filestorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Filestorage.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '85a998bb-f613-464a-af19-f5aaed2d127b' # 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 Filestorage 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 = '79.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Filestorage.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 = 'Confirm-OCIFilestorageKeyTabs', 'Get-OCIFilestorageExport', 'Get-OCIFilestorageExportSet', 'Get-OCIFilestorageExportSetsList', 'Get-OCIFilestorageExportsList', 'Get-OCIFilestorageFileSystem', 'Get-OCIFilestorageFileSystemsList', 'Get-OCIFilestorageFilesystemSnapshotPoliciesList', 'Get-OCIFilestorageFilesystemSnapshotPolicy', 'Get-OCIFilestorageMountTarget', 'Get-OCIFilestorageMountTargetsList', 'Get-OCIFilestorageOutboundConnector', 'Get-OCIFilestorageOutboundConnectorsList', 'Get-OCIFilestorageReplication', 'Get-OCIFilestorageReplicationsList', 'Get-OCIFilestorageReplicationTarget', 'Get-OCIFilestorageReplicationTargetsList', 'Get-OCIFilestorageSnapshot', 'Get-OCIFilestorageSnapshotsList', 'Invoke-OCIFilestorageEstimateReplication', 'Invoke-OCIFilestoragePauseFilesystemSnapshotPolicy', 'Invoke-OCIFilestorageUnpauseFilesystemSnapshotPolicy', 'Move-OCIFilestorageFileSystemCompartment', 'Move-OCIFilestorageFilesystemSnapshotPolicyCompartment', 'Move-OCIFilestorageMountTargetCompartment', 'Move-OCIFilestorageOutboundConnectorCompartment', 'Move-OCIFilestorageReplicationCompartment', 'New-OCIFilestorageExport', 'New-OCIFilestorageFileSystem', 'New-OCIFilestorageFilesystemSnapshotPolicy', 'New-OCIFilestorageMountTarget', 'New-OCIFilestorageOutboundConnector', 'New-OCIFilestorageReplication', 'New-OCIFilestorageSnapshot', 'Remove-OCIFilestorageExport', 'Remove-OCIFilestorageFileSystem', 'Remove-OCIFilestorageFilesystemSnapshotPolicy', 'Remove-OCIFilestorageMountTarget', 'Remove-OCIFilestorageOutboundConnector', 'Remove-OCIFilestorageReplication', 'Remove-OCIFilestorageReplicationTarget', 'Remove-OCIFilestorageSnapshot', 'Update-OCIFilestorageExport', 'Update-OCIFilestorageExportSet', 'Update-OCIFilestorageFileSystem', 'Update-OCIFilestorageFilesystemSnapshotPolicy', 'Update-OCIFilestorageMountTarget', 'Update-OCIFilestorageOutboundConnector', 'Update-OCIFilestorageReplication', 'Update-OCIFilestorageSnapshot' # 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','Filestorage' # 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/3706.ps1
3706.ps1
function Get-AzAdvisorConfigurationNoParameter { $propertiesCount = 4 $cmdletReturnType = "Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationData" $TypeValue = "Microsoft.Advisor/Configurations" $queryResult = Get-AzAdvisorConfiguration Assert-IsInstance $queryResult $cmdletReturnType Assert-NotNull $queryResult for ($i = 0; $i -lt $queryResult.Count; $i++){ Assert-PropertiesCount $queryResult[$i] $propertiesCount Assert-IsInstance $queryResult[$i].id String Assert-AreEqual $queryResult[$i].Type $TypeValue } }
combined_dataset/train/non-malicious/sample_29_94.ps1
sample_29_94.ps1
# # Module manifest for module 'OCI.PSModules.Ocvp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocvp.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '05a069dc-62d0-41ee-b47b-3fe73fff277d' # 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 Ocvp 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 = '73.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Ocvp.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-OCIOcvpCluster', 'Get-OCIOcvpClustersList', 'Get-OCIOcvpEsxiHost', 'Get-OCIOcvpEsxiHostsList', 'Get-OCIOcvpSddc', 'Get-OCIOcvpSddcsList', 'Get-OCIOcvpSupportedCommitmentsList', 'Get-OCIOcvpSupportedHostShapesList', 'Get-OCIOcvpSupportedVmwareSoftwareVersionsList', 'Get-OCIOcvpWorkRequest', 'Get-OCIOcvpWorkRequestErrorsList', 'Get-OCIOcvpWorkRequestLogsList', 'Get-OCIOcvpWorkRequestsList', 'Invoke-OCIOcvpDowngradeHcx', 'Invoke-OCIOcvpInplaceUpgrade', 'Invoke-OCIOcvpRefreshHcxLicenseStatus', 'Invoke-OCIOcvpReplaceHost', 'Invoke-OCIOcvpRetrievePassword', 'Invoke-OCIOcvpSwapBilling', 'Invoke-OCIOcvpUpgradeHcx', 'Move-OCIOcvpSddcCompartment', 'New-OCIOcvpCluster', 'New-OCIOcvpEsxiHost', 'New-OCIOcvpSddc', 'Remove-OCIOcvpCluster', 'Remove-OCIOcvpEsxiHost', 'Remove-OCIOcvpSddc', 'Stop-OCIOcvpDowngradeHcx', 'Update-OCIOcvpCluster', 'Update-OCIOcvpEsxiHost', 'Update-OCIOcvpSddc' # 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','Ocvp' # 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/ShowUI Binary Clock.ps1
ShowUI Binary Clock.ps1
<# .SYNOPSIS Displays a Binary Coded Sexagesimal clock using the ShowUI module. .DESCRIPTION This clock displays time using three rows of blocks. The top row represents hours, the middle is minutes and the bottom is seconds. Each of the six columns represents a binary digit. The values for each digit in the order displayed are: 32 16 8 4 2 1. Adding the values of each of the "On" blocks in a row yields the value for the row's corresponding time part. Press the 'h' key to toggle the Helper values. Press the 't' key to toggle the Time text. Press the 'd' key to toggle the Date text. Pres the '+'/'-' keys to resize the window (pressing Shift is not required). Click and drag to move the window. Double-click the window to close. This script was inspired by Boe Prox's post at: http://learn-powershell.net/2011/07/06/building-a-binary-clock-with-powershell/ .PARAMETER OnColor The color of the "On" blocks which represent the 1 digits in a binary number. This value must be able to convert to a System.Windows.Media.Brush type. (e.g. "Blue","Red","Transparent","#FF00FF") The default value is "#00D000" .PARAMETER OnColor The color of the "Off" blocks which represent the 0 digits in a binary number. This value must be able to convert to a System.Windows.Media.Brush type. (e.g. "Blue","Red","Transparent","#FF00FF") The default value is "#606060" .PARAMETER GridColor The color of the space between the blocks. This value must be able to convert to a System.Windows.Media.Brush type. (e.g. "Blue","Red","Transparent","#FF00FF") The default value is "#202020" .PARAMETER TextColor The color of the text on the blocks. All text is off by default. Press 'h' for Help values, 't' for Time or 'd' for Date. This value must be able to convert to a System.Windows.Media.Brush type. (e.g. "Blue","Red","Transparent","#FF00FF") The default value is "#FFFFFF" .PARAMETER Topmost This switch determines the window's Topmost attribute. .EXAMPLE C:\\PS>.\\Show-BinaryClock.ps1 -OnColor '#8000F0' -OffColor '#808080' -GridColor '#FFFFFF' -Topmost Displays a topmost clock with a white grid, gray off blocks and purple on blocks. .EXAMPLE C:\\PS>.\\Show-BinaryClock.ps1 -OnColor '#F08000' -OffColor 'Transparent' -GridColor 'Transparent' Displays a clock where the on blocks and any text are the only visible elements. .NOTES NAME: Show-BinaryClock.ps1 VERSION: 1.0 DATE: 2011-07-08 AUTHOR: Ryan Grant #> param( $OnColor = '#00D000', $OffColor = '#606060', $GridColor = '#202020', $TextColor = '#FFFFFF', [switch] $Topmost ) Import-Module ShowUI -ErrorAction Stop $GLOBAL:backColor = @{'0'=$OffColor ;'1'= $OnColor} $windowParams = @{ Width = 160 Height = 90 WindowStyle = 'None' AllowsTransparency = $true Background = $GridColor Topmost = $Topmost } Window @windowParams -Show ` -Content { # Create 3 Rows of 6 TextBlocks in a UniformGrid. The top row represents the hour, # the middle row represents the minute, and the bottom row represents the second. UniformGrid -Name ClockGrid -Columns 6 -Margin 2 -Children { foreach($part in @('Hour','Minute','Second')) {0..5|%{TextBlock -Name "$part$_" -Margin 2 -Foreground $TextColor}} } } -On_Loaded { Register-PowerShellCommand -In '0:0:0.5' -Run -ScriptBlock { $time = Get-Date # Convert the time values to a binary format string $vals = @($time.Hour, $time.Minute, $time.Second)| %{[convert]::ToString($_,2)}| %{('0'*(6-$_.ToString().Length))+$_} # Set the TextBlock background colors to the appropriate value for each digit in the # binary formatted string. Using the $backColor hash table, 0 = $OffColor and 1 = $OnColor foreach($d in 0..5) { (Get-Variable "Hour$d").Value.Background = $backColor[[string]$vals[0][$d]] (Get-Variable "Minute$d").Value.Background = $backColor[[string]$vals[1][$d]] (Get-Variable "Second$d").Value.Background = $backColor[[string]$vals[2][$d]] } # Display the time text # Multiplying by $IsShowTime creates an empty string if it is $False 'Hour','Minute'| %{(Get-Variable ($_+"0")).Value.Text = ("{0:00}" -f $time.$_) * $IsShowTime} # Only set the second text if the helper text is off, since they occupy the same TextBlock if(!$IsHelpers) {(Get-Variable ("Second0")).Value.Text = ("{0:00}" -f $time.Second) * $IsShowTime} # Display the date text $Hour3.Text = ("{0:00}" -f $time.Month) * $IsShowDate $Hour4.Text = ("{0:00}" -f $time.Day) * $IsShowDate $Hour5.Text = ($time.Year.ToString().Substring(2,2)) * $IsShowDate } } -On_KeyDown { switch ($_.Key){ # Toggle helper text, and turn off time text 'H' { $IsShowTime = 0 $IsHelpers = $IsHelpers -bxor 1 } # Toggle time text, and turn off helper text 'T' { $IsHelpers = 0 $IsShowTime = $IsShowTime -bxor 1 } # Toggle date text 'D' { $IsShowDate = $IsShowDate -bxor 1 } # Increase the size of the window {'Add','OemPlus' -contains $_} { $window.Width *= 1.1 $window.Height *= 1.1 } # Decrease the size of the window {'Subtract','OemMinus' -contains $_} { if($window.Width -gt 50) { $window.Width /= 1.1 $window.Height /= 1.1 } } } # Set digit value helper text 1..5| %{(Get-Variable "Second$_").Value.Text = "{0:00}" -f [math]::Pow(2,(5-$_)) * $IsHelpers} # Only set leftmost digit helper if not displaying the time text if(!$IsShowTime) {(Get-Variable "Second0").Value.Text = '32' * $IsHelpers} } ` -On_MouseDoubleClick {$window.Close()}` -On_MouseLeftButtonDown {$window.DragMove()}
combined_dataset/train/non-malicious/New-StoredProcFunction.ps1
New-StoredProcFunction.ps1
# New-StoredProcFunction.ps1 # Steven Murawski # http://blog.usepowershell.com # 04/08/2009 # Example: ./New-StoredProcFunction.ps1 'DataSource=MySqlServer;Database=Northwind;User=AnythingButSa;Password=abc123' sp_createnewcustomer # Example 'sp_createnewcustomer | ./New-StoredProcFunction.ps1 'DataSource=MySqlServer;Database=Northwind;User=AnythingButSa;Password=abc123' param($ConnectionString, [String[]]$StoredProc= $null) BEGIN { if ($StoredProc.count -gt 0) { $StoredProc | New-StoredProcFunction $ConnectionString } function Get-StoredProcText() { param ($ProcName, $ConnectionString) $query = @' SELECT ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_BODY = 'SQL' AND ROUTINE_NAME LIKE '$_' '@ $connection = New-Object System.Data.SqlClient.SqlConnection $connectionString $command = New-Object System.Data.SqlClient.SqlCommand $query,$connection $connection.Open() $adapter = New-Object System.Data.SqlClient.SqlDataAdapter $command $dataset = New-Object System.Data.DataSet [void] $adapter.Fill($dataSet) $result = $dataSet.Tables | ForEach-Object {$_.Rows} $connection.Close() return $Result.ROUTINE_DEFINITION } function Get-FunctionParameter() { param ($Text) [regex]$EndRegex = '\\)\\s+AS' [regex]$ParamRegex = '@(?<Parameter>\\w+?)\\s+(?<DataType>\\w+(\\(\\d+\\))*)(,|\\s+)*(?<Output>out)*' $ParamStart = $Text.indexof('(') $ParamEnd = $EndRegex.Match($text).index $ParamText = $Text.Substring($ParamStart, ($ParamEnd-$ParamStart)) $RegMatches = $ParamRegex.matches($ParamText) foreach ($RegMatch in $RegMatches) { $Parameter = "" | Select-Object Name, DataType, IsOutput $Parameter.Name = $RegMatch.Groups[3].value $Parameter.DataType = $RegMatch.Groups[4].Value [bool]$Parameter.IsOutput = $RegMatch.Groups[5].Value $Parameter } } } PROCESS { if ($_ -ne $null) { $FunctionName = $_ $StoredProcText = Get-StoredProcText $FunctionName $ConnectionString $Parameters = Get-FunctionParameter $StoredProcText [String[]]$InputParamNames = $Parameters | where {-not $_.IsOutput} | ForEach-Object {$_.Name} [String[]]$OutputParameterNames = $Parameters | Where-Object {$_.IsOutput} | ForEach-Object {$_.Name} $ScriptText = ' ' if ($InputParamNames.count -gt 0) { $OFS = ', $' $ScriptText += 'param (${0})' -f $InputParamNames $ScriptText += "`n" $OFS = ', ' } $BodyTemplate = @' $connection = New-Object System.Data.SqlClient.SqlConnection('{0}') $command = New-Object System.Data.SqlClient.SqlCommand('{1}', $connection) $command.CommandType = [System.Data.CommandType]::StoredProcedure '@ $ScriptText += $BodyTemplate -f $ConnectionString, $FunctionName if ( ($Parameters -ne $null) -or ($Parameters.count -gt 1) ) { if ($OutputParameterNames.count -gt 0) { $ReturnText = "" $CommandOutput = "" | select $OutputParameterNames } #Add the parameters foreach ($param in $Parameters) { if ($param.datatype -match '(?<type>\\w+)\\((?<nbr>\\d+)\\)') { $ParamTemplate = '$command.Parameters.Add("@{0}", "{1}", {2}) | out-null ' $ScriptText += "`n" $ScriptText += $ParamTemplate -f $param.name, $matches.type, $matches.nbr } else { $ParamTemplate = '$command.Parameters.Add("@{0}", "{1}") | out-null ' $ScriptText += "`n" $ScriptText += $ParamTemplate -f $param.name, $param.datatype } if ($param.IsOutput) { $ScriptText += "`n" $ScriptText += '$command.Parameters["@{0}"].Direction = [System.Data.ParameterDirection]::Output ' -f $param.Name $ReturnText += "`n" $ReturnText += '$CommandOutput.{0} = $command.Parameters["@{0}"].Value' -f $param.name } else { $ScriptText += "`n" $ScriptText += '$command.Parameters["@{0}"].Value = ${0} ' -f $param.name } } } $ScriptText += "`n" $ScriptText += @' $connection.Open() | out-null $command.ExecuteNonQuery() | out-null '@ if ($OutputParameterNames.count -gt 0) { $ScriptText += $ReturnText } $ScriptText += @' $connection.Close() | out-null return $CommandOutput '@ #$ScriptText Set-Item -Path function:global:$FunctionName -Value $scripttext } }
combined_dataset/train/non-malicious/Enable-HistoryPersistenc.ps1
Enable-HistoryPersistenc.ps1
##############################################################################\n##\n## Enable-HistoryPersistence\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nReloads any previously saved command history, and registers for the\nPowerShell.Exiting engine event to save new history when the shell\nexits.\n\n#>\n\nSet-StrictMode -Version Latest\n\n## Load our previous history\n$GLOBAL:maximumHistoryCount = 32767\n$historyFile = (Join-Path (Split-Path $profile) "commandHistory.clixml")\nif(Test-Path $historyFile)\n{\n Import-CliXml $historyFile | Add-History\n}\n\n## Register for the engine shutdown event\n$null = Register-EngineEvent -SourceIdentifier `\n ([System.Management.Automation.PsEngineEvent]::Exiting) -Action {\n\n ## Save our history\n $historyFile = (Join-Path (Split-Path $profile) "commandHistory.clixml")\n $maximumHistoryCount = 1kb\n\n ## Get the previous history items\n $oldEntries = @()\n if(Test-Path $historyFile)\n {\n $oldEntries = Import-CliXml $historyFile -ErrorAction SilentlyContinue\n }\n\n ## And merge them with our changes\n $currentEntries = Get-History -Count $maximumHistoryCount\n $additions = Compare-Object $oldEntries $currentEntries `\n -Property CommandLine | Where-Object { $_.SideIndicator -eq "=>" } |\n Foreach-Object { $_.CommandLine }\n\n $newEntries = $currentEntries | ? { $additions -contains $_.CommandLine }\n\n ## Keep only unique command lines. First sort by CommandLine in\n ## descending order (so that we keep the newest entries,) and then\n ## re-sort by StartExecutionTime.\n $history = @($oldEntries + $newEntries) |\n Sort -Unique -Descending CommandLine | Sort StartExecutionTime\n\n ## Finally, keep the last 100\n Remove-Item $historyFile\n $history | Select -Last 100 | Export-CliXml $historyFile\n}
combined_dataset/train/non-malicious/26.ps1
26.ps1
. $PSScriptRoot\Shared.ps1 function GetMacOSAdjustedTempPath($Path) { if (($PSVersionTable.PSVersion.Major -ge 6) -and $IsMacOS) { return "/private${Path}" } $Path } Describe 'Get-GitDiretory Tests' { Context "Test normal repository" { BeforeAll { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')] $origPath = Get-Location } AfterAll { Set-Location $origPath } It 'Returns $null for not a Git repo' { Set-Location $env:windir Get-GitDirectory | Should BeNullOrEmpty } It 'Returns $null for not a filesystem path' { Set-Location Alias:\ Get-GitDirectory | Should BeNullOrEmpty } It 'Returns correct path when in the root of repo' { $repoRoot = (Resolve-Path $PSScriptRoot\..).Path Set-Location $repoRoot Get-GitDirectory | Should BeExactly (MakeNativePath $repoRoot\.git) } It 'Returns correct path when under a child folder of the root of repo' { $repoRoot = (Resolve-Path $PSScriptRoot\..).Path Set-Location $PSScriptRoot Get-GitDirectory | Should BeExactly (Join-Path $repoRoot .git) } } Context 'Test worktree' { BeforeEach { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')] $origPath = Get-Location $temp = [System.IO.Path]::GetTempPath() $repoPath = Join-Path $temp ([IO.Path]::GetRandomFileName()) $worktreePath = Join-Path $temp ([IO.Path]::GetRandomFileName()) &$gitbin init $repoPath Set-Location $repoPath &$gitbin config user.email "you@example.com" &$gitbin config user.name "Pester User" 'foo' > ./README.md &$gitbin add ./README.md &$gitbin commit -m "`"initial commit.`"" if (Test-Path $worktreePath) { Remove-Item $worktreePath -Recurse -Force } New-Item $worktreePath -ItemType Directory > $null &$gitbin worktree add -b test-worktree $worktreePath master 2>$null } AfterEach { Set-Location $origPath if (Test-Path $repoPath) { Remove-Item $repoPath -Recurse -Force } if (Test-Path $worktreePath) { Remove-Item $worktreePath -Recurse -Force } } It 'Returns the correct dir when under a worktree' { Set-Location $worktreePath $worktreeBaseName = Split-Path $worktreePath -Leaf $path = GetMacOSAdjustedTempPath $repoPath Get-GitDirectory | Should BeExactly (MakeGitPath $path\.git\worktrees\$worktreeBaseName) } } Context 'Test bare repository' { BeforeAll { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssigments', '')] $origPath = Get-Location $temp = [System.IO.Path]::GetTempPath() $bareRepoName = "test.git" $bareRepoPath = Join-Path $temp $bareRepoName if (Test-Path $bareRepoPath) { Remove-Item $bareRepoPath -Recurse -Force } &$gitbin init --bare $bareRepoPath } AfterAll { Set-Location $origPath if (Test-Path $bareRepoPath) { Remove-Item $bareRepoPath -Recurse -Force } } It 'Returns correct path when in the root of bare repo' { Set-Location $bareRepoPath Get-GitDirectory | Should BeExactly (MakeNativePath $bareRepoPath) } It 'Returns correct path when under a child folder of the root of bare repo' { Set-Location $bareRepoPath\hooks -ErrorVariable Stop $path = GetMacOSAdjustedTempPath $bareRepoPath Get-GitDirectory | Should BeExactly (MakeNativePath $path) } } Context "Test GIT_DIR environment variable" { AfterAll { Remove-Item Env:\GIT_DIR -ErrorAction SilentlyContinue } It 'Returns the value in GIT_DIR env var' { $env:GIT_DIR = MakeNativePath '/xyzzy/posh-git/.git' Get-GitDirectory | Should BeExactly $env:GIT_DIR } } }
combined_dataset/train/non-malicious/Add-Namespace_2.ps1
Add-Namespace_2.ps1
trap [System.Management.Automation.RuntimeException] { $entryException = $_ if ($_.CategoryInfo.Category -eq [System.Management.Automation.ErrorCategory]::InvalidOperation) { if ($_.FullyQualifiedErrorId -eq "TypeNotFound") { $targetName = $_.CategoryInfo.TargetName try { $isAmbiguous = $global:__ambiguousTypeNames.Contains($targetName) } catch { throw $entryException } if ($isAmbiguous) { $message = New-Object System.Text.StringBuilder $message.AppendFormat("The type [{0}] is ambiguous. Specify one of the following: ", $targetName).AppendLine() | Out-Null [System.Type]::GetType("System.Management.Automation.TypeAccelerators")::Get.GetEnumerator() | ForEach-Object { if (($_.Key.Split('.'))[-1] -eq $targetName) { $message.Append($_.Key).AppendLine() | Out-Null } } $exception = New-Object System.Management.Automation.RuntimeException -ArgumentList $message.ToString() $errorId = "TypeNotFound" $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation $targetObject = $_.TargetObject throw New-Object System.Management.Automation.ErrorRecord -ArgumentList $exception, $errorId, $errorCategory, $targetObject } } } } <# .SYNOPSIS Imports the types in the specified namespaces in the specified assemblies. .DESCRIPTION The Add-Namespace function adds a type accelerator for each type found in the specified namespaces in the specified assemblies that satisfy a set of conditions. For more information see the NOTES section. .PARAMETER Assembly The namespace to import. .PARAMETER Namespace Specifies one or more namespaces to import. .INPUTS System.Reflection.Assembly You can pipe an assembly to Add-Namespace. .OUTPUTS None This function does not return any output. .NOTES The type accelerator for the type is added if the type: - Has a base type which is not System.Attribute, System.Delegate or System.MulticastDelegate - Is not abstract - Is not an interface - Is not nested - Is public - Is visible - Is qualified by the namespace specified in the Namespace parameter This function also comes with an exception handler in the form of a trap block. Type name collisions occur when a type has the same name of another type which is in a different namespace. When this happens, the function adds or replaces the type accelerator for that type using its fully-qualified type name. If a type resolution occurs during runtime, the trap block will determine if the type was unresolved during any of the calls made to Add-Namespace and throw an exception listing valid replacements. The type accelerators added by this function exist only in the current session. To use the type accelerators in all sessions, add them to your Windows PowerShell profile. For more information about the profile, see about_profiles. Be aware that namspaces can span multiple assemblies, in which case you would have to import the namespace for each assembly that it exists in. This function will not attempt to add or replace types which already exist under the same name. .EXAMPLE C:\\PS> [System.Reflection.Assembly]::LoadWithPartialName("mscorlib") | Add-Namespace System.Reflection C:\\PS> [Assembly]::LoadWithPartialName("System.Windows.Forms") This example shows how to import namespaces from an assembly. The assembly must be loaded non-reflectively into the current application domain. .EXAMPLE C:\\PS> $assemblies = @([System.Reflection.Assembly]::LoadWithPartialName("mscorlib"), [System.Reflection.Assembly]::LoadWithPartialName("System"), [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms"), [System.Reflection.Assembly]::LoadWithPartialName("System.Xml"), [System.Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")) C:\\PS> $assemblies | Add-Namespace System, System.Collections, System.Collections.Generic, System.Net, System.Net.NetworkInformation, System.Reflection, System.Windows.Forms, System.Xml.Linq This example shows how to import multiple namespaces from multiple assemblies. .LINK about_trap #> function Add-Namespace { [CmdletBinding(SupportsShouldProcess = $true)] param ( [Parameter(ValueFromPipeline = $true)] [System.Reflection.Assembly]$Assembly, [Parameter(Mandatory = $true, Position = 0)] [ValidateNotNullOrEmpty()] [String[]]$Namespace ) BEGIN { if ($global:__ambiguousTypeNames -eq $null) { $global:__ambiguousTypeNames = New-Object 'System.Collections.Generic.List[System.String]' } $genericRegex = [Regex]'(?<Name>.*)`\\d+' $typeAccelerators = [System.Type]::GetType("System.Management.Automation.TypeAccelerators") $typeDictionary = $typeAccelerators::Get } PROCESS { $_.GetTypes() | Where-Object { ($_.BaseType -ne [System.Attribute]) -and ($_.BaseType -ne [System.Delegate]) -and ($_.BaseType -ne [System.MulticastDelegate]) -and !$_.IsAbstract -and !$_.IsInterface -and !$_.IsNested -and $_.IsPublic -and $_.IsVisible -and ($Namespace -contains $_.Namespace) } | ForEach-Object { $name = $_.Name $fullName = $_.FullName if ($_.IsGenericType) { if ($_.Name -match $genericRegex) { $name = $Matches["Name"] } if ($_.FullName -match $genericRegex) { $fullName = $Matches["Name"] } } if ($typeDictionary.ContainsKey($name)) { if ($typeDictionary[$name] -eq $_) { return } } if ($typeDictionary.ContainsKey($fullName)) { if ($typeDictionary[$fullName] -eq $_) { return } } if ($global:__ambiguousTypeNames.Contains($name)) { $typeAccelerators::Add($fullName, $_) return } if ($typeDictionary.ContainsKey($name)) { $type = $typeDictionary[$name] if ($_ -ne $type) { $global:__ambiguousTypeNames.Add($name) $newName = $typeDictionary[$name].FullName if ($newName -match $genericRegex) { $newName = $Matches["Name"] } $typeAccelerators::Remove($name) $typeAccelerators::Add($newName, $type) $typeAccelerators::Add($fullName, $_) } return } $typeAccelerators::Add($name, $_) } | Out-Null } END { } } # Sample usage # You can do this as an initialization task for your script @( [System.Reflection.Assembly]::LoadWithPartialName("mscorlib"), [System.Reflection.Assembly]::LoadWithPartialName("System"), [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms"), [System.Reflection.Assembly]::LoadWithPartialName("System.Xml"), [System.Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq") ) | Add-Namespace -Namespace ` System, System.Collections, System.Collections.Generic, System.Net, System.Net.NetworkInformation, System.Reflection, System.Windows.Forms, System.Xml.Linq
combined_dataset/train/non-malicious/sample_32_42.ps1
sample_32_42.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.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. # ---------------------------------------------------------------------------------- <# .Synopsis Creates a new PostgreSQL flexible server. .Description Creates a new PostgreSQL flexible server. #> $DELEGATION_SERVICE_NAME = "Microsoft.DBforPostgreSQL/flexibleServers" $DEFAULT_VNET_PREFIX = '10.0.0.0/16' $DEFAULT_SUBNET_PREFIX = '10.0.0.0/24' $AZURE_ARMNAME = '^[^<>%&:\\?/]{1,260}$' function New-AzPostgreSqlFlexibleServer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Models.Api20210601.IServerAutoGenerated])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Description('Creates a new server.')] param( [Parameter(HelpMessage = 'The name of the server.')] [Alias('ServerName')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Path')] [System.String] ${Name}, [Parameter(HelpMessage = 'The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Path')] [System.String] ${ResourceGroupName}, [Parameter(HelpMessage='The subscription ID that identifies an Azure subscription.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] ${SubscriptionId}, [Parameter(HelpMessage = 'Availability zone into which to provision the resource.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.String] ${Zone}, [Parameter(HelpMessage = 'The location the resource resides in.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.String] ${Location}, [Parameter(HelpMessage = 'Administrator username for the server. Once set, it cannot be changed.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.String] ${AdministratorUserName}, [Parameter(HelpMessage = 'The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.Security.SecureString] [ValidateNotNullOrEmpty()] ${AdministratorLoginPassword}, [Parameter(HelpMessage = 'The name of the sku, typically, tier + family + cores, e.g. Standard_B1ms, Standard_D2s_v3.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.String] ${Sku}, [Parameter(HelpMessage = 'Compute tier of the server. Accepted values: Burstable, GeneralPurpose, Memory Optimized. Default: Burstable.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.String] ${SkuTier}, [Parameter(HelpMessage = "Backup retention days for the server. Day count is between 7 and 35.")] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.Int32] ${BackupRetentionDay}, [Parameter(HelpMessage = 'Max storage allowed for a server. ')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [System.Int32] [ValidateSet(32768, 65536, 131072, 262144, 524288, 1048576 , 2097152, 4194304, 8388608, 16777216)] ${StorageInMb}, [Parameter(HelpMessage='Enable or disable high availability feature. Allowed values: Enabled, Disabled')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [Validateset('Enabled', 'Disabled')] [System.String] ${HaEnabled}, [Parameter(HelpMessage = 'Application-specific metadata in the form of key-value pairs.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Models.Api20171201.IServerForCreateTags]))] [System.Collections.Hashtable] ${Tag}, [Parameter(HelpMessage = 'Server version.')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Support.ServerVersion])] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Support.ServerVersion] ${Version}, [Parameter(HelpMessage = 'The id of an existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. The suffix of dns zone has to be same as that of fully qualified domain of the server. ')] [System.String] ${PrivateDnsZone}, # [Parameter(ParameterSetName='CreateWithPrivateAccess')] [Parameter(HelpMessage = 'The subnet IP address prefix to use when creating a new vnet in CIDR format. Default value is 10.0.0.0/24.')] [System.String] ${SubnetPrefix}, # [Parameter(ParameterSetName='CreateWithPrivateAccess')] [Parameter(HelpMessage = 'The Name or Id of an existing Subnet or name of a new one to create. Please note that the subnet will be delegated to Microsoft.DBforPostgreSQL/flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.')] [System.String] ${Subnet}, # [Parameter(ParameterSetName='CreateWithPrivateAccess')] [Parameter(HelpMessage = 'The IP address prefix to use when creating a new vnet in CIDR format. Default value is 10.0.0.0/16.')] [System.String] ${VnetPrefix}, # [Parameter(ParameterSetName='CreateWithPrivateAccess')] [Parameter(HelpMessage = 'The Name or Id of an existing virtual network or name of a new one to create. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.')] [System.String] ${Vnet}, [Parameter(HelpMessage = " Determines the public access. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash- separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Specifying no IP address sets the server in public access mode but does not create a firewall rule.")] [System.String] ${PublicAccess}, [Parameter(HelpMessage = 'The credentials, account, tenant, and subscription used for communication with Azure.')] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Azure')] [System.Management.Automation.PSObject] ${DefaultProfile}, [Parameter(HelpMessage = 'Run the command as a job.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${AsJob}, [Parameter(DontShow, HelpMessage = 'Wait for .NET debugger to attach.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline. ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline. ${HttpPipelinePrepend}, [Parameter(HelpMessage = 'Run the command asynchronously.')] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [System.Management.Automation.SwitchParameter] ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [System.Uri] # The URI for the proxy server to use. ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call. ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy. ${ProxyUseDefaultCredentials} ) process { try { if (!$PSBoundParameters.ContainsKey('Location')) { $PSBoundParameters.Location = 'eastus' } if ($PSBoundParameters.ContainsKey('Zone')) { $PSBoundParameters.AvailabilityZone = $PSBoundParameters.Zone $null = $PSBoundParameters.Remove('Zone') } if (!$PSBoundParameters.ContainsKey('AdministratorLoginPassword')) { $Password = Get-GeneratePassword $PSBoundParameters.AdministratorLoginPassword = $Password | ConvertTo-SecureString -AsPlainText -Force } Import-Module -Name Az.Resources if(!$PSBoundParameters.ContainsKey('ResourceGroupName')) { $PSBoundParameters.ResourceGroupName = Get-RandomNumbers -Prefix 'group' -Length 10 $Msg = "Creating Resource Group {0}..." -f $PSBoundParameters.ResourceGroupName Write-Host $Msg if($PSCmdlet.ShouldProcess($PSBoundParameters.ResourceGroupName)) { $null = New-AzResourceGroup -Name $PSBoundParameters.ResourceGroupName -Location $PSBoundParameters.Location -Force } } else { $Msg = 'Checking the existence of the resource group {0} ...' -f $PSBoundParameters.ResourceGroupName Write-Host $Msg try { $null = Get-AzResourceGroup -Name $PSBoundParameters.ResourceGroupName -ErrorAction Stop $Msg = 'Resource group {0} exists ? : True' -f $PSBoundParameters.ResourceGroupName Write-Host $Msg } catch { $Msg = 'Resource group {0} exists ? : False' -f $PSBoundParameters.ResourceGroupName Write-Host $Msg $Msg = "Creating Resource Group {0}..." -f $PSBoundParameters.ResourceGroupName Write-Host $Msg if($PSCmdlet.ShouldProcess($PSBoundParameters.ResourceGroupName)) { $null = New-AzResourceGroup -Name $PSBoundParameters.ResourceGroupName -Location $PSBoundParameters.Location -Force } } } if (!$PSBoundParameters.ContainsKey('Name')) { $PSBoundParameters.Name = Get-RandomNumbers -Prefix 'server' -Length 10 } if ($PSBoundParameters.ContainsKey('Sku')) { $PSBoundParameters.SkuName = $PSBoundParameters['Sku'] $null = $PSBoundParameters.Remove('Sku') } else { $PSBoundParameters.SkuName = 'Standard_D2s_v3' } if (!$PSBoundParameters.ContainsKey('SkuTier')) { $PSBoundParameters.SkuTier = 'GeneralPurpose' } if (!$PSBoundParameters.ContainsKey('BackupRetentionDay')) { $PSBoundParameters.BackupRetentionDay = 7 } if ($PSBoundParameters.ContainsKey('StorageInMb')) { $PSBoundParameters.StorageSizeGb = [Math]::floor($PSBoundParameters['StorageInMb'] / 1024) $null = $PSBoundParameters.Remove('StorageInMb') } else { $PSBoundParameters.StorageSizeGb = 128 } if (!$PSBoundParameters.ContainsKey('Version')) { $PSBoundParameters.Version = '12' } if ($PSBoundParameters.ContainsKey('AdministratorUserName')) { $PSBoundParameters.AdministratorLogin = $PSBoundParameters['AdministratorUserName'] $null = $PSBoundParameters.Remove('AdministratorUserName') } else { $PSBoundParameters.AdministratorLogin = Get-RandomName } if ($PSBoundParameters.ContainsKey('HaEnabled')){ if ($PSBoundParameters["HaEnabled"] -eq "Enabled"){ $PSBoundParameters.HighAvailabilityMode = [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Support.HighAvailabilityMode]::ZoneRedundant } else { $PSBoundParameters.HighAvailabilityMode = [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Support.HighAvailabilityMode]::Disabled } $null = $PSBoundParameters.Remove('HaEnabled') } $PSBoundParameters.CreateMode = [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Support.CreateMode]::Default # Handling Vnet & Subnet $NetworkKeys = 'PublicAccess', 'Subnet', 'Vnet', 'SubnetPrefix', 'VnetPrefix', 'PrivateDnsZone' $NetworkParameters = @{} foreach($Key in $NetworkKeys){ if ($PSBoundParameters.ContainsKey($Key)){ $NetworkParameters[$Key] = $PSBoundParameters[$Key] $null = $PSBoundParameters.Remove($Key) } } $RequiredKeys = 'SubscriptionId', 'ResourceGroupName', 'Name', 'Location' foreach($Key in $RequiredKeys){ $NetworkParameters[$Key] = $PSBoundParameters[$Key] } if ($NetworkParameters.ContainsKey('Vnet') -Or $NetworkParameters.ContainsKey('Subnet')){ $VnetSubnetParameters = CreateNetworkResource $NetworkParameters $SubnetId = GetSubnetId $VnetSubnetParameters.ResourceGroupName $VnetSubnetParameters.VnetName $VnetSubnetParameters.SubnetName $VnetId = [string]::Join("/",$SubnetId.split("/")[0..8]) $PSBoundParameters.NetworkDelegatedSubnetResourceId = $SubnetId if ([string]::IsNullOrEmpty($PSBoundParameters.NetworkDelegatedSubnetResourceId)) { $null = $PSBoundParameters.Remove('NetworkDelegatedSubnetResourceId') } if ($NetworkParameters.ContainsKey('PrivateDnsZone')){ if (!(Get-Module -ListAvailable -Name Az.PrivateDns)) { throw 'Please install Az.Network module by entering "Install-Module -Name Az.PrivateDns"' } else { Import-Module -Name Az.PrivateDns } $ZoneName = $NetworkParameters["PrivateDnsZone"].split("/")[-1] $DnsResourceGroup = $NetworkParameters["PrivateDnsZone"].split("/")[4] $Links = Get-AzPrivateDnsVirtualNetworkLink -ZoneName $ZoneName -ResourceGroupName $DnsResourceGroup $LinkedFlag = $false foreach($Link in $Links){ if ($Link.VirtualNetworkId -eq $VnetId){ $LinkedFlag = $true break } } if (!$LinkedFlag){ Write-Host "Adding virtual network link to the DNS zone..." New-AzPrivateDnsVirtualNetworkLink -ZoneName $ZoneName -ResourceGroupName $DnsResourceGroup -Name $PSBoundParameters["Name"] -VirtualNetworkId $VnetId } $PSBoundParameters.NetworkPrivateDnsZoneArmResourceId = $NetworkParameters["PrivateDnsZone"] $null = $PSBoundParameters.Remove('PrivateDnsZone') } else{ throw "To provision a server with private access, you need to provide private DNS zone." } } else{ $RuleName, $StartIp, $EndIp = ParseFirewallRule $NetworkParameters.PublicAccess } $Msg = 'Creating PostgreSQL server {0} in group {1}...' -f $PSBoundParameters.Name, $PSBoundParameters.resourceGroupName Write-Host $Msg $Msg = 'Your server {0} is using sku {1} (Paid Tier). Please refer to https://aka.ms/postgresql-pricing for pricing details' -f $PSBoundParameters.Name, $PSBoundParameters.SkuName Write-Host $Msg $Server = Az.PostgreSql.internal\New-AzPostgreSqlFlexibleServer @PSBoundParameters # Create Firewallrules if (![string]::IsNullOrEmpty($RuleName)) { $FirewallRuleName = CreateFirewallRule $RuleName $StartIp $EndIp $PSBoundParameters.ResourceGroupName $PSBoundParameters.Name $Server.FirewallRuleName = $FirewallRuleName } $Server.SecuredPassword = $PSBoundParameters.AdministratorLoginPassword return $Server } catch { throw } } } function CreateNetworkResource($NetworkParameters) { [OutputType([hashtable])] $WarningPreference = 'silentlycontinue' if (!(Get-Module -ListAvailable -Name Az.Network)) { throw 'Please install Az.Network module by entering "Install-Module -Name Az.Network"' } else { Import-Module -Name Az.Network } # 1. Error Handling # Raise error when user passes values for both parameters if ($NetworkParameters.Containskey('Subnet') -And $NetworkParameters.ContainsKey('PublicAccess')) { throw "Incorrect usage : A combination of the parameters -Subnet and -PublicAccess is invalid. Use either one of them." } # # When address space parameters are passed, the only valid combination is : -Vnet -Subnet -VnetPrefix -SubnetPrefix if ($NetworkParameters.ContainsKey('Vnet') -Or $NetworkParameters.ContainsKey('Subnet')) { if (($NetworkParameters.ContainsKey('VnetPrefix') -And !$NetworkParameters.ContainsKey('SubnetPrefix')) -Or (!$NetworkParameters.ContainsKey('VnetPrefix') -And $NetworkParameters.ContainsKey('SubnetPrefix')) -Or ($NetworkParameters.ContainsKey('VnetPrefix') -And $NetworkParameters.ContainsKey('SubnetPrefix') -And (!$NetworkParameters.ContainsKey('Vnet') -Or !$NetworkParameters.ContainsKey('Subnet')))){ throw "Incorrect usage : -Vnet -Subnet -VnetPrefix -SubnetPrefix must be supplied together." } } #Handle Vnet, Subnet scenario # Only the Subnet ID provided.. if (!$NetworkParameters.ContainsKey('Vnet') -And $NetworkParameters.ContainsKey('Subnet')) { if (IsValidSubnetId $NetworkParameters.Subnet) { Write-Host "You have supplied a subnet Id. Verifying its existence..." $ParsedResult = ParseResourceId $NetworkParameters.Subnet $NetworkParameters.VnetName = $ParsedResult.VnetName $NetworkParameters.SubnetName = $ParsedResult.SubnetName $NetworkParameters.ResourceGroupName = $ParsedResult.ResourceGroupName $SubnetFlag = $true try { # Valid Subnet ID is provided $Subnet = Get-AzVirtualNetworkSubnetConfig -ResourceId $NetworkParameters.Subnet -ErrorAction Stop } catch { # Invalid subnet ID is provided, creating a new one. $SubnetFlag = $false Write-Host "The subnet doesn't exist. Creating the subnet" $Subnet = CreateVnetSubnet $NetworkParameters } if ($SubnetFlag){ $Delegations = Get-AzDelegation -Subnet $Subnet if ($null -ne $Delegations){ # Valid but incorrect delegation $Delegations | ForEach-Object {if ($PSItem.ServiceName -ne $DELEGATION_SERVICE_NAME) { $Msg = "Can not use subnet with existing delegations other than {0}" -f $DELEGATION_SERVICE_NAME throw $Msg }} } else { # Valid but no delegation $Vnet = Get-AzVirtualNetwork -ResourceGroupName $NetworkParameters.ResourceGroupName -Name $NetworkParameters.VnetName $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $NetworkParameters.SubnetName -VirtualNetwork $Vnet $Subnet = Add-AzDelegation -Name $DELEGATION_SERVICE_NAME -ServiceName $DELEGATION_SERVICE_NAME -Subnet $Subnet $Vnet | Set-AzVirtualNetwork } } } else { throw "The Subnet ID is not a valid form of resource id." } } elseif ($NetworkParameters.ContainsKey('Vnet') -And !$NetworkParameters.ContainsKey('Subnet')) { if (IsValidVnetId $NetworkParameters.Vnet){ Write-Host "You have supplied a vnet Id. Verifying its existence..." IsValidRgLocation $NetworkParameters.Vnet $NetworkParameters $ParsedResult = ParseResourceId $NetworkParameters.Vnet $NetworkParameters.VnetName = $ParsedResult.VnetName $NetworkParameters.SubnetName = 'Subnet' + $NetworkParameters.Name $Subnet = CreateVnetSubnet $NetworkParameters } elseif ($NetworkParameters.Vnet -Match $AZURE_ARMNAME) { Write-Host "You have supplied a vnet Name. Verifying its existence..." $NetworkParameters.VnetName = $NetworkParameters.Vnet $NetworkParameters.SubnetName = 'Subnet' + $NetworkParameters.Name $Subnet = CreateVnetSubnet $NetworkParameters IsValidRgLocation $Subnet.Id $NetworkParameters } else { throw "Incorrectly formed Vnet id or Vnet name" } } else { # Both Vnet and Subnet provided if ($NetworkParameters.Vnet -Match $AZURE_ARMNAME -And $NetworkParameters.Subnet -Match $AZURE_ARMNAME) { $NetworkParameters.VnetName = $NetworkParameters.Vnet $NetworkParameters.SubnetName = $NetworkParameters.Subnet $Subnet = CreateVnetSubnet $NetworkParameters } else { if ($NetworkParameters.ContainsKey('SubnetPrefix') -And $NetworkParameters.ContainsKey('VnetPrefix')) { $Msg = "If you pass an address prefix, please consider passing a name (instead of Id) for a subnet or vnet." } else { $Msg = "If you pass both --vnet and --subnet, consider passing names instead of ids." } throw $Msg } } return $NetworkParameters } function GetSubnetId($ResourceGroupName, $VnetName, $SubnetName){ if (!($ResourceGroupName -is [String])){ $ResourceGroupName = $ResourceGroupName[0]} $Vnet = Get-AzVirtualNetwork -Name $VnetName -ResourceGroupName $ResourceGroupName $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $SubnetName -VirtualNetwork $Vnet return $Subnet.Id } function CreateVnetSubnet($Parameters){ if (!$Parameters.ContainsKey('SubnetPrefix')){$Parameters.SubnetPrefix = $DEFAULT_SUBNET_PREFIX} if (!$Parameters.ContainsKey('VnetPrefix')){$Parameters.VnetPrefix = $DEFAULT_VNET_PREFIX} try { $Vnet = Get-AzVirtualNetwork -Name $Parameters.VnetName -ResourceGroupName $Parameters.ResourceGroupName -ErrorAction Stop $Msg = "The provided vnet does exist." Write-Host $Msg $prefixes = $Vnet.AddressSpace.AddressPrefixes if (!($prefixes -Contains $Parameters.VnetPrefix)){ $prefixes.Add($Parameters.VnetPrefix) $Vnet.AddressSpace.AddressPrefixes = $prefixes $Vnet | Set-AzVirtualNetwork } } catch { $Msg = "Creating new vnet {0} in resource group {1}" -f $Parameters.VnetName, $Parameters.ResourceGroupName Write-Host $Msg if($PSCmdlet.ShouldProcess($Parameters.VnetName)) { New-AzVirtualNetwork -Name $Parameters.VnetName -ResourceGroupName $Parameters.ResourceGroupName -Location $Parameters.Location -AddressPrefix $Parameters.VnetPrefix -Force } } $Subnet = CreateAndDelegateSubnet $Parameters return $Subnet } function CreateAndDelegateSubnet($Parameters) { $SubnetFlag = $true $Vnet = Get-AzVirtualNetwork -Name $Parameters.VnetName -ResourceGroupName $Parameters.ResourceGroupName -ErrorAction Stop try { $Subnet = Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $Vnet -Name $Parameters.SubnetName -ErrorAction Stop $Msg = "The provided subnet does exist." Write-Host $Msg } catch { $SubnetFlag = $false $Msg = 'Creating new subnet {0} in resource group {1} and delegating it to {2}' -f $Parameters.SubnetName, $Parameters.ResourceGroupName, $DELEGATION_SERVICE_NAME Write-Host $Msg } if (!$SubnetFlag) { $Delegation = New-AzDelegation -Name $DELEGATION_SERVICE_NAME -ServiceName $DELEGATION_SERVICE_NAME Add-AzVirtualNetworkSubnetConfig -Name $Parameters.SubnetName -VirtualNetwork $Vnet -AddressPrefix $Parameters.SubnetPrefix -Delegation $Delegation | Set-AzVirtualNetwork } else { # check if existing subnet is delegated $Delegations = Get-AzDelegation -Subnet $Subnet if ($null -ne $Delegations){ $Delegations | ForEach-Object {If ($PSItem.ServiceName -ne $DELEGATION_SERVICE_NAME) { $Msg = "Can not use subnet with existing delegations other than {0}" -f $DELEGATION_SERVICE_NAME throw $Msg }} } else { # Valid but no delegation $Subnet = Add-AzDelegation -Name $DELEGATION_SERVICE_NAME -ServiceName $DELEGATION_SERVICE_NAME -Subnet $Subnet $Vnet | Set-AzVirtualNetwork } } return $Subnet } function CreateFirewallRule($RuleName, $StartIp, $EndIp, $ResourceGroupName, $ServerName) { $FirewallRule = New-AzPostgreSqlFlexibleServerFirewallRule -Name $RuleName -ResourceGroupName $ResourceGroupName -ServerName $ServerName -EndIPAddress $EndIp -StartIPAddress $StartIp return $FirewallRule.Name } function ParseFirewallRule($PublicAccess){ $PublicAccess = [string]$PublicAccess if ([string]::IsNullOrEmpty($PublicAccess)) { $PublicAccess = 'none' } if ($PublicAccess.ToLower() -ne 'none') { $Date = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" if ($PublicAccess.ToLower() -eq 'all'){ $StartIp = '0.0.0.0' $EndIp = '255.255.255.255' $RuleName = "AllowAll_" + $Date } else { $Parsed = $PublicAccess -split "-" if ($Parsed.length -eq 1) { $StartIp = $Parsed[0] $EndIp = $Parsed[0] } elseif ($Parsed.length -eq 2) { $StartIp = $Parsed[0] $EndIp = $Parsed[1] } else { throw "Incorrect usage: --public-access. Acceptable values are \'all\', \'none\',\'<startIP>\' and \'<startIP>-<destinationIP>\' where startIP and destinationIP ranges from 0.0.0.0 to 255.255.255.255" } if ($StartIp -eq '0.0.0.0' -And $EndIp -eq '0.0.0.0') { $RuleName = "AllowAllAzureServicesAndResourcesWithinAzureIps_" + $Date $Msg = 'Configuring server firewall rule to accept connections from all Azure resources...' } elseif ($StartIP -eq $EndIP) { $Msg = 'Configuring server firewall rule to accept connections from ' + $StartIP $RuleName = "FirewallIPAddress_" + $Date } else { $Msg = 'Configuring server firewall rule to accept connections from {0} to {1}' -f $StartIP, $EndIp $RuleName = "FirewallIPAddress_" + $Date } Write-Host $Msg } } else{ $StartIp = $null $EndIp = $null $RuleName = $null } return $RuleName, $StartIp, $EndIp } function IsValidVnetId($Rid){ $VnetFormat = "\/subscriptions\/[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}\/resourceGroups\/[-\w\._\(\)]+\/providers\/Microsoft.Network\/virtualNetworks\/[^<>%&:\\?/]{1,260}$" if ( $Rid -match $VnetFormat ) { return $True } return $False } function IsValidSubnetId($Rid){ $SubnetFormat = "\/subscriptions\/[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}\/resourceGroups/[-\w\._\(\)]+\/providers\/Microsoft.Network\/virtualNetworks\/[^<>%&:\\?/]{1,260}\/subnets\/[^<>%&:\\?/]{1,260}$" if ( $Rid -match $SubnetFormat ) { return $True } return $False } function ParseResourceId($Rid){ $Splits = $Rid -split "/" $ParsedResults = @{} if ($Splits.length -gt 1){ $ParsedResults["SubscriptionId"] = $Splits[2] $ParsedResults["ResourceGroupName"] = $Splits[4] $ParsedResults["VnetName"] = $Splits[8] if ($Splits.length -eq 11) { $ParsedResults["SubnetName"] = $Splits[10] } } return $ParsedResults } function IsValidRgLocation($ResourceId, $Parameters){ $ParsedResults = ParseResourceId $ResourceId $Group = Get-AzResourceGroup -Name $ParsedResults["ResourceGroupName"] $ParsedResults["Location"] = $Group.Location if ($Parameters.SubscriptionId -eq $ParsedResults.SubscriptionId -And $Parameters.Location -eq $ParsedResults.Location) { return $True } throw "Incorrect Usage : The location and subscription of the server, Vnet and Subnet should be same." } function Get-RandomNumbers($Prefix, $Length) { $Generated = "" for($i = 0; $i -lt $Length; $i++){ $Generated += Get-Random -Maximum 10 } return $Prefix + $Generated } function Get-RandomName() { $Noun = Get-Content -Path (Join-Path $PSScriptRoot ".\nouns.txt") | Get-Random $Adjective = Get-Content -Path (Join-Path $PSScriptRoot ".\adjectives.txt") | Get-Random $Number = Get-Random -Maximum 10 $RandomName = $Adjective + $Noun + $Number return $RandomName } function Get-GeneratePassword() { $Password = '' $Chars = 'abcdefghiklmnoprstuvwxyzABCDEFGHKLMNOPRSTUVWXYZ1234567890' for ($i = 0; $i -lt 16; $i++ ) { $Password += $Chars[(Get-Random -Minimum 0 -Maximum $Chars.Length)] } $Password = ($Password -split '' | Sort-Object {Get-Random}) -join '' return $Password } # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDp4R5YAQ5W4cXg # fM9F8W8Gg6Xg0WpiQx58Iz+gkuD52KCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG # 0W8Sb0vxi/vorcLHOL9i+t2D6yvvDzLlEefUCbQV/zGCBjXGlYJcUj6RAzXyeNAN # xSpKXAGd7Fh+ocGHPPphcD9LQTOJgG7Y7aYztHqBLJiQQ4eAgZNU4ac6+8LnEGAL # go1ydC5BJEuJQjYKbNTy959HrKSu7LO3Ws0w8jw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KmrAsxxXkRqaQfNB2XI0K7Qx/821 # /r/n # SIG # End signature block
combined_dataset/train/non-malicious/449.ps1
449.ps1
Register-PSFConfigValidation -Name "timespan" -ScriptBlock { Param ( $Value ) $Result = New-Object PSObject -Property @{ Success = $True Value = $null Message = "" } try { [timespan]$timespan = $Value } catch { $Result.Message = "Not a Timespan: $Value" $Result.Success = $False return $Result } $Result.Value = $timespan return $Result }
combined_dataset/train/non-malicious/Get-MemoryChart.ps1
Get-MemoryChart.ps1
#.Synopsis # Draw pie charts of server memory usage by process #.Description # Uses PowerBoots to draw a pipe-chart of each computer's memory use. While you wait for that information # to be gathered, it shows you the latest xkcd comic. ##DEPEND-ON -Function Get-Comic # Uses the Transitionals library for nice transitions ##DEPEND-ON -Assembly Transitionals http://www.codeplex.com/transitionals #.Parameter hosts # The hostnames of the computers you want memory charts for #.Example # Get-MemoryChart localhost # # Returns a pie-chart of the memory on your local PC #.Example # Get-MemoryChart Server01,Server02 # # Returns a pie-chart of the memory on Server01, and Server02 # Note that this requires WMI and authorization... # Param([string[]]$hosts = "localhost") Import-Module PowerBoots if(!(Get-Command Chart -EA SilentlyContinue)) { Add-BootsContentProperty 'DataPoints', 'Series' Add-BootsFunction -Assembly "~\\Documents\\WindowsPowershell\\Libraries\\WPFVisifire.Charts.dll" 2>$Null Add-BootsFunction -Assembly "~\\Documents\\WindowsPowershell\\Libraries\\Transitionals.dll" } ## And this is how you use a script which might not be there... $comical = Get-Command Get-Comic -EA SilentlyContinue if($comical) { $script:comic = Get-Comic xkcd $image = [system.drawing.image]::fromfile( $comic.FullName ) $script:width = $image.Width $image.Dispose() } #$window = Boots { Image -Source $xkcd -MinHeight 100 } -Popup -Async $limitsize = 10mb $labellimitsize = 15mb $window = Boots { DockPanel { ListBox -DisplayMember Name -Ov global:list ` # -width 0 -On_SelectionChanged { $global:container[0].Content = $global:list[0].SelectedItem } # TransitionElement -Transition $(RotateTransition -Angle 45) ` Frame ` -Name TransitionBox -Ov global:container ` -MinWidth 400 -MinHeight 400 -MaxHeight 600 ` -Content { StackPanel { Label -FontSize 42 "Loading ..." if($comical) { Image -Source $comic.FullName -MaxWidth $width } } | Set-AttachedProperty ([System.Windows.Navigation.JournalEntry]::NameProperty) "XKCD Comic" } } -LastChildFill $true } -MinHeight 400 -Async -Popup -Passthru sleep 2; $jobs = @() ForEach($pc in $hosts) { $jobs += gwmi Win32_Process -ComputerName $pc -AsJob; } while($jobs) { $job = Wait-Job -Any $jobs Invoke-BootsWindow $window { if($list -is [System.Collections.ArrayList]) { $list = $list[0]; $list.Padding = "2,2,5,2" } $name = $($job.Location -Replace "[^a-zA-Z_0-9]" -replace "(^[0-9])",'_$1') # $null = $list.Items.Add( $global:container[0].Content = ` $( Chart { DataSeries -LabelText $job.Location { ForEach($proc in (Receive-Job $job | Sort WorkingSetSize)) { if($proc.WorkingSetSize -gt $limitsize) { DataPoint -YValue $proc.WorkingSetSize -LabelText $proc.Name ` -LabelEnabled $($proc.WorkingSetSize -gt $labellimitsize) ` -ToolTipText "$($proc.Name): #YValue (#Percentage%)" } } } -RenderAs Pie -ShowInLegend $false } -Watermark $false -AnimationEnabled $true -Name $name | Set-AttachedProperty ([System.Windows.Navigation.JournalEntry]::NameProperty) $name ) ); $list.SelectedIndex = $list.Items.Count - 1 } $jobs = $jobs -ne $job Remove-Job $job.Id Sleep 5 }
combined_dataset/train/non-malicious/Get-ProfilesList_1.ps1
Get-ProfilesList_1.ps1
function Get-ProfilesList { $hive = "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList" gci $hive | % -b {$prof = @()} -p {$dest = "" | select UserName, Sid, ProfilePath $dest.Sid = $_.PSChildName $dest.ProfilePath = (gp ($hive + "\\" + $_.PSChildName)).ProfileImagePath $dest.UserName = Split-Path $dest.ProfilePath -leaf $prof += $dest } -end {$prof | ft -a} }
combined_dataset/train/non-malicious/891.ps1
891.ps1
$webappname="mywebapp$(Get-Random -Minimum 100000 -Maximum 999999)" $storagename="$($webappname)storage" $container="appbackup" $location="West Europe" $backupname="backup1" New-AzResourceGroup -Name myResourceGroup -Location $location $storage = New-AzStorageAccount -ResourceGroupName myResourceGroup ` -Name $storagename -SkuName Standard_LRS -Location $location New-AzStorageContainer -Name $container -Context $storage.Context $sasUrl = New-AzStorageContainerSASToken -Name $container -Permission rwdl ` -Context $storage.Context -ExpiryTime (Get-Date).AddMonths(1) -FullUri New-AzAppServicePlan -ResourceGroupName myResourceGroup -Name $webappname ` -Location $location -Tier Standard New-AzWebApp -ResourceGroupName myResourceGroup -Name $webappname ` -Location $location -AppServicePlan $webappname New-AzWebAppBackup -ResourceGroupName myResourceGroup -Name $webappname ` -StorageAccountUrl $sasUrl -BackupName $backupname Get-AzWebAppBackupList -ResourceGroupName myResourceGroup -Name $webappname
combined_dataset/train/non-malicious/93a65603-30b1-4887-8fef-5b0d188f44a2.ps1
93a65603-30b1-4887-8fef-5b0d188f44a2.ps1
function Using-Culture { <# .SYNOPSIS Runs a PowerShell script under a different locale to test localization features. .DESCRIPTION Runs a PowerShell script under a different locale to test localization features. Copied from http://rkeithhill.wordpress.com/2009/10/21/windows-powershell-2-0-string-localization/ and converted to a Cmdlet including help comments. .LINK Import-LocalizedData Convert-FromStringData http://rkeithhill.wordpress.com/2009/10/21/windows-powershell-2-0-string-localization/ .PARAMETER Culture The culture (language) to run the script in. .PARAMETER Script The scriptblock or script (wrapped in a scriptblock) to run. .EXAMPLE PS C:\\> Using-Culture fr-FR { .\\test.ps1 } Runs the script test.ps1 under French language settings. #> [CmdletBinding()] Param([Parameter(Mandatory = $true, HelpMessage = 'The culture (language) to run the script in.')] [ValidateNotNull()] [System.Globalization.CultureInfo] $Culture, [Parameter(Mandatory = $true, HelpMessage = 'The scriptblock or wrapped script to run.')] [ValidateNotNull()] [ScriptBlock] $Script ) $OldCulture = [System.Threading.Thread]::CurrentThread.CurrentCulture $OldUICulture = [System.Threading.Thread]::CurrentThread.CurrentUICulture try { [System.Threading.Thread]::CurrentThread.CurrentCulture = $culture [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture Invoke-Command $script } finally { [System.Threading.Thread]::CurrentThread.CurrentCulture = $OldCulture [System.Threading.Thread]::CurrentThread.CurrentUICulture = $OldUICulture } }
combined_dataset/train/non-malicious/sample_36_38.ps1
sample_36_38.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\practice\demo\quick-reference\node_modules\.pnpm\node_modules" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Node # are installed in the same directory $exe=".exe" $pathsep=";" } else { $new_node_path="/mnt/c/practice/demo/quick-reference/node_modules/.pnpm/node_modules" } if ([string]::IsNullOrEmpty($env_node_path)) { $env:NODE_PATH=$new_node_path } else { $env:NODE_PATH="$env_node_path$pathsep$new_node_path" } $ret=0 if (Test-Path "$basedir/node$exe") { # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & "$basedir/node$exe" "$basedir/../../../../node_modules/.pnpm/lint-staged@15.2.2/node_modules/lint-staged/bin/lint-staged.js" $args } else { & "$basedir/node$exe" "$basedir/../../../../node_modules/.pnpm/lint-staged@15.2.2/node_modules/lint-staged/bin/lint-staged.js" $args } $ret=$LASTEXITCODE } else { # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & "node$exe" "$basedir/../../../../node_modules/.pnpm/lint-staged@15.2.2/node_modules/lint-staged/bin/lint-staged.js" $args } else { & "node$exe" "$basedir/../../../../node_modules/.pnpm/lint-staged@15.2.2/node_modules/lint-staged/bin/lint-staged.js" $args } $ret=$LASTEXITCODE } $env:NODE_PATH=$env_node_path exit $ret
combined_dataset/train/non-malicious/sample_60_59.ps1
sample_60_59.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 = '89.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 = '89.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-OCIDatabaseAutonomousDatabasePeersList', '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-OCIDatabaseExadbVmCluster', 'Get-OCIDatabaseExadbVmClustersList', 'Get-OCIDatabaseExadbVmClusterUpdate', 'Get-OCIDatabaseExadbVmClusterUpdateHistoryEntriesList', 'Get-OCIDatabaseExadbVmClusterUpdateHistoryEntry', 'Get-OCIDatabaseExadbVmClusterUpdatesList', 'Get-OCIDatabaseExascaleDbStorageVault', 'Get-OCIDatabaseExascaleDbStorageVaultsList', 'Get-OCIDatabaseExternalBackupJob', 'Get-OCIDatabaseExternalContainerDatabase', 'Get-OCIDatabaseExternalContainerDatabasesList', 'Get-OCIDatabaseExternalDatabaseConnector', 'Get-OCIDatabaseExternalDatabaseConnectorsList', 'Get-OCIDatabaseExternalNonContainerDatabase', 'Get-OCIDatabaseExternalNonContainerDatabasesList', 'Get-OCIDatabaseExternalPluggableDatabase', 'Get-OCIDatabaseExternalPluggableDatabasesList', 'Get-OCIDatabaseFlexComponentsList', 'Get-OCIDatabaseGiVersionMinorVersionsList', '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-OCIDatabaseConfirmKeyStoreDetailsAreCorrect', '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-OCIDatabaseAutonomousDatabaseSubscription', 'Move-OCIDatabaseAutonomousExadataInfrastructureCompartment', 'Move-OCIDatabaseAutonomousVmClusterCompartment', 'Move-OCIDatabaseBackupDestinationCompartment', 'Move-OCIDatabaseCloudAutonomousVmClusterCompartment', 'Move-OCIDatabaseCloudExadataInfrastructureCompartment', 'Move-OCIDatabaseCloudExadataInfrastructureSubscription', 'Move-OCIDatabaseCloudVmClusterCompartment', 'Move-OCIDatabaseCloudVmClusterSubscription', 'Move-OCIDatabaseDataguardRole', 'Move-OCIDatabaseDbSystemCompartment', 'Move-OCIDatabaseDisasterRecoveryConfiguration', 'Move-OCIDatabaseExadataInfrastructureCompartment', 'Move-OCIDatabaseExadbVmClusterCompartment', 'Move-OCIDatabaseExascaleDbStorageVaultCompartment', '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-OCIDatabaseExadbVmCluster', 'New-OCIDatabaseExascaleDbStorageVault', '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-OCIDatabaseExadbVmCluster', 'Remove-OCIDatabaseExascaleDbStorageVault', 'Remove-OCIDatabaseExternalContainerDatabase', 'Remove-OCIDatabaseExternalDatabaseConnector', 'Remove-OCIDatabaseExternalNonContainerDatabase', 'Remove-OCIDatabaseExternalPluggableDatabase', 'Remove-OCIDatabaseKeyStore', 'Remove-OCIDatabaseOneoffPatch', 'Remove-OCIDatabasePluggableDatabase', 'Remove-OCIDatabaseSoftwareImage', 'Remove-OCIDatabaseVirtualMachineFromCloudVmCluster', 'Remove-OCIDatabaseVirtualMachineFromExadbVmCluster', '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-OCIDatabaseExadbVmCluster', 'Update-OCIDatabaseExascaleDbStorageVault', '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/Export-CustomProperty.ps1
Export-CustomProperty.ps1
## An example of how to make a custom object with strongly-typed properties, custom enumeration values, and custom validators, etc. function Export-CustomProperty { param( [Parameter(ValueFromPipeline=$true)] [PSCustomObject]$Object ) process { foreach($property in Get-Member Get_*,Set_* -Input $Object -Type Methods | Group-Object { $_.Name.Split("_",2)[1] }) { $GetAccessor = $SetAccessor = {} foreach($accessor in $property.Group) { switch($accessor.Name.Split("_")[0]) { "Get" { $GetAccessor = [ScriptBlock]::Create('$this.' + $accessor.Name + '()') } "Set" { $SetAccessor = [ScriptBlock]::Create('try { $this.' + $accessor.Name + '( $args ) } catch { throw $_.Exception.Message.Split(":",2)[1].trim('' "'') }') } } } Add-Member -Input $Object -Type ScriptProperty -Name $Property.Name -Value $GetAccessor $SetAccessor } Write-Output $Object } } ## USAGE: $customThing = New-Module -AsCustomObject { ## The FooBar property: a variable, two accessor methods and later, a ScriptProperty. [string]$FooBar = 'foo' [string[]]$FooBarValues = 'foo','bar' function Get_FooBar { $FooBar } function Set_FooBar { param([string]$value) if($FooBarValues -notcontains $Value) { throw "You can't set FooBar to '$value', valid values are $($FooBarValues -join ', ')."; } $script:FooBar = $value } ## The Enabled property: just a strongly-typed variable [bool]$Enabled = $False ## The UserName property: a variable, two accessor methods (and a validation method) and later, a ScriptProperty. [String]$UserName = $Env:UserName function Test-ADUser { [CmdletBinding()] param([string]$UserName) $ads = New-Object System.DirectoryServices.DirectorySearcher([ADSI]'') $ads.filter = "(&(objectClass=Person)(samAccountName=$UserName))" return [bool]$ads.FindOne() } function Get_UserName { $UserName } function Set_UserName { param([string]$value) if(!(Test-ADUser $Value)) { throw "You can't set UserName to '$value', that user doesn't exist."; } $script:UserName = $value } Export-ModuleMember -Function Get_*,Set_* -Variable Enabled } | Export-CustomProperty #### Sample Validation Output: ############################################################################## # C:\\PS> $customThing.UserName = 'Nobody' # # Exception setting "UserName": "You can't set UserName to 'Nobody', that user doesn't exist." # At line:1 char:6 # + $customThing. <<<< UserName = 'Nobody' # + CategoryInfo : InvalidOperation: (:) [], RuntimeException # + FullyQualifiedErrorId : PropertyAssignmentException # # # C:\\PS> $customThing.FooBar = 'foobar' # # Exception setting "FooBar": "You can't set FooBar to 'foobar', valid values are foo, bar." # At line:1 char:6 # + $customThing. <<<< FooBar = 'foobar' # + CategoryInfo : InvalidOperation: (:) [], RuntimeException # + FullyQualifiedErrorId : PropertyAssignmentException # # # C:\\PS> $customThing.Enabled = "what" # # Cannot convert value "System.String" to type "System.Boolean", parameters of this type only accept booleans or numbers, use $true, $false, 1 or 0 instead. # At line:1 char:6 # + $customThing. <<<< Enabled = "what" # + CategoryInfo : InvalidOperation: (:) [], RuntimeException # + FullyQualifiedErrorId : PropertyAssignmentException
combined_dataset/train/non-malicious/2269.ps1
2269.ps1
function Load-Form { $Form.Controls.Add($TabControl) $TabControl.Controls.AddRange(@($TabPageGeneral, $TabPageCAS, $TabPagePrimary, $TabPageSecondary, $TabPageSiteRoles, $TabPageOther)) $TabPageGeneral.Controls.AddRange(@($OutputBoxGeneral, $BlogLink, $LabelHeader, $LabelGeneralRestart, $LabelGeneralOS, $LabelGeneralPS, $LabelGeneralElevated, $GBGeneralReboot, $GBGeneralOS, $GBGeneralPS, $GBGeneralElevated, $GBGeneralValidation)) $LabelGeneralRestart.Visible = $false $LabelGeneralOS.Visible = $false $LabelGeneralPS.Visible = $false $Form.Add_Shown({Validate-RunChecks}) $Form.Add_Shown({$Form.Activate()}) [void]$Form.ShowDialog() } function Load-CAS { if (-not(($TabPageCAS.Controls | Measure-Object).Count -ge 1)) { $TabPageCAS.Controls.Clear() $TabPageCAS.Controls.AddRange(@($ProgressBarCAS, $OutputBoxCAS, $CBCASDownloadPrereqs, $ButtonInstallCAS)) } if ($ButtonInstallCAS.Enabled -eq $false) { $ButtonInstallCAS.Enabled = $true } } function Load-Primary { if (-not(($TabPagePrimary.Controls | Measure-Object).Count -ge 1)) { $TabPagePrimary.Controls.Clear() $TabPagePrimary.Controls.AddRange(@($ProgressBarPrimary, $OutputBoxPrimary, $CBPrimaryDownloadPrereqs, $ButtonInstallPrimarySite)) } if ($ButtonInstallPrimarySite.Enabled -eq $false) { $ButtonInstallPrimarySite.Enabled = $true } } function Load-Secondary { if (-not(($TabPageSecondary.Controls | Measure-Object).Count -ge 1)) { $TabPageSecondary.Controls.Clear() $TabPageSecondary.Controls.AddRange(@($ProgressBarSecondary, $OutputBoxSecondary, $ButtonInstallSecondarySite)) } if ($ButtonInstallSecondarySite.Enabled -eq $false) { $ButtonInstallSecondarySite.Enabled = $true } } function Load-SiteSystemRoles { if (-not(($TabPageSiteRoles.Controls | Measure-Object).Count -ge 1)) { $TabPageSiteRoles.Controls.Clear() $TabPageSiteRoles.Controls.AddRange(@($ProgressBarSiteRoles, $OutputBoxSiteRoles, $RadioButtonSiteRoleMP, $RadioButtonSiteRoleDP, $RadioButtonSiteRoleAppCat, $RadioButtonSiteRoleEP, $ButtonInstallSiteRoles, $GBSiteSystemRoles)) } } function Load-Other { if (-not(($TabPageOther.Controls | Measure-Object).Count -ge 1)) { $TabPageOther.Controls.Clear() $TabPageOther.Controls.AddRange(@($ProgressBarOther, $OutputBoxOther, $ButtonInstallOther, $RadioButtonOtherEAD, $RadioButtonOtherWSUS, $RadioButtonOtherADK, $RadioButtonOtherSMC, $GBOther)) } } function Load-SystemManagementContainer { Validate-ADGroupSearch } function Interactive-TabPages { param( [parameter(Mandatory=$true)] [ValidateSet("Enable","Disable")] $Mode ) Begin { $CurrentTabPage = $TabControl.SelectedTab.Name switch ($Mode) { "Enable" { $TabPageMode = $true } "Disable" { $TabPageMode = $false } } $TabNameArrayList = New-Object -TypeName System.Collections.ArrayList foreach ($TabNameArrayListObject in (($TabControl.TabPages.Name))) { $TabNameArrayList.Add($TabNameArrayListObject) } } Process { foreach ($TabPageObject in $TabNameArrayList) { if ($Mode -like "Disable") { if ($CurrentTabPage -like "General") { $TabPageCAS.Enabled = $TabPageMode $TabPagePrimary.Enabled = $TabPageMode $TabPageSecondary.Enabled = $TabPageMode $TabPageSiteRoles.Enabled = $TabPageMode $TabPageOther.Enabled = $TabPageMode } if ($CurrentTabPage -like "Central Administration Site") { $TabPageGeneral.Enabled = $TabPageMode $TabPagePrimary.Enabled = $TabPageMode $TabPageSecondary.Enabled = $TabPageMode $TabPageSiteRoles.Enabled = $TabPageMode $TabPageOther.Enabled = $TabPageMode } if ($CurrentTabPage -like "Primary Site") { $TabPageGeneral.Enabled = $TabPageMode $TabPageCAS.Enabled = $TabPageMode $TabPageSecondary.Enabled = $TabPageMode $TabPageSiteRoles.Enabled = $TabPageMode $TabPageOther.Enabled = $TabPageMode } if ($CurrentTabPage -like "Secondary Site") { $TabPageGeneral.Enabled = $TabPageMode $TabPageCAS.Enabled = $TabPageMode $TabPagePrimary.Enabled = $TabPageMode $TabPageSiteRoles.Enabled = $TabPageMode $TabPageOther.Enabled = $TabPageMode } if ($CurrentTabPage -like "Site System Roles") { $TabPageGeneral.Enabled = $TabPageMode $TabPageCAS.Enabled = $TabPageMode $TabPagePrimary.Enabled = $TabPageMode $TabPageSecondary.Enabled = $TabPageMode $TabPageOther.Enabled = $TabPageMode } if ($CurrentTabPage -like "Other") { $TabPageGeneral.Enabled = $TabPageMode $TabPageCAS.Enabled = $TabPageMode $TabPagePrimary.Enabled = $TabPageMode $TabPageSecondary.Enabled = $TabPageMode $TabPageSiteRoles.Enabled = $TabPageMode } } else { $TabPageGeneral.Enabled = $TabPageMode $TabPageCAS.Enabled = $TabPageMode $TabPagePrimary.Enabled = $TabPageMode $TabPageSecondary.Enabled = $TabPageMode $TabPageSiteRoles.Enabled = $TabPageMode $TabPageOther.Enabled = $TabPageMode } } } } function Interactive-RadioButtons { param( [parameter(Mandatory=$true)] [ValidateSet("Enable","Disable")] $Mode, [parameter(Mandatory=$true)] [ValidateSet("Other","SiteRoles")] $Module ) Begin { switch ($Mode) { "Enable" { $TabPageRadioButtonMode = $true } "Disable" { $TabPageRadioButtonMode = $false } } } Process { if ($Module -eq "SiteRoles") { foreach ($Control in $TabPageSiteRoles.Controls) { if ($Control.GetType().ToString() -eq "System.Windows.Forms.RadioButton") { $Control.Enabled = $TabPageRadioButtonMode } if ($Control.GetType().ToString() -eq "System.Windows.Forms.ComboBox") { $Control.Enabled = $TabPageRadioButtonMode } } } if ($Module -eq "Other") { foreach ($Control in $TabPageOther.Controls) { if ($Control.GetType().ToString() -eq "System.Windows.Forms.RadioButton") { $Control.Enabled = $TabPageRadioButtonMode } if ($Control.GetType().ToString() -eq "System.Windows.Forms.ComboBox") { $Control.Enabled = $TabPageRadioButtonMode } if ($Control.GetType().ToString() -eq "System.Windows.Forms.CheckBox") { $Control.Enabled = $TabPageRadioButtonMode } if ($Control.GetType().ToString() -eq "System.Windows.Forms.TextBox") { $Control.Enabled = $TabPageRadioButtonMode } } } } } function Interactive-SiteRolesControlVisibility { param( [parameter(Mandatory=$true)] [ValidateSet("Enable","Disable")] $Mode ) Begin { $ControlsArrayList = New-Object System.Collections.ArrayList $ControlsArrayList.AddRange(@("Option Enrollment Point","Option Management Point","Option Distribution Point","Option Application Catalog","Option Site System Roles")) switch ($Mode) { "Enable" { $TabPageSiteRolesVisibilityMode = $true } "Disable" { $TabPageSiteRolesVisibilityMode = $false } } } Process { $SiteRolesControls = $TabPageSiteRoles.Controls $SiteRolesControls | ForEach-Object { $CurrentControl = $_ if ($CurrentControl.GetType().ToString() -eq "System.Windows.Forms.RadioButton") { if (-not($ControlsArrayList -contains $CurrentControl.Name)) { $CurrentControl.Visible = $TabPageSiteRolesVisibilityMode } } if ($CurrentControl.GetType().ToString() -eq "System.Windows.Forms.GroupBox") { if (-not($ControlsArrayList -contains $CurrentControl.Name)) { $CurrentControl.Visible = $TabPageSiteRolesVisibilityMode } } if ($CurrentControl.GetType().ToString() -eq "System.Windows.Forms.CheckBox") { if (-not($ControlsArrayList -contains $CurrentControl.Name)) { $CurrentControl.Visible = $TabPageSiteRolesVisibilityMode } } if ($CurrentControl.GetType().ToString() -eq "System.Windows.Forms.ComboBox") { if (-not($ControlsArrayList -contains $CurrentControl.Name)) { $CurrentControl.Visible = $TabPageSiteRolesVisibilityMode } } } } } function Interactive-OtherControlVisibility { param( [parameter(Mandatory=$true)] [ValidateSet("Enable","Disable")] $Mode, [parameter(Mandatory=$true)] [ValidateSet("EAD","WSUS","ADK","SMC")] $Module ) Begin { $OtherControlsArrayList = New-Object System.Collections.ArrayList $OtherControlsArrayList.AddRange(@("Option Extend Active Directory","Option Install WSUS","Option Install Windows ADK","Option System Management Container","Option Make a selection")) switch ($Mode) { "Enable" { $TabPageOtherVisibilityMode = $true } "Disable" { $TabPageOtherVisibilityMode = $false } } } Process { $OtherControls = $TabPageOther.Controls $OtherControls | ForEach-Object { $OtherCurrentControl = $_ if ($OtherCurrentControl.GetType().ToString() -eq "System.Windows.Forms.RadioButton") { if (-not($OtherControlsArrayList -contains $OtherCurrentControl.Name)) { if (($OtherCurrentControl.Name -eq $Module)) { $CurrentControl.Visible = $TabPageOtherVisibilityMode } } } if ($OtherCurrentControl.GetType().ToString() -eq "System.Windows.Forms.GroupBox") { if (-not($OtherControlsArrayList -contains $OtherCurrentControl.Name)) { if (($OtherCurrentControl.Name -eq $Module)) { $OtherCurrentControl.Visible = $TabPageOtherVisibilityMode } } } if ($OtherCurrentControl.GetType().ToString() -eq "System.Windows.Forms.ComboBox") { if (-not($OtherControlsArrayList -contains $OtherCurrentControl.Name)) { if (($OtherCurrentControl.Name -eq $Module)) { $OtherCurrentControl.Visible = $TabPageOtherVisibilityMode } } } if ($OtherCurrentControl.GetType().ToString() -eq "System.Windows.Forms.TextBox") { if (-not($OtherControlsArrayList -contains $OtherCurrentControl.Name)) { if (($OtherCurrentControl.Name -eq $Module)) { $OtherCurrentControl.Visible = $TabPageOtherVisibilityMode } } } if ($OtherCurrentControl.GetType().ToString() -eq "System.Windows.Forms.CheckBox") { if (-not($OtherControlsArrayList -contains $OtherCurrentControl.Name)) { if (($OtherCurrentControl.Name -eq $Module)) { $OtherCurrentControl.Visible = $TabPageOtherVisibilityMode } } } } } } function Validate-RunChecks { $ValidateCounter = 0 if (Validate-RebootPendingCheck) { $ValidateCounter++ } if (Validate-OSCheck) { $ValidateCounter++ } if (Validate-PSCheck) { $ValidateCounter++ } if (Validate-Elevated) { $ValidateCounter++ } if ($ValidateCounter -ge 4) { Interactive-TabPages -Mode Enable Write-OutputBox -OutputBoxMessage "All validation checks passed successfully" -Type "INFO: " -Object General } else { Interactive-TabPages -Mode Disable Write-OutputBox -OutputBoxMessage "All validation checks did not pass successfully, remediate the errors and re-launch the tool" -Type "ERROR: " -Object General } } function Validate-Elevated { $UserIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() $UserWP = New-Object Security.Principal.WindowsPrincipal($UserIdentity) if ($UserWP.IsInRole("S-1-5-32-544")) { $LabelGeneralElevated.ForeColor = "Green" $LabelGeneralElevated.Text = "Sufficient rights detected" $LabelGeneralElevated.Visible = $true Write-OutputBox -OutputBoxMessage "User has local administrative rights, and the tool was launched elevated" -Type "INFO: " -Object General return $true } else { $LabelGeneralElevated.ForeColor = "Red" $LabelGeneralElevated.Text = "Insufficient rights detected" $LabelGeneralElevated.Visible = $true Write-OutputBox -OutputBoxMessage "The tool requires local administrative rights and was not launched elevated" -Type "ERROR: " -Object General return $false } } function Validate-RebootPending { param( [parameter(Mandatory=$true)] $ComputerName ) $RebootPendingCBS = $null $RebootPendingWUAU = $null $GetOS = Get-WmiObject -Class Win32_OperatingSystem -Property BuildNumber,CSName -ComputerName $ComputerName $ConnectRegistry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]"LocalMachine",$ComputerName) if ($GetOS.BuildNumber -ge 6001) { $RegistryCBS = $ConnectRegistry.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\").GetSubKeyNames() $RebootPendingCBS = $RegistryCBS -contains "RebootPending" } $RegistryWUAU = $ConnectRegistry.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\").GetSubKeyNames() $RebootPendingWUAU = $RegistryWUAU -contains "RebootRequired" $RegistryPFRO = $ConnectRegistry.OpenSubKey("SYSTEM\CurrentControlSet\Control\Session Manager\") $RegistryValuePFRO = $RegistryPFRO.GetValue("PendingFileRenameOperations",$null) if ($RegistryValuePFRO) { $RebootPendingPFRO = $true } if (($RebootPendingCBS) -or ($RebootPendingWUAU) -or ($RebootPendingPFRO)) { return $true } else { return $false } } function Validate-RebootPendingCheck { $GetComputerName = $env:COMPUTERNAME $ValidateRebootPending = Validate-RebootPending -ComputerName $GetComputerName if ($ValidateRebootPending) { $LabelGeneralRestart.ForeColor = "Red" $LabelGeneralRestart.Text = "A reboot is pending" $LabelGeneralRestart.Visible = $true Write-OutputBox -OutputBoxMessage "A reboot is pending, please restart the system" -Type "ERROR: " -Object General return $false } else { $LabelGeneralRestart.ForeColor = "Green" $LabelGeneralRestart.Text = "No reboot pending" $LabelGeneralRestart.Visible = $true Write-OutputBox -OutputBoxMessage "Pending reboot checks validated successfully" -Type "INFO: " -Object General return $true } } function Validate-OSCheck { $OSProductType = Get-WmiObject -Namespace "root\cimv2" -Class Win32_OperatingSystem | Select-Object -ExpandProperty ProductType $OSBuildNumber = Get-WmiObject -Namespace "root\cimv2" -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber if (($OSProductType -eq 3) -and ($OSBuildNumber -ge 9200)) { Write-OutputBox -OutputBoxMessage "Supported operating system found" -Type "INFO: " -Object General $LabelGeneralOS.ForeColor = "Green" $LabelGeneralOS.Text = "Supported platform detected" $LabelGeneralOS.Visible = $true return $true } else { if ($OSBuildNumber -lt 9200) { Write-OutputBox -OutputBoxMessage "The detected operating system is not supported. This tool is supported on Windows Server 2012 and above" -Type "ERROR: " -Object General $LabelGeneralOS.ForeColor = "Red" $LabelGeneralOS.Text = "Unsupported platform detected" $LabelGeneralOS.Visible = $true return $false } if ($OSProductType -eq 2) { Write-OutputBox -OutputBoxMessage "The detected system is a Domain Controller. This tool is not supported on this platform" -Type "ERROR: " -Object General $LabelGeneralOS.ForeColor = "Red" $LabelGeneralOS.Text = "Unsupported platform detected" $LabelGeneralOS.Visible = $true return $false } if ($OSProductType -eq 1) { Write-OutputBox -OutputBoxMessage "The detected operating system is a Workstation OS. This tool is not supported on this platform" -Type "ERROR: " -Object General $LabelGeneralOS.ForeColor = "Red" $LabelGeneralOS.Text = "Unsupported platform detected" $LabelGeneralOS.Visible = $true return $false } } } function Validate-PSCheck { if ($host.Version -ge "3.0") { Write-OutputBox -OutputBoxMessage "Supported version of PowerShell was detected" -Type "INFO: " -Object General $LabelGeneralPS.ForeColor = "Green" $LabelGeneralPS.Text = "Supported version detected" $LabelGeneralPS.Visible = $true return $true } else { Write-OutputBox -OutputBoxMessage "Unsupported version of PowerShell detected. This tool requires PowerShell 3.0 and above" -Type "ERROR: " -Object General $LabelGeneralPS.ForeColor = "Red" $LabelGeneralPS.Text = "Unsupported version detected" $LabelGeneralPS.Visible = $true return $false } } function Validate-DomainController { param( [parameter(Mandatory=$true)] $DCName ) Process { $SchemaMaster = ([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).SchemaRoleOwner.Name if (($DCName -like $SchemaMaster) -or ($DCName -like $SchemaMaster.Split(".")[0])) { Write-OutputBox -OutputBoxMessage "Specified server name is the Schema Master role owner" -Type "INFO: " -Object Other return $true } elseif (($DCName -ne $SchemaMaster) -or ($DCName -ne $SchemaMaster.Split(".")[0])) { Write-OutputBox -OutputBoxMessage "The specified server name is not the Schema Master role owner in the forest" -Type "ERROR: " -Object Other return $false } else { return $false } } } function Validate-WSUS { $WSUSErrorHandler = 0 if ((([System.Environment]::OSVersion.Version).Build -lt 9200) -or ([System.Environment]::Is64BitOperatingSystem -eq $false)) { $WSUSErrorHandler++ } if ($WSUSErrorHandler -gt 0) { Write-OutputBox -OutputBoxMessage "Unsupported Operating System detected. Windows Server 2012 64-bit and later is supported" -Type "ERROR: " -Object Other $ButtonInstallWSUS.Enabled = $false } else { $GetComputerName = $env:COMPUTERNAME $ValidateWSUSRebootPending = Validate-RebootPending -ComputerName $GetComputerName if ($ValidateWSUSRebootPending) { $ButtonInstallWSUS.Enabled = $false Write-OutputBox -OutputBoxMessage "A reboot is pending, please restart the system." -Type "WARNING: " -Object Other } else { if (($TextBoxWSUSSQLServer.Text.Length -eq 0) -and ($RadioButtonSQL.Checked -eq $true)) { Write-OutputBox -OutputBoxMessage "Please enter a SQL Server computer name" -Type "ERROR: " -Object Other } else { Install-WSUS } } } } function Install-CAS { Interactive-TabPages -Mode Disable $ProgressBarCAS.Value = 0 $OutputBoxCAS.ResetText() $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($Host.Version)" -Type "INFO: " -Object CAS $WinFeatures = @("NET-Framework-Core","BITS","BITS-IIS-Ext","BITS-Compact-Server","RDC","WAS-Process-Model","WAS-Config-APIs","WAS-Net-Environment","Web-Server","Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Net-Ext","Web-Net-Ext45","Web-ASP-Net","Web-ASP-Net45","Web-ASP","Web-Windows-Auth","Web-Basic-Auth","Web-URL-Auth","Web-IP-Security","Web-Scripting-Tools","Web-Mgmt-Service","Web-Stat-Compression","Web-Dyn-Compression","Web-Metabase","Web-WMI","Web-HTTP-Redirect","Web-Log-Libraries","Web-HTTP-Tracing","UpdateServices-RSAT","UpdateServices-API","UpdateServices-UI") } $ProgressBarCAS.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallCAS.Enabled = $false $CBCASDownloadPrereqs.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object CAS [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { if ($CurrentFeature -eq "NET-Framework-Core") { Add-WindowsFeature NET-Framework-Core -ErrorAction SilentlyContinue | Out-Null if (Get-WindowsFeature -Name NET-Framework-Core | Select-Object Name,Installed | Where-Object { $_.Installed -like "false" }) { Write-OutputBox -OutputBoxMessage "Failed to install $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object CAS do { if (([System.Environment]::OSVersion.Version).Build -eq 9600) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 R2 installation media for the '<drive-letter>:\sources\sxs' folder." } if (([System.Environment]::OSVersion.Version).Build -eq 9200) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 installation media for the '<drive-letter>:\sources\sxs' folder." } } until (($SetupDLLocation.Length -gt 0) -and (Test-Path -Path "$($SetupDLLocation.SubString(0,2))\sources\sxs" -ErrorAction SilentlyContinue)) Write-OutputBox -OutputBoxMessage "Installing role with specified source location: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object CAS Add-WindowsFeature NET-Framework-Core -Source $SetupDLLocation } } else { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object CAS } $ProgressBarCAS.PerformStep() } Write-OutputBox -OutputBoxMessage "Installation completed" -Type "INFO: " -Object CAS if ($CBCASDownloadPrereqs.Checked -eq $true) { Get-PrereqFiles -Module CAS Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object CAS $ErrorVerify = 0 $ProgressBarCAS.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox -OutputBoxMessage "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object CAS $ProgressBarCAS.PerformStep() } else { $ErrorVerify++ Write-OutputBox -OutputBoxMessage "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object CAS $ProgressBarCAS.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object CAS } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object CAS } } else { Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object CAS $ErrorVerify = 0 $ProgressBarCAS.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox -OutputBoxMessage "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object CAS $ProgressBarCAS.PerformStep() } else { $ErrorVerify++ Write-OutputBox -OutputBoxMessage "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object CAS $ProgressBarCAS.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object CAS } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object CAS } } $ButtonInstallCAS.Enabled = $true $CBCASDownloadPrereqs.Enabled = $true Interactive-TabPages -Mode Enable } function Install-Primary { Interactive-TabPages -Mode Disable $ProgressBarPrimary.Value = 0 $OutputBoxPrimary.ResetText() $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object Primary $WinFeatures = @("NET-Framework-Core","BITS","BITS-IIS-Ext","BITS-Compact-Server","RDC","WAS-Process-Model","WAS-Config-APIs","WAS-Net-Environment","Web-Server","Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Net-Ext","Web-Net-Ext45","Web-ASP-Net","Web-ASP-Net45","Web-ASP","Web-Windows-Auth","Web-Basic-Auth","Web-URL-Auth","Web-IP-Security","Web-Scripting-Tools","Web-Mgmt-Service","Web-Stat-Compression","Web-Dyn-Compression","Web-Metabase","Web-WMI","Web-HTTP-Redirect","Web-Log-Libraries","Web-HTTP-Tracing","UpdateServices-RSAT","UpdateServices-API","UpdateServices-UI") } $ProgressBarPrimary.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallPrimarySite.Enabled = $false $CBPrimaryDownloadPrereqs.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Primary [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { if ($CurrentFeature -eq "NET-Framework-Core") { Add-WindowsFeature NET-Framework-Core -ErrorAction SilentlyContinue | Out-Null if (Get-WindowsFeature -Name NET-Framework-Core | Select-Object Name,Installed | Where-Object { $_.Installed -like "false" }) { Write-OutputBox -OutputBoxMessage "Failed to install $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object Primary do { if (([System.Environment]::OSVersion.Version).Build -eq 9600) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 R2 installation media for the '<drive-letter>:\sources\sxs' folder." } if (([System.Environment]::OSVersion.Version).Build -eq 9200) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 installation media for the '<drive-letter>:\sources\sxs' folder." } } until (($SetupDLLocation.Length -gt 0) -and (Test-Path -Path "$($SetupDLLocation.SubString(0,2))\sources\sxs" -ErrorAction SilentlyContinue)) Write-OutputBox -OutputBoxMessage "Installing role with specified source location: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Primary Add-WindowsFeature NET-Framework-Core -Source $SetupDLLocation } } else { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Primary } $ProgressBarPrimary.PerformStep() } Write-OutputBox -OutputBoxMessage "Installation completed" -Type "INFO: " -Object Primary if ($CBPrimaryDownloadPrereqs.Checked -eq $true) { Get-PrereqFiles -Module Primary Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object Primary $ErrorVerify = 0 $ProgressBarPrimary.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox -OutputBoxMessage "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Primary $ProgressBarPrimary.PerformStep() } else { $ErrorVerify++ Write-OutputBox -OutputBoxMessage "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object Primary $ProgressBarPrimary.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object Primary } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object Primary } } else { Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object Primary $ErrorVerify = 0 $ProgressBarPrimary.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox -OutputBoxMessage "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Primary $ProgressBarPrimary.PerformStep() } else { $ErrorVerify++ Write-OutputBox -OutputBoxMessage "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object Primary $ProgressBarPrimary.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object Primary } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object Primary } } $ButtonInstallPrimarySite.Enabled = $true $CBPrimaryDownloadPrereqs.Enabled = $true Interactive-TabPages -Mode Enable } function Install-Secondary { Interactive-TabPages -Mode Disable $ProgressBarSecondary.Value = 0 $OutputBoxSecondary.ResetText() $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object Secondary $WinFeatures = @("NET-Framework-Core","BITS","BITS-IIS-Ext","BITS-Compact-Server","RDC","WAS-Process-Model","WAS-Config-APIs","WAS-Net-Environment","Web-Server","Web-ISAPI-Ext","Web-Windows-Auth","Web-Basic-Auth","Web-URL-Auth","Web-IP-Security","Web-Scripting-Tools","Web-Mgmt-Service","Web-Metabase","Web-WMI") } $ProgressBarSecondary.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallSecondarySite.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Secondary [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { if ($CurrentFeature -eq "NET-Framework-Core") { Add-WindowsFeature NET-Framework-Core -ErrorAction SilentlyContinue | Out-Null if (Get-WindowsFeature -Name NET-Framework-Core | Select-Object Name,Installed | Where-Object { $_.Installed -like "false" }) { Write-OutputBox -OutputBoxMessage "Failed to install $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object Secondary do { if (([System.Environment]::OSVersion.Version).Build -eq 9600) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 R2 installation media for the '<drive-letter>:\sources\sxs' folder." } if (([System.Environment]::OSVersion.Version).Build -eq 9200) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 installation media for the '<drive-letter>:\sources\sxs' folder." } } until (($SetupDLLocation.Length -gt 0) -and (Test-Path -Path "$($SetupDLLocation.SubString(0,2))\sources\sxs" -ErrorAction SilentlyContinue)) Write-OutputBox -OutputBoxMessage "Installing role with specified source location: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Secondary Add-WindowsFeature NET-Framework-Core -Source $SetupDLLocation } } else { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Secondary } $ProgressBarSecondary.PerformStep() } Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object Secondary $ErrorVerify = 0 $ProgressBarSecondary.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Secondary $ProgressBarSecondary.PerformStep() } else { $ErrorVerify++ Write-OutputBox "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object Secondary $ProgressBarSecondary.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object Secondary } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object Secondary } $ButtonInstallSecondarySite.Enabled = $true Interactive-TabPages -Mode Enable } function Install-AppCat { Interactive-TabPages -Mode Disable Interactive-RadioButtons -Mode Disable -Module SiteRoles $ProgressBarSiteRoles.Value = 0 $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object SiteRoles $WinFeatures = @("NET-Framework-Features","NET-Framework-Core","NET-HTTP-Activation","NET-Non-HTTP-Activ","NET-WCF-Services45","NET-WCF-HTTP-Activation45","RDC","WAS","WAS-Process-Model","WAS-NET-Environment","WAS-Config-APIs","Web-Server","Web-WebServer","Web-Common-Http","Web-Static-Content","Web-Default-Doc","Web-App-Dev","Web-ASP-Net","Web-ASP-Net45","Web-Net-Ext","Web-Net-Ext45","Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Security","Web-Windows-Auth","Web-Filtering","Web-Mgmt-Tools","Web-Mgmt-Console","Web-Scripting-Tools","Web-Mgmt-Compat","Web-Metabase","Web-Lgcy-Mgmt-Console","Web-Lgcy-Scripting","Web-WMI") } $ProgressBarSiteRoles.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallSiteRoles.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { if ($CurrentFeature -eq "NET-Framework-Core") { Add-WindowsFeature NET-Framework-Core -ErrorAction SilentlyContinue | Out-Null if (Get-WindowsFeature -Name NET-Framework-Core | Select-Object Name,Installed | Where-Object { $_.Installed -like "false" }) { Write-OutputBox -OutputBoxMessage "Failed to install $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles do { if (([System.Environment]::OSVersion.Version).Build -eq 9600) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 R2 installation media for the '<drive-letter>:\sources\sxs' folder." } if (([System.Environment]::OSVersion.Version).Build -eq 9200) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 installation media for the '<drive-letter>:\sources\sxs' folder." } } until (($SetupDLLocation.Length -gt 0) -and (Test-Path -Path "$($SetupDLLocation.SubString(0,2))\sources\sxs" -ErrorAction SilentlyContinue)) Write-OutputBox -OutputBoxMessage "Installing role with specified source location: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles Add-WindowsFeature NET-Framework-Core -Source $SetupDLLocation } } else { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles } $ProgressBarSiteRoles.PerformStep() } Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object SiteRoles $ErrorVerify = 0 $ProgressBarSiteRoles.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } else { $ErrorVerify++ Write-OutputBox "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object SiteRoles } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object SiteRoles } Interactive-RadioButtons -Mode Enable -Module SiteRoles Interactive-TabPages -Mode Enable $ButtonInstallSiteRoles.Enabled = $true } function Install-MP { Interactive-TabPages -Mode Disable Interactive-RadioButtons -Mode Disable -Module SiteRoles $ProgressBarSiteRoles.Value = 0 $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object SiteRoles $WinFeatures = @("NET-Framework-Core","NET-Framework-45-Features","NET-Framework-45-Core","NET-WCF-TCP-PortSharing45","NET-WCF-Services45","BITS","BITS-IIS-Ext","BITS-Compact-Server","RSAT-Bits-Server","Web-Server","Web-WebServer","Web-ISAPI-Ext","Web-WMI","Web-Metabase","Web-Windows-Auth","Web-ISAPI-Ext") } $ProgressBarSiteRoles.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallSiteRoles.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { if ($CurrentFeature -eq "NET-Framework-Core") { Add-WindowsFeature NET-Framework-Core -ErrorAction SilentlyContinue | Out-Null if (Get-WindowsFeature -Name NET-Framework-Core | Select-Object Name,Installed | Where-Object { $_.Installed -like "false" }) { Write-OutputBox -OutputBoxMessage "Failed to install $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles do { if (([System.Environment]::OSVersion.Version).Build -eq 9600) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 R2 installation media for the '<drive-letter>:\sources\sxs' folder." } if (([System.Environment]::OSVersion.Version).Build -eq 9200) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 installation media for the '<drive-letter>:\sources\sxs' folder." } } until (($SetupDLLocation.Length -gt 0) -and (Test-Path -Path "$($SetupDLLocation.SubString(0,2))\sources\sxs" -ErrorAction SilentlyContinue)) Write-OutputBox -OutputBoxMessage "Installing role with specified source location: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles Add-WindowsFeature NET-Framework-Core -Source $SetupDLLocation } } else { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles } $ProgressBarSiteRoles.PerformStep() } Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object SiteRoles $ErrorVerify = 0 $ProgressBarSiteRoles.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } else { $ErrorVerify++ Write-OutputBox "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object SiteRoles } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object SiteRoles } Interactive-RadioButtons -Mode Enable -Module SiteRoles Interactive-TabPages -Mode Enable $ButtonInstallSiteRoles.Enabled = $true } function Install-DP { Interactive-TabPages -Mode Disable Interactive-RadioButtons -Mode Disable -Module SiteRoles $ProgressBarSiteRoles.Value = 0 $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object SiteRoles $WinFeatures = @("FS-FileServer","RDC","Web-WebServer","Web-Common-Http","Web-Default-Doc","Web-Dir-Browsing","Web-Http-Errors","Web-Static-Content","Web-Http-Redirect","Web-Health","Web-Http-Logging","Web-Performance","Web-Stat-Compression","Web-Security","Web-Filtering","Web-Windows-Auth","Web-App-Dev","Web-ISAPI-Ext","Web-Mgmt-Tools","Web-Mgmt-Console","Web-Mgmt-Compat","Web-Metabase","Web-WMI","Web-Scripting-Tools") } $ProgressBarSiteRoles.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallSiteRoles.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles } $ProgressBarSiteRoles.PerformStep() } Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object SiteRoles $ErrorVerify = 0 $ProgressBarSiteRoles.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } else { $ErrorVerify++ Write-OutputBox "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object SiteRoles } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object SiteRoles } Interactive-RadioButtons -Mode Enable -Module SiteRoles Interactive-TabPages -Mode Enable $ButtonInstallSiteRoles.Enabled = $true } function Install-EP { Interactive-TabPages -Mode Disable Interactive-RadioButtons -Mode Disable -Module SiteRoles $ProgressBarSiteRoles.Value = 0 $OSBuild = ([System.Environment]::OSVersion.Version).Build if ($ComboBoxSiteRolesEP.Text -eq "Enrollment Point") { if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object SiteRoles $WinFeatures = @("Web-Server","Web-WebServer","Web-Default-Doc","Web-Dir-Browsing","Web-Http-Errors","Web-Static-Content","Web-Http-Logging","Web-Stat-Compression","Web-Filtering","Web-Net-Ext","Web-Asp-Net","Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Mgmt-Console","Web-Metabase","NET-Framework-Core","NET-Framework-Features","NET-HTTP-Activation","NET-Framework-45-Features","NET-Framework-45-Core","NET-Framework-45-ASPNET","NET-WCF-Services45","NET-WCF-TCP-PortSharing45") } } if ($ComboBoxSiteRolesEP.Text -eq "Enrollment Proxy Point") { if ($OSBuild -ge 9200) { Write-OutputBox -OutputBoxMessage "Detected OS build version is $($OSBuild) running PowerShell version $($host.Version)" -Type "INFO: " -Object SiteRoles $WinFeatures = @("Web-Server","Web-WebServer","Web-Default-Doc","Web-Dir-Browsing","Web-Http-Errors","Web-Static-Content","Web-Http-Logging","Web-Stat-Compression","Web-Filtering","Web-Windows-Auth","Web-Net-Ext","Web-Net-Ext45","Web-Asp-Net","Web-Asp-Net45","Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Mgmt-Console","Web-Metabase","NET-Framework-Core","NET-Framework-Features","NET-Framework-45-Features","NET-Framework-45-Core","NET-Framework-45-ASPNET","NET-WCF-Services45","NET-WCF-TCP-PortSharing45") } } $ProgressBarSiteRoles.Maximum = ($WinFeatures | Measure-Object).Count $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ButtonInstallSiteRoles.Enabled = $false $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles [System.Windows.Forms.Application]::DoEvents() if (([System.Environment]::OSVersion.Version).Build -ge 9200) { if ($CurrentFeature -eq "NET-Framework-Core") { Add-WindowsFeature NET-Framework-Core -ErrorAction SilentlyContinue | Out-Null if (Get-WindowsFeature -Name NET-Framework-Core | Select-Object Name,Installed | Where-Object { $_.Installed -like "false" }) { Write-OutputBox -OutputBoxMessage "Failed to install $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles do { if (([System.Environment]::OSVersion.Version).Build -eq 9600) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 R2 installation media for the '<drive-letter>:\sources\sxs' folder." } if (([System.Environment]::OSVersion.Version).Build -eq 9200) { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse the Windows Server 2012 installation media for the '<drive-letter>:\sources\sxs' folder." } } until (($SetupDLLocation.Length -gt 0) -and (Test-Path -Path "$($SetupDLLocation.SubString(0,2))\sources\sxs" -ErrorAction SilentlyContinue)) Write-OutputBox -OutputBoxMessage "Installing role with specified source location: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles Add-WindowsFeature NET-Framework-Core -Source $SetupDLLocation } } else { Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature -Force Remove-Job -Name $CurrentFeature } } } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles } $ProgressBarSiteRoles.PerformStep() } Write-OutputBox -OutputBoxMessage "Starting to verify that all features where successfully installed" -Type "INFO: " -Object SiteRoles $ErrorVerify = 0 $ProgressBarSiteRoles.Value = 0 $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (Get-WindowsFeature $CurrentFeature | Where-Object { $_.Installed -eq $true}) { Write-OutputBox "Verified installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } else { $ErrorVerify++ Write-OutputBox "Feature not installed: $($CurrentFeatureDisplayName.DisplayName)" -Type "ERROR: " -Object SiteRoles $ProgressBarSiteRoles.PerformStep() } } if ($ErrorVerify -eq 0) { Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object SiteRoles } else { Write-OutputBox -OutputBoxMessage "One or more Windows Features was not installed" -Type "ERROR: " -Object SiteRoles } Interactive-RadioButtons -Mode Enable -Module SiteRoles Interactive-TabPages -Mode Enable $ButtonInstallSiteRoles.Enabled = $true } function Extend-ActiveDirectorySchema { $ButtonInstallOther.Enabled = $false Interactive-RadioButtons -Mode Disable -Module Other $CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent() $WindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($CurrentUser) if (-not($TextBoxDC.Text -eq $WaterMarkDC)) { if (Test-Connection -ComputerName $TextBoxDC.Text -Count 1 -ErrorAction SilentlyContinue) { if (($WindowsPrincipal.IsInRole("Domain Admins")) -and ($WindowsPrincipal.IsInRole("Schema Admins"))) { $TextBoxDC.Enabled = $false do { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse to the '<ConfigMgr source files>\SMSSETUP\BIN\X64' folder." } until (Test-Path -Path "$($SetupDLLocation)\EXTADSCH.EXE") $DC = $TextBoxDC.Text $GetPath = Get-ChildItem -Recurse -Filter "EXTADSCH.EXE" -Path "$($SetupDLLocation)" $Path = $GetPath.DirectoryName + "\EXTADSCH.EXE" $Destination = "\\" + $DC + "\C$" Write-OutputBox -OutputBoxMessage "Copying EXTADSCH.EXE to the specified domain controller" -Type "INFO: " -Object Other Copy-Item $Path $Destination -Force Write-OutputBox -OutputBoxMessage "Starting to extend the Active Directory schema" -Type "INFO: " -Object Other Invoke-WmiMethod -Class Win32_Process -Name Create -ArgumentList "C:\EXTADSCH.EXE" -ComputerName $DC | Out-Null Start-Sleep -Seconds 10 $Content = Get-Content -Path "\\$($DC)\C$\extadsch.log" if ($Content -match "Successfully extended the Active Directory schema") { Write-OutputBox -OutputBoxMessage "Active Directory schema was successfully extended" -Type "INFO: " -Object Other } else { Write-OutputBox -OutputBoxMessage "Active Directory was not extended successfully, refer to C:\ExtADSch.log on the domain controller" -Type "ERROR: " -Object Other } } else { Write-OutputBox -OutputBoxMessage "Current logged on user is not a member of the Domain Admins or Schema Admins group" -Type "ERROR: " -Object Other } } else { Write-OutputBox -OutputBoxMessage "Unable to establish a connection to the specified domain controller" -Type "ERROR: " -Object Other } } else { Write-OutputBox -OutputBoxMessage "Please enter a hostname of a domain controller" -Type "ERROR: " -Object Other } Interactive-RadioButtons -Mode Enable -Module Other $ButtonInstallOther.Enabled = $true $TextBoxDC.Enabled = $true } function Install-WSUS { Interactive-RadioButtons -Mode Disable -Module Other Interactive-TabPages -Mode Disable $ButtonInstallOther.Enabled = $false if ($ComboBoxOtherWSUS.Text -eq "WID") { $WinFeatures = @("UpdateServices","UpdateServices-WidDB","UpdateServices-Services","UpdateServices-RSAT","UpdateServices-API","UpdateServices-UI") } if ($ComboBoxOtherWSUS.Text -eq "SQL") { $WinFeatures = @("UpdateServices-Services","UpdateServices-RSAT","UpdateServices-API","UpdateServices-UI","UpdateServices-DB") } $ProgressBarOther.Maximum = 10 $ProgressPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" $ProgressBarOther.PerformStep() $WinFeatures | ForEach-Object { $CurrentFeature = $_ $CurrentFeatureDisplayName = Get-WindowsFeature | Select-Object Name,DisplayName | Where-Object { $_.Name -like "$($CurrentFeature)"} if (-NOT(Get-WindowsFeature -Name $CurrentFeature | Select-Object Name,Installed | Where-Object { $_.Installed -like "true" })) { Write-OutputBox -OutputBoxMessage "Installing role: $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Other Start-Job -Name $CurrentFeature -ScriptBlock { param( [parameter(Mandatory=$true)] $CurrentFeature ) Add-WindowsFeature $CurrentFeature } -ArgumentList $CurrentFeature | Out-Null Wait-Job -Name $CurrentFeature Remove-Job -Name $CurrentFeature } else { Write-OutputBox -OutputBoxMessage "Skipping role (already installed): $($CurrentFeatureDisplayName.DisplayName)" -Type "INFO: " -Object Other } $ProgressBarOther.PerformStep() } Write-OutputBox -OutputBoxMessage "Successfully installed all required Windows Features" -Type "INFO: " -Object Other $WSUSContentPath = Read-FolderBrowserDialog -Message "Choose a location where WSUS content will be stored, e.g. C:\WSUS" $ProgressBarOther.PerformStep() if (-not(Test-Path -Path $WSUSContentPath)) { New-Item $WSUSContentPath -ItemType Directory | Out-Null } if (Test-Path -Path "$($Env:ProgramFiles)\Update Services\Tools\WsusUtil.exe") { $WSUSUtil = "$($Env:ProgramFiles)\Update Services\Tools\WsusUtil.exe" if ($ComboBoxOtherWSUS.SelectedItem -eq "WID") { $WSUSUtilArgs = "POSTINSTALL CONTENT_DIR=$($WSUSContentPath)" } if ($ComboBoxOtherWSUS.Text -eq "SQL") { if (($TextBoxWSUSSQLServer.Text.Length -ge 1) -and ($TextBoxWSUSSQLServer.Text -notlike $WaterMarkWSUSSQLServer) -and ($TextBoxWSUSSQLInstance.Text -like $WaterMarkWSUSSQLInstance)) { Write-OutputBox -OutputBoxMessage "Choosen configuration is SQL Server, default instance" -Type "INFO: " -Object Other $WSUSUtilArgs = "POSTINSTALL SQL_INSTANCE_NAME=$($TextBoxWSUSSQLServer.Text) CONTENT_DIR=$($WSUSContentPath)" } if (($TextBoxWSUSSQLServer.Text.Length -ge 1) -and ($TextBoxWSUSSQLServer.Text -notlike $WaterMarkWSUSSQLServer) -and ($TextBoxWSUSSQLInstance.Text.Length -ge 1) -and ($TextBoxWSUSSQLInstance.Text -notlike $WaterMarkWSUSSQLInstance)) { Write-OutputBox -OutputBoxMessage "Choosen configuration is SQL Server, named instance" -Type "INFO: " -Object Other $WSUSUtilArgs = "POSTINSTALL SQL_INSTANCE_NAME=$($TextBoxWSUSSQLServer.Text)\$($TextBoxWSUSSQLInstance.Text) CONTENT_DIR=$($WSUSContentPath)" } } Write-OutputBox -OutputBoxMessage "Starting WSUS post install configuration, this will take some time" -Type "INFO: " -Object Other $ProgressBarOther.PerformStep() Start-Process -FilePath $WSUSUtil -ArgumentList $WSUSUtilArgs -NoNewWindow -Wait -RedirectStandardOutput "C:\temp.txt" | Out-Null $ProgressBarOther.PerformStep() Write-OutputBox -OutputBoxMessage "Successfully installed and configured WSUS" -Type "INFO: " -Object Other Remove-Item "C:\temp.txt" -Force $ProgressBarOther.PerformStep() } else { $ProgressBarOther.Value = 10 Write-OutputBox -OutputBoxMessage "Unable to locate $($WSUSUtil)" -Type "INFO: " -Object Other } Interactive-RadioButtons -Mode Enable -Module Other Interactive-TabPages -Mode Enable $ButtonInstallOther.Enabled = $true } function Install-ADK { Interactive-RadioButtons -Mode Disable -Module Other Interactive-TabPages -Mode Disable $ButtonInstallOther.Enabled = $false $ADKInstalledFeatures = @() $ComputerName = $env:COMPUTERNAME $UninstallKey = "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall" $Registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$ComputerName) $RegistryKey = $Registry.OpenSubKey($UninstallKey) $SubKeys = $RegistryKey.GetSubKeyNames() ForEach ($Key in $SubKeys) { $CurrentKey = $UninstallKey + "\\" + $Key $CurrentSubKey = $Registry.OpenSubKey($CurrentKey) $DisplayName = $CurrentSubKey.GetValue("DisplayName") if ($DisplayName -like "Windows PE x86 x64") { $ADKInstalledFeatures += $DisplayName } elseif ($DisplayName -like "User State Migration Tool") { $ADKInstalledFeatures += $DisplayName } elseif ($DisplayName -like "Windows Deployment Tools") { $ADKInstalledFeatures += $DisplayName } } if (($ComboBoxOtherADK.Text -eq "Online") -and ($ADKInstalledFeatures.Length -ne 3)) { $ADKOnlineArguments = "/norestart /q /ceip off /features OptionId.WindowsPreinstallationEnvironment OptionId.DeploymentTools OptionId.UserStateMigrationTool" $ADKDownloadFolder = "C:\Downloads" $ADKSetupFile = "adksetup.exe" Get-WebDownloadFile -URL "http://download.microsoft.com/download/6/A/E/6AEA92B0-A412-4622-983E-5B305D2EBE56/adk/adksetup.exe" -DownloadFolder $ADKDownloadFolder -FileName $ADKSetupFile -Module Other Write-OutputBox -OutputBoxMessage "Download completed" -Type "INFO: " -Object Other [System.Windows.Forms.Application]::DoEvents() Write-OutputBox -OutputBoxMessage "Starting Windows ADK installation" -Type "INFO: " -Object Other [System.Windows.Forms.Application]::DoEvents() Write-OutputBox -OutputBoxMessage "Downloading Windows ADK components and installing, this will take some time depending on your internet connection" -Type "INFO: " -Object Other [System.Windows.Forms.Application]::DoEvents() Start-Process -FilePath "$($ADKDownloadFolder)\$($ADKSetupFile)" -ArgumentList $ADKOnlineArguments while (Get-WmiObject -Class Win32_Process -Filter 'Name="adksetup.exe"') { [System.Windows.Forms.Application]::DoEvents() Start-Sleep -Milliseconds 500 } Write-OutputBox -OutputBoxMessage "Successfully installed Windows ADK" -Type "INFO: " -Object Other } if (($ComboBoxOtherADK.Text -eq "Offline") -and ($ADKInstalledFeatures.Length -ne 3)) { $ADKOfflineArguments = "/norestart /q /ceip off /features OptionId.WindowsPreinstallationEnvironment OptionId.DeploymentTools OptionId.UserStateMigrationTool" $ADKSetupFile = "adksetup.exe" do { $SetupLocation = Read-FolderBrowserDialog -Message "Select the folder where adksetup.exe is located" if (-not(Test-Path -Path "$($SetupLocation)\$($ADKSetupFile)")) { $ADKShellObject = New-Object -ComObject WScript.Shell $PopupValidate = $ADKShellObject.Popup("Unable to find $($ADKSetupFile) in the selected folder",0,"Unable to locate file",0) } } until (Test-Path -Path "$($SetupLocation)\$($ADKSetupFile)") Write-OutputBox -OutputBoxMessage "Starting Windows ADK installation, this will take some time" -Type "INFO: " -Object Other Start-Process -FilePath "$($SetupLocation)\$($ADKSetupFile)" -ArgumentList $ADKOfflineArguments while (Get-WmiObject -Class Win32_Process -Filter 'Name="adksetup.exe"') { [System.Windows.Forms.Application]::DoEvents() Start-Sleep -Milliseconds 500 } Write-OutputBox -OutputBoxMessage "Successfully installed Windows ADK" -Type "INFO: " -Object Other } if ($ADKInstalledFeatures.Length -eq 3) { Write-OutputBox -OutputBoxMessage "All required Windows ADK features are already installed, skipping install" -Type "INFO: " -Object Other } Interactive-RadioButtons -Mode Enable -Module Other Interactive-TabPages -Mode Enable $ButtonInstallOther.Enabled = $true } function Create-SMCContainer { $ObjectDomain = New-Object System.DirectoryServices.DirectoryEntry $ObjectContainer = $ObjectDomain.Create("container", "CN=System Management,CN=System") $ObjectContainer.SetInfo() | Out-Null $SuccssContainerCreate = Get-SMCContainer if ($SuccssContainerCreate -eq $true) { return $true } else { return $false } } function Get-SMCContainer { $ADFilter = "(&(objectClass=container)(cn=*System Management*))" $ADSearch = New-Object System.DirectoryServices.DirectorySearcher($ADFilter) $ADResult = $ADSearch.FindOne() $SuccessContainer = $ADResult.GetDirectoryEntry() if ($SuccessContainer) { return $true } else { return $false } } function Configure-SystemManagementContainer { Interactive-RadioButtons -Mode Disable -Module Other Interactive-TabPages -Mode Disable $ButtonInstallOther.Enabled = $false $ADGroupName = $Global:SMCSharedData $ShellObject = New-Object -ComObject Wscript.Shell $CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent() $WindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($CurrentUser) if ($WindowsPrincipal.IsInRole("Domain Admins")) { if ($CBSMCCreate.Checked -eq $true) { if (Get-SMCContainer -eq $true) { Write-OutputBox -OutputBoxMessage "Found the System Management container, will not create it" -Type "INFO: " -Object Other } else { Write-OutputBox -OutputBoxMessage "System Management container not found, creating it" -Type "INFO: " -Object Other Create-SMCContainer if (Get-SMCContainer -eq $true) { Write-OutputBox -OutputBoxMessage "System Management container created successfully" -Type "INFO: " -Object Other } } } if (Get-SMCContainer -eq $true) { Write-OutputBox -OutputBoxMessage "Found the System Management container" -Type "INFO: " -Object Other Write-OutputBox -OutputBoxMessage "Checking if '$($ADGroupName)' is already added to the System Management container" -Type "INFO: " -Object Other $ADDomain = New-Object System.DirectoryServices.DirectoryEntry | Select-Object -ExpandProperty distinguishedName $ADGroupFilter = "(&(ObjectCategory=group)(samAccountName=*$($ADGroupName)*))" $ADGroupSearch = New-Object System.DirectoryServices.DirectorySearcher($ADGroupFilter) $ADGroupSearch.FindAll() | ForEach-Object { $Object = New-Object System.Security.Principal.SecurityIdentifier $_.Properties["objectSID"][0],0 [System.Security.Principal.SecurityIdentifier]$ADGroupSID = $Object.Value } $IdentityReference = @() $ContainerObject = [ADSI]("LDAP://CN=System Management,CN=System,$($ADDomain)") $ContainerObject.ObjectSecurity.GetAccessRules($true,$true,[System.Security.Principal.SecurityIdentifier]) | ForEach-Object { $IdentityReference += $_.IdentityReference } if ($IdentityReference.Value -match $ADGroupSID.Value) { Write-OutputBox -OutputBoxMessage "'$($ADGroupName)' is already added to the System Management container" -Type "ERROR: " -Object Other } else { try { Write-OutputBox -OutputBoxMessage "Adding '$($ADGroupName)' to the System Management container" -Type "INFO: " -Object Other $ObjectGUID = New-Object GUID 00000000-0000-0000-0000-000000000000 $ContainerACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($ADGroupSID,"GenericAll","Allow","All",$ObjectGUID) $ContainerObject.ObjectSecurity.AddAccessRule($ContainerACE) $ContainerObject.CommitChanges() Write-OutputBox -OutputBoxMessage "Succesfully added '$($ADGroupName)' to the System Management container" -Type "INFO: " -Object Other } catch { Write-OutputBox -OutputBoxMessage "$($_.Exception.Message)" -Type "ERROR: " -Object Other } } } else { Write-OutputBox -OutputBoxMessage "Unable to find the System Management container, will not continue" -Type "ERROR: " -Object Other } } else { Write-OutputBox -OutputBoxMessage "The current user is not a member of the Domain Admins group, please run this script as a member of the Domain Admin group" -Type "ERROR: " -Object Other } Interactive-RadioButtons -Mode Enable -Module Other Interactive-TabPages -Mode Enable $ButtonInstallOther.Enabled = $true } function Search-SMC { $FormSMCSearch.Controls.AddRange(@($ButtonSystemManagementContainerGroupSearch, $ButtonSMCOK ,$TextBoxSMCGroupSearch, $TextBoxSMCGroupResult, $DGVSMCGroup, $GBSystemManagementContainerGroup, $GBSystemManagementContainerGroupSearch)) $FormSMCSearch.Add_Shown({$FormSMCSearch.Activate()}) [void]$FormSMCSearch.ShowDialog() $ButtonSMCOK.Enabled = $false if (($DGVSMCGroup.Rows | Measure-Object).Count -ge 1) { $TextBoxSMCGroupSearch.ResetText() $TextBoxSMCGroupResult.ResetText() $DGVSMCGroup.Rows.Clear() $DGVSMCGroup.Refresh() } } function Configure-LocalAdmin { param( [parameter(Mandatory=$true)] [string]$ComputerName, [parameter(Mandatory=$true)] [string]$LocalComputer, [parameter(Mandatory=$true)] [string]$LocalGroup ) $Group = [ADSI]("WinNT://$($LocalComputer)/$($LocalGroup)") $Computer = [ADSI]("WinNT://$($Domain)/$($ComputerName)$") $Group.PSBase.Invoke("Add",$Computer.PSBase.Path) } function Validate-ADGroupSearch { $DGVSMCGroup.Rows.Clear() $DGVSMCGroup.Refresh() } function Search-ADGroup { if ($DGVSMCGroup.Rows.Count -ge 1) { Validate-ADGroupSearch } if ($TextBoxSMCGroupSearch.Text.Length -ge 1) { $ADGroupFilter = "(&(ObjectCategory=group)(samAccountName=*$($TextBoxSMCGroupSearch.Text)*))" $ADGroupSearch = New-Object System.DirectoryServices.DirectorySearcher($ADGroupFilter) $ADGroupSearch.FindAll() | ForEach-Object { $DGVSMCGroup.Rows.Add(([string]$_.Properties.Item("samAccountName"))) | Out-Null } } else { Write-OutputBox -OutputBoxMessage "Please enter an Active Directory group to search for in the text box" -Type "ERROR: " -Object Other } } function Read-FolderBrowserDialog { param( [parameter(Mandatory=$true)] [string]$Message ) $ShellApplication = New-Object -ComObject Shell.Application $FolderBrowserDialog = $ShellApplication.BrowseForFolder(0,"$($Message)",0,17) if ($FolderBrowserDialog) { return $FolderBrowserDialog.Self.Path } else { return "" } } function Clear-OutputBox { $OutputBox.ResetText() } function Get-WebDownloadFile { param( [Parameter(Mandatory=$true)] [String]$URL, [Parameter(Mandatory=$true)] [string]$DownloadFolder, [Parameter(Mandatory=$true)] [string]$FileName, [Parameter(Mandatory=$true)] [ValidateSet("SiteRoles","Other")] [string]$Module ) process { if ($Module -eq "SiteRoles") { $ProgressBarSiteRoles.Maximum = 100 $ProgressBarSiteRoles.Value = 0 } if ($Module -eq "Other") { $ProgressBarOther.Maximum = 100 $ProgressBarOther.Value = 0 } $WebClient = New-Object System.Net.WebClient if (-not(Test-Path -Path $DownloadFolder)) { Write-OutputBox -OutputBoxMessage "Creating download folder: $($DownloadFolder)" -Type "INFO: " -Object $Module [System.Windows.Forms.Application]::DoEvents() New-Item $DownloadFolder -ItemType Directory | Out-Null } $Global:DownloadComplete = $False $EventDataComplete = Register-ObjectEvent $WebClient DownloadFileCompleted -SourceIdentifier WebClient.DownloadFileComplete -Action {$Global:DownloadComplete = $True} $EventDataProgress = Register-ObjectEvent $WebClient DownloadProgressChanged -SourceIdentifier WebClient.DownloadProgressChanged -Action { $Global:DPCEventArgs = $EventArgs } $WebClient.DownloadFileAsync($URL, "$($DownloadFolder)\$($FileName)") Write-OutputBox -OutputBoxMessage "Downloading ($($FileName) to $($DownloadFolder)" -Type "INFO: " -Object $Module do { $PercentComplete = $Global:DPCEventArgs.ProgressPercentage $DownloadedBytes = $Global:DPCEventArgs.BytesReceived $TotalBytes = $Global:DPCEventArgs.TotalBytesToReceive if ($Module -eq "SiteRoles") { $ProgressBarSiteRoles.Value = $PercentComplete } if ($Module -eq "Other") { $ProgressBarOther.Value = $PercentComplete } [System.Windows.Forms.Application]::DoEvents() } until ($Global:DownloadComplete) $WebClient.Dispose() Unregister-Event -SourceIdentifier WebClient.DownloadProgressChanged Unregister-Event -SourceIdentifier WebClient.DownloadFileComplete } } function Get-PrereqFiles { param( [parameter(Mandatory=$true)] [ValidateSet("CAS","Primary")] [string]$Module ) do { $GetDownloadDestination = Read-FolderBrowserDialog -Message "Browse for a folder where the prerequisite files will be downloaded to." $DownloadDestination = '"' + $GetDownloadDestination + '"' } until (Test-Path -Path $GetDownloadDestination) Write-OutputBox -OutputBoxMessage "Prerequisite files will be downloaded to: $($GetDownloadDestination)" -Type "INFO: " -Object $Module do { $SetupDLLocation = Read-FolderBrowserDialog -Message "Browse to the '<ConfigMgr source files>\SMSSETUP\BIN\X64' folder." } until (Test-Path -Path "$($SetupDLLocation)\setupdl.exe") Write-OutputBox -OutputBoxMessage "Downloading prerequisite files from Microsoft" -Type "INFO: " -Object $Module do { Start-Process -FilePath "$($SetupDLLocation)\setupdl.exe" -ArgumentList $DownloadDestination -Wait } until ((Get-ChildItem -Path $GetDownloadDestination | Measure-Object).Count -ge 59) Write-OutputBox -OutputBoxMessage "Successfully downloaded all prerequisite files" -Type "INFO: " -Object $Module } function Write-OutputBox { param( [parameter(Mandatory=$true)] [string]$OutputBoxMessage, [ValidateSet("WARNING: ","ERROR: ","INFO: ")] [string]$Type, [parameter(Mandatory=$true)] [ValidateSet("General","CAS","Primary","Secondary","SiteRoles","Other")] [string]$Object ) Process { if ($Object -like "General") { if ($OutputBoxGeneral.Text.Length -eq 0) { $OutputBoxGeneral.Text = "$($Type)$($OutputBoxMessage)" [System.Windows.Forms.Application]::DoEvents() $OutputBoxGeneral.ScrollToCaret() } else { $OutputBoxGeneral.AppendText("`n$($Type)$($OutputBoxMessage)") [System.Windows.Forms.Application]::DoEvents() $OutputBoxGeneral.ScrollToCaret() } } if ($Object -like "CAS") { if ($OutputBoxCAS.Text.Length -eq 0) { $OutputBoxCAS.Text = "$($Type)$($OutputBoxMessage)" [System.Windows.Forms.Application]::DoEvents() $OutputBoxCAS.ScrollToCaret() } else { $OutputBoxCAS.AppendText("`n$($Type)$($OutputBoxMessage)") [System.Windows.Forms.Application]::DoEvents() $OutputBoxCAS.ScrollToCaret() } } if ($Object -like "Primary") { if ($OutputBoxPrimary.Text.Length -eq 0) { $OutputBoxPrimary.Text = "$($Type)$($OutputBoxMessage)" [System.Windows.Forms.Application]::DoEvents() $OutputBoxPrimary.ScrollToCaret() } else { $OutputBoxPrimary.AppendText("`n$($Type)$($OutputBoxMessage)") [System.Windows.Forms.Application]::DoEvents() $OutputBoxPrimary.ScrollToCaret() } } if ($Object -like "Secondary") { if ($OutputBoxSecondary.Text.Length -eq 0) { $OutputBoxSecondary.Text = "$($Type)$($OutputBoxMessage)" [System.Windows.Forms.Application]::DoEvents() $OutputBoxSecondary.ScrollToCaret() } else { $OutputBoxSecondary.AppendText("`n$($Type)$($OutputBoxMessage)") [System.Windows.Forms.Application]::DoEvents() $OutputBoxSecondary.ScrollToCaret() } } if ($Object -like "SiteRoles") { if ($OutputBoxSiteRoles.Text.Length -eq 0) { $OutputBoxSiteRoles.Text = "$($Type)$($OutputBoxMessage)" [System.Windows.Forms.Application]::DoEvents() $OutputBoxSiteRoles.ScrollToCaret() } else { $OutputBoxSiteRoles.AppendText("`n$($Type)$($OutputBoxMessage)") [System.Windows.Forms.Application]::DoEvents() $OutputBoxSiteRoles.ScrollToCaret() } } if ($Object -like "Other") { if ($OutputBoxOther.Text.Length -eq 0) { $OutputBoxOther.Text = "$($Type)$($OutputBoxMessage)" [System.Windows.Forms.Application]::DoEvents() $OutputBoxOther.ScrollToCaret() } else { $OutputBoxOther.AppendText("`n$($Type)$($OutputBoxMessage)") [System.Windows.Forms.Application]::DoEvents() $OutputBoxOther.ScrollToCaret() } } } } function Enter-WaterMark { param( [parameter(Mandatory=$true)] $InputObject, [parameter(Mandatory=$true)] $Text ) if ($InputObject.Text -eq $Text) { $InputObject.Text = "" $InputObject.ForeColor = "WindowText" } } function Leave-WaterMark { param( [parameter(Mandatory=$true)] $InputObject, [parameter(Mandatory=$true)] $Text ) if ($InputObject.Text -eq "") { $InputObject.Text = $Text $InputObject.ForeColor = "LightGray" } } function Leave-WaterMarkStart { param( [parameter(Mandatory=$true)] $InputObject, [parameter(Mandatory=$true)] $Text ) if ($InputObject.Text.Length -gt 0) { $InputObject.Text = $Text $InputObject.ForeColor = "LightGray" } } [void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void][System.Reflection.Assembly]::LoadWithPartialName("System.DirectoryServices") $Global:SMCSharedData = 0 $Form = New-Object System.Windows.Forms.Form $Form.Size = New-Object System.Drawing.Size(805,530) $Form.MinimumSize = New-Object System.Drawing.Size(805,530) $Form.MaximumSize = New-Object System.Drawing.Size(805,530) $Form.SizeGripStyle = "Hide" $Form.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($PSHome + "\powershell.exe") $Form.Text = "ConfigMgr 2012 R2 Prerequisites Installation Tool - 1.3.0" $FormSMCSearch = New-Object System.Windows.Forms.Form $FormSMCSearch.Size = New-Object System.Drawing.Size(505,480) $FormSMCSearch.MinimumSize = New-Object System.Drawing.Size(505,480) $FormSMCSearch.MaximumSize = New-Object System.Drawing.Size(505,480) $FormSMCSearch.SizeGripStyle = "Hide" $FormSMCSearch.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($PSHome + "\powershell.exe") $FormSMCSearch.Text = "Search for an Active Directory group" $TabPageGeneral = New-Object System.Windows.Forms.TabPage $TabPageGeneral.Location = New-Object System.Drawing.Size(10,50) $TabPageGeneral.Size = New-Object System.Drawing.Size(300,300) $TabPageGeneral.Text = "General" $TabPageGeneral.Name = "General" $TabPageGeneral.Padding = "0,0,0,0" $TabPageGeneral.BackColor = "Control" $TabPageCAS = New-Object System.Windows.Forms.TabPage $TabPageCAS.Location = New-Object System.Drawing.Size(10,50) $TabPageCAS.Size = New-Object System.Drawing.Size(300,300) $TabPageCAS.Text = "Central Administration Site" $TabPageCAS.Name = "Central Administration Site" $TabPageCAS.Padding = "0,0,0,0" $TabPageCAS.BackColor = "Control" $TabPagePrimary = New-Object System.Windows.Forms.TabPage $TabPagePrimary.Location = New-Object System.Drawing.Size(10,50) $TabPagePrimary.Size = New-Object System.Drawing.Size(300,300) $TabPagePrimary.Text = "Primary Site" $TabPagePrimary.Name = "Primary Site" $TabPagePrimary.Padding = "0,0,0,0" $TabPagePrimary.BackColor = "Control" $TabPageSecondary = New-Object System.Windows.Forms.TabPage $TabPageSecondary.Location = New-Object System.Drawing.Size(10,50) $TabPageSecondary.Size = New-Object System.Drawing.Size(300,300) $TabPageSecondary.Text = "Secondary Site" $TabPageSecondary.Name = "Secondary Site" $TabPageSecondary.Padding = "0,0,0,0" $TabPageSecondary.BackColor = "Control" $TabPageSiteRoles = New-Object System.Windows.Forms.TabPage $TabPageSiteRoles.Location = New-Object System.Drawing.Size(10,50) $TabPageSiteRoles.Size = New-Object System.Drawing.Size(300,300) $TabPageSiteRoles.Text = "Site System Roles" $TabPageSiteRoles.Name = "Site System Roles" $TabPageSiteRoles.Padding = "0,0,0,0" $TabPageSiteRoles.BackColor = "Control" $TabPageOther = New-Object System.Windows.Forms.TabPage $TabPageOther.Location = New-Object System.Drawing.Size(10,50) $TabPageOther.Size = New-Object System.Drawing.Size(300,300) $TabPageOther.Text = "Other" $TabPageOther.Name = "Other" $TabPageOther.Padding = "0,0,0,0" $TabPageOther.BackColor = "Control" $TabPageSMCComputer = New-Object System.Windows.Forms.TabPage $TabPageSMCComputer.Location = New-Object System.Drawing.Size(10,50) $TabPageSMCComputer.Size = New-Object System.Drawing.Size(300,300) $TabPageSMCComputer.Text = "Computer" $TabPageSMCComputer.Name = "Computer" $TabPageSMCComputer.Padding = "0,0,0,0" $TabPageSMCComputer.BackColor = "Control" $TabPageSMCGroup = New-Object System.Windows.Forms.TabPage $TabPageSMCGroup.Location = New-Object System.Drawing.Size(0,0) $TabPageSMCGroup.Size = New-Object System.Drawing.Size(300,300) $TabPageSMCGroup.Text = "Group " $TabPageSMCGroup.Name = "Group" $TabPageSMCGroup.Padding = "0,0,0,0" $TabPageSMCGroup.BackColor = "Control" $TabPageSMCGroup.Margin = New-Object System.Windows.Forms.Padding('0') $TabControl = New-Object System.Windows.Forms.TabControl $TabControl.Location = New-Object System.Drawing.Size(0,0) $TabControl.Size = New-Object System.Drawing.Size(805,530) $TabControl.Anchor = "Top, Bottom, Left, Right" $TabControl.Name = "Global" $TabControl.SelectedIndex = 0 $TabControl.Add_Selected([System.Windows.Forms.TabControlEventHandler]{ if ($TabControl.SelectedTab.Name -like "Central Administration Site") { Load-CAS if ($TabControl.SelectedTab.Enabled -eq $true) { if (-not($OutputBoxCAS.Text.Length -ge 1)) { $OutputBoxCAS.ResetText() Write-OutputBox -OutputBoxMessage "Click on the Install button to install the required Windows Features for a Central Administration Site. Additionally you can choose to also download the prerequisite files" -Type "INFO: " -Object CAS } } } if ($TabControl.SelectedTab.Name -like "Primary Site") { Load-Primary if ($TabControl.SelectedTab.Enabled -eq $true) { if (-not($OutputBoxPrimary.Text.Length -ge 1)) { $OutputBoxPrimary.ResetText() Write-OutputBox -OutputBoxMessage "Click on the Install button to install the required Windows Features for a Primary Site. Additionally you can choose to also download the prerequisite files" -Type "INFO: " -Object Primary } } } if ($TabControl.SelectedTab.Name -like "Secondary Site") { Load-Secondary if ($TabControl.SelectedTab.Enabled -eq $true) { if (-not($OutputBoxSecondary.Text.Length -ge 1)) { $OutputBoxSecondary.ResetText() Write-OutputBox -OutputBoxMessage "Click on the Install button to install the required Windows Features for a Secondary Site" -Type "INFO: " -Object Secondary } } } if ($TabControl.SelectedTab.Name -like "Site System Roles") { Load-SiteSystemRoles if ($TabControl.SelectedTab.Enabled -eq $true) { if (-not($OutputBoxSiteRoles.Text.Length -ge 1)) { $OutputBoxSiteRoles.ResetText() Write-OutputBox -OutputBoxMessage "Make a selection from the options on the left to begin" -Type "INFO: " -Object SiteRoles } } } if ($TabControl.SelectedTab.Name -like "Other") { Load-Other if ($TabControl.SelectedTab.Enabled -eq $true) { if (-not($OutputBoxOther.Text.Length -ge 1)) { $OutputBoxOther.ResetText() Write-OutputBox -OutputBoxMessage "Make a selection from the options on the left to begin" -Type "INFO: " -Object Other } } } }) $TabControlSMC = New-Object System.Windows.Forms.TabControl $TabControlSMC.Location = New-Object System.Drawing.Size(0,0) $TabControlSMC.Size = New-Object System.Drawing.Size(800,500) $TabControlSMC.Anchor = "Top, Bottom, Left, Right" $TabControlSMC.Name = "TabControl" $TabControlSMC.SelectedIndex = 0 $TabControlSMC.Add_Selected([System.Windows.Forms.TabControlEventHandler]{ if ($TabControlSMC.SelectedTab.Name -like "Group") { $OutputBox.ResetText() if ($OutputBox.Location.Y -eq 10) { $OutputBox.Location = New-Object System.Drawing.Size(380,65) $OutputBox.Size = New-Object System.Drawing.Size(393,296) } $TabPageSMCGroup.Controls.Add($OutputBox) } }) $TabControlSMC.Add_Selected([System.Windows.Forms.TabControlEventHandler]{ if ($TabControlSMC.SelectedTab.Name -like "Computer") { $OutputBox.ResetText() if ($OutputBox.ControlAdded) { $TabPageSMCGroup.Controls.Remove($OutputBox) } $OutputBox.Location = New-Object System.Drawing.Size(10,10) $OutputBox.Size = New-Object System.Drawing.Size(763,350) $TabPageSMCComputer.Controls.Add($OutputBox) } }) $ProgressBarCAS = New-Object System.Windows.Forms.ProgressBar $ProgressBarCAS.Location = New-Object System.Drawing.Size(10,375) $ProgressBarCAS.Size = New-Object System.Drawing.Size(763,30) $ProgressBarCAS.Step = 1 $ProgressBarCAS.Value = 0 $ProgressBarPrimary = New-Object System.Windows.Forms.ProgressBar $ProgressBarPrimary.Location = New-Object System.Drawing.Size(10,375) $ProgressBarPrimary.Size = New-Object System.Drawing.Size(763,30) $ProgressBarPrimary.Step = 1 $ProgressBarPrimary.Value = 0 $ProgressBarSecondary = New-Object System.Windows.Forms.ProgressBar $ProgressBarSecondary.Location = New-Object System.Drawing.Size(10,375) $ProgressBarSecondary.Size = New-Object System.Drawing.Size(763,30) $ProgressBarSecondary.Step = 1 $ProgressBarSecondary.Value = 0 $ProgressBarSiteRoles = New-Object System.Windows.Forms.ProgressBar $ProgressBarSiteRoles.Location = New-Object System.Drawing.Size(10,375) $ProgressBarSiteRoles.Size = New-Object System.Drawing.Size(763,30) $ProgressBarSiteRoles.Step = 1 $ProgressBarSiteRoles.Value = 0 $ProgressBarOther = New-Object System.Windows.Forms.ProgressBar $ProgressBarOther.Location = New-Object System.Drawing.Size(10,375) $ProgressBarOther.Size = New-Object System.Drawing.Size(763,30) $ProgressBarOther.Step = 1 $ProgressBarOther.Value = 0 $OutputBoxGeneral = New-Object System.Windows.Forms.RichTextBox $OutputBoxGeneral.Location = New-Object System.Drawing.Size(260,60) $OutputBoxGeneral.Size = New-Object System.Drawing.Size(500,365) $OutputBoxGeneral.Font = "Courier New" $OutputBoxGeneral.BackColor = "white" $OutputBoxGeneral.ReadOnly = $true $OutputBoxGeneral.MultiLine = $True $OutputBoxCAS = New-Object System.Windows.Forms.RichTextBox $OutputBoxCAS.Location = New-Object System.Drawing.Size(10,10) $OutputBoxCAS.Size = New-Object System.Drawing.Size(763,350) $OutputBoxCAS.Font = "Courier New" $OutputBoxCAS.BackColor = "white" $OutputBoxCAS.ReadOnly = $true $OutputBoxCAS.MultiLine = $True $OutputBoxPrimary = New-Object System.Windows.Forms.RichTextBox $OutputBoxPrimary.Location = New-Object System.Drawing.Size(10,10) $OutputBoxPrimary.Size = New-Object System.Drawing.Size(763,350) $OutputBoxPrimary.Font = "Courier New" $OutputBoxPrimary.BackColor = "white" $OutputBoxPrimary.ReadOnly = $true $OutputBoxPrimary.MultiLine = $True $OutputBoxSecondary = New-Object System.Windows.Forms.RichTextBox $OutputBoxSecondary.Location = New-Object System.Drawing.Size(10,10) $OutputBoxSecondary.Size = New-Object System.Drawing.Size(763,350) $OutputBoxSecondary.Font = "Courier New" $OutputBoxSecondary.BackColor = "white" $OutputBoxSecondary.ReadOnly = $true $OutputBoxSecondary.MultiLine = $True $OutputBoxSiteRoles = New-Object System.Windows.Forms.RichTextBox $OutputBoxSiteRoles.Location = New-Object System.Drawing.Size(210,10) $OutputBoxSiteRoles.Size = New-Object System.Drawing.Size(563,350) $OutputBoxSiteRoles.Font = "Courier New" $OutputBoxSiteRoles.BackColor = "white" $OutputBoxSiteRoles.ReadOnly = $true $OutputBoxSiteRoles.MultiLine = $True $OutputBoxOther = New-Object System.Windows.Forms.RichTextBox $OutputBoxOther.Location = New-Object System.Drawing.Size(220,10) $OutputBoxOther.Size = New-Object System.Drawing.Size(553,350) $OutputBoxOther.Font = "Courier New" $OutputBoxOther.BackColor = "white" $OutputBoxOther.ReadOnly = $true $OutputBoxOther.MultiLine = $True $DGVSMCGroup = New-Object System.Windows.Forms.DataGridView $DGVSMCGroup.Location = New-Object System.Drawing.Size(10,65) $DGVSMCGroup.Size = New-Object System.Drawing.Size(360,295) $DGVSMCGroup.ColumnCount = 1 $DGVSMCGroup.ColumnHeadersVisible = $true $DGVSMCGroup.Columns[0].Name = "Active Directory group" $DGVSMCGroup.AllowUserToAddRows = $false $DGVSMCGroup.AllowUserToDeleteRows = $false $DGVSMCGroup.ReadOnly = $True $DGVSMCGroup.ColumnHeadersHeightSizeMode = "DisableResizing" $DGVSMCGroup.AutoSizeColumnsMode = "Fill" $DGVSMCGroup.RowHeadersWidthSizeMode = "DisableResizing" $DGVSMCGroup.Add_CellContentClick({ $DGVSMCResult = $DGVSMCGroup.CurrentCell.Value $TextBoxSMCGroupResult.Text = $DGVSMCResult $ButtonSMCOK.Enabled = $true }) $TextBoxDC = New-Object System.Windows.Forms.TextBox $TextBoxDC.Location = New-Object System.Drawing.Size(20,428) $TextBoxDC.Size = New-Object System.Drawing.Size(170,20) $TextBoxDC.TabIndex = "0" $TextBoxDC.Name = "EAD" $TextBoxSMCLocal = New-Object System.Windows.Forms.TextBox $TextBoxSMCLocal.Location = New-Object System.Drawing.Size(38,393) $TextBoxSMCLocal.Size = New-Object System.Drawing.Size(140,20) $TextBoxSMCLocal.TabIndex = "0" $TextBoxSMCLocal.Text = $env:COMPUTERNAME $TextBoxSMCLocal.Enabled = $false $TextBoxSMCRemote = New-Object System.Windows.Forms.TextBox $TextBoxSMCRemote.Location = New-Object System.Drawing.Size(218,393) $TextBoxSMCRemote.Size = New-Object System.Drawing.Size(140,20) $TextBoxSMCRemote.TabIndex = "0" $TextBoxSMCRemote.Enabled = $false $TextBoxSMCGroupSearch = New-Object System.Windows.Forms.TextBox $TextBoxSMCGroupSearch.Location = New-Object System.Drawing.Size(20,27) $TextBoxSMCGroupSearch.Size = New-Object System.Drawing.Size(340,20) $TextBoxSMCGroupSearch.TabIndex = "0" $TextBoxSMCGroupSearch.Add_KeyPress([System.Windows.Forms.KeyPressEventHandler]{ if ($_.KeyChar -eq 13) { Write-OutputBox -OutputBoxMessage "Searching Active Directory for '$($TextBoxSMCGroupSearch.Text)'" -Type "INFO: " -Object Other Search-ADGroup } }) $TextBoxSMCGroupResult = New-Object System.Windows.Forms.TextBox $TextBoxSMCGroupResult.Location = New-Object System.Drawing.Size(20,392) $TextBoxSMCGroupResult.Size = New-Object System.Drawing.Size(340,20) $TextBoxSMCGroupResult.Enabled = $false $TextBoxWSUSSQLServer = New-Object System.Windows.Forms.TextBox $TextBoxWSUSSQLServer.Location = New-Object System.Drawing.Size(160,428) $TextBoxWSUSSQLServer.Size = New-Object System.Drawing.Size(140,20) $TextBoxWSUSSQLServer.TabIndex = "0" $TextBoxWSUSSQLServer.Enabled = $false $TextBoxWSUSSQLServer.Name = "WSUS" $TextBoxWSUSSQLInstance = New-Object System.Windows.Forms.TextBox $TextBoxWSUSSQLInstance.Location = New-Object System.Drawing.Size(310,428) $TextBoxWSUSSQLInstance.Size = New-Object System.Drawing.Size(140,20) $TextBoxWSUSSQLInstance.TabIndex = "0" $TextBoxWSUSSQLInstance.Text = $env:COMPUTERNAME $TextBoxWSUSSQLInstance.Enabled = $false $TextBoxWSUSSQLInstance.Name = "WSUS" $ButtonInstallCAS = New-Object System.Windows.Forms.Button $ButtonInstallCAS.Location = New-Object System.Drawing.Size(673,420) $ButtonInstallCAS.Size = New-Object System.Drawing.Size(100,30) $ButtonInstallCAS.Text = "Install" $ButtonInstallCAS.TabIndex = "1" $ButtonInstallCAS.Add_Click({Install-CAS}) $ButtonInstallPrimarySite = New-Object System.Windows.Forms.Button $ButtonInstallPrimarySite.Location = New-Object System.Drawing.Size(673,420) $ButtonInstallPrimarySite.Size = New-Object System.Drawing.Size(100,30) $ButtonInstallPrimarySite.Text = "Install" $ButtonInstallPrimarySite.TabIndex = "1" $ButtonInstallPrimarySite.Add_Click({Install-Primary}) $ButtonInstallSecondarySite = New-Object System.Windows.Forms.Button $ButtonInstallSecondarySite.Location = New-Object System.Drawing.Size(673,420) $ButtonInstallSecondarySite.Size = New-Object System.Drawing.Size(100,30) $ButtonInstallSecondarySite.Text = "Install" $ButtonInstallSecondarySite.TabIndex = "1" $ButtonInstallSecondarySite.Add_Click({Install-Secondary}) $ButtonInstallSiteRoles = New-Object System.Windows.Forms.Button $ButtonInstallSiteRoles.Location = New-Object System.Drawing.Size(673,420) $ButtonInstallSiteRoles.Size = New-Object System.Drawing.Size(100,30) $ButtonInstallSiteRoles.Text = "Install" $ButtonInstallSiteRoles.TabIndex = "1" $ButtonInstallSiteRoles.Add_Click({ if ($RadioButtonSiteRoleMP.Checked -eq $true) { Write-OutputBox -OutputBoxMessage "Begin installing prerequisites for a Management Point role" -Type "INFO: " -Object SiteRoles Install-MP } elseif ($RadioButtonSiteRoleDP.Checked -eq $true) { Write-OutputBox -OutputBoxMessage "Begin installing prerequisites for a Distribution Point role" -Type "INFO: " -Object SiteRoles Install-DP } elseif ($RadioButtonSiteRoleAppCat.Checked -eq $true) { Write-OutputBox -OutputBoxMessage "Begin installing prerequisites for a Application Catalog role" -Type "INFO: " -Object SiteRoles Install-AppCat } elseif ($RadioButtonSiteRoleEP.Checked -eq $true) { if (($ComboBoxSiteRolesEP.Text -eq "Enrollment Point") -or ($ComboBoxSiteRolesEP.Text -eq "Enrollment Proxy Point")) { Write-OutputBox -OutputBoxMessage "Begin installing prerequisites for a $($ComboBoxSiteRolesEP.Text) role" -Type "INFO: " -Object SiteRoles Install-EP } else { Write-OutputBox -OutputBoxMessage "Please select an Enrollment Point role" -Type "INFO: " -Object SiteRoles } } else { Write-OutputBox -OutputBoxMessage "Please select a Site System role to install" -Type "INFO: " -Object SiteRoles } }) $ButtonInstallOther = New-Object System.Windows.Forms.Button $ButtonInstallOther.Location = New-Object System.Drawing.Size(673,420) $ButtonInstallOther.Size = New-Object System.Drawing.Size(100,30) $ButtonInstallOther.Text = "Install" $ButtonInstallOther.TabIndex = "1" $ButtonInstallOther.Add_Click({ if (($RadioButtonOtherEAD.Checked -eq $true) -or ($RadioButtonOtherWSUS.Checked -eq $true) -or ($RadioButtonOtherADK.Checked -eq $true) -or ($RadioButtonOtherSMC.Checked -eq $true)) { if ($RadioButtonOtherEAD.Checked -eq $true) { Write-OutputBox -OutputBoxMessage "Begin validation checks for extending Active Directory" -Type "INFO: " -Object Other Extend-ActiveDirectorySchema } if ($RadioButtonOtherWSUS.Checked -eq $true) { if (($ComboBoxOtherWSUS.Text -eq "SQL") -or ($ComboBoxOtherWSUS.Text -eq "WID")) { Write-OutputBox -OutputBoxMessage "Preparing to install WSUS features configured for $($ComboBoxOtherWSUS.Text)" -Type "INFO: " -Object Other Install-WSUS } else { Write-OutputBox -OutputBoxMessage "Please select where to install the WSUS database" -Type "INFO: " -Object Other } } if ($RadioButtonOtherADK.Checked -eq $true) { if (($ComboBoxOtherADK.Text -eq "Online") -or ($ComboBoxOtherADK.Text -eq "Offline")) { Write-OutputBox -OutputBoxMessage "Preparing for an $(($ComboBoxOtherADK.Text).ToLower()) installation of Windows ADK" -Type "INFO: " -Object Other Install-ADK } else { Write-OutputBox -OutputBoxMessage "Please select an installation option" -Type "INFO: " -Object Other } } if ($RadioButtonOtherSMC.Checked -eq $true) { Search-SMC } } else { Write-OutputBox -OutputBoxMessage "Nothing has been selected, please make a selection first" -Type "INFO: " -Object Other } }) $ButtonSystemManagementContainerGroupSearch = New-Object System.Windows.Forms.Button $ButtonSystemManagementContainerGroupSearch.Location = New-Object System.Drawing.Size(380,20) $ButtonSystemManagementContainerGroupSearch.Size = New-Object System.Drawing.Size(100,30) $ButtonSystemManagementContainerGroupSearch.Text = "Search" $ButtonSystemManagementContainerGroupSearch.TabIndex = "1" $ButtonSystemManagementContainerGroupSearch.Add_Click({ Search-ADGroup }) $ButtonSMCOK = New-Object System.Windows.Forms.Button $ButtonSMCOK.Location = New-Object System.Drawing.Size(380,385) $ButtonSMCOK.Size = New-Object System.Drawing.Size(100,30) $ButtonSMCOK.Text = "OK" $ButtonSMCOK.TabIndex = "1" $ButtonSMCOK.Enabled = $false $ButtonSMCOK.Add_Click({ $Global:SMCSharedData = $TextBoxSMCGroupResult.Text Write-OutputBox -OutputBoxMessage "Selected Active Directory group: $($Global:SMCSharedData)" -Type "INFO: " -Object Other $FormSMCSearch.Close() Configure-SystemManagementContainer }) $WaterMarkDC = "Enter Schema Master server name" $TextBoxDC.ForeColor = "LightGray" $TextBoxDC.Text = $WaterMarkDC $TextBoxDC.add_Enter({Enter-WaterMark -InputObject $TextBoxDC -Text $WaterMarkDC}) $TextBoxDC.add_Leave({Leave-WaterMark -InputObject $TextBoxDC -Text $WaterMarkDC}) $WaterMarkWSUSSQLServer = "Enter SQL Server name" $TextBoxWSUSSQLServer.ForeColor = "LightGray" $TextBoxWSUSSQLServer.Text = $WaterMarkWSUSSQLServer $TextBoxWSUSSQLServer.add_Enter({Enter-WaterMark -InputObject $TextBoxWSUSSQLServer -Text $WaterMarkWSUSSQLServer}) $TextBoxWSUSSQLServer.add_Leave({Leave-WaterMark -InputObject $TextBoxWSUSSQLServer -Text $WaterMarkWSUSSQLServer}) $TextBoxWSUSSQLServer.Name = "WSUS" $WaterMarkWSUSSQLInstance = "Enter SQL Server instance" $TextBoxWSUSSQLInstance.ForeColor = "LightGray" $TextBoxWSUSSQLInstance.Text = $WaterMarkWSUSSQLInstance $TextBoxWSUSSQLInstance.add_Enter({Enter-WaterMark -InputObject $TextBoxWSUSSQLInstance -Text $WaterMarkWSUSSQLInstance}) $TextBoxWSUSSQLInstance.add_Leave({Leave-WaterMark -InputObject $TextBoxWSUSSQLInstance -Text $WaterMarkWSUSSQLInstance}) $TextBoxWSUSSQLInstance.Name = "WSUS" $LabelHeader = New-Object System.Windows.Forms.Label $LabelHeader.Location = New-Object System.Drawing.Size(257,23) $LabelHeader.Size = New-Object System.Drawing.Size(500,30) $LabelHeader.Text = "Install ConfigMgr 2012 R2 Prerequisites" $LabelHeader.Font = New-Object System.Drawing.Font("Verdana",12,[System.Drawing.FontStyle]::Bold) $LabelGeneralRestart = New-Object System.Windows.Forms.Label $LabelGeneralRestart.Size = New-Object System.Drawing.Size(150,15) $LabelGeneralRestart.Location = New-Object System.Drawing.Size(38,57) $LabelGeneralRestart.Font = New-Object System.Drawing.Font("Microsoft Sans Serif","8.25",[System.Drawing.FontStyle]::Bold) $LabelGeneralOS = New-Object System.Windows.Forms.Label $LabelGeneralOS.Size = New-Object System.Drawing.Size(170,15) $LabelGeneralOS.Location = New-Object System.Drawing.Size(38,97) $LabelGeneralOS.Font = New-Object System.Drawing.Font("Microsoft Sans Serif","8.25",[System.Drawing.FontStyle]::Bold) $LabelGeneralPS = New-Object System.Windows.Forms.Label $LabelGeneralPS.Size = New-Object System.Drawing.Size(170,15) $LabelGeneralPS.Location = New-Object System.Drawing.Size(38,137) $LabelGeneralPS.Font = New-Object System.Drawing.Font("Microsoft Sans Serif","8.25",[System.Drawing.FontStyle]::Bold) $LabelGeneralElevated = New-Object System.Windows.Forms.Label $LabelGeneralElevated.Size = New-Object System.Drawing.Size(170,15) $LabelGeneralElevated.Location = New-Object System.Drawing.Size(38,177) $LabelGeneralElevated.Font = New-Object System.Drawing.Font("Microsoft Sans Serif","8.25",[System.Drawing.FontStyle]::Bold) $LabelSMCCreate = New-Object System.Windows.Forms.Label $LabelSMCCreate.Location = New-Object System.Drawing.Size(418,395) $LabelSMCCreate.Size = New-Object System.Drawing.Size(150,20) $LabelSMCCreate.Text = "Create the container" $OpenLink = {[System.Diagnostics.Process]::Start("http://www.scconfigmgr.com")} $BlogLink = New-Object System.Windows.Forms.LinkLabel $BlogLink.Location = New-Object System.Drawing.Size(20,440) $BlogLink.Size = New-Object System.Drawing.Size(150,25) $BlogLink.Text = "www.scconfigmgr.com" $BlogLink.Add_Click($OpenLink) $RadioButtonSiteRoleMP = New-Object System.Windows.Forms.RadioButton $RadioButtonSiteRoleMP.Location = New-Object System.Drawing.Size(25,35) $RadioButtonSiteRoleMP.Size = New-Object System.Drawing.Size(120,25) $RadioButtonSiteRoleMP.Text = "Management Point" $RadioButtonSiteRoleMP.Name = "Option Management Point" $RadioButtonSiteRoleMP.Checked = $false $RadioButtonSiteRoleMP.Add_Click({ if ($RadioButtonSiteRoleMP.Checked -eq $true) { $OutputBoxSiteRoles.ResetText() } $OutputBoxSiteRoles.ResetText() $ProgressBarSiteRoles.Value = 0 Write-OutputBox -OutputBoxMessage "Management Point selections loaded" -Type "INFO: " -Object SiteRoles Write-OutputBox -OutputBoxMessage "Click on the Install button to install the required Windows Features for a Management Point site system role" -Type "INFO: " -Object SiteRoles Interactive-SiteRolesControlVisibility -Mode Disable }) $RadioButtonSiteRoleDP = New-Object System.Windows.Forms.RadioButton $RadioButtonSiteRoleDP.Location = New-Object System.Drawing.Size(25,65) $RadioButtonSiteRoleDP.Size = New-Object System.Drawing.Size(120,25) $RadioButtonSiteRoleDP.Text = "Distribution Point" $RadioButtonSiteRoleDP.Name = "Option Distribution Point" $RadioButtonSiteRoleDP.Checked = $false $RadioButtonSiteRoleDP.Add_Click({ if ($RadioButtonSiteRoleDP.Checked -eq $true) { $OutputBoxSiteRoles.ResetText() } $OutputBoxSiteRoles.ResetText() $ProgressBarSiteRoles.Value = 0 Write-OutputBox -OutputBoxMessage "Distribution Point selections loaded" -Type "INFO: " -Object SiteRoles Write-OutputBox -OutputBoxMessage "Click on the Install button to install the required Windows Features for a Distribution Point site system role" -Type "INFO: " -Object SiteRoles Interactive-SiteRolesControlVisibility -Mode Disable }) $RadioButtonSiteRoleAppCat = New-Object System.Windows.Forms.RadioButton $RadioButtonSiteRoleAppCat.Location = New-Object System.Drawing.Size(25,95) $RadioButtonSiteRoleAppCat.Size = New-Object System.Drawing.Size(120,25) $RadioButtonSiteRoleAppCat.Text = "Application Catalog" $RadioButtonSiteRoleAppCat.Name = "Option Application Catalog" $RadioButtonSiteRoleAppCat.Checked = $false $RadioButtonSiteRoleAppCat.Add_Click({ if ($RadioButtonSiteRoleAppCat.Checked -eq $true) { $OutputBoxSiteRoles.ResetText() } $OutputBoxSiteRoles.ResetText() $ProgressBarSiteRoles.Value = 0 Write-OutputBox -OutputBoxMessage "Application Catalog selections loaded" -Type "INFO: " -Object SiteRoles Write-OutputBox -OutputBoxMessage "Click on the Install button to install the required Windows Features for the Application Catalog site system roles" -Type "INFO: " -Object SiteRoles Interactive-SiteRolesControlVisibility -Mode Disable }) $RadioButtonSiteRoleEP = New-Object System.Windows.Forms.RadioButton $RadioButtonSiteRoleEP.Location = New-Object System.Drawing.Size(25,125) $RadioButtonSiteRoleEP.Size = New-Object System.Drawing.Size(120,25) $RadioButtonSiteRoleEP.Text = "Enrollment Point" $RadioButtonSiteRoleEP.Name = "Option Enrollment Point" $RadioButtonSiteRoleEP.Checked = $false $RadioButtonSiteRoleEP.Add_Click({ if ($RadioButtonSiteRoleEP.Checked -eq $true) { $OutputBoxSiteRoles.ResetText() } $ProgressBarSiteRoles.Value = 0 $ComboBoxSiteRolesEP.SelectedIndex = -1 Write-OutputBox -OutputBoxMessage "Enrollment Point selections loaded" -Type "INFO: " -Object SiteRoles Write-OutputBox -OutputBoxMessage "Select to install required Windows Features for either an Enrollment Point or an Enrollment Proxy Point site system role" -Type "INFO: " -Object SiteRoles Interactive-SiteRolesControlVisibility -Mode Disable $TabPageSiteRoles.Controls.AddRange(@($ComboBoxSiteRolesEP, $GBEP)) Interactive-SiteRolesControlVisibility -Mode Enable }) $RadioButtonOtherEAD = New-Object System.Windows.Forms.RadioButton $RadioButtonOtherEAD.Location = New-Object System.Drawing.Size(25,35) $RadioButtonOtherEAD.Size = New-Object System.Drawing.Size(170,25) $RadioButtonOtherEAD.Text = "Extend Active Directory" $RadioButtonOtherEAD.Name = "Option Extend Active Directory" $RadioButtonOtherEAD.Checked = $false $RadioButtonOtherEAD.Add_MouseClick({ if ($RadioButtonOtherEAD.Checked -eq $true) { $OutputBoxOther.ResetText() } $ProgressBarOther.Value = 0 $ButtonInstallOther.Text = "Extend" if ($TextBoxDC.Enabled -eq $false) { $TextBoxDC.Enabled = $true } Write-OutputBox -OutputBoxMessage "Extend Active Directory selections loaded" -Type "INFO: " -Object Other Write-OutputBox -OutputBoxMessage "Enter the server name of the Schema Master server in the textbox below" -Type "INFO: " -Object Other Interactive-OtherControlVisibility -Mode Disable -Module WSUS Interactive-OtherControlVisibility -Mode Disable -Module ADK Interactive-OtherControlVisibility -Mode Disable -Module SMC $TabPageOther.Controls.AddRange(@($TextBoxDC, $GBExtendAD)) Interactive-OtherControlVisibility -Mode Enable -Module EAD }) $RadioButtonOtherWSUS = New-Object System.Windows.Forms.RadioButton $RadioButtonOtherWSUS.Location = New-Object System.Drawing.Size(25,65) $RadioButtonOtherWSUS.Size = New-Object System.Drawing.Size(170,25) $RadioButtonOtherWSUS.Text = "Install WSUS" $RadioButtonOtherWSUS.Name = "Option Install WSUS" $RadioButtonOtherWSUS.Checked = $false $RadioButtonOtherWSUS.Add_Click({ if ($RadioButtonOtherWSUS.Checked -eq $true) { $OutputBoxOther.ResetText() } $TextBoxWSUSSQLServer.Enabled = $false $TextBoxWSUSSQLInstance.Enabled = $false $ProgressBarOther.Value = 0 if (-not($ButtonInstallOther.Text -eq "Install")) { $ButtonInstallOther.Text = "Install" } $ComboBoxOtherWSUS.SelectedIndex = -1 Write-OutputBox -OutputBoxMessage "Install WSUS selections loaded" -Type "INFO: " -Object Other Write-OutputBox -OutputBoxMessage "Select whether the WSUS database should be created on a SQL Server or by creating a local Windows Internal Database (WID)" -Type "INFO: " -Object Other Interactive-OtherControlVisibility -Mode Disable -Module EAD Interactive-OtherControlVisibility -Mode Disable -Module ADK Interactive-OtherControlVisibility -Mode Disable -Module SMC $TabPageOther.Controls.AddRange(@($ComboBoxOtherWSUS, $TextBoxWSUSSQLServer, $TextBoxWSUSSQLInstance, $GBWSUS, $GBWSUSSQL)) Interactive-OtherControlVisibility -Mode Enable -Module WSUS }) $RadioButtonOtherADK = New-Object System.Windows.Forms.RadioButton $RadioButtonOtherADK.Location = New-Object System.Drawing.Size(25,95) $RadioButtonOtherADK.Size = New-Object System.Drawing.Size(170,25) $RadioButtonOtherADK.Text = "Install Windows ADK" $RadioButtonOtherADK.Name = "Option Install Windows ADK" $RadioButtonOtherADK.Checked = $false $RadioButtonOtherADK.Add_Click({ if ($RadioButtonOtherADK.Checked -eq $true) { $OutputBoxOther.ResetText() } $ProgressBarOther.Value = 0 if (-not($ButtonInstallOther.Text -eq "Install")) { $ButtonInstallOther.Text = "Install" } $ComboBoxOtherADK.SelectedIndex = -1 Write-OutputBox -OutputBoxMessage "Install Windows ADK selections loaded" -Type "INFO: " -Object Other Write-OutputBox -OutputBoxMessage "Select whether to install Windows ADK by downloading the setup bootstrapper from the internet (Online), or by pointing to a folder where the complete redistributed Windows ADK setup files have been downloaded locally (Offline)" -Type "INFO: " -Object Other Interactive-OtherControlVisibility -Mode Disable -Module EAD Interactive-OtherControlVisibility -Mode Disable -Module WSUS Interactive-OtherControlVisibility -Mode Disable -Module SMC $TabPageOther.Controls.AddRange(@($ComboBoxOtherADK, $GBADK)) Interactive-OtherControlVisibility -Mode Enable -Module ADK }) $RadioButtonOtherSMC = New-Object System.Windows.Forms.RadioButton $RadioButtonOtherSMC.Location = New-Object System.Drawing.Size(25,125) $RadioButtonOtherSMC.Size = New-Object System.Drawing.Size(181,25) $RadioButtonOtherSMC.Text = "System Management Container" $RadioButtonOtherSMC.Name = "Option System Management Container" $RadioButtonOtherSMC.Font = New-Object System.Drawing.Font("Microsoft Sans Serif","8.25",[System.Drawing.FontStyle]::Regular) $RadioButtonOtherSMC.Checked = $false $RadioButtonOtherSMC.Add_Click({ if ($RadioButtonOtherSMC.Checked -eq $true) { $OutputBoxOther.ResetText() } $ProgressBarOther.Value = 0 if (-not($ButtonInstallOther.Text -eq "Search")) { $ButtonInstallOther.Text = "Search" } Write-OutputBox -OutputBoxMessage "System Management Container selections loaded" -Type "INFO: " -Object Other Write-OutputBox -OutputBoxMessage "Click on the Search button to find an Active Directory group that contains all Site servers that will be given Full Control permissions on the System Management container. If you havn't yet created such a group containing all the Site server, please do so before you continue" -Type "INFO: " -Object Other Interactive-OtherControlVisibility -Mode Disable -Module EAD Interactive-OtherControlVisibility -Mode Disable -Module ADK Interactive-OtherControlVisibility -Mode Disable -Module WSUS $TabPageOther.Controls.Add($CBSMCCreate) Interactive-OtherControlVisibility -Mode Enable -Module SMC }) $RadioButtonOnline = New-Object System.Windows.Forms.RadioButton $RadioButtonOnline.Location = New-Object System.Drawing.Size(20,417) $RadioButtonOnline.Size = New-Object System.Drawing.Size(60,24) $RadioButtonOnline.Text = "Online" $RadioButtonOffline = New-Object System.Windows.Forms.RadioButton $RadioButtonOffline.Location = New-Object System.Drawing.Size(90,417) $RadioButtonOffline.Size = New-Object System.Drawing.Size(60,24) $RadioButtonOffline.Text = "Offline" $RadioButtonSMCLocal = New-Object System.Windows.Forms.RadioButton $RadioButtonSMCLocal.Location = New-Object System.Drawing.Size(20,392) $RadioButtonSMCLocal.Size = New-Object System.Drawing.Size(15,24) $RadioButtonSMCLocal.Add_Click({$TextBoxSMCRemote.Enabled = $false}) $RadioButtonSMCRemote = New-Object System.Windows.Forms.RadioButton $RadioButtonSMCRemote.Location = New-Object System.Drawing.Size(200,392) $RadioButtonSMCRemote.Size = New-Object System.Drawing.Size(15,24) $RadioButtonSMCRemote.Add_Click({$TextBoxSMCRemote.Enabled = $true}) $RadioButtonWID = New-Object System.Windows.Forms.RadioButton $RadioButtonWID.Location = New-Object System.Drawing.Size(20,417) $RadioButtonWID.Size = New-Object System.Drawing.Size(60,24) $RadioButtonWID.Text = "WID" $RadioButtonWID.Checked = $true $RadioButtonWID.Add_Click({ $TextBoxWSUSSQLServer.Enabled = $false $TextBoxWSUSSQLInstance.Enabled = $false $OutputBox.Clear() }) $RadioButtonSQL = New-Object System.Windows.Forms.RadioButton $RadioButtonSQL.Location = New-Object System.Drawing.Size(90,427) $RadioButtonSQL.Size = New-Object System.Drawing.Size(45,24) $RadioButtonSQL.Text = "SQL" $RadioButtonSQL.Add_Click({ $TextBoxWSUSSQLServer.Enabled = $true $TextBoxWSUSSQLInstance.Enabled = $true Write-OutputBox -OutputBoxMessage "Specify the SQL Server computer name and instance name in the fields below" -Type "INFO: " Write-OutputBox -OutputBoxMessage "Leave the instance field empty if you're using the default instance on the SQL Server" -Type "INFO: " }) $CBSMCCreate = New-Object System.Windows.Forms.CheckBox $CBSMCCreate.Location = New-Object System.Drawing.Size(10,425) $CBSMCCreate.Size = New-Object System.Drawing.Size(250,20) $CBSMCCreate.Text = "Create the System Management container" $CBSMCCreate.Name = "SMC" $CBCASDownloadPrereqs = New-Object System.Windows.Forms.CheckBox $CBCASDownloadPrereqs.Location = New-Object System.Drawing.Size(10,425) $CBCASDownloadPrereqs.Size = New-Object System.Drawing.Size(190,20) $CBCASDownloadPrereqs.Text = "Download prerequisite files" $CBPrimaryDownloadPrereqs = New-Object System.Windows.Forms.CheckBox $CBPrimaryDownloadPrereqs.Location = New-Object System.Drawing.Size(10,425) $CBPrimaryDownloadPrereqs.Size = New-Object System.Drawing.Size(190,20) $CBPrimaryDownloadPrereqs.Text = "Download prerequisite files" $GBGeneralValidation = New-Object System.Windows.Forms.GroupBox $GBGeneralValidation.Location = New-Object System.Drawing.Size(20,20) $GBGeneralValidation.Size = New-Object System.Drawing.Size(220,200) $GBGeneralReboot = New-Object System.Windows.Forms.GroupBox $GBGeneralReboot.Location = New-Object System.Drawing.Size(30,40) $GBGeneralReboot.Size = New-Object System.Drawing.Size(200,40) $GBGeneralReboot.Text = "Pending reboot" $GBGeneralOS = New-Object System.Windows.Forms.GroupBox $GBGeneralOS.Location = New-Object System.Drawing.Size(30,80) $GBGeneralOS.Size = New-Object System.Drawing.Size(200,40) $GBGeneralOS.Text = "Platform" $GBGeneralPS = New-Object System.Windows.Forms.GroupBox $GBGeneralPS.Location = New-Object System.Drawing.Size(30,120) $GBGeneralPS.Size = New-Object System.Drawing.Size(200,40) $GBGeneralPS.Text = "PowerShell version" $GBGeneralElevated = New-Object System.Windows.Forms.GroupBox $GBGeneralElevated.Location = New-Object System.Drawing.Size(30,160) $GBGeneralElevated.Size = New-Object System.Drawing.Size(200,40) $GBGeneralElevated.Text = "Administrative rights" $GBSiteSystemRoles = New-Object System.Windows.Forms.GroupBox $GBSiteSystemRoles.Location = New-Object System.Drawing.Size(10,10) $GBSiteSystemRoles.Size = New-Object System.Drawing.Size(190,350) $GBSiteSystemRoles.Text = "Select a Site System Role" $GBSiteSystemRoles.Name = "Option Site System Roles" $GBOther = New-Object System.Windows.Forms.GroupBox $GBOther.Location = New-Object System.Drawing.Size(10,10) $GBOther.Size = New-Object System.Drawing.Size(200,350) $GBOther.Text = "Make a selection" $GBOther.Name = "Option Make a selection" $GBADK = New-Object System.Windows.Forms.GroupBox $GBADK.Location = New-Object System.Drawing.Size(10,410) $GBADK.Size = New-Object System.Drawing.Size(150,45) $GBADK.Text = "Installation methods" $GBADK.Name = "ADK" $GBWSUS = New-Object System.Windows.Forms.GroupBox $GBWSUS.Location = New-Object System.Drawing.Size(10,410) $GBWSUS.Size = New-Object System.Drawing.Size(130,45) $GBWSUS.Text = "Database options" $GBWSUS.Name = "WSUS" $GBWSUSSQL = New-Object System.Windows.Forms.GroupBox $GBWSUSSQL.Location = New-Object System.Drawing.Size(150,410) $GBWSUSSQL.Size = New-Object System.Drawing.Size(310,45) $GBWSUSSQL.Text = "SQL Server details" $GBWSUSSQL.Name = "WSUS" $GBExtendAD = New-Object System.Windows.Forms.GroupBox $GBExtendAD.Location = New-Object System.Drawing.Size(10,410) $GBExtendAD.Size = New-Object System.Drawing.Size(190,45) $GBExtendAD.Text = "Schema Master server name" $GBExtendAD.Name = "EAD" $GBSystemManagementContainer = New-Object System.Windows.Forms.GroupBox $GBSystemManagementContainer.Location = New-Object System.Drawing.Size(10,375) $GBSystemManagementContainer.Size = New-Object System.Drawing.Size(360,45) $GBSystemManagementContainer.Text = "Add computer account to the System Management container" $GBSystemManagementContainerGroup = New-Object System.Windows.Forms.GroupBox $GBSystemManagementContainerGroup.Location = New-Object System.Drawing.Size(10,375) $GBSystemManagementContainerGroup.Size = New-Object System.Drawing.Size(360,45) $GBSystemManagementContainerGroup.Text = "Selected Active Directory group" $GBSystemManagementContainerGroupSearch = New-Object System.Windows.Forms.GroupBox $GBSystemManagementContainerGroupSearch.Location = New-Object System.Drawing.Size(10,10) $GBSystemManagementContainerGroupSearch.Size = New-Object System.Drawing.Size(360,45) $GBSystemManagementContainerGroupSearch.Text = "Search for an Active Directory group" $GBEP = New-Object System.Windows.Forms.GroupBox $GBEP.Location = New-Object System.Drawing.Size(10,410) $GBEP.Size = New-Object System.Drawing.Size(170,45) $GBEP.Text = "Select a site system role" $GBEP.Name = "Select a site system role" $ComboBoxSiteRolesEP = New-Object System.Windows.Forms.ComboBox $ComboBoxSiteRolesEP.Location = New-Object System.Drawing.Size(20,427) $ComboBoxSiteRolesEP.Size = New-Object System.Drawing.Size(150,20) $ComboBoxSiteRolesEP.DropDownStyle = "DropDownList" $ComboBoxSiteRolesEP.Items.AddRange(@("Enrollment Point","Enrollment Proxy Point")) $ComboBoxOtherWSUS = New-Object System.Windows.Forms.ComboBox $ComboBoxOtherWSUS.Location = New-Object System.Drawing.Size(20,427) $ComboBoxOtherWSUS.Size = New-Object System.Drawing.Size(110,20) $ComboBoxOtherWSUS.DropDownStyle = "DropDownList" $ComboBoxOtherWSUS.Items.AddRange(@("SQL","WID")) $ComboBoxOtherWSUS.Name = "WSUS" $ComboBoxOtherWSUS.Add_SelectedValueChanged({ if ($ComboBoxOtherWSUS.SelectedItem -eq "SQL") { $TextBoxWSUSSQLServer.Enabled = $true $TextBoxWSUSSQLInstance.Enabled = $true } if ($ComboBoxOtherWSUS.SelectedItem -eq "WID") { $TextBoxWSUSSQLServer.Enabled = $false $TextBoxWSUSSQLInstance.Enabled = $false } }) $ComboBoxOtherADK = New-Object System.Windows.Forms.ComboBox $ComboBoxOtherADK.Location = New-Object System.Drawing.Size(20,427) $ComboBoxOtherADK.Size = New-Object System.Drawing.Size(130,20) $ComboBoxOtherADK.DropDownStyle = "DropDownList" $ComboBoxOtherADK.Items.AddRange(@("Online","Offline")) $ComboBoxOtherADK.Name = "ADK" Load-Form
combined_dataset/train/non-malicious/sample_3_12.ps1
sample_3_12.ps1
# You may use this code and information and create derivative works of it, # provided that the following conditions are met: # 1. This code and information and any derivative works may only be used for # troubleshooting a) Windows and b) products for Windows, in either case using # the Windows Troubleshooting Platform # 2. Any copies of this code and information # and any derivative works must retain the above copyright notice, this list of # conditions and the following disclaimer. # 3. THIS CODE AND INFORMATION IS PROVIDED ``AS IS'' WITHOUT WARRANTY OF ANY KIND, # WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. IF THIS CODE AND # INFORMATION IS USED OR MODIFIED, THE ENTIRE RISK OF USE OR RESULTS IN CONNECTION # WITH THE USE OF THIS CODE AND INFORMATION REMAINS WITH THE USER. # Need to investigate XML output options and Service account information to include PSID information $Error.Clear() trap { "[Get-ErrorlogPath] : Trapped error ..." | WriteTo-Stdout Show-ErrorDetails $error[0] } if($debug -eq $true){[void]$shell.popup("Run SQL_Get_All_Services.ps1")} Import-LocalizedData -BindingVariable AllServicesString -FileName SQL_Get_All_Services -UICulture en-us Write-DiagProgress -Activity $AllServicesString.ID_SQL_Setup_Services -Status $AllServicesString.ID_SQL_Setup_Services_Description $OutputFile = $ComputerName + "_SC_Services_Output.txt" $CommandLineToExecute = "cmd.exe /c SC.exe queryex type= all state= all > $OutputFile" $fileDescription = "Microsoft Windows Running Services Output" $sectionDescription = "Microsoft Windows Running Services" RunCmD -commandToRun $CommandLineToExecute -sectionDescription $fileDescription -filesToCollect $OutputFile -fileDescription $sectionDescription # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDbgw496MTj3Qqk # PBNV60Pi0BHu7Id/dXqHNQH1/koEiaCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxMTE0WhcNMjUwOTExMjAxMTE0WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE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+MBB+I5tuo3srctBesnL25ljRMQrzqydxu8pPyAVKTainFNI1O0U+ # 2i3OpL+utTWxw0ifacYuQUk76EzyV4VDcbFQcH5V+s3+un5tdWOXZNI9KqNZxJI4 # I/QX0C3FM3DSXbTJWYAdfNuQPTAdvQqWB08QRIitgIDmOPTerTqUxIDM0SzT+3OP # CV1lHT/b5T8cbo3Z5EBsBcDfCwRXY/laeuiBBM5m+m2BKSqo5bo6U43qx5gIXzkk # utoSPQYrL5A2AmwTEYwTZXzV5fVBhzks2HYuophm03kzqGLQvVBAMMCMZhTgD3h2 # 3y87jjIi6F0FZFzfr2ufP6KVY/PCFzk8nT95h7SzcwyjdZYzEmLe9s4nN2G9wiXM # ommU95Peg53zFNh4l/wBghDkzegkBzSHmVVeTZQd+qGW5zWJGMsaHbSqfMBgDCqN # lEXreMv76I7PtklCf4F0WYuaytNC4J5aI+VeJfine3TBI60iV/t6sUO0pgPaM480 # 7PHVzRIYI9Eb8j+K5f4s/e+YPZf0yFsc3pusvD8gF8D8+bFDLa+TKQRmXZTdjKpv # jKjSnt3Hh61fLyO/ysA= # SIG # End signature block
combined_dataset/train/non-malicious/FastNFS - PowerCLI.ps1
FastNFS - PowerCLI.ps1
# fastNFS # Description: Mounts NFS datastore to a group of ESX hosts. # Usage: Enter a list of ESX hosts (by IP or hostname). Then enter the IP, path, and datastore name of the share. # # # Enter the name or IP of the NFS server $nfssrv = Read-Host "Enter the name or IP of the NFS server" # Enter the full path to the share $nfspath = Read-Host "Enter the full path to the share" # Give a name for the new NFS datastore $nfsds = Read-Host "Enter a name for the new NFS datastore" # Create an empty array for $esx $esx = @() # Will continue to prompt for ESX hosts until you stop entering them. do { $input = Read-Host "Add an ESX host by FQDN or IP" if ($input -ne ""){ $esx += $input } } until ($input -eq "") # Mounts the datastore foreach ($name in $esx) { New-Datastore -VMHost $name -Name $nfsds -Path $nfspath -Nfshost $nfssrv -Nfs }
combined_dataset/train/non-malicious/4416.ps1
4416.ps1
function Update-Module { [CmdletBinding(SupportsShouldProcess = $true, HelpUri = 'https://go.microsoft.com/fwlink/?LinkID=398576')] Param ( [Parameter(ValueFromPipelineByPropertyName = $true, Position = 0)] [ValidateNotNullOrEmpty()] [String[]] $Name, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateNotNull()] [string] $RequiredVersion, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateNotNull()] [string] $MaximumVersion, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCredential] $Credential, [Parameter()] [ValidateSet("CurrentUser", "AllUsers")] [string] $Scope, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateNotNullOrEmpty()] [Uri] $Proxy, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCredential] $ProxyCredential, [Parameter()] [Switch] $Force, [Parameter()] [Switch] $AllowPrerelease, [Parameter()] [switch] $AcceptLicense, [Parameter()] [switch] $PassThru ) Begin { Install-NuGetClientBinaries -CallerPSCmdlet $PSCmdlet -Proxy $Proxy -ProxyCredential $ProxyCredential if ($Scope -eq "AllUsers" -and -not (Test-RunningAsElevated)) { $message = $LocalizedData.UpdateModuleAdminPrivilegeRequiredForAllUsersScope -f @($script:programFilesModulesPath, $script:MyDocumentsModulesPath) ThrowError -ExceptionName "System.ArgumentException" ` -ExceptionMessage $message ` -ErrorId "UpdateModuleAdminPrivilegeRequiredForAllUsersScope" ` -CallerPSCmdlet $PSCmdlet ` -ErrorCategory InvalidArgument } $moduleNamesInPipeline = @() } Process { $ValidationResult = Validate-VersionParameters -CallerPSCmdlet $PSCmdlet ` -Name $Name ` -MaximumVersion $MaximumVersion ` -RequiredVersion $RequiredVersion ` -AllowPrerelease:$AllowPrerelease if (-not $ValidationResult) { return } $GetPackageParameters = @{ } $GetPackageParameters[$script:PSArtifactType] = $script:PSArtifactTypeModule $GetPackageParameters["Provider"] = $script:PSModuleProviderName $GetPackageParameters["MessageResolver"] = $script:PackageManagementMessageResolverScriptBlock $GetPackageParameters['ErrorAction'] = 'SilentlyContinue' $GetPackageParameters['WarningAction'] = 'SilentlyContinue' if ($AllowPrerelease) { $PSBoundParameters[$script:AllowPrereleaseVersions] = $true } $null = $PSBoundParameters.Remove("AllowPrerelease") $null = $PSBoundParameters.Remove("PassThru") $PSGetItemInfos = @() if (-not $Name) { $Name = @('*') } foreach ($moduleName in $Name) { $GetPackageParameters['Name'] = $moduleName $installedPackages = PackageManagement\Get-Package @GetPackageParameters if (-not $installedPackages -and -not (Test-WildcardPattern -Name $moduleName)) { $availableModules = Get-Module -ListAvailable $moduleName -Verbose:$false | Microsoft.PowerShell.Utility\Select-Object -Unique -ErrorAction Ignore if (-not $availableModules) { $message = $LocalizedData.ModuleNotInstalledOnThisMachine -f ($moduleName) Write-Error -Message $message -ErrorId 'ModuleNotInstalledOnThisMachine' -Category InvalidOperation -TargetObject $moduleName } else { $message = $LocalizedData.ModuleNotInstalledUsingPowerShellGet -f ($moduleName) Write-Error -Message $message -ErrorId 'ModuleNotInstalledUsingInstallModuleCmdlet' -Category InvalidOperation -TargetObject $moduleName } continue } $installedPackages | Microsoft.PowerShell.Core\ForEach-Object { New-PSGetItemInfo -SoftwareIdentity $_ -Type $script:PSArtifactTypeModule } | Microsoft.PowerShell.Core\ForEach-Object { $PSGetItemInfos += $_ } } $PSBoundParameters["Provider"] = $script:PSModuleProviderName $PSBoundParameters[$script:PSArtifactType] = $script:PSArtifactTypeModule foreach ($psgetItemInfo in $PSGetItemInfos) { if ($moduleNamesInPipeline -contains $psgetItemInfo.Name) { continue } $moduleNamesInPipeline += $psgetItemInfo.Name $message = $LocalizedData.CheckingForModuleUpdate -f ($psgetItemInfo.Name) Write-Verbose -Message $message $providerName = Get-ProviderName -PSCustomObject $psgetItemInfo if (-not $providerName) { $providerName = $script:NuGetProviderName } $PSBoundParameters["MessageResolver"] = $script:PackageManagementUpdateModuleMessageResolverScriptBlock $PSBoundParameters["Name"] = $psgetItemInfo.Name $PSBoundParameters['Source'] = $psgetItemInfo.Repository $PSBoundParameters["PackageManagementProvider"] = $providerName $PSBoundParameters["InstallUpdate"] = $true if (-not $Scope) { $Scope = Get-InstallationScope -PreviousInstallLocation $psgetItemInfo.InstalledLocation -CurrentUserPath $script:MyDocumentsModulesPath } $PSBoundParameters["Scope"] = $Scope $sid = PackageManagement\Install-Package @PSBoundParameters if ($PassThru) { $sid | Microsoft.PowerShell.Core\ForEach-Object { New-PSGetItemInfo -SoftwareIdentity $_ -Type $script:PSArtifactTypeModule } } } } }
combined_dataset/train/non-malicious/Get-Weather_1.ps1
Get-Weather_1.ps1
Function Get-Weather { <# .SYNOPSIS Display weather data for a specific country and city. .DESCRIPTION Display weather data for a specific country and city. There is a possibility for this to fail if the web service being used is unavailable. .PARAMETER Country URL of the website to test access to. .PARAMETER ListCities Use the currently authenticated user's credentials .PARAMETER City Used to connect via a proxy .NOTES Name: Get-Weather Author: Boe Prox DateCreated: 15Feb2011 .LINK http://www.webservicex.net/ws/default.aspx .LINK http://boeprox.wordpress.com .EXAMPLE Get-Weather -Country "United States" -ListCities Description ------------ Returns all of the available cities that are available to retrieve weather information from. .EXAMPLE Get-Weather -Country "United States" -City "San Francisco" Description ------------ Retrieves the current weather information for San Francisco #> [cmdletbinding( DefaultParameterSetName = 'Weather', ConfirmImpact = 'low' )] Param( [Parameter( Mandatory = $True, Position = 0, ParameterSetName = '', ValueFromPipeline = $True)] [string]$Country, [Parameter( Position = 1, Mandatory = $False, ParameterSetName = 'listcities')] [switch]$ListCities, [Parameter( Mandatory = $False, ParameterSetName = '')] [string]$City ) Begin { $psBoundParameters.GetEnumerator() | % { Write-Verbose "Parameter: $_" } Try { #Make connection to known good weather service Write-Verbose "Create web proxy connection to weather service" $weather = New-WebServiceProxy 'http://www.webservicex.net/globalweather.asmx?WSDL' } Catch { Write-Warning "$($Error[0])" Break } } Process { #Determine if we are only to list the cities for a given country or get the weather from a city Switch ($PSCmdlet.ParameterSetName) { ListCities { Try { #List all cities available to query for weather Write-Verbose "Listing cities in country: $($country)" (([xml]$weather.GetCitiesByCountry("$country")).newdataset).table | Sort City | Select City Break } Catch { Write-Warning "$($Error[0])" Break } } Weather { Try { #Get the weather for the city and country Write-Verbose "Getting weather for Country: $($country), City $($city)" ([xml]$weather.GetWeather("$city", "$country")).CurrentWeather } Catch { Write-Warning "$($Error[0])" } } } } End { Write-Verbose "End function, performing clean-up" Remove-Variable city -Force Remove-Variable country -Force } }
combined_dataset/train/non-malicious/770.ps1
770.ps1
[CmdletBinding(DefaultParameterSetName = "Build")] param( [Parameter(ParameterSetName="Bootstrap")] [switch] $Bootstrap, [Parameter(ParameterSetName="Build")] [switch] $Clean, [Parameter(ParameterSetName="Build")] [switch] $Test ) $NeededTools = @{ VSCode = "Visual Studio Code" NodeJS = "Node.js 6.0 or higher" PowerShellGet = "PowerShellGet latest" InvokeBuild = "InvokeBuild latest" } function needsVSCode () { try { $vscodeVersion = (code -v) if (-not $vscodeVersion) { Throw } } catch { try { $vscodeInsidersVersion = (code-insiders -v) if (-not $vscodeInsidersVersion) { Throw } } catch { return $true } } return $false } function needsNodeJS () { try { $nodeJSVersion = node -v } catch { return $true } if ($nodeJSVersion -notmatch 'v(\d+\.\d+\.\d+)') { return $true } $nodeVer = [System.Version]$matches[1] return ($nodeVer.Major -lt 6) } function needsPowerShellGet () { if (Get-Module -ListAvailable -Name PowerShellGet) { return $false } return $true } function needsInvokeBuild () { if (Get-Module -ListAvailable -Name InvokeBuild) { return $false } return $true } function getMissingTools () { $missingTools = @() if (needsVSCode) { $missingTools += $NeededTools.VSCode } if (needsNodeJS) { $missingTools += $NeededTools.NodeJS } if (needsPowerShellGet) { $missingTools += $NeededTools.PowerShellGet } if (needsInvokeBuild) { $missingTools += $NeededTools.InvokeBuild } return $missingTools } function hasMissingTools () { return ((getMissingTools).Count -gt 0) } if ($Bootstrap) { $string = "Here is what your environment is missing:`n" $missingTools = getMissingTools if (($missingTools).Count -eq 0) { $string += "* nothing!`n`n Run this script without a flag to build or a -Clean to clean." } else { $missingTools | ForEach-Object {$string += "* $_`n"} $string += "`nAll instructions for installing these tools can be found on VSCode PowerShell's Github:`n" ` + "https://github.com/PowerShell/vscode-powershell/blob/master/docs/development.md" } Write-Host "`n$string`n" } elseif(hasMissingTools) { Write-Host "You are missing needed tools. Run './build.ps1 -Bootstrap' to see what they are." } else { if($Clean) { Invoke-Build Clean } Invoke-Build Build if($Test) { Invoke-Build Test } }
combined_dataset/train/non-malicious/sample_50_17.ps1
sample_50_17.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservice.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '600a044a-632a-42d0-b1ab-94f26e2f3791' # 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 Datalabelingservice 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.Datalabelingservice.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-OCIDatalabelingserviceDatasetLabels', 'Get-OCIDatalabelingserviceAnnotationFormatsList', 'Get-OCIDatalabelingserviceDataset', 'Get-OCIDatalabelingserviceDatasetsList', 'Get-OCIDatalabelingserviceWorkRequest', 'Get-OCIDatalabelingserviceWorkRequestErrorsList', 'Get-OCIDatalabelingserviceWorkRequestLogsList', 'Get-OCIDatalabelingserviceWorkRequestsList', 'Import-OCIDatalabelingservicePreAnnotatedData', 'Invoke-OCIDatalabelingserviceSnapshotDataset', 'Move-OCIDatalabelingserviceDatasetCompartment', 'New-OCIDatalabelingserviceDataset', 'New-OCIDatalabelingserviceDatasetRecords', 'Remove-OCIDatalabelingserviceDataset', 'Remove-OCIDatalabelingserviceDatasetLabels', 'Rename-OCIDatalabelingserviceDatasetLabels', 'Update-OCIDatalabelingserviceDataset' # 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','Datalabelingservice' # 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_39_35.ps1
sample_39_35.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# .Synopsis Registers or unregisters the PowerShell ETW manifest .Parameter Path The fully qualified path to the PowerShell.Core.Instrumentation.man manifest file. The default value is the location of this script. .Parameter Unregister Specify to unregister the manifest. .Notes The PowerShell.Core.Instrumentation.man and PowerShell.Core.Instrumentation.dll files are expected to be at the location specified by the Path parameter. When registered, PowerShell.Core.Instrumentation.dll is locked to prevent deleting or changing. To update the binary, first unregister the manifest using the -Unregister switch. #> [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [string] $Path = $PSScriptRoot, [switch] $Unregister ) Set-StrictMode -Version 3.0 $ErrorActionPreference = 'Stop' function Start-NativeExecution([scriptblock]$sb, [switch]$IgnoreExitcode) { $backupEAP = $script:ErrorActionPreference $script:ErrorActionPreference = "Continue" try { & $sb # note, if $sb doesn't have a native invocation, $LASTEXITCODE will # point to the obsolete value if ($LASTEXITCODE -ne 0 -and -not $IgnoreExitcode) { throw "Execution of {$sb} failed with exit code $LASTEXITCODE" } } finally { $script:ErrorActionPreference = $backupEAP } } function Test-Elevated { [CmdletBinding()] [OutputType([bool])] Param() # if the current Powershell session was called with administrator privileges, # the Administrator Group's well-known SID will show up in the Groups for the current identity. # Note that the SID won't show up unless the process is elevated. return (([Security.Principal.WindowsIdentity]::GetCurrent()).Groups -contains "S-1-5-32-544") } $IsWindowsOs = $PSHOME.EndsWith('\WindowsPowerShell\v1.0', [System.StringComparison]::OrdinalIgnoreCase) -or $IsWindows if (-not $IsWindowsOs) { throw 'This script must be run on Windows.' } if (-not (Test-Elevated)) { throw 'This script must be run from an elevated process.' } $manifest = Get-Item -Path (Join-Path -Path $Path -ChildPath 'PowerShell.Core.Instrumentation.man') $binary = Get-Item -Path (Join-Path -Path $Path -ChildPath 'PowerShell.Core.Instrumentation.dll') $files = @($manifest, $binary) foreach ($file in $files) { if (-not (Test-Path -Path $file)) { throw "Could not find $($file.Name) at $Path" } } [string] $command = 'wevtutil um "{0}"' -f $manifest.FullName # Unregister if present. Avoids warnings when registering the manifest # and it is already registered. Write-Verbose "unregister the manifest, if present: $command" Start-NativeExecution {Invoke-Expression $command} $true if (-not $Unregister) { $command = 'wevtutil.exe im "{0}" /rf:"{1}" /mf:"{1}"' -f $manifest.FullName, $binary.FullName Write-Verbose -Message "Register the manifest: $command" Start-NativeExecution { Invoke-Expression $command } } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC1/q5FJbWVjBBd # zdmm1gMERAVvJK3uGRSGbK2+M2jUNKCCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwW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# dxyEepRCSZZCQmEpnGQfAeoNFAIAGlxrpvePZ+ZYQlmPmFwbkNmfoU5lQpEQg+wP # vOLL/w0jmFZHV/3bCB/YYWZGPQFCoesKCwljZ2j+T5p1aC2ml3wisTsgN5W62SSL # 8o3GdC0Sl7avD5Ro/JWDNAYgfixa4MxHkN/BJ8emki/6fAhNtri8ZHyw4s7E/F6f # 0Mh0zwv5rAi/z7p8CwvznhcoS6pwr0DSqfvfR0STH9KPnWjN2C9xBPFI+CcmZ9mG # frxWdAjryg9CcQXBs1Dx/0wMTInKpy9KEOXMkHLVcUullYGJtCsxxf9LPuFtmti4 # SKAYe/dl6w9UukafGZH53EEegvjepEPkH+B41cKDaLXabKSQuVlYgtvVbHcLBlFu # rqf56qaGNJtaRQnKLm4Ztuxx7mNoYSjwDduOxQEh3l5r+Hutek0uPurJRCj7t3Kw # BdpFbGOdrEQj9JD2zFpOdYYqBpTJeh/p7fX4kfTTczdIlauxj2PV8q4SGevi4XcY # D5Bc8XmF3NaoVhmLpqalSqWJdL3WnPz91CGvLLJmlzPX5KLDVwDO+LEbcnmPGC8s # wAS4amXXWrQ7JJFs8pbITYHhtpYemwOrGmotHZXv8TOa8gAje/UB0SlTXHUoHJz3 # F52q8N/rAokvkZjUCP4= # SIG # End signature block
combined_dataset/train/non-malicious/2316.ps1
2316.ps1
param( [Parameter()] [ValidateNotNullOrEmpty()] [string]$CsvFilePath ) function New-CompanyAdUser { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [pscustomobject]$EmployeeRecord ) $password = [System.Web.Security.Membership]::GeneratePassword((Get-Random -Minimum 20 -Maximum 32), 3) $secPw = ConvertTo-SecureString -String $password -AsPlainText -Force $userName = "$($EmployeeRecord.FirstName.Substring(0,1))$($EmployeeRecord.LastName))" $NewUserParameters = @{ GivenName = $EmployeeRecord.FirstName Surname = $EmployeeRecord.LastName Name = $userName AccountPassword = $secPw } New-AdUser @NewUserParameters Add-AdGroupMember -Identity $EmployeeRecord.Department -Members $userName } function New-CompanyUserFolder { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [pscustomobject]$EmployeeRecord ) $fileServer = 'FS1' $null = New-Item -Path "\\$fileServer\Users\$($EmployeeRecord.FirstName)$($EmployeeRecord.LastName)" -ItemType Directory } function Register-CompanyMobileDevice { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [pscustomobject]$EmployeeRecord ) $sendMailParams = @{ 'From' = 'EmailAddress@gmail.com' 'To' = 'SomeOtherAddress@whatever.com' 'Subject' = 'A new mobile device needs to be registered' 'Body' = "Employee: $($EmployeeRecord.FirstName) $($EmployeeRecord.LastName)" 'SMTPServer' = 'smtpserver.something.local' 'SMTPPort' = '587' } Send-MailMessage @sendMailParams } function Read-Employee { [CmdletBinding()] param ( [Parameter()] [ValidateNotNullOrEmpty()] [string]$CsvFilePath = $CsvFilePath ) Import-Csv -Path $CsvFilePath } $functions = 'New-CompanyAdUser','New-CompanyUserFolder','Register-CompanyMobileDevice' foreach ($employee in (Read-Employee)) { foreach ($function in $functions) { & $function -EmployeeRecord $employee } }
combined_dataset/train/non-malicious/2848.ps1
2848.ps1
function SelectObjectWithDefault { [CmdletBinding()] param( [Parameter(ValueFromPipeline=$true)] [PSObject] $InputObject, [string] $Name, $Value ) process { if ($_ -eq $null) { $Value } elseif ($_ | Get-Member -Name $Name) { $_.$Name } elseif (($_ -is [Hashtable]) -and ($_.Keys -contains $Name)) { $_.$Name } else { $Value } } }
combined_dataset/train/non-malicious/Cisco-Inventory.ps1
Cisco-Inventory.ps1
#================================================================================================== # File Name : CiscoInventory.ps1 # Original Author : Kenneth C. Mazie (kcmjr) # Description : As written it will poll Cisco routers and switches and if the snmp OID's # : match it will pull out model, serial, and IOS version. The resulting # : spreadsheet contains IP, host name, serial, model, IOS version, and # : rack location. # # Notes : Normal operation is with no command line options. # : This PowerShell script was cobbled together from various sources around # : the Internet. It was inspired by an article by David Davis over at ZDNet # : but came about because I had yet to find a PowerShell script to do what # : it does in any of my searches. # : # : The script requires net-snmp tools. The script will first attempt to # : ping a target, then process it if the ping succeeds. Our devices use a # : standard naming convention of 12 characters. The script parses the host # : name and determines the location of the device by what it finds in # : character position 2 and 3 so you may want to remove that section or # : edit it for your needs. # : # : The script creates an excel spreadsheet and saves it as a date & time # : stamped file on the root of C:, so you need Excel installed. Target # : systems are read from a file named "devices.txt" that should reside in # : the same folder as the script and contain a list of target IP addresses, # : one per line. # : # Warnings : None # : # Legal : Script provided "AS IS" without warranties or guarantees of any # : kind. USE AT YOUR OWN RISK. Public domain, no rights reserved. # : Please keep this header in tact if at all possible. # : # Credits : Code snippets and/or ideas came from many sources including but # : # Last Update by : Kenneth C. Mazie # Version History : v1.0 - 06-24-10 - Original # Change History : v1.1 - # #======================================================================================= Clear-Host #--[ Global presets ]---------------------------------- $Invocation = (Get-Variable MyInvocation -Scope 0).Value #$ScriptPath = Split-Path $Invocation.MyCommand.Path $strExe = "f:\\usr\\bin\\snmpget.exe" #--[ Set the location of the net-snmp tools bin folder ]--------- $strCommunity = "Public" #--[ set your community string ]--------- #--[ Assorted Excel presets settings ]---------------------------------- $xlAutomatic = -4105 # $xlBottom = -4107 # Text alignment bottom $xlCenter = -4108 # Text alignment center $xlContext = -5002 # Text alignment $xlContinuous = 1 # $xlDiagonalDown = 5 # Cell line position $xlDiagonalUp = 6 # Cell line position $xlEdgeBottom = 9 # Cell line position $xlEdgeLeft = 7 # Cell line position $xlEdgeRight = 10 # Cell line position $xlEdgeTop = 8 # Cell line position $xlInsideHorizontal = 12 # Cell line position $xlInsideVertical = 11 # Cell line position $xlDash = -4115 # Dashed line $xlDashDot = 4 # Alternating dashes and dots $xlDashDotDot = 5 # Dash followed by two dots $xlDot = -4118 # Dotted line $xlDouble = -4119 # Double line $xlNone = -4142 # No line $xlSlantDashDot = 13 # Slanted dashes. $xlThick = 4 # Thick line $xlThin = 2 # Thin line $sortCol = 5 # what column to place sort code in #--[ Create Spreadsheet ]------------------------------- $Excel = New-Object -comobject Excel.Application $Excel.Visible = $True $Excel = $Excel.Workbooks.Add(1) $WorkSheet = $Excel.Worksheets.Item(1) $WorkSheet.Cells.Item(1,1) = "Target IP" $WorkSheet.Cells.Item(1,2) = "Hostname" $WorkSheet.Cells.Item(1,3) = "Model #" $WorkSheet.Cells.Item(1,4) = "Serial #" $WorkSheet.Cells.Item(1,5) = "IOS Ver" $WorkSheet.Cells.Item(1,6) = "Location" $Workbook = $WorkSheet.UsedRange $WorkBook.Interior.ColorIndex = 8 $WorkBook.Font.ColorIndex = 11 $WorkBook.Font.Bold = $True $WorkBook.EntireColumn.AutoFit() #--[ Formatting ]---------------------------- $Col = 1 while ($Col -le 6){ $Edge = 7 while ($Edge -le 10){ $WorkSheet.Cells.Item(1,$Col).Borders.Item($Edge).LineStyle = 1 #$WorkSheet.Cells.Item(1,$Col).Borders.Item($Edge).Weight = 4 #--[ uncomment to make borders bold ]--------- $Edge++ } $Col++ } #$arrDevices = @("192.168.10.2","192.168.10.252") $arrDevices = Get-Content ($ScriptPath + "\\devicelist.txt") $intRow = 1 $count = 0 # NOTE: Cisco MIB for chassis serial # = mib-2.47.1.1.1.1.11.1001 # NOTE: Cisco MIB for chassis model # = mib-2.47.1.1.1.1.13.1001 # NOTE: Cisco MIB for IOS Ver = mib-2.47.1.1.1.1.13.1001 # NOTE: Cisco MIB for hostname = sysName.0 #--[ populate spreadsheet with data ]------------------ foreach ($strTarget in $arrDevices){ #--[ Cycle through targets ]-------- $intRow = $intRow + 1 $WorkSheet.Cells.Item($intRow,1) = $strTarget #--[ Place Target IP in current row, column A ]---------- Write-Host "Processing..... " $strTarget if (test-connection $strTarget) { if ($count = 5) {$count = 0} $strSerial = iex "cmd.exe /c `"$strExe -v 1 -c $strCommunity $strTarget mib-2.47.1.1.1.1.11.1001`"" $strModel = iex "cmd.exe /c `"$strExe -v 1 -c $strCommunity $strTarget mib-2.47.1.1.1.1.13.1001`"" $strIOS = iex "cmd.exe /c `"$strExe -v 1 -c $strCommunity $strTarget mib-2.47.1.1.1.1.9.1001`"" $strHostName = iex "cmd.exe /c `"$strExe -v 1 -c $strCommunity $strTarget sysName.0`"" #--[ If we get back a model place it in current row, column C ]---------- if ($strModel.Length -gt 1) {$WorkSheet.Cells.Item($intRow,3) = ($strModel.Split('"'))[1]} #--[ If we get back a serial # place it in current row, column D ]---------- if ($strSerial.Length -gt 1) {$WorkSheet.Cells.Item($intRow,4) = ($strSerial.Split('"'))[1]} #--[ If we get back an IOS version place it in current row, column E ]---------- if ($strIOS.Length -gt 1) {$WorkSheet.Cells.Item($intRow,5) = ($strIOS.Split('"'))[1]} #--[ If we get back a hostname place it in current row, column B ]---------- if ($strHostname.Length -gt 1) { $strHostName = ($strHostName.Split(' '))[3] $WorkSheet.Cells.Item($intRow,2) = $strHostName switch($strHostName.substring(1,2)) { "00" { $errorcode = 'Rack 00' } "01" { $errorcode = 'Rack 01' } "02" { $errorcode = 'Rack 02' } "03" { $errorcode = 'Rack 03' } "04" { $errorcode = 'Rack 04' } "05" { $errorcode = 'Rack 05' } "06" { $errorcode = 'Rack 06' } "07" { $errorcode = 'Rack 07' } "08" { $errorcode = 'Rack 08' } "09" { $errorcode = 'Rack 09' } "10" { $errorcode = 'Rack 10' } "11" { $errorcode = 'Rack 11' } "12" { $errorcode = 'Rack 12' } "13" { $errorcode = 'Rack 13' } "14" { $errorcode = 'Rack 14' } default { $errorcode = 'Unknown' } } $WorkSheet.Cells.Item($intRow,6) = $errorcode #--[ Place location in current row, column F ]---------- } } else { $WorkSheet.Cells.Item($intRow,2) = "Unreachable" #--[ Place model # in current row, column B ]---------- } $count = $count + 1 if ($count =5) {$WorkBook.EntireColumn.AutoFit()} } $WorkBook.EntireColumn.AutoFit() #--[ Adjust column width across used columns ]--------- $WorkSheet.Cells.Item($intRow + 2, 1) = "DONE" $strFilename = "c:\\CiscoInventory-{0:dd-MM-yyyy_HHmm}.xls" -f (Get-Date) #--[ Places a date stamped spreadsheet in the root of C: ]------ $Excel.SaveAs($StrFilename) Write-Host ("Output saved to " + $strFilename) Write-Host "Done..."
combined_dataset/train/non-malicious/Stop service and wait....ps1
Stop service and wait....ps1
<# This script stops the service, then waits for the service to stop before continuing with the reboot/shutdown The scritp can be pushed to a server/Pc using Group Policy or Registry or run manually. The shutdown script Registry key is: HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown\\ #> # type the name of the service in the quotes here $ServiceName = 'Service Name' Stop-Service $ServiceName write-host $ServiceName'...' -NoNewLine $TestService = Get-Service $Service | Select-Object 'Status' While($TestService | where {$_.Status -eq 'Running'}){ Write-Host '.'-NoNewLine Sleep 2 } # If you want to shutdown the computer add the command "Shutdown /t 0" (without quoutes)onto the bottom line. # If you want to Reboot the computer then add the command "Restart-computer" (without quotes) on the line below.
combined_dataset/train/non-malicious/sample_40_38.ps1
sample_40_38.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AMTFirmwareVersion { <# .Synopsis Returns the core Intel Active Management Technology firmware version .Description This Cmdlet returns the Intel Active Management Technology(AMT) core firmware version from clients that have Intel Active Management Technology firmware version 3.2 or higher. .Notes Supported AMT Firmware Versions: This Cmdlet supports AMT firmware version 3.2 or higher. AMT Provisioning: The vPro client AMT firmware must be provisioned prior to accessing AMT functionality. This CMDLet will fail if it is run against a vPro client that has not been provisioned. AMT Client Authentication: To invoke commands against AMT enabled clients credentials to authenticate must be specified. When no credential is provided as a parameter, the script will use the local logged on Kerberos credential. When only the username (Kerberos or Digest) parameter is included the user will be prompted to provide the associated password. Credentials should be stored as a PowerShell variable then passed into the Cmdlet with the credential parameter. $AMTCredential = get-credential AMT Client Encryption: If the Intel vPro client has been configured to use TLS (a web server certificate has been issued to the Intel Management Engine) the Cmdlet must be called with a -TLS switch. When managing an Intel vPro client over TLS (Port 16993) it is important that the computername parameter matchs the primary subject name of the issued TLS certificate. Typically this is the fully qualified domain name (FQDN). If Mutual TLS is desired, the Cmdlet must be called with -TLS switch and with a valid certificate name from the certificate store in the -CertificateName parameter. Status: Status output designates if the Cmdlet was run successfully. For failed attempts additional status may be provided. .Link http:\\vproexpert.com http:\\www.intel.com\vpro http:\\www.intel.com .Example Get-AMTFirmwareVersion -computername:vProClient ComputerName Property Value ------------ -------- ----- vProClient AMT FW Core Version 7.1.3.1053 #> [CmdletBinding()] Param ( [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true, position=0, HelpMessage="Hostname, FQDN, or IP Address")] [String[]] $ComputerName, [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$false, position=1, HelpMessage="Valid Ports are 16992 (non-TLS) or 16993 (TLS)")][ValidateSet("16992", "16993")] [String] $Port, [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$false, HelpMessage="Use TLS (Port 16993)")] [switch] $TLS, [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$false, HelpMessage="Name of certificate. (Use for mutual TLS)")] [string] $CertificateName, [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$false, HelpMessage="Digest of Kerberos User")] [string] $Username, [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$false, HelpMessage="Digest of Kerberos Password")] [string] $Password, [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$false, position=2, HelpMessage="PS Credential")] [System.Management.Automation.PSCredential] $Credential ) PROCESS { if ($Credential.username.Length -gt 0) {} elseif ($Username.length -gt 0) { if ($Password.length -gt 0) { $passwd = ConvertTo-SecureString $Password -AsPlainText –Force $Credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $Username,$passwd } else { $Credential = Get-Credential $Username } } $tlsstring = "" if ($TLS.IsPresent) { $tlsstring = "-TLS" } if ($Port -eq "16993") { $tlsstring = "-TLS" } if($CertificateName.Length -gt 0) { $Connection.Options.SetClientCertificateByCertificateName($CertificateName) } $Results = @() $rand = New-Object System.Random ForEach ($Comp in $ComputerName) { $obj = New-Object PSObject $obj | Add-Member -MemberType noteproperty -Name ComputerName -value $Comp $tempAMTPSDrive = "AMTDrive"+$rand.next() $CannotConnect = $False if ($Credential.username.Length -gt 0){ $expression = "New-PSDrive -Name $tempAMTPSDrive -PSProvider AmtSystem -Root `"\`" -ComputerName `$Comp -Credential `$Credential $tlsstring -ea Stop" } else { $expression = "New-PSDrive -Name $tempAMTPSDrive -PSProvider AmtSystem -Root `"\`" -ComputerName `$Comp $tlsstring -ea Stop" } try{ $null = invoke-expression $expression $buildNum = Get-itemproperty $tempAMTPSDrive":\Config\Etc\CodeVersions\Recovery Build Num" -name Value Get-Item $tempAMTPSDrive":\Config\Etc\CodeVersions\AMT FW Core Version" | ForEach-Object { $obj | Add-Member -MemberType noteproperty -Name Property -value $_.Name $entireNum = [String]$_.Value + "." + $buildnum $obj | Add-Member -MemberType noteproperty -Name Value -value $entireNum $Results += $obj } Remove-PSDrive $tempAMTPSDrive } catch{ if($_.ToString().Contains("Unauthorized")) { $obj | Add-Member -MemberType noteproperty -Name Property -value "Error" $obj | Add-Member -MemberType noteproperty -Name Value -value "Unauthorized" } else { $obj | Add-Member -MemberType noteproperty -Name Property -value "Error" $obj | Add-Member -MemberType noteproperty -Name Value -value "Cannot connect" $obj | Add-Member -MemberType noteproperty -Name Reason -value $_.Exception.Message } $Results += $obj } } write-output $Results } } # SIG # Begin signature block # MIIo1wYJKoZIhvcNAQcCoIIoyDCCKMQCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCkoRTEy2nptDju # 00ekdqpVY/hfpLHHcQMWyU9fdjkpC6CCEe8wggWIMIIEcKADAgECAhAK3oEU12eb # Bm8tst/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OWCzKw20Y2az1fpiLoU754v69knRTG # r0QqXW9qoGHazK4Hsbrxkp/PzSao/Ol8Oez0SifVR9Mw4lHaxbI2mNMn7w== # SIG # End signature block
combined_dataset/train/non-malicious/sample_14_3.ps1
sample_14_3.ps1
# # Module manifest for module 'OCI.PSModules.Logging' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Logging.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'f66b580b-7ca1-43ed-a8f5-fc5d59c67c85' # 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 Logging 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 = '79.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Logging.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-OCILoggingLog', 'Get-OCILoggingLogGroup', 'Get-OCILoggingLogGroupsList', 'Get-OCILoggingLogSavedSearch', 'Get-OCILoggingLogSavedSearchesList', 'Get-OCILoggingLogsList', 'Get-OCILoggingServicesList', 'Get-OCILoggingUnifiedAgentConfiguration', 'Get-OCILoggingUnifiedAgentConfigurationsList', 'Get-OCILoggingWorkRequest', 'Get-OCILoggingWorkRequestErrorsList', 'Get-OCILoggingWorkRequestLogsList', 'Get-OCILoggingWorkRequestsList', 'Move-OCILoggingLogGroupCompartment', 'Move-OCILoggingLogLogGroup', 'Move-OCILoggingLogSavedSearchCompartment', 'Move-OCILoggingUnifiedAgentConfigurationCompartment', 'New-OCILoggingLog', 'New-OCILoggingLogGroup', 'New-OCILoggingLogSavedSearch', 'New-OCILoggingUnifiedAgentConfiguration', 'Remove-OCILoggingLog', 'Remove-OCILoggingLogGroup', 'Remove-OCILoggingLogSavedSearch', 'Remove-OCILoggingUnifiedAgentConfiguration', 'Remove-OCILoggingWorkRequest', 'Update-OCILoggingLog', 'Update-OCILoggingLogGroup', 'Update-OCILoggingLogSavedSearch', 'Update-OCILoggingUnifiedAgentConfiguration' # 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','Logging' # 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_59_41.ps1
sample_59_41.ps1
# # Module manifest for module 'OCI.PSModules.Generativeai' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeai.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '88627585-5bbc-41e3-a1a5-15e5194ce97a' # 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 Generativeai 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.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Generativeai.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-OCIGenerativeaiDedicatedAiCluster', 'Get-OCIGenerativeaiDedicatedAiClustersList', 'Get-OCIGenerativeaiEndpoint', 'Get-OCIGenerativeaiEndpointsList', 'Get-OCIGenerativeaiModel', 'Get-OCIGenerativeaiModelsList', 'Get-OCIGenerativeaiWorkRequest', 'Get-OCIGenerativeaiWorkRequestErrorsList', 'Get-OCIGenerativeaiWorkRequestLogsList', 'Get-OCIGenerativeaiWorkRequestsList', 'Move-OCIGenerativeaiDedicatedAiClusterCompartment', 'Move-OCIGenerativeaiEndpointCompartment', 'Move-OCIGenerativeaiModelCompartment', 'New-OCIGenerativeaiDedicatedAiCluster', 'New-OCIGenerativeaiEndpoint', 'New-OCIGenerativeaiModel', 'Remove-OCIGenerativeaiDedicatedAiCluster', 'Remove-OCIGenerativeaiEndpoint', 'Remove-OCIGenerativeaiModel', 'Update-OCIGenerativeaiDedicatedAiCluster', 'Update-OCIGenerativeaiEndpoint', 'Update-OCIGenerativeaiModel' # 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','Generativeai' # 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_42_84.ps1
sample_42_84.ps1
# # Module manifest for module 'OCI.PSModules.Certificates' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificates.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = '2be0ad0a-0889-41e0-b5ab-448d9fc6f7c4' # 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 Certificates 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.Certificates.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-OCICertificatesCaBundle', 'Get-OCICertificatesCertificateAuthorityBundle', 'Get-OCICertificatesCertificateAuthorityBundleVersionsList', 'Get-OCICertificatesCertificateBundle', 'Get-OCICertificatesCertificateBundleVersionsList' # 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','Certificates' # 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/Get-Parameter.ps1
Get-Parameter.ps1
param($Cmdlet) $CmdletInfo = Get-Command -CommandType Cmdlet -Name $Cmdlet if ( $? ) { if ($CmdletInfo.GetType().Name -eq "CmdletInfo" ) { $parsed = $CmdletInfo.Definition ` -replace "\\] \\[", "]`n[" ` -replace "> \\[", ">`n[" ` -replace "$Cmdlet " ` -split "`n" ` -replace "\\[-" ` -replace "\\]$" $parsed = $parsed | Sort-Object -Unique switch -regex ($parsed) { "^\\[" { Write-host -ForegroundColor Green $_ } "Confirm|Debug|Verbose|WhatIf" { Write-Host -ForegroundColor Blue $_ } Default { Write-Host $_ } } } }
combined_dataset/train/non-malicious/image2excel_1.ps1
image2excel_1.ps1
<# .Description image2excel converts image to excel file #> param ( [parameter(Mandatory=$true, ValueFromPipeline=$true, HelpMessage="Image file path" )] [ValidateScript({Test-Path $_})] [String] $filename ) [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null function color2excel($color) { $color.R * 256*256 + $color.G * 256 + $color.B } $image = New-Object System.Drawing.Bitmap $filename $o = New-Object -ComObject Excel.Application $wb = $o.Workbooks.Add() $sh = $wb.ActiveSheet $sh.Cells.ColumnWidth =0.25; $sh.Cells.RowHeight = 2.5; $o.Visible = $true $total = $image.Width * $image.Height foreach($x in 0..($image.Width-1)) { foreach($y in 0..($image.Height-1)) { Write-Progress "Exporting..." "$x,$y" -PercentComplete ((($x * $image.Height + $y) / $total ) * 100) $sh.Cells.Item($y+1, $x+1).Interior.Color = color2excel($image.GetPixel($x, $y)) } }
combined_dataset/train/non-malicious/2054.ps1
2054.ps1
Import-Module HelpersCommon Describe "Test-ModuleManifest tests" -tags "CI" { BeforeEach { $testModulePath = "testdrive:/module/test.psd1" New-Item -ItemType Directory -Path testdrive:/module > $null } AfterEach { Remove-Item -Recurse -Force -ErrorAction SilentlyContinue testdrive:/module } It "module manifest containing paths with backslashes or forwardslashes are resolved correctly" { New-Item -ItemType Directory -Path testdrive:/module/foo > $null New-Item -ItemType Directory -Path testdrive:/module/bar > $null New-Item -ItemType File -Path testdrive:/module/foo/bar.psm1 > $null New-Item -ItemType File -Path testdrive:/module/bar/foo.psm1 > $null $testModulePath = "testdrive:/module/test.psd1" $fileList = "foo\bar.psm1","bar/foo.psm1" New-ModuleManifest -NestedModules $fileList -RootModule foo\bar.psm1 -RequiredAssemblies $fileList -Path $testModulePath -TypesToProcess $fileList -FormatsToProcess $fileList -ScriptsToProcess $fileList -FileList $fileList -ModuleList $fileList Test-Path $testModulePath | Should -BeTrue Test-ModuleManifest -Path $testModulePath -ErrorAction Stop | Should -BeOfType System.Management.Automation.PSModuleInfo } It "module manifest containing missing files returns error: <parameter>" -TestCases ( @{parameter = "RequiredAssemblies"; error = "Modules_InvalidRequiredAssembliesInModuleManifest"}, @{parameter = "NestedModules"; error = "Modules_InvalidNestedModuleinModuleManifest"}, @{parameter = "RequiredModules"; error = "Modules_InvalidRequiredModulesinModuleManifest"}, @{parameter = "FileList"; error = "Modules_InvalidFilePathinModuleManifest"}, @{parameter = "ModuleList"; error = "Modules_InvalidModuleListinModuleManifest"}, @{parameter = "TypesToProcess"; error = "Modules_InvalidManifest"}, @{parameter = "FormatsToProcess"; error = "Modules_InvalidManifest"}, @{parameter = "RootModule"; error = "Modules_InvalidRootModuleInModuleManifest"}, @{parameter = "ScriptsToProcess"; error = "Modules_InvalidManifest"} ) { param ($parameter, $error) New-Item -ItemType Directory -Path testdrive:/module/foo > $null New-Item -ItemType File -Path testdrive:/module/foo/bar.psm1 > $null $args = @{$parameter = "doesnotexist.psm1"} New-ModuleManifest -Path $testModulePath @args [string]$errorId = "$error,Microsoft.PowerShell.Commands.TestModuleManifestCommand" { Test-ModuleManifest -Path $testModulePath -ErrorAction Stop } | Should -Throw -ErrorId $errorId } It "module manifest containing valid unprocessed rootmodule file type succeeds: <rootModuleValue>" -TestCases ( @{rootModuleValue = "foo.psm1"}, @{rootModuleValue = "foo.dll"}, @{rootModuleValue = "foo.exe"} ) { param($rootModuleValue) New-Item -ItemType File -Path testdrive:/module/$rootModuleValue > $null New-ModuleManifest -Path $testModulePath -RootModule $rootModuleValue $moduleManifest = Test-ModuleManifest -Path $testModulePath -ErrorAction Stop $moduleManifest | Should -BeOfType System.Management.Automation.PSModuleInfo $moduleManifest.RootModule | Should -Be $rootModuleValue } It "module manifest containing valid rootmodule without specifying .psm1 extension succeeds" { $rootModuleFileName = "bar.psm1"; New-Item -ItemType File -Path testdrive:/module/$rootModuleFileName > $null New-ModuleManifest -Path $testModulePath -RootModule "bar" $moduleManifest = Test-ModuleManifest -Path $testModulePath -ErrorAction Stop $moduleManifest | Should -BeOfType System.Management.Automation.PSModuleInfo $moduleManifest.RootModule | Should -Be "bar" } It "module manifest containing valid processed empty rootmodule file type fails: <rootModuleValue>" -TestCases ( @{rootModuleValue = "foo.cdxml"; error = "System.Xml.XmlException"} ) { param($rootModuleValue, $error) New-Item -ItemType File -Path testdrive:/module/$rootModuleValue > $null New-ModuleManifest -Path $testModulePath -RootModule $rootModuleValue { Test-ModuleManifest -Path $testModulePath -ErrorAction Stop } | Should -Throw -ErrorId "$error,Microsoft.PowerShell.Commands.TestModuleManifestCommand" } It "module manifest containing empty rootmodule succeeds: <rootModuleValue>" -TestCases ( @{rootModuleValue = $null}, @{rootModuleValue = ""} ) { param($rootModuleValue) New-ModuleManifest -Path $testModulePath -RootModule $rootModuleValue $moduleManifest = Test-ModuleManifest -Path $testModulePath -ErrorAction Stop $moduleManifest | Should -BeOfType System.Management.Automation.PSModuleInfo $moduleManifest.RootModule | Should -BeNullOrEmpty } It "module manifest containing invalid rootmodule returns error: <rootModuleValue>" -TestCases ( @{rootModuleValue = "foo.psd1"; error = "Modules_InvalidManifest"} ) { param($rootModuleValue, $error) New-Item -ItemType File -Path testdrive:/module/$rootModuleValue > $null New-ModuleManifest -Path $testModulePath -RootModule $rootModuleValue { Test-ModuleManifest -Path $testModulePath -ErrorAction Stop } | Should -Throw -ErrorId "$error,Microsoft.PowerShell.Commands.TestModuleManifestCommand" } It "module manifest containing non-existing rootmodule returns error: <rootModuleValue>" -TestCases ( @{rootModuleValue = "doesnotexist.psm1"; error = "Modules_InvalidRootModuleInModuleManifest"} ) { param($rootModuleValue, $error) New-ModuleManifest -Path $testModulePath -RootModule $rootModuleValue { Test-ModuleManifest -Path $testModulePath -ErrorAction Stop } | Should -Throw -ErrorId "$error,Microsoft.PowerShell.Commands.TestModuleManifestCommand" } It "module manifest containing nested module gets returned: <variation>" -TestCases ( @{variation = "no analysis as all exported with no wildcard"; exportValue = "@()"}, @{variation = "analysis as exported with wildcard"; exportValue = "*"} ) { param($exportValue) New-Item -ItemType File -Path testdrive:/module/Foo.psm1 > $null New-ModuleManifest -Path $testModulePath -NestedModules "Foo.psm1" -FunctionsToExport $exportValue -CmdletsToExport $exportValue -VariablesToExport $exportValue -AliasesToExport $exportValue $module = Test-ModuleManifest -Path $testModulePath $module.NestedModules | Should -HaveCount 1 $module.NestedModules.Name | Should -BeExactly "Foo" } } Describe "Tests for circular references in required modules" -tags "CI" { function CreateTestModules([string]$RootPath, [string[]]$ModuleNames, [bool]$AddVersion, [bool]$AddGuid, [bool]$AddCircularReference) { $RequiredModulesSpecs = @(); foreach($moduleDir in New-Item $ModuleNames -ItemType Directory -Force) { if ($lastItem) { if ($AddVersion -or $AddGuid) {$RequiredModulesSpecs += $lastItem} else {$RequiredModulesSpecs += $lastItem.ModuleName} } $ModuleVersion = '3.0' $GUID = New-Guid New-ModuleManifest ((join-path $moduleDir.Name $moduleDir.Name) + ".psd1") -RequiredModules $RequiredModulesSpecs -ModuleVersion $ModuleVersion -Guid $GUID $lastItem = @{ ModuleName = $moduleDir.Name} if ($AddVersion) {$lastItem += @{ ModuleVersion = $ModuleVersion}} if ($AddGuid) {$lastItem += @{ GUID = $GUID}} } if ($AddCircularReference) { if ($AddVersion -or $AddGuid) { $firstModuleName = $RequiredModulesSpecs[0].ModuleName $firstModuleVersion = $RequiredModulesSpecs[0].ModuleVersion $firstModuleGuid = $RequiredModulesSpecs[0].GUID $RequiredModulesSpecs = $lastItem } else { $firstModuleName = $RequiredModulesSpecs[0] $firstModuleVersion = '3.0' $firstModuleGuid = New-Guid $RequiredModulesSpecs = $lastItem.ModuleName } New-ModuleManifest ((join-path $firstModuleName $firstModuleName) + ".psd1") -RequiredModules $RequiredModulesSpecs -ModuleVersion $firstModuleVersion -Guid $firstModuleGuid } } function TestImportModule([bool]$AddVersion, [bool]$AddGuid, [bool]$AddCircularReference) { $moduleRootPath = Join-Path $TestDrive 'TestModules' New-Item $moduleRootPath -ItemType Directory -Force > $null Push-Location $moduleRootPath $moduleCount = 6 $ModuleNames = 1..$moduleCount | ForEach-Object {"TestModule$_"} CreateTestModules $moduleRootPath $ModuleNames $AddVersion $AddGuid $AddCircularReference $newpath = [system.io.path]::PathSeparator + "$moduleRootPath" $OriginalPSModulePathLength = $env:PSModulePath.Length $env:PSModulePath += $newpath $lastModule = $ModuleNames[$moduleCount - 1] try { Import-Module $lastModule -ErrorAction Stop Get-Module $lastModule | Should -Not -BeNullOrEmpty } finally { Remove-Module $ModuleNames -Force -ErrorAction SilentlyContinue $env:PSModulePath = $env:PSModulePath.Substring(0,$OriginalPSModulePathLength) Pop-Location Remove-Item $moduleRootPath -Recurse -Force -ErrorAction SilentlyContinue } } It "No circular references and RequiredModules field has only module names" { TestImportModule $false $false $false } It "No circular references and RequiredModules field has module names and versions" { TestImportModule $true $false $false } It "No circular references and RequiredModules field has module names, versions and GUIDs" { TestImportModule $true $true $false } It "Add a circular reference to RequiredModules and verify error" { { TestImportModule $false $false $true } | Should -Throw -ErrorId "Modules_InvalidManifest,Microsoft.PowerShell.Commands.ImportModuleCommand" } } Describe "Test-ModuleManifest Performance bug followup" -tags "CI" { BeforeAll { $TestModulesPath = [System.IO.Path]::Combine($PSScriptRoot, 'assets', 'testmodulerunspace') $PSHomeModulesPath = "$pshome\Modules" if (Test-CanWriteToPsHome) { Copy-Item $TestModulesPath\* $PSHomeModulesPath -Recurse -Force -ErrorAction Stop } } It "Test-ModuleManifest should not load unnessary modules" -Skip:(!(Test-CanWriteToPsHome)) { $job = start-job -name "job1" -ScriptBlock {test-modulemanifest "$using:PSHomeModulesPath\ModuleWithDependencies2\2.0\ModuleWithDependencies2.psd1" -verbose} | Wait-Job $verbose = $job.ChildJobs[0].Verbose.ReadAll() $verbose.Count | Should -BeLessThan 15 } AfterAll { if (Test-CanWriteToPsHome) { Remove-Item $PSHomeModulesPath\ModuleWithDependencies2 -Recurse -Force -ErrorAction SilentlyContinue Remove-Item $PSHomeModulesPath\NestedRequiredModule1 -Recurse -Force -ErrorAction SilentlyContinue } } }
combined_dataset/train/non-malicious/2570.ps1
2570.ps1
param( $SqlServerOne = 'YourDatabaseServer', $FirstDatabase = 'FirstDatabaseToCompare', $SqlServerTwo = 'YourDatabaseServer', $SecondDatabase = 'SecondDatabaseToCompare', [String[]] $DatabaseList, $FilePrefix = 'Log', [switch]$Log, [switch]$Column ) $File = $FilePrefix + '{0}-{1}.csv' $ScriptName = [system.io.path]::GetFilenameWithoutExtension($MyInvocation.InvocationName) $TableDifferences = @() $SprocDifferences = @() $ColumnDifferences = @() $TableQuery = " SELECT name AS TableName FROM sys.objects WHERE type = 'U' AND is_ms_shipped = '0' ORDER BY 1" $SprocQuery = " SELECT SPECIFIC_NAME AS SprocName , (SELECT CONVERT(NVARCHAR(42),HashBytes('SHA1', ROUTINE_DEFINITION),2)) AS SprocHASH FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'PROCEDURE' AND ROUTINE_NAME NOT LIKE 'dt_%' AND ROUTINE_NAME NOT LIKE '%diagram%' AND ROUTINE_NAME NOT LIKE 'sp_MS%' " function write-log([string]$info) { if($loginitialized -eq $false) { $FileHeader > $logfile $script:loginitialized = $True } $info >> $logfile } function Run-Query() { param ( $SqlQuery, $SqlServer, $SqlCatalog, $SqlUser, $SqlPass ) $SqlConnection = New-Object System.Data.SqlClient.SqlConnection("Data Source=$SqlServer;Integrated Security=SSPI;Initial Catalog=$SqlCatalog;"); $SqlCmd = New-Object System.Data.SqlClient.SqlCommand $SqlCmd.CommandText = $SqlQuery $SqlCmd.Connection = $SqlConnection $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter $SqlAdapter.SelectCommand = $SqlCmd $DataSet = New-Object System.Data.DataSet $a = $SqlAdapter.Fill($DataSet) $SqlConnection.Close() $DataSet.Tables | Select-Object -ExpandProperty Rows } $script:logfile = "E:\Dexma\Logs\DMartAudit-$SqlServerOne_$FirstDatabase-$(get-date -format MMddyy).log" $script:Seperator = @" $("-" * 25) "@ $script:loginitialized = $false $script:FileHeader = @" Server, SourceDatabase, ComparedDatabase, DifferentDatabase, Table, Column, Type, Length "@ Write-Log foreach ($SecondDatabase in $DatabaseList) { $TablesDBOne = Run-Query -SqlQuery $TableQuery -SqlServer $SqlServerOne -SqlCatalog $FirstDatabase -SqlUser $SqlUsernameOne -SqlPass $SqlPasswordOne | Select-Object -Property TableName $TablesDBTwo = Run-Query -SqlQuery $TableQuery -SqlServer $SqlServerTwo -SqlCatalog $SecondDatabase -SqlUser $SqlUsernameTwo -SqlPass $SqlPasswordTwo | Select-Object -Property TableName $SprocsDBOne = Run-Query -SqlQuery $SprocQuery -SqlServer $SqlServerOne -SqlCatalog $FirstDatabase -SqlUser $SqlUsernameOne -SqlPass $SqlPasswordOne | Select-Object -Property SprocName, SprocHASH $SprocsDBTwo = Run-Query -SqlQuery $SprocQuery -SqlServer $SqlServerTwo -SqlCatalog $SecondDatabase -SqlUser $SqlUsernameOne -SqlPass $SqlPasswordOne | Select-Object -Property SprocName, SprocHASH $Server = @{Name='Server';Expression={if ($_.SideIndicator -eq '<='){'{0}' -f $SqlServerOne} else {'{0}' -f $SqlServerTwo}}} $Database = @{Name='Database';Expression={if ($_.SideIndicator -eq '<='){'{0}' -f $FirstDatabase} else {'{0}' -f $SecondDatabase}}} $TableDifference = Compare-Object $TablesDBOne $TablesDBTwo -SyncWindow (($TablesDBOne.count + $TablesDBTwo.count)/2) -Property TableName | select TableName, $Server, $Database $SprocDifference = Compare-Object $SprocsDBOne $SprocsDBTwo -SyncWindow (($SprocsDBOne.count + $SprocsDBTwo.count)/2) -Property SprocName, SprocHASH | select SprocName, SprocHASH, $Server, $Database if ($log) { if ($TableDifference) { foreach ( $Row in $TableDifference ) { write-log "$($Row.Server), $FirstDatabase, $SecondDatabase, $($Row.Database), $($Row.TableName)" $TableDiff = New-Object -TypeName PSObject Add-Member -InputObject $TableDiff -type NoteProperty -Name "SQLServerExists" -value $SqlServerOne Add-Member -InputObject $TableDiff -type NoteProperty -Name "SQLServerMissing" -value $SqlServerTwo Add-Member -InputObject $TableDiff -type NoteProperty -Name "Database" -value $($Row.Database) Add-Member -InputObject $TableDiff -type NoteProperty -Name "Schema" -Value $($Row.Schema) Add-Member -InputObject $TableDiff -type NoteProperty -Name "TableName" -value $($Row.TableName) $TableDifferences += $TableDiff } } if ($SprocDifference) { foreach ( $Diff in $SprocDifference | Sort-Object SprocName, SprocHash, Server ) { write-log "$($Diff.Server), $($Diff.Database), $($Diff.SprocName), $($Diff.SprocHASH)" $SprocDiff = New-Object -TypeName Object Add-Member -inputobject $SprocDiff -type NoteProperty -name "DifferingServer" -value $($Diff.Server) Add-Member -inputobject $SprocDiff -type NoteProperty -name "DifferingDatabase" -value $($Diff.Database) Add-Member -inputobject $SprocDiff -type NoteProperty -name "DifferingSprocName" -value $($Diff.SprocName) Add-Member -inputobject $SprocDiff -type NoteProperty -name "DifferingSprocHASH" -value $($Diff.SprocHASH) $SprocDifferences += $SprocDiff } } } $SprocDiff | Sort-Object -Property SprocName, SprocHASH | Format-Table -AutoSize | Out-Host if ($Column) { $SameTables = Compare-Object $TablesDBOne $TablesDBTwo -SyncWindow (($TablesDBOne.count + $TablesDBTwo.count)/2) -Property TableName -IncludeEqual -ExcludeDifferent $ColumnQuery = @" select sysobjects.name as TableName , syscolumns.name as ColumnName , systypes.name as Type , systypes.Length , systypes.XUserType from sysobjects, syscolumns, systypes where sysobjects.xtype like 'U' and --specify only user tables sysobjects.name not like 'dtproperties' and --specify only user tables syscolumns.xusertype= systypes.xusertype --get data type info and sysobjects.id=syscolumns.id and sysobjects.name = '{0}' order by sysobjects.name, syscolumns.name, syscolumns.type "@ foreach ($Table in $SameTables) { $ColumnsDBOne = Run-Query -SqlQuery ($ColumnQuery -f $table.tablename) -SqlServer $SqlServerOne -SqlCatalog $FirstDatabase -SqlUser $SqlUsernameOne -SqlPass $SqlPasswordOne | Select-Object -Property TableName, ColumnName, Type, Length, XUserType $ColumnsDBTwo = Run-Query -SqlQuery ($ColumnQuery -f $table.tablename) -SqlServer $SqlServerTwo -SqlCatalog $SecondDatabase -SqlUser $SqlUsernameTwo -SqlPass $SqlPasswordTwo | Select-Object -Property TableName, ColumnName, Type, Length, XUserType $ColumnDifference = Compare-Object $ColumnsDBOne $ColumnsDBTwo -SyncWindow (($ColumnsDBOne.count + $ColumnsDBTwo.count)/2) -Property TableName, ColumnName, Type, Length, XUserType, Name | Select-Object TableName, ColumnName, Type, Length, XUserType, $Server, $Database if ($log -and $ColumnDifference ) { foreach ( $Row in $ColumnDifference ) { write-log "$($Row.Server), $FirstDatabase, $SecondDatabase, $($Row.Database), $($Row.TableName), $($Row.ColumnName), $($Row.Type), $($Row.length)" $ColumnDiff = New-Object -TypeName PSObject Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "Server" -Value $SqlServerTwo Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "Database" -Value $($Row.Database) Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "TableName" -Value $($Row.TableName) Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "Schema" -Value $($Row.Schema) Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "ColumnName" -Value $($Row.ColumnName) Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "Type" -Value $($Row.Type) Add-Member -InputObject $ColumnDiff -type NoteProperty -Name "Length" -Value $($Row.length) $ColumnDifferences += $ColumnDiff } } } } } $DBSprocs | Sort-Object -Property DifferingSprocName, DifferingSprocHASH, DifferingServer, DifferingDatabase | Format-Table -AutoSize | Out-Host Write-Log($DBSprocs | Sort-Object -Property DifferingSprocName, DifferingSprocHASH, DifferingServer, DifferingDatabase | Format-Table -AutoSize) $TableDifferences | Sort-Object -Property SQLServerTwo, TableName, Database | Export-Csv -Path e:\dexma\logs\TableDiff.$ScriptName.csv -notypeinformation $SprocDifferences | Sort-Object -Property SQLServerMissing, SprocHASH, SprocName | Export-Csv -Path e:\dexma\logs\SprocDiff.$ScriptName.csv -notypeinformation $ColumnDifferences | Sort-Object -Property Server, ColumnName, TableName | Export-Csv -Path e:\dexma\logs\ColDiff.$ScriptName.csv -notypeinformation
combined_dataset/train/non-malicious/796.ps1
796.ps1
function My-Function ($myInput) { My-Function $myInput } $things = 4 $things My-Function $things Write-Output "Hi"; Write-Output "" . .\VariableDefinition.ps1 Write-Output $variableInOtherFile ${variable-with-weird-name} = "this variable has special characters" Write-Output ${variable-with-weird-name}
combined_dataset/train/non-malicious/Get-DLRestriction_1.ps1
Get-DLRestriction_1.ps1
########################################### # Get-DLRestriction # # Uses QAD cmdlets to retrieve distribution list restriction attributes # and then provides a list of users which can send email messages to the group. # # Usage: Get-DLRestriction "Worldwide Everyone" # # Dmitry Sotnikov, http://dmitrysotnikov.wordpress.com ############################################ function Get-DLRestriction { param([System.String] $DLName ) "Checking restrictions for $DLName" $DL = Get-QADGroup $DLName ` -IncludedProperties AuthOrig, UnauthOrig, dLMemRejectPerms,` dLMemSubmitPerms, msExchRequireAuthToSendTo # we'll set this to true if we see a restriction $restricted = $false # if the group with such a name is found if ( $DL -ne $null ) { if ( $DL.AuthOrig -ne $null ) { $restricted = $true "`nThe following users can send messages to this list:" $DL.AuthOrig | Get-QADUser } if ( $DL.UnauthOrig -ne $null ) { $restricted = $true "`nAnyone BUT the following users can send messages to this list:" $DL.UnauthOrig | Get-QADUser } if ( $DL.dLMemSubmitPerms -ne $null ) { $restricted = $true "`nMembers of this group can send messages to this list: $($DL.dLMemSubmitPerms | Get-QADGroup)) :" Get-QADGroupMember $DL.dLMemSubmitPerms } if ( $DL.dLMemRejectPerms -ne $null ) { $restricted = $true "`nAnyone BUT members of this group can send messages to this list: $($DL.dLMemRejectPerms | Get-QADGroup)) :" Get-QADGroupMember $DL.dLMemRejectPerms } if ( $DL.msExchRequireAuthToSendTo ) { $restricted = $true "`nOnly authenticated users can send messages to this list.`nExternal senders get blocked." } if ( -not $restricted ) { "`nThis list is not restricted. Anyone can email it." } } else { "`nDL $DLName not found." } }
combined_dataset/train/non-malicious/sample_29_15.ps1
sample_29_15.ps1
if ( (Test-Path .web\bufferSource.ts) -and (Test-Path .web\fetchSource.ts) -and (Test-Path .web\extension.ts) -and (Test-Path .web\package-lock.json) -and (Test-Path .web\package.json) -and (Test-Path .web\.vscode\extensions.json) -and (Test-Path .web\.vscode\launch.json) -and (Test-Path .web\.vscode\settings.json) -and (Test-Path .web\.vscode\tasks.json) -and (Test-Path .web\web\test\suite\extension.test.ts) -and (Test-Path .web\web\test\suite\index.ts) -and (Test-Path .web\tsconfig.json) -and (Test-Path .web\gitTransactions.ts) -and (Test-Path .web\tabLabels.ts) -and (Test-Path .web\workspaceClass.ts) ) { New-Item -ItemType Directory -Path ".local" -ErrorAction SilentlyContinue Move-Item src\Buffer\bufferSource.ts .local\bufferSource.ts Move-Item src\Fetch\fetchSource.ts .local\fetchSource.ts Move-Item src\extension.ts .local\extension.ts Move-Item package-lock.json .local\package-lock.json Move-Item package.json .local\package.json Move-Item .vscode .local\.vscode Move-Item tsconfig.json .local\tsconfig.json Move-Item src\export .local\export Move-Item src\import .local\import Move-Item src\workspace\importExport .local\importExport Move-Item src\gitTransactions.ts .local\gitTransactions.ts Move-Item src\workspace\workspaceClass.ts .local\workspaceClass.ts Move-Item src\ttsDebugger .local\ttsDebugger Move-Item src\tabLabels\tabLabels.ts .local\tabLabels.ts Move-Item .web\bufferSource.ts src\Buffer\bufferSource.ts Move-Item .web\fetchSource.ts src\Fetch\fetchSource.ts Move-Item .web\extension.ts src\extension.ts Move-Item .web\package-lock.json package-lock.json Move-Item .web\package.json package.json Move-Item .web\.vscode .vscode Move-Item .web\web src\web Move-Item .web\tsconfig.json tsconfig.json Move-Item .web\gitTransactions.ts src\gitTransactions.ts Move-Item .web\workspaceClass.ts src\workspace\workspaceClass.ts Move-Item .web\tabLabels.ts src\tabLabels\tabLabels.ts npm clean-install } elseif ( (Test-Path .local\bufferSource.ts) -and (Test-Path .local\fetchSource.ts) -and (Test-Path .local\extension.ts) -and (Test-Path .local\package-lock.json) -and (Test-Path .local\package.json) -and (Test-Path .local\.vscode\extensions.json) -and (Test-Path .local\.vscode\launch.json) -and (Test-Path .local\.vscode\settings.json) -and (Test-Path .local\.vscode\tasks.json) -and (Test-Path .local\tsconfig.json) -and (Test-Path .local\export\exportDocuments.ts) -and (Test-Path .local\export\exportFormView.ts) -and (Test-Path .local\import\importDropProvider.ts) -and (Test-Path .local\import\importFiles.ts) -and (Test-Path .local\import\importFileSystemView.ts) -and (Test-Path .local\import\importFormView.ts) -and (Test-Path .local\importExport\types.ts) -and (Test-Path .local\importExport\exportWorkspace.ts) -and (Test-Path .local\importExport\importWorkspace.ts) -and (Test-Path .local\gitTransactions.ts) -and (Test-Path .local\ttsDebugger\debugger\activateTTSDebug.ts) -and (Test-Path .local\ttsDebugger\debugger\debugAdapter.ts) -and (Test-Path .local\ttsDebugger\debugger\debugExtention.ts) -and (Test-Path .local\ttsDebugger\debugger\ttsDebug.ts) -and (Test-Path .local\ttsDebugger\debugger\ttsRuntime.ts) -and (Test-Path .local\ttsDebugger\debugSession.ts) -and (Test-Path .local\ttsDebugger\tts\tts.ts) -and (Test-Path .local\ttsDebugger\tts\windows.ts) -and (Test-Path .local\ttsDebugger\tts\windowsCommand.ts) -and (Test-Path .local\tabLabels.ts) -and (Test-Path .local\workspaceClass.ts) ) { New-Item -ItemType Directory -Path ".web" -ErrorAction SilentlyContinue Move-Item src\Buffer\bufferSource.ts .web\bufferSource.ts Move-Item src\Fetch\fetchSource.ts .web\fetchSource.ts Move-Item src\extension.ts .web\extension.ts Move-Item package-lock.json .web\package-lock.json Move-Item package.json .web\package.json Move-Item .vscode .web\.vscode Move-Item src\web .web\web Move-Item tsconfig.json .web\tsconfig.json Move-Item src\gitTransactions.ts .web\gitTransactions.ts Move-Item src\workspace\workspaceClass.ts .web\workspaceClass.ts Move-Item src\tabLabels\tabLabels.ts .web\tabLabels.ts Move-Item .local\ttsDebugger src\ttsDebugger Move-Item .local\bufferSource.ts src\Buffer\bufferSource.ts Move-Item .local\fetchSource.ts src\Fetch\fetchSource.ts Move-Item .local\extension.ts src\extension.ts Move-Item .local\package-lock.json package-lock.json Move-Item .local\package.json package.json Move-Item .local\.vscode .vscode Move-Item .local\tsconfig.json tsconfig.json Move-Item .local\export src\export Move-Item .local\import src\import Move-Item .local\importExport src\workspace\importExport Move-Item .local\gitTransactions.ts src\gitTransactions.ts Move-Item .local\workspaceClass.ts src\workspace\workspaceClass.ts Move-Item .local\tabLabels.ts src\tabLabels\tabLabels.ts npm clean-install } else { Write-Host ".local or .web broken :(" }
combined_dataset/train/non-malicious/Get-QADGroupNesting.ps1
Get-QADGroupNesting.ps1
Param ( [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, HelpMessage="DN or ObjectGUID of the AD Group." )] [string]$groupIdentity, [switch]$showTree ) #Validate Quest PSSnapin is loaded Add-PSSnapin -Name Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue $global:numberOfRecursiveGroupMemberships = 0 $lastGroupAtALevelFlags = @() function Get-GroupNesting ([string] $identity, [int] $level, [hashtable] $groupsVisitedBeforeThisOne, [bool] $lastGroupOfTheLevel) { $group = $null $group = Get-QADGroup -Identity $identity -SizeLimit 0 if($lastGroupAtALevelFlags.Count -le $level) { $lastGroupAtALevelFlags = $lastGroupAtALevelFlags + 0 } if($group -ne $null) { if($showTree) { for($i = 0; $i -lt $level - 1; $i++) { if($lastGroupAtALevelFlags[$i] -ne 0) { Write-Host -ForegroundColor Blue -NoNewline " " } else { Write-Host -ForegroundColor Blue -NoNewline "„  " } } if($level -ne 0) { if($lastGroupOfTheLevel) { Write-Host -ForegroundColor Blue -NoNewline "„¤„ź" } else { Write-Host -ForegroundColor Blue -NoNewline "„Ą„ź" } } Write-Host -ForegroundColor Blue $group.Name } $groupsVisitedBeforeThisOne.Add($group.DN,$null) $global:numberOfRecursiveGroupMemberships ++ $groupMemberShipCount = $group.memberOf.Count if ($groupMemberShipCount -gt 0) { $maxMemberGroupLevel = 0 $count = 0 foreach($groupDN in $group.memberOf) { $count++ $lastGroupOfThisLevel = $false if($count -eq $groupMemberShipCount){$lastGroupOfThisLevel = $true; $lastGroupAtALevelFlags[$level] = 1} if(-not $groupsVisitedBeforeThisOne.Contains($groupDN)) #prevent cyclic dependancies { $memberGroupLevel = Get-GroupNesting -Identity $groupDN -Level $($level+1) -GroupsVisitedBeforeThisOne $groupsVisitedBeforeThisOne -lastGroupOfTheLevel $lastGroupOfThisLevel if ($memberGroupLevel -gt $maxMemberGroupLevel){$maxMemberGroupLevel = $memberGroupLevel} } } $level = $maxMemberGroupLevel } else #we've reached the top level group, return it's height { return $level } return $level } } $global:numberOfRecursiveGroupMemberships = 0 $groupObj = Get-QADGroup -Identity $groupIdentity -SizeLimit 0 if($groupObj) { [int]$maxNestingLevel = Get-GroupNesting -Identity $groupIdentity -Level 0 -GroupsVisitedBeforeThisOne @{} -lastGroupOfTheLevel $false Add-Member -InputObject $groupObj -MemberType NoteProperty -Name MaxNestingLevel -Value $maxNestingLevel -Force Add-Member -InputObject $groupObj -MemberType NoteProperty -Name NestedGroupMembershipCount -Value $($global:numberOfRecursiveGroupMemberships - 1) -Force $groupObj | Select-Object Name,DN,MaxNestingLevel,NestedGroupMembershipCount | Format-List }
combined_dataset/train/non-malicious/1350.ps1
1350.ps1
function Remove-CIisMimeMap { [CmdletBinding(DefaultParameterSetName='ForWebServer')] param( [Parameter(Mandatory=$true,ParameterSetName='ForWebsite')] [string] $SiteName, [Parameter(ParameterSetName='ForWebsite')] [string] $VirtualPath = '', [Parameter(Mandatory=$true)] [string] $FileExtension ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $getIisConfigSectionParams = @{ } if( $PSCmdlet.ParameterSetName -eq 'ForWebsite' ) { $getIisConfigSectionParams['SiteName'] = $SiteName $getIisConfigSectionParams['VirtualPath'] = $VirtualPath } $staticContent = Get-CIisConfigurationSection -SectionPath 'system.webServer/staticContent' @getIisConfigSectionParams $mimeMapCollection = $staticContent.GetCollection() $mimeMapToRemove = $mimeMapCollection | Where-Object { $_['fileExtension'] -eq $FileExtension } if( -not $mimeMapToRemove ) { Write-Verbose ('MIME map for file extension {0} not found.' -f $FileExtension) return } $mimeMapCollection.Remove( $mimeMapToRemove ) $staticContent.CommitChanges() }
combined_dataset/train/non-malicious/sample_57_7.ps1
sample_57_7.ps1
# # Module manifest for module 'OCI.PSModules.Logging' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Logging.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditions CompatiblePSEditions = 'Core' # ID used to uniquely identify this module GUID = 'f66b580b-7ca1-43ed-a8f5-fc5d59c67c85' # 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 Logging 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.Logging.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-OCILoggingLog', 'Get-OCILoggingLogGroup', 'Get-OCILoggingLogGroupsList', 'Get-OCILoggingLogSavedSearch', 'Get-OCILoggingLogSavedSearchesList', 'Get-OCILoggingLogsList', 'Get-OCILoggingServicesList', 'Get-OCILoggingUnifiedAgentConfiguration', 'Get-OCILoggingUnifiedAgentConfigurationsList', 'Get-OCILoggingWorkRequest', 'Get-OCILoggingWorkRequestErrorsList', 'Get-OCILoggingWorkRequestLogsList', 'Get-OCILoggingWorkRequestsList', 'Move-OCILoggingLogGroupCompartment', 'Move-OCILoggingLogLogGroup', 'Move-OCILoggingLogSavedSearchCompartment', 'Move-OCILoggingUnifiedAgentConfigurationCompartment', 'New-OCILoggingLog', 'New-OCILoggingLogGroup', 'New-OCILoggingLogSavedSearch', 'New-OCILoggingUnifiedAgentConfiguration', 'Remove-OCILoggingLog', 'Remove-OCILoggingLogGroup', 'Remove-OCILoggingLogSavedSearch', 'Remove-OCILoggingUnifiedAgentConfiguration', 'Remove-OCILoggingWorkRequest', 'Update-OCILoggingLog', 'Update-OCILoggingLogGroup', 'Update-OCILoggingLogSavedSearch', 'Update-OCILoggingUnifiedAgentConfiguration' # 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','Logging' # 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_35_72.ps1
sample_35_72.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Invoke-VerifyDLLSign { $CurrentDir = Split-Path -Parent $PSCommandPath $DLLPath = Join-Path $CurrentDir Intel.Wsman.Scripting.dll $sign = Get-AuthenticodeSignature $DLLPath if ($sign.Status -ne "Valid") { Write-Error "Intel.Wsman.Scripting.dll is not properly signed" Break } $DLLPath = Join-Path $CurrentDir IntelvProModule.dll $sign = Get-AuthenticodeSignature $DLLPath if ($sign.Status -ne "Valid") { Write-Error "IntelvProModule.dll is not properly signed" Break } #end Function Invoke-DLLSign } Invoke-VerifyDLLSign # SIG # Begin signature block # MIIo1gYJKoZIhvcNAQcCoIIoxzCCKMMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCordmM8qhmGsG5 # 3P/PHylU8RoD+33SNG+oHMcmoVBp1qCCEe8wggWIMIIEcKADAgECAhAK3oEU12eb # Bm8tst/S9nrCMA0GCSqGSIb3DQEBCwUAMHwxCzAJBgNVBAYTAkdCMRswGQYDVQQI # ExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoT # D1NlY3RpZ28gTGltaXRlZDEkMCIGA1UEAxMbU2VjdGlnbyBSU0EgQ29kZSBTaWdu # aW5nIENBMB4XDTIxMDQwNTAwMDAwMFoXDTIzMDQwNTIzNTk1OVowcDELMAkGA1UE # BhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFDASBgNVBAcMC1NhbnRhIENsYXJh # MRowGAYDVQQKDBFJbnRlbCBDb3Jwb3JhdGlvbjEaMBgGA1UEAwwRSW50ZWwgQ29y # cG9yY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