পাওয়ারশেল ব্যবহার করে ওয়েবসাইটের লিংকগুলো বের করতে, প্রথমে Invoke-WebRequest কমান্ডলেট ব্যবহার করে ওয়েবপেজ থেকে ডেটা রিট্রিভ করতে হবে।
$req = Invoke-WebRequest -uri "https://theautomationcode.com" $req
আউটপুট

শুধু লিংকগুলো পেতে আমরা সেই প্রপার্টি ব্যবহার করতে পারি এবং সেখানে InnerHTML, Innertext, href ইত্যাদি সাব-প্রপার্টি পাওয়া যাবে আউটপুটে দেখানো হয়েছে।
$req = Invoke-WebRequest -uri "https://theautomationcode.com" $req.Links
আউটপুট
innerHTML : Scripts innerText : Scripts outerHTML : Scripts outerText : Scripts tagName : A href : https://theautomationcode.com/scripts/
আমাদের শুধু লিংক দরকার তাই আমরা href প্রপার্টি ব্যবহার করব।
$req.Links | Select -ExpandProperty href
আউটপুট
https://theautomationcode.com/2020/11/ https://theautomationcode.com/author/chiragce17/ https://theautomationcode.com/category/powershell/ https://theautomationcode.com/category/troubleshooting/