This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Check-SoftwareInstalled { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$SoftwareName | |
) | |
$uninstallKey = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall' | |
$registry = Get-Item -Path $uninstallKey | |
if (!$registry) { | |
Write-Error "Error: Registry key $uninstallKey not found." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ScriptPath = "D:\test.ps1" | |
# Step1 | |
Get-Content $ScriptPath | Powershell -noprofile - | |
# Step2 | |
Powershell -ExecutionPolicy Bypass -File $ScriptPath | |
# Step3 | |
Get-Content $ScriptPath | Invoke-Expression |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Reverse-String | |
{ | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$Phrase | |
) | |
$StrText = $Phrase.ToCharArray() | |
([array]::Reverse($StrText)) | |
$output = $StrText -join "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-WIFIPass | |
{ | |
$output = netsh.exe wlan show profiles | |
$ssidProfiles = $output | Select-String -Pattern 'All User Profile' -AllMatches | |
$ssidNetwork = ($ssidProfiles -split ": ").Trim() | % { | |
if ($_ -ne 'All User Profile') | |
{ | |
$getPW = netsh.exe wlan show profiles name="$_" key=clear | |
$pw = $getPW | Select-String -Pattern 'Key Content' | |
if($pw -eq $null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7/4/2017 12:32:28 AM 3B76C30834DB4F8C88A339D1B4BA3196.MAI Msg:Passed-ClientIPNotLocal AuthStatus:0 | |
ClientIP:187.181.39.60 | |
Sender: xkkah@abc.com Recipients: geral@askdj.com | |
7/4/2017 12:34:17 AM 8027F8A703654CB2B204C3C460C7582A.MAI Msg:Passed-ClientIPNotLocal AuthStatus:0 | |
ClientIP:212.233.216.133 | |
Sender: xfccwz@dfs.state.fl Recipients: info@infinitytech.com | |
7/4/2017 12:35:14 AM 0DC7EBDE5C444E7F9A3908DEB267ED6C.MAI Msg:Passed-ClientIPNotLocal AuthStatus:0 | |
ClientIP:209.85.220.194 | |
Sender: eutech2055@mail.com Recipients: admin@srr.in,principal@srr.in | |
7/4/2017 12:35:23 AM 070F64522B6847E59BC633940C3D0C19.MAI Msg:Passed-ClientIPNotLocal AuthStatus:0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##-----[ SCRIPT BY AMAR ]-------### | |
$URL = "https://www.sslshopper.com/ssl-checker.html#hostname=216.58.199.174" | |
$iexplorer = New-Object -ComObject "internetexplorer.application" | |
$iexplorer.visible = $true | |
$iexplorer.navigate($URL) | |
Start-Sleep -Seconds 10 | |
$Output = $iexplorer.Document.getElementsByTagName("td") | ?{$_.innerText -imatch "Common name:"} | Select outerText | |
$Output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#===[ START OF SCRIPT ]===# | |
# Title in the PowerShell Console | |
Write-Host "`nHere is your Powershell Cmdlet of the Day`n`n" -ForegroundColor Yellow | |
# Choosing a Random Powershell Cmdlet | |
$RandomCmdlet = gcm * -CommandType Cmdlet | Get-Random | |
$help = Get-Help $RandomCmdlet.Name -Full | |
# Function to Convert Help Description to String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
This script performs the installation or uninstallation of an application(s). | |
.DESCRIPTION | |
The script is provided as a template to perform an install or uninstall of an application(s). | |
The script either performs an "Install" deployment type or an "Uninstall" deployment type. | |
The install deployment type is broken down into 3 main sections/phases: Pre-Install, Install, and Post-Install. | |
The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application. | |
.PARAMETER DeploymentType | |
The type of deployment to perform. Default is: Install. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################### | |
## LOG SCRIPT ## | |
## Written by :- AMAR ## | |
########################### | |
#!/usr/bin/perl | |
use Net::SSH::Expect; | |
use POSIX qw(strftime); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#======================================# | |
## SCRIPT WRITTEN BY : AMAR HELLOWEEN ## | |
#======================================# | |
#----- Defining Function and Loading Assemblies -----# | |
#====================================================# | |
Add-Type –AssemblyName System.Windows.Forms | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing") | out-null |
NewerOlder