full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/IseSteroids/PoshCode/134032f9-0687-4d0a-b267-6a42e5c116df.ps1
134032f9-0687-4d0a-b267-6a42e5c116df.ps1
#'*********************************************************************** #'* File: Check-Directory.ps1 #'* Creation Date: 2008/05/30 #'* Author: Jacob Hodges (Technology Effect) #'* Purpose: Checks to see if an INF File is already in the MDT Workbench. #'* Usage: .\\Create-DistributionShare.ps1 D:\\Dr...
PowerShellCorpus/IseSteroids/PoshCode/ExceptionHandling.ps1
ExceptionHandling.ps1
## ExceptionHandling.ps1 ############################################################################################################## ## .Net style exception handling ############################################################################################################## ## Usage: ## . .\\ExceptionHandl...
PowerShellCorpus/IseSteroids/PoshCode/Modify Excel.ps1
Modify Excel.ps1
function Release-Ref ($ref) { ([System.Runtime.InteropServices.Marshal]::ReleaseComObject( [System.__ComObject]$ref) -gt 0) [System.GC]::Collect() [System.GC]::WaitForPendingFinalizers() } $objExcel = new-object -comobject excel.application $objExcel.Visible = $True $objWorkbook = $objExcel.Workbook...
PowerShellCorpus/IseSteroids/PoshCode/chkhash_16.ps1
chkhash_16.ps1
# calculate SHA512 of file. function _00010111110000100([System.IO.FileInfo] ${_10111101110001110} = $(throw $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('VQBzAGEAZwBlADoAIABHAGUAdAAtAE0ARAA1ACAAWwBTAHkAcwB0AGUAbQAuAEkATwAuAEYAaQBsAGUASQBuAGYAbwBdAA=='))))) { ${10001001111010111} = $null; ...
PowerShellCorpus/IseSteroids/PoshCode/Import-ADUser.ps1
Import-ADUser.ps1
#############################################################################\n##\n## Import-AdUser\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\nCreate users...
PowerShellCorpus/IseSteroids/PoshCode/Convert-ToCHexString_2.ps1
Convert-ToCHexString_2.ps1
function Convert-ToCHexString { param ([String] $str) $ans = '' [System.Text.Encoding]::ASCII.GetBytes($str) | % { $ans += "0x{0:X2}, " -f $_ } return $ans.Trim(' ',',') }
PowerShellCorpus/IseSteroids/PoshCode/FormsLib.ps1
FormsLib.ps1
# FormsLib.ps1 # contains some helper functions to create and modify Form controls # in a PowerShell script used by RoboGUI.ps1 # # /\\/\\o\\/\\/ # http://thePowerShellGuy.com Function ConvertTo-HashTable ([string]$StringValue) { invoke-expression ("@$StringValue".replace(',',';')) } Function ConvertTo...
PowerShellCorpus/IseSteroids/PoshCode/Start-SQL 1.0.ps1
Start-SQL 1.0.ps1
param( $Server = $(Read-Host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UwBRAEwAIABTAGUAcgB2AGUAcgAgAE4AYQBtAGUA')))), $Database = $(Read-Host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RABlAGYAYQB1AGwAdAAgAEQAYQB0AGEAYgBhAHMAZQ...
PowerShellCorpus/IseSteroids/PoshCode/Connect-VMHost_1.ps1
Connect-VMHost_1.ps1
#requires -version 2 #requires -pssnapin VMware.VimAutomation.Core Function Connect-VMHost { <# .Summary Used to Connect a disconnected host to vCenter. .Parameter VMHost VMHost to reconnect to virtual center .Example Get-VMHost | Where-Object {$_.state -eq "Disconnect...
PowerShellCorpus/IseSteroids/PoshCode/New-SqlConnectionString.ps1
New-SqlConnectionString.ps1
function New-SqlConnectionString { #.Synopsis # Create a new SQL ConnectionString #.Description # Builds a SQL ConnectionString using SQLConnectionStringBuilder with the supplied parameters #.Example # New-SqlConnectionString -Server DBServer12 -Database NorthWind -IntegratedSecurity -MaxPoolSize 4 -Pooling #...
PowerShellCorpus/IseSteroids/PoshCode/UIAutomation _1.9.ps1
UIAutomation _1.9.ps1
if($PSVersionTable.CLRVersion -gt "4.0") { ${/=\/\/\/\__/\_/\/} = "CSharp" Add-Type -AssemblyName "UIAutomationClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Add-Type -AssemblyName "UIAutomationTypes, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31...
PowerShellCorpus/IseSteroids/PoshCode/Create datastore by LUN .ps1
Create datastore by LUN .ps1
function New-DatastoreByLun { param( [string]$vmHost, [string]$hbaId, [int]$targetId, [int]$lunId, [string]$dataStoreName ) $view = Get-VMHost $vmHost | get-view $lun = $view.Config.StorageDevice.ScsiTopology | ForEach-Object { $_.Adapter } | Where-Object {$_.Key -match $hbaId} | ForEach-Object {$_.Target} | Wher...
PowerShellCorpus/IseSteroids/PoshCode/Get-MyPublicIPAddress.ps1
Get-MyPublicIPAddress.ps1
[CmdletBinding()] param () $webClient = New-Object System.Net.WebClient $webClient.DownloadString('http://myip.dnsomatic.com/')
PowerShellCorpus/IseSteroids/PoshCode/Import-Delimited 2.3.ps1
Import-Delimited 2.3.ps1
Function Convert-Delimiter([regex]$from,[string]$to) { begin { ${/=\/\____/\/=\/\/} = [char](222) } process { $_ = $_.Trim() $_ = $_ -replace "(?:`"((?:(?:[^`"]|`"`"))+)(?:`"$from|`"`$))|(?:$from)|(?:((?:.(?!$from))...
PowerShellCorpus/IseSteroids/PoshCode/Get Twitter RSS Feed_3.ps1
Get Twitter RSS Feed_3.ps1
param ([String] $ScreenName) ${__/===\_/===\_/==} = New-Object System.Net.WebClient ${____/\/===\__/\__} = $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('aAB0AHQAcABzADoALwAvAGEAcABpAC4AdAB3AGkAdAB0AGUAcgAuAGMAbwBtAC8AMQAvAHUAcwBlAHIAcwAvAHMAaABvAHcALgBqAH...
PowerShellCorpus/IseSteroids/PoshCode/Add CounterPaths 2 Mongo.ps1
Add CounterPaths 2 Mongo.ps1
$mongoDriverPath = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('QwA6AFwAXABQAHIAbwBnAHIAYQBtACAARgBpAGwAZQBzACAAKAB4ADgANgApAFwAXABNAG8AbgBnAG8ARABCAFwAXABDAFMAaABhAHIAcABEAHIAaQB2AGUAcgAgADEALgA1AA=='))) Add-Type -Path "$($mongoDriverPath)\\MongoDB.Bson.dll"; Add-Type -Path "$($mongoDriverPa...
PowerShellCorpus/IseSteroids/PoshCode/Add-SVNFile.ps1
Add-SVNFile.ps1
funtcion Add-SVNFile { param ( [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$true)] [String[]]$File, [Parameter(Position=1,Mandatory=$true)] [String]$Uri, [Parameter(Position=2,Mandatory=$true)] [String]$Comment = "Nothing" ) saps -Filepat...
PowerShellCorpus/IseSteroids/PoshCode/Remove-DeadITunesTracks.ps1
Remove-DeadITunesTracks.ps1
Clear $ITunes = New-Object -ComObject iTunes.Application 1..$ITunes.LibraryPlaylist.Tracks.Count | % { $CurrentTrack = $ITunes.LibraryPlaylist.Tracks.Item($_) if ( $CurrentTrack.Kind -eq 1 ) { if ( ! ([System.IO.File]::Exists($CurrentTrack.Location)) ) { Write-Host "$($CurrentTrack.Artist) - $($Cur...
PowerShellCorpus/IseSteroids/PoshCode/Write-ASCII-Letters.ps1
Write-ASCII-Letters.ps1
param( [string[]] $InputText, [switch] $NoPrependChar, [string] $TextColor = 'Default' ) Set-StrictMode -Version Latest $ErrorActionPreference = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String(...
PowerShellCorpus/IseSteroids/PoshCode/Set-IPAddress_1.ps1
Set-IPAddress_1.ps1
function Set-IPAddress { param( [string]$networkinterface =$(read-host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RQBuAHQAZQByACAAdABoAGUAIABuAGEAbQBlACAAbwBmACAAdABoAGUAIABOAEkAQwAgACgAaQBlACAATABvAGMAYQBsACAAQQByAGUAYQAgAEMAbwBuAG4AZQBjAHQAaQBvAG4AKQA=')))), [string]$ip = $(read-host $...
PowerShellCorpus/IseSteroids/PoshCode/FTP upload_6.ps1
FTP upload_6.ps1
@charset $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('dQB0AGYALQA4AA=='))); /* Credit:http://www.templatemo.com */ body { margin: 0px; padding: 0px; color: #c2bead; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; line-height: 1.5em; background-color: #2f2e28; backgrou...
PowerShellCorpus/IseSteroids/PoshCode/Build-TFSProjects_2.ps1
Build-TFSProjects_2.ps1
Param( [switch] $CSRWEB, [switch] $CSRWS, [switch] $CSRServices, [string] $LogPath, [String] $Outdir = "C:\\Application\\CSR" ) Begin { ${_/\_/=\/==\_/\_/=}=$([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('YwA6AFwAXABXAEkATgBEAE8AVw...
PowerShellCorpus/IseSteroids/PoshCode/style acording video res_1.ps1
style acording video res_1.ps1
--------------------------------------------------------------------------------------------------------------------------- this code is copied from http://www.ti4fun.com/myouikar/JavaScript/rotina.aspx?r=JJiKNeLQlIA[[ti&l=STN[ti]5tehuTA[[ti ---------------------------------------------------------------------------...
PowerShellCorpus/IseSteroids/PoshCode/Exchange Services.ps1
Exchange Services.ps1
#Requires input from the user $Server = read-host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RQBuAHQAZQByACAARQB4AGMAaABhAG4AZwBlACAAUwBlAHIAdgBlAHIAIABOAGEAbQBlAA=='))) #Finds only the services that contain "Exchange" $Status = (Get-Service -ComputerName $server |Where-object {$_.Displaynam...
PowerShellCorpus/IseSteroids/PoshCode/NTFS ACLs Folder Tree_2.ps1
NTFS ACLs Folder Tree_2.ps1
####################################### # TITLE: listACL.ps1 # # AUTHOR: Santiago Fernandez Muñoz # # # # DESC: This script generate a HTML # # report show all ACLs asociated with # # a Folder tree structure starting in # # root specified by the user ...
PowerShellCorpus/IseSteroids/PoshCode/Get-WindowsExperience_1.ps1
Get-WindowsExperience_1.ps1
function Get-WindowsExperienceRating { [CmdletBinding()] param( [Parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [string[]]$ComputerName='localhost' ) process { Get-WmiObject -ComputerName $ComputerName Win32_WinSAT | ForEach-Object { if($_.WinSatAssessmentState -ne 1) { ...
PowerShellCorpus/IseSteroids/PoshCode/Combine-CSV Function.ps1
Combine-CSV Function.ps1
function Combine-CSV{ param( [Parameter(Position=0,Mandatory=$true,HelpMessage="Please provide the folder which contains your .CSV files.")] $SourceFolder, [Parameter(Position=1,Mandatory=$false,HelpMessage="Please provide any Get-ChildItem filter you would like to apply")] [String]$Filter, [Parameter(Positi...
PowerShellCorpus/IseSteroids/PoshCode/Check PowerShell version.ps1
Check PowerShell version.ps1
#Check if PowerShell version 3 or higher is installed if($host.Version.Major -lt 3) { Write-Host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UABvAHcAZQByAFMAaABlAGwAbAAgAFYAZQByAHMAaQBvAG4AIAAzACAAbwByACAAaABpAGcAaABlAHIAIABuAGUAZQBkAHMAIAB0AG8AIABiAGUAIABpAG4AcwB0AGEAbABsAGUAZAA='))) -Fore...
PowerShellCorpus/IseSteroids/PoshCode/fc6a6ed7-a2a0-4a41-af75-9b06c4fba5de.ps1
fc6a6ed7-a2a0-4a41-af75-9b06c4fba5de.ps1
#======================================================================== # Code Generated By: SAPIEN Technologies, Inc., PowerShell Studio 2012 v3.1.15 # Generated On: 2/6/2013 2:58 AM # Generated By: Manoj Nair # Organization: Self #======================================================================== #-----...
PowerShellCorpus/IseSteroids/PoshCode/Get-Credential 2.6.ps1
Get-Credential 2.6.ps1
## Get-Credential ## An improvement over the default cmdlet which has no options ... ################################################################################################### ## History ## v 2.6 Put back support for passing in the domain when getting credentials without prompting ## v 2.5 Added examples...
PowerShellCorpus/IseSteroids/PoshCode/Get-DiskSizeInfo.ps1
Get-DiskSizeInfo.ps1
Function Get-DiskSizeInfo { <# .DESCRIPTION Check the Disk(s) Size and remaining freespace. .PARAMETER ComputerName Specify the computername(s) .INPUTS System.String .OUTPUTS System.Management.Automation.PSObject .EXAMPLE ...
PowerShellCorpus/IseSteroids/PoshCode/New-PemFile.ps1
New-PemFile.ps1
function New-PemFile { [CmdletBinding()] param ( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [ValidateScript({ foreach (${1} in $_) { if (Test-Path -LiteralPath ${1}) {$true} else { throw "The argument '$_' is not a valid file." ...
PowerShellCorpus/IseSteroids/PoshCode/Get-RemoteRegistry_3.ps1
Get-RemoteRegistry_3.ps1
#.SYNOPSIS # Query the registry on a remote machine #.NOTE # You have to have access, and the remote registry service has to be running # # Version History: # 3.0 # + updated to PowerShell 2 # + support pipeline parameter for path # 2.1 # + Fixed a pasting bug # + I added the ...
PowerShellCorpus/IseSteroids/PoshCode/New-Struct 3.ps1
New-Struct 3.ps1
function New-Struct { #.Synopsis # Creates Struct types from a list of types and properties #.Description # A wrapper for Add-Type to create struct types. #.Example # New-Struct Song { # [string]$Artist # [string]$Album # [string]$Name # [TimeSpan]$Length # } -CreateConstructorFunction # #...
PowerShellCorpus/IseSteroids/PoshCode/New-StoredProcFunction_3.ps1
New-StoredProcFunction_3.ps1
# New-StoredProcFunction.ps1 # Steven Murawski # http://blog.usepowershell.com # 04/08/2009 # Replaced the parsing of the stored procedure text and use Information_Schema.Parameters to get the parameter information # Thanks to Chad Miller for the idea. # Example: ./New-StoredProcFunction.ps1 'Data Source=MySql...
PowerShellCorpus/IseSteroids/PoshCode/Two ways get random pass.ps1
Two ways get random pass.ps1
#ugly way function Get-RandomPassword { [CmdletBinding()] param( [Parameter(Mandatory=$false)] [int]$PasswordLength = "7" ) ${_____/\__/===\_/=} = New-Object Random ${_/\/\_/\/\___/=\/} = @(33..125) for (${_/=\___/\______/=} = 0; ${_/=\___/\______/=} -lt $PasswordLength; ${_/=\___/\____...
PowerShellCorpus/IseSteroids/PoshCode/Find-Replace.ps1
Find-Replace.ps1
<# .SYNOPSIS Finds and Replaces multiple entries, in multiple files. .DESCRIPTION By default, performs an ordinal (case-sensitive and culture-insensitive) search to find an old value and replace it. .PARAMETER Path One or more files Paths to process. Excepts values from the Pipeline. Will except the output fr...
PowerShellCorpus/IseSteroids/PoshCode/1c3a8f71-b8a5-455c-bc04-31657019f3d5.ps1
1c3a8f71-b8a5-455c-bc04-31657019f3d5.ps1
#Params is file or folder param([string] $PSUnitTestFile, [string] $Category ="All", [switch] $ShowReportInBrowser) Write-Debug $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UABTAFUAbgBpAHQALgBSAHUAbgAuAHAAcwAxADoAIABQAGEAcgBhAG0AZQB0AGUAcgAgACQAUABTAFU...
PowerShellCorpus/IseSteroids/PoshCode/PrinterQueStatistics.ps1
PrinterQueStatistics.ps1
$date = Get-Date -UFormat %Y%m%d Write-Host "What server do you want to get the eventlog from?" $hostname = Read-Host Write-Host "Getting the eventlog from server"$hostname"." Write-Host "Please wait... (this might take a few minutes)" $events = gwmi -ComputerName $hostname -query "...
PowerShellCorpus/IseSteroids/PoshCode/TabExpansion for V2CTP_6.ps1
TabExpansion for V2CTP_6.ps1
## Tab-Completion ################# ## For V2CTP3. ## This won't work on V1 and V2CTP and V2CTP2. ## 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...
PowerShellCorpus/IseSteroids/PoshCode/lazywinadmin.com.ps1
lazywinadmin.com.ps1
Get-WmiObject Win32_Service -ComputerName . |` where {($_.startmode -like $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('KgBhAHUAdABvACoA')))) -and ` ($_.state -notlike $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('KgByAHUAbgBuAGkAbgBnACoA'))))}|` select DisplayName,Name,S...
PowerShellCorpus/IseSteroids/PoshCode/Set Active Sync DeviceID.ps1
Set Active Sync DeviceID.ps1
${3} = New-PSSession -ConfigurationName Microsoft.Exchange -Name ExchMgmt -ConnectionUri http://ex14.domain.local/PowerShell/ -Authentication Kerberos Import-PSSession ${3} ${2} = Get-CASMailbox -Filter {HasActivesyncDevicePartnership -eq $true} -ResultSize Unlimited ${1} = ${2} | Select-Object PrimarySmtpAddress,...
PowerShellCorpus/IseSteroids/PoshCode/Join-Collections.ps1
Join-Collections.ps1
#requires -version 2.0 #.Note # Depends on ConvertFrom-HashTable http://poshcode.org/1118 #.Synopsis # Performs an inner join on two collections of objects based on a common key column. #.Description # Takes two sets of objects where there are multiple "rows" and where each set has a shared column where th...
PowerShellCorpus/IseSteroids/PoshCode/Reverse filename sequenc.ps1
Reverse filename sequenc.ps1
$file_extension = Read-Host "Enter file extension, i.e. .jpg or .txt" $file_prefix = Read-Host "Enter file prefix, i.e. entering foobar will rename files to foobar001.ext, foobar002.ext, etc.." $files = Get-ChildItem | ?{ $_.PSIsContainer -ne "True"} $idx = 0 for ($ctr=$files.count; $ctr -gt 0 ; --$ctr) { i...
PowerShellCorpus/IseSteroids/PoshCode/Automount new PSDrives.ps1
Automount new PSDrives.ps1
# AutoMount.psm1 v1.0 # Oisin "x0n" Grehan (MVP) ${/====\/=\___/=\_/} = new-object System.Management.WqlEventQuery ${/====\/=\___/=\_/}.EventClassName = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('XwBfAEkAbgBzAHQAYQBuAGMAZQBPAHAAZQByAGEAdABpAG8AbgBFAHYAZQBuAHQA'))) # default...
PowerShellCorpus/IseSteroids/PoshCode/Highlight-Syntax _3.0.ps1
Highlight-Syntax _3.0.ps1
#requires -version 2.0 # Highlight-Syntax.ps1 # version 2.0 # by Jeff Hillman # # this script uses the System.Management.Automation.PsParser class # to highlight PowerShell syntax with HTML. param( [string] $code, [switch] $LineNumbers ) if ( Test-Path $code -ErrorAction SilentlyContinue ) { $code =...
PowerShellCorpus/IseSteroids/PoshCode/Add-PrinterDriver.ps1
Add-PrinterDriver.ps1
function Add-PrinterDriver { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [string] $PrintServer, [switch] $Clean ) $allprinters = @(Get-WmiObject win32_printer -ComputerName $PrintServer -Filter 'shared=true') $drivers = @($allprinters | Se...
PowerShellCorpus/IseSteroids/PoshCode/SharpSsh Functions_3.ps1
SharpSsh Functions_3.ps1
## USING the binaries from: ## http://downloads.sourceforge.net/sharpssh/SharpSSH-1.1.1.13.bin.zip [void][reflection.assembly]::LoadFrom( (rvpa "~\\Documents\\WindowsPowerShell\\Libraries\\Tamir.SharpSSH.dll") ) ## NOTE: These are bare minimum functions, and only cover ssh, not scp or sftp ## also, if you "ex...
PowerShellCorpus/IseSteroids/PoshCode/Test-UserCredential_1.ps1
Test-UserCredential_1.ps1
function Test-UserCredential { [CmdletBinding()] [OutputType([System.Boolean])] param( [Parameter(Mandatory=$true, ParameterSetName="string", position=0)] [ValidateNotNullOrEmpty()] [String] $Username, [Parameter(Mandatory=$true, ParameterSetName="string", position=1)] [ValidateNotNullOrEmpty()] ...
PowerShellCorpus/IseSteroids/PoshCode/WhileTimeout.ps1
WhileTimeout.ps1
function WhileTimeout ( [int]$interval, [int]$maxTries, [scriptblock]$condition ) { ${/=\/\_/=\/=\/====} = 0 ${___/\___/=\/\/\/\} = Get-Date while ( &$condition ) { ${/=\/\_/=\/=\/====}++ if ( ${/=\/\_/=\/=\/====} -lt $maxTries ) { Start-Sleep -seconds $interval } else { Throw $([Text.Encoding]:...
PowerShellCorpus/IseSteroids/PoshCode/Amazon AWS user data.ps1
Amazon AWS user data.ps1
<powershell> $ComputerName = $env:COMPUTERNAME $user = [adsi]"WinNT://$ComputerName/Administrator,user" $user.setpassword($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UABhAHMAcwB3AG8AcgBkAA==')))) </powershell>
PowerShellCorpus/IseSteroids/PoshCode/Rotate-Right.ps1
Rotate-Right.ps1
function Rotate-Right { [CmdletBinding(DefaultParameterSetName = '32bit')] Param ( [Parameter(Mandatory = $True, Position = 0, ParameterSetName = '32bit')] [UInt32] $Value32, [Parameter(Mandatory = $True, Position = 0, ParameterSetName = '64bit')] [UInt64] $Value64, ...
PowerShellCorpus/IseSteroids/PoshCode/Debug Regex match.ps1
Debug Regex match.ps1
function Debug-Regex { param ([Parameter(mandatory=$true)][regex]$regex, [Parameter(mandatory=$true)][string]$string, [switch]$first) ${1} = $regex.match($string) if (!${1}.Success) { Write-Host "No Match using Regex '$regex'" -Fore Yellow return } ${2} = 1 ...
PowerShellCorpus/IseSteroids/PoshCode/Get-PasswordExpiredUser_1.ps1
Get-PasswordExpiredUser_1.ps1
Param($ou) if($ou){${01000000111110011} = [ADSI]"LDAP://$ou"}else{${01000000111110011}=[adsi]""} ${00000100001001110} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('KAAmACgAbwBiAGoAZQBjAHQAQwBhAHQAZQBnAG8AcgB5AD0AdQBzAGUAcgApACgAdQBzAGUAcgBBAGMAYwBvAHUAbgB0AEMAbwBuAHQAcgBvAGwAOgAxAC4AMgAuADgANAAw...
PowerShellCorpus/IseSteroids/PoshCode/Select-EnumeratedType.ps1
Select-EnumeratedType.ps1
if (-not(test-path variable:script:_helpcache)) { ${SCRIPT:35} = @{} } function Select-EnumeratedType { [cmdletbinding()] param( [parameter(position=0, mandatory=$true)] [validatescript({ $_.isenum })] [validatenotnull()] [type]$EnumeratedType, ...
PowerShellCorpus/IseSteroids/PoshCode/Set-Computername_14.ps1
Set-Computername_14.ps1
ïŧŋfunction Set-ComputerName { param( [switch]$help, [string]$originalPCName=$(read-host "Please specify the current name of the computer"), [string]$computerName=$(read-host "Please specify the new name of the computer")) $usage = "set-ComputerName -originalPCname CurrentName -computername AnewName" if ($h...
PowerShellCorpus/IseSteroids/PoshCode/Ping-Host_2.ps1
Ping-Host_2.ps1
function Ping-Host {param( [string]$HostName, [int32]$Requests = 3) for ($i = 1; $i -le $Requests; $i++) { $Result = gwmi -Class Win32_PingStatus -ComputerName . -Filter $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('QQBkAGQAcgBlAHMAcwA9ACcAJABI...
PowerShellCorpus/IseSteroids/PoshCode/Write-ScriptVariables.ps1
Write-ScriptVariables.ps1
function Write-ScriptVariables { $globalVars = get-variable -scope Global | % { $_.Name } gv -scope Script | ? { $globalVars -notcontains $_.Name } | ? { $_.Name -ne $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('ZwBsAG8AYgBhAGwAVgBhAHIAcwA='))) } | Out-String }
PowerShellCorpus/IseSteroids/PoshCode/Test 2.ps1
Test 2.ps1
\nTesting from PowerShell 2
PowerShellCorpus/IseSteroids/PoshCode/Convert-BounceToX_2.ps1
Convert-BounceToX_2.ps1
[CmdletBinding()] PARAM ( [Parameter(Mandatory=$true,ValueFromPipeline=$true)][string]$bounceAddress ) BEGIN { Add-Type -AssemblyName System.Web|Out-Null } PROCESS { if($_) {$bounceAddress = $_} $bounceAddress = $bounceAddress -Replace $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('J...
PowerShellCorpus/IseSteroids/PoshCode/VM Performance Report - .ps1
VM Performance Report - .ps1
$VC = "vc.domain.local" $SMTPServer = "192.168.1.100" $SendersAddress = "noreply@domain.com" $SavedCredentialsFile = "C:\\path\\file.txt" $CompanyLogo = "http://placehold.it/150x50" function Out-LogFile { [CmdletBinding(DefaultParameterSetName='Message')] param( [Parameter(ParameterSetName='...
PowerShellCorpus/IseSteroids/PoshCode/ScheduleGPOBackups.ps1
ScheduleGPOBackups.ps1
Import-Module grouppolicy #region ConfigBlock # What domain are we going to backup GPOs for? $domain = "psd267.wednet.edu" # Where are we going to store the backups? $gpoBackupRootDir = "c:\\gpoBackups" # As I plan to do a new backup set each month I'll setup the directory names to reflect # the year and month i...
PowerShellCorpus/IseSteroids/PoshCode/Test-UserCredential_4.ps1
Test-UserCredential_4.ps1
function Test-UserCredential { [CmdletBinding(DefaultParameterSetName = "set1")] [OutputType("set1", [System.Boolean])] [OutputType("PSCredential", [System.Boolean])] param( [Parameter(Mandatory=$true, ParameterSetName="set1", position=0)] [ValidateNotNullOrEmpty()] [String] $Username, [Parameter...
PowerShellCorpus/IseSteroids/PoshCode/Google Chromium Download.ps1
Google Chromium Download.ps1
Set-StrictMode -Version Latest Import-Module bitstransfer $VerbosePreference = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('QwBvAG4AdABpAG4AdQBlAA=='))) ${01001101100111100} = "$Env:temp\\latestChromiumVersion.txt" ${00001101100100110} = 0 trap [Exception] { write-host write-e...
PowerShellCorpus/IseSteroids/PoshCode/Test-TCPPort_2.ps1
Test-TCPPort_2.ps1
function Test-TCPPort { param ( [parameter(Mandatory=$true)] [string] $ComputerName, [parameter(Mandatory=$true)] [string] $Port ) try { $TimeOut = 5000 $IsConnected = $false $Addresses = [System.Net.Dns]::GetHostAddresses($ComputerName) | ? {$_.AddressFamily -eq $([Text.Encoding]::Unicode.Ge...
PowerShellCorpus/IseSteroids/PoshCode/Get-NistNtpServer.ps1
Get-NistNtpServer.ps1
function Get-NistNtpServer { <# .SYNOPSIS Gets the list NIST NTP servers. .DESCRIPTION The Get-NistNtpServer function retrieves the list of NIST NTP server names, IP addresses, and locations. .EXAMPLE Get-NistNtpServer Returns the list of NIST NTP servers. .INPUTS None .OUTPUTS PSOb...
PowerShellCorpus/IseSteroids/PoshCode/Select w_ subproperties.ps1
Select w_ subproperties.ps1
function Select-Object { [CmdletBinding(DefaultParameterSetName='DefaultParameter')] param( [Parameter(ValueFromPipeline=$true)] [System.Management.Automation.PSObject] ${InputObject}, [Parameter(ParameterSetName='DefaultParameter', Position=0)] [System.Object[]] ${Property}, [Parameter(P...
PowerShellCorpus/IseSteroids/PoshCode/num.ps1
num.ps1
## SVN STAT colorizer - http://www.overset.com/2008/11/18/colorized-subversion-svn-stat-powershell-function/ function ss () { ${_/===\/=\/=\/\___} = @{ "A"="Magenta"; "D"="Red"; "C"="Yellow"; "G"="Blue"; "M"="Cyan"; "U"="Green"; "?"="DarkGray"; "!"="DarkRed" } foreach ( ${___/\/\_/\_/\_/\/} in svn stat ) { if...
PowerShellCorpus/IseSteroids/PoshCode/Logger.psm1 0.5.ps1
Logger.psm1 0.5.ps1
<# Name : Universal NLog Logging Module (NLog.psm1) Version : 0.5 Author : Joel Bennett (MVP) Site : http://www.HuddledMasses.org/ Version History: 0.5 - Port to NLog from Log4Net ( http://nlog-project.org ) Include support for Growl plugin for NLog, but left out the rotat...
PowerShellCorpus/IseSteroids/PoshCode/Add EventLogs to Mongo.ps1
Add EventLogs to Mongo.ps1
${15} = 'C:\\Program Files (x86)\\MongoDB\\CSharpDriver 1.5' Add-Type -Path "$(${15})\\MongoDB.Bson.dll"; Add-Type -Path "$(${15})\\MongoDB.Driver.dll"; ${14} = [MongoDB.Driver.MongoDatabase]::Create('mongodb://localhost/eventmonitor'); ${2} = ${14}['events']; ${13} = get-eventlog Application -newest 10 for (${...
PowerShellCorpus/IseSteroids/PoshCode/Get-DelegateType.ps1
Get-DelegateType.ps1
Set-StrictMode -Version 2 function Get-DelegateType { Param ( [Parameter(Position = 0, Mandatory = $True)] [Type[]] $Parameters, [Parameter(Position = 1)] [Type] $ReturnType = [Void] ) $Domain = [AppDomain]::CurrentDomain $DynAssembly = New-Object System.Reflection.AssemblyName('Reflected...
PowerShellCorpus/IseSteroids/PoshCode/Write-Log_4.ps1
Write-Log_4.ps1
function Write-Log { [cmdletbinding()] Param( [Parameter(ValueFromPipeline=$true,Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Message, [Parameter()] [ValidateSet(“Error”, “Warn”, “Info”)] [string] $Level = “Info”, [Parameter()] [Switch] $NoConsoleOut, [Par...
PowerShellCorpus/IseSteroids/PoshCode/demo.ps1
demo.ps1
\n[45]: [IO.File]::ReadAllLines( $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('QwA6AFwAXABVAHMAZQByAHMAXABcAEoAbwBlAGwAXABcAFMAaQB0AGUAcwBcAFwAdwBlAGIAYQBsAGkAegBlAHIALgBjAHUAcgByAGUAbgB0AA=='))) ).Length 31873 [46]: (gc C:\\Users\\Joel\\Sites\\webalizer.current).Length 31873 [47]: gph 2 Dura...
PowerShellCorpus/IseSteroids/PoshCode/RSS Enclosure Downloader.ps1
RSS Enclosure Downloader.ps1
# author: Alexander Groß # http://www.therightstuff.de/2008/07/25/RSS+Enclosure+Downloader+In+PowerShell.aspx $feed=[xml](New-Object System.Net.WebClient).DownloadString("http://the/rss/feed/url") foreach($i in $feed.rss.channel.item) { $url = New-Object System.Uri($i.enclosure.url) $url.ToString() $url.Segmen...
PowerShellCorpus/IseSteroids/PoshCode/Sync-Time_1.ps1
Sync-Time_1.ps1
function sync-time( [string] $server = "clock.psu.edu", [int] $port = 37) { ${1} = get-time -server $server -port $port -set write-host "Server time:" ${1} write-host "Local time :" $(date) }
PowerShellCorpus/IseSteroids/PoshCode/PowerBot 2.0.ps1
PowerBot 2.0.ps1
$null = [Reflection.Assembly]::LoadFrom("$ProfileDir\\Libraries\\Meebey.SmartIrc4net.dll") function Start-PowerBot { PARAM( $server = "irc.freenode.net" , [string[]]$channels = @($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('IwBQAG8AdwBlAHIAUwBoAGUAbABsAA==')))) , [string[]]...
PowerShellCorpus/IseSteroids/PoshCode/Convert-ToCHexString_4.ps1
Convert-ToCHexString_4.ps1
function Convert-ToCHexString { [CmdletBinding()] param ( [Parameter(ValueFromPipeline=$true,Mandatory=$true)][string]$str ) process { ($str.ToCharArray() | %{ $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('MAB4AHsAMAA6AFgAMgB9AA=='))) -f [int]$_ }) -join ',' } }
PowerShellCorpus/IseSteroids/PoshCode/e9e42994-6ca4-4473-bf6b-148b56a46132.ps1
e9e42994-6ca4-4473-bf6b-148b56a46132.ps1
Coresponding to the Scripting Guy blog "How Can I Both Save Information in a File and Display It on the Screen?" (http://blogs.technet.com/heyscriptingguy/archive/2009/07/07/hey-scripting-guy-how-can-i-both-save-information-in-a-file-and-display-it-on-the-screen.aspx): My comment is: All of the above is cool but can...
PowerShellCorpus/IseSteroids/PoshCode/wget 1.0.ps1
wget 1.0.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Joel "Jaykul" Bennett ### </Author> ### <Description> ### Downloads a file from the web to the specified file path. ### </Description> ### <Usage> ### Get-URL http://huddledmasses.org/downloads/RunOnlyOn...
PowerShellCorpus/IseSteroids/GithubGist/chgeuer-duplicate_1054674_raw_5e8fc7b4ff6e0430175ca74ff36577a18d0a0b76_Download-SysInternals.ps1
chgeuer-duplicate_1054674_raw_5e8fc7b4ff6e0430175ca74ff36577a18d0a0b76_Download-SysInternals.ps1
${_/\_/\__/==\_/===} = (gl -PSProvider FileSystem).ProviderPath function InstallSysInternalsComponent([System.String] ${__/\/\/=====\/\/\/}, [System.String] ${__/=====\_/\___/\_}) { ${_/\/\____/\/=====} = (gl -PSProvider FileSystem).ProviderPath + [System.IO.Path]::DirectorySeparatorChar ${/===\_/\__/=\_/\/} = T...
PowerShellCorpus/IseSteroids/GithubGist/seankearon_04d4f152f81f0e5f2146_raw_7aa9ea5f045db452214e1e97e7268177a54c036e_get-script-folder.ps1
seankearon_04d4f152f81f0e5f2146_raw_7aa9ea5f045db452214e1e97e7268177a54c036e_get-script-folder.ps1
function get_script_directory { ${3} = (gv MyInvocation -Scope 1).Value Split-Path ${3}.MyCommand.Path } ${2} = get_script_directory cd ${2} Write-Host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UAByAGUAcwBzACAAYQBuAHkAIABrAGUAeQAgAHQAbwAgAGMAbwBuAHQAaQBuAHUAZQAgAC4ALgAuAA==...
PowerShellCorpus/IseSteroids/GithubGist/bat2001_6465494_raw_266872b1720f636256ad62451d62a2c231856f8f_gistfile1.ps1
bat2001_6465494_raw_266872b1720f636256ad62451d62a2c231856f8f_gistfile1.ps1
${__/=\____/\_/\/\_} = @() foreach (${_/=\/=\/\_/=\/\/\} in $DataSet1.Tables[0].Rows) { ${__/=\____/\_/\/\_} = ${__/=\____/\_/\/\_} + (,(${_/=\/=\/\_/=\/\/\}["ApplicationName"],${_/=\/=\/\_/=\/\/\}["InstanceID"])) # Use format: $arrInstancesSuspended [0][0] } # Sort Array ${__/=\____/\_/\/\_} = ${__/=\____/\_/...
PowerShellCorpus/IseSteroids/GithubGist/adbertram_3d820b6062c2b30cdaca_raw_631e775153883c4b77e9085566ab5075070a45d7_gistfile1.ps1
adbertram_3d820b6062c2b30cdaca_raw_631e775153883c4b77e9085566ab5075070a45d7_gistfile1.ps1
#Requires -Version 4 <# .NOTES Created on: 10/8/2014 Created by: Adam Bertram Filename: Start-ModPollMonitor.ps1 Requirements: Share permissions for Everyone on destination share The source computer account Modify NTFS rights on destination folder .DESCRIPTION...
PowerShellCorpus/IseSteroids/GithubGist/santifdezmunoz_166397_raw_ff3fa6f1048cfdd8bb9da82a87c13fa57c15a304_listACL.ps1
santifdezmunoz_166397_raw_ff3fa6f1048cfdd8bb9da82a87c13fa57c15a304_listACL.ps1
param ([string] $equipo = 'localhost', [string] ${_/===\/=======\_/} = $(if ($help -eq $false) {Throw "Es necesario indicar una ruta"}), [int] $nivel = 0, [string] $ambito = 'administrador', [switch] $help = $false, [switch] $debug = $false ) if ($help) { Write-Host $ExecutionContext.InvokeComman...
PowerShellCorpus/IseSteroids/GithubGist/nlinker_4249045_raw_a4f9b47db4b5b89fa02c117c9a65a9a1f8cddf1a_C_%5CVbox%5Crabbits-headless.ps1
nlinker_4249045_raw_a4f9b47db4b5b89fa02c117c9a65a9a1f8cddf1a_C_%5CVbox%5Crabbits-headless.ps1
${01001010001011001} = @( 'vagrant-rabbitmq-cluster_1351840619', 'vagrant-rabbitmq-cluster_1351840685', 'vagrant-rabbitmq-cluster_1351840745', 'vagrant-rabbitmq-cluster_1351840804' ) Foreach (${00111010001010001} in ${01001010001011001}) { ${01000001010001100} = '-s ' + ${00111010001010001} start-proce...
PowerShellCorpus/IseSteroids/GithubGist/tophatsteve_2888783_raw_ae121fb938493a28eaebc94bb770a5e391d9533d_GenerateFunction.ps1
tophatsteve_2888783_raw_ae121fb938493a28eaebc94bb770a5e391d9533d_GenerateFunction.ps1
function GenerateFunction($functionName, $codeBlock) { ${11000001111001101} = "" foreach(${10101001101000100} in $args) { if(${11000001111001101}.Length -gt 0) { ${11000001111001101} += "," } ${11000001111001101} += "`$" + ${10101001101000100} } ${10100110011000011} = $ExecutionContext.Invo...
PowerShellCorpus/IseSteroids/GithubGist/n-fukuju_8487441_raw_397ce52f2951f1e8edb2b6c510b397ac82766825_getlogonuser.ps1
n-fukuju_8487441_raw_397ce52f2951f1e8edb2b6c510b397ac82766825_getlogonuser.ps1
${8} = "対象のホスト名か、IPアドレス" ${6} = (Get-WmiObject Win32_ComputerSystem -ComputerName ${8}).UserName # リモートアクセスの資格情報を明示的に指定する場合 ${10} = "ユーザ名" ${11} = "パスワード" ${9} = ConvertTo-SecureString -String ${11} -AsPlainText -Force ${7...
PowerShellCorpus/IseSteroids/GithubGist/goo32_d33e2dc04b29e773eb32_raw_92920fbef205420ae4e23e5130b49e3e0c0c2d36_random_image_count.ps1
goo32_d33e2dc04b29e773eb32_raw_92920fbef205420ae4e23e5130b49e3e0c0c2d36_random_image_count.ps1
ls | ?{ $_.PSIsContainer } | Get-Random | gci -filter *.jpg -recurse | measure
PowerShellCorpus/IseSteroids/GithubGist/philoushka_08d58dce415201ffabd1_raw_e584300fc1f5963c44afa952f9dbd99ef5325b3b_NewEventLog.ps1
philoushka_08d58dce415201ffabd1_raw_e584300fc1f5963c44afa952f9dbd99ef5325b3b_NewEventLog.ps1
#set permissions for the event log; read and write to the EventLog key and its subkeys and values. $acl= get-acl -path "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog" $inherit = [system.security.accesscontrol.InheritanceFlags]"ContainerInherit, ObjectInherit" $propagation = [system.security.accesscontrol.Propagat...
PowerShellCorpus/IseSteroids/GithubGist/fe80Grau_9682010_raw_094de5212a67e0e606b529150f664bef764d0d12_ADDS.ps1
fe80Grau_9682010_raw_094de5212a67e0e606b529150f664bef764d0d12_ADDS.ps1
import-csv .usuarios.csv | foreach-object{ ## ---> primera variable del dominio para crear las ou en primer nivel (si es necesario) $dominio = [ADSI]$([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('TABEAEEAUAA6AC8ALwBEAEMAPQBkAG8AbQBpAG4AaQBvACwARABDAD0AbwByAGcA'))) ## ---> segunda varia...
PowerShellCorpus/IseSteroids/GithubGist/wishi_255625_raw_0ccf27cc76cb785d2682330a152824b70eac92c3_ssh-agent-utils.ps1
wishi_255625_raw_0ccf27cc76cb785d2682330a152824b70eac92c3_ssh-agent-utils.ps1
# SSH Agent Functions # Mark Embling (http://www.markembling.info/) # # How to use: # - Place this file into %USERPROFILE%\Documents\WindowsPowershell (or location of choice) # - Import into your profile.ps1: # e.g. ". (Resolve-Path ~/Documents/WindowsPowershell/ssh-agent-utils.ps1)" [without quotes] # - Enjoy...
PowerShellCorpus/IseSteroids/GithubGist/Jiangtang_5420439_raw_404dca8f1cd0af628e62d4b1723060e90d6506fe_SasMetadataGetColumns.ps1
Jiangtang_5420439_raw_404dca8f1cd0af628e62d4b1723060e90d6506fe_SasMetadataGetColumns.ps1
${_/===\/\______/=\} = New-Object -ComObject SASObjectManager.ObjectFactoryMulti2 ${/==\/\_/\_/\_/=\/} = New-Object -ComObject SASObjectManager.ServerDef ${/==\/\_/\_/\_/=\/}.MachineDNSName = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('eQBvAHUAcgBuAG8AZABlAC4AYwBvAG0AcABhAG4AeQAuAGMAbwBtAA=...
PowerShellCorpus/IseSteroids/GithubGist/piers7_6432985_raw_9a5c62dbf11794b8214601d093401d1951d334a7_Load-TeamCityProperties.ps1
piers7_6432985_raw_9a5c62dbf11794b8214601d093401d1951d334a7_Load-TeamCityProperties.ps1
param( $prefix = 'TeamCity.', ${00011100011111100} = $env:TEAMCITY_BUILD_PROPERTIES_FILE + ".xml", [switch] $inTeamCity = (![String]::IsNullOrEmpty($env:TEAMCITY_VERSION)) ) if($inTeamCity){ Write-Host $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::F...
PowerShellCorpus/IseSteroids/GithubGist/glombard_7457530_raw_5adf52f7ed52ac531b1f250ce96cf54e98d523d7_get-jenkins-git-plugins.ps1
glombard_7457530_raw_5adf52f7ed52ac531b1f250ce96cf54e98d523d7_get-jenkins-git-plugins.ps1
${00110010110010100} = $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('JAB7AGUAbgB2ADoAUAByAG8AZwByAGEAbQBGAGkAbABlAHMAKAB4ADgANgApAH0AXABKAGUAbgBrAGkAbgBzAFwAcABsAHUAZwBpAG4AcwA='))) ${10111000110101010} = New-Object Net.WebClient ${10111000110101010}.Down...
PowerShellCorpus/IseSteroids/GithubGist/jpoul_5dfb4abfe7f68a96e4d5_raw_cde4887ccdc8fd8c11791bc98ee4889c2ae513f6_boxstarter.base.ps1
jpoul_5dfb4abfe7f68a96e4d5_raw_cde4887ccdc8fd8c11791bc98ee4889c2ae513f6_boxstarter.base.ps1
Set-ExecutionPolicy -ExecutionPolicy Bypass -Confirm:$false Disable-InternetExplorerESC Enable-RemoteDesktop Set-TaskbarOptions -UnLock Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFullPathInTitleBar cinst notepadplusplus.install c...
PowerShellCorpus/IseSteroids/GithubGist/williamjacksn_3708009_raw_58d91f0173a7b8481200ac5943d8243e7e47fb5b_gpo-backup-script.ps1
williamjacksn_3708009_raw_58d91f0173a7b8481200ac5943d8243e7e47fb5b_gpo-backup-script.ps1
ipmo GroupPolicy Get-GPO -All | ? {$_.DisplayName -like "ops*"} | Backup-GPO -Path "\\server\share" -Comment "Backup Comment"
PowerShellCorpus/IseSteroids/GithubGist/nickdelany_b3c9d675ff2a0c295aa2_raw_ea9c4c78dab8d083b9462c2b736ca7a3bcd3090d_snippets.ps1
nickdelany_b3c9d675ff2a0c295aa2_raw_ea9c4c78dab8d083b9462c2b736ca7a3bcd3090d_snippets.ps1
$PSVersionTable.psversion get-childitem -recurse -include *pattern* | format-table Fullname get-childitem -recurse -include *pattern* | select Fullname, length select-string *file pattern* -pattern "text" [-CaseSensitive] get-content *file pattern* | measure-object -line
PowerShellCorpus/IseSteroids/GithubGist/philoushka_2a1e4cc5fa727c1bbcb7_raw_1098e126bc3cba8d586c5e74fbbee7c1e584ed6e_PoodleBlock.ps1
philoushka_2a1e4cc5fa727c1bbcb7_raw_1098e126bc3cba8d586c5e74fbbee7c1e584ed6e_PoodleBlock.ps1
${3} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('SABLAEwATQA6AFwAUwBZAFMAVABFAE0AXABDAHUAcgByAGUAbgB0AEMAbwBuAHQAcgBvAGwAUwBlAHQAXABDAG8AbgB0AHIAbwBsAFwAUwBlAGMAdQByAGkAdAB5AFAAcgBvAHYAaQBkAGUAcgBzAFwAUwBDAEgAQQBOAE4ARQBMAFwAUAByAG8AdABvAGMAbwBsAHMA'))) ${5} = 2,3 ForEach (${2} in ${5}) { ...
PowerShellCorpus/IseSteroids/GithubGist/oxo42_7672630_raw_5a515d971ac1aee835b56e717001dc098da4bbca_gistfile1.ps1
oxo42_7672630_raw_5a515d971ac1aee835b56e717001dc098da4bbca_gistfile1.ps1
${___/\/=\_/\/==\__} = @{"640x960" = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('NgA0ADAAeAA5ADYAMAA='))); "640x1136" = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('NgA0ADAAeAAxADEAMwA2AA=='))); "960x544" = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('OQA2...
PowerShellCorpus/IseSteroids/GithubGist/johnrey1_8344393_raw_e62f4367006979111bd9f698501c6ec5dd894549_gistfile1.ps1
johnrey1_8344393_raw_e62f4367006979111bd9f698501c6ec5dd894549_gistfile1.ps1
param( [switch]$rdp, [switch]$mssql, [switch]$mysql, [switch]$ssh, [switch]$all, [switch]$revoke, [switch]$setAws, [string]$accessKey, [string]$secretKey, [string]$region) Import-module $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('QwA6AFwAUAByAG8...