What are the PowerShell equivalents of these Quest cmdlets??

I found a script on the interwebs with Quest cmdlets in it:

if ($scope -eq "Computer") {
foreach ($GroupMember in $GroupMembers) {
$OU = Get-QADComputer $GroupMember
New-GPLink -Name "$GPO" -Target $OU.ParentContainerDN -link Yes
if ($scope -eq "User") {
foreach ($GroupMember in $GroupMembers) {
$OU = Get-QADUser $GroupMember
New-GPLink -Name "$GPO" -Target $OU.ParentContainerDN -link Yes

How can I write the code to use standard PowerShell instead??

Optimizing GPOs

While searching for what you got this snippet ? To make the question more clear, What are you trying to achieve here ?

finally, try removing QA from the quest cmdlets.

I want to rewrite the script without using the QA cmdlets, using only standard PowerShell code.
I’m not a PowerShell expert.
I tried it with removing the QA on the commands but then get-adgroupmember wants an Identity…

Yup, identity is a mandatory input. You can read the help document which will help you to achieve your goal.

#Do a Get-Help for each cmdlet to get help/examples on how to use it. Below is how it will be for Get-AdGroupMember
Get-Help Get-AdGroupMember -Online

Once you read the docs, try to use the cmdlets as per the docs and see what you get and post here in case of any errors/blockers you face.

Thank you, I think I will have to rewrite the whole script anyway.