Posts

Automatically open any site on Internet explorer with PowerShell script.

# Name: Richa Sharma #Automatically open google.com (Any site) on IE with PowerShell script. # Action Required: Change www.google.com with any site of your requirement. #just 3 line code # ie is the variable which stores value of ComObject $ie= New-Object -ComObject InternetExplorer.Application $ie.Visible =$true $ie.Navigate2(" www.google.com ")

Create a HTML file on Desktop with top 10 process running on your system, if that file already exists on Desktop it will give prompt to user to recreate that file.

# Name: Richa Sharma #Create a HTML file on Desktop with top 10 process running on your system, if that file already #exists on Desktop it will give prompt to user to recreate that file. # Action required: Change the path <Desktop path name> according to your requirement.     $path="C:\Users\azuser84\Desktop\process.html" $isFilesExists = Test-path $path   if($isFilesExists -eq $true) {         $ans= Read-Host "Do you want to recreate (Y/N)"         if($ans -eq "Y")         {                          Remove-Item -Path $path              Get-Process | select -First 10 | ConvertTo-Html | Out-File -FilePath <Desktop path name>           }           E...

Check ping status of remote computer

#Name: Richa Sharma #Date: 19-Dec-2018 # Check ping status of remote computer (IP Address is not dynamic here) $output=Test-Connection 8.8.8.8 -Quiet if($output -eq $true) {     Write-Host "Alive" }  else {     Write-Host "Not pinging" }

Check test connectivity on remote servers with given IP range-Powershell Script

<#  Script to Test connection of first 10 remote computers within specific IP range (Depends on your environment) Data Required: First 3 octet IP range, can be done with 2 octet as well. Name : Richa Sharma #> # Creating variable dir, IP range : 192.168.1 $dir=1..10 | ForEach-Object {"192.168.1.$_"} foreach($temp in $dir) { $check=Test-Connection -Quiet $temp     if($check -eq $true)     {         Write-Output "$temp is pinging"      }    Else      {         Write-Output "$temp is not pinging"      } }