-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearch-Website.ps1
More file actions
22 lines (17 loc) · 811 Bytes
/
Search-Website.ps1
File metadata and controls
22 lines (17 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Define the search query
#for string arguments that have whitespaces, replace whitespace with +
param (
[Parameter(Mandatory = $True)][String] $company,
[Parameter(Mandatory = $True)][String] $role,
[String] $site = "linkedin.com"
)
# Define the URL for the search
$searchUrl = "https://www.google.com/search?client=firefox-b-d&q=inurl%3A$site+%22$company%22+%22$role%22"
# Start Firefox with the search URL
Start-Process "firefox.exe" -ArgumentList $searchUrl
# Optionally, you can add a delay to allow Firefox to open before closing the script
Start-Sleep -Seconds 5 # Wait for 5 seconds (adjust as needed)
# You can add more code here to interact with the Firefox window if needed
# For example, you can use the Send-Keys cmdlet to send keys to the Firefox window.
# Close the script
Exit