locked
Approve-WDSClient - Access Denied RRS feed

  • Question

  • Oh hi~

    I got trouble with this cmdlet. I'm to lazy to log-in on wds server to approve new PC and I tryed to do script (see below)

    $C = Get-Credential
    $Serv = Read-Host "Enter the name of WDS Server"
    $R = Read-Host "Enter RequestID Provided"
    $SB = {Approve-WdsClient -RequestId $Using:R}
    $S = New-PSSession -ComputerName $Serv
    Invoke-Command -Session $S -ScriptBlock $SB
    Remove-PSSession $S
    Read-Host -Prompt "Press Enter to continue"

    The problem is

    When I try to approve already approved PC I got Error:

    The device has already been approved or rejected.

    Ok... seems correct.

    But when I'm trying in for new PC with "Pending" status I got

    Access Denied Error.

    I read some articles that it's possible if I don't have access to the OU when PC will be placed, but I don't need it. I need just Approve PC and Computer account I will create later. Is it anyway to go through it.

    Friday, May 19, 2017 12:28 PM

All replies

  • this is related to Windows setup/deployment using WDS.. suggesting asking it or moving the thread to setup/deployment forum.

    https://social.technet.microsoft.com/Forums/ie/en-US/home?forum=winserversetup


    cheers..uc If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.

    Friday, May 19, 2017 2:38 PM
  • You cannot manage a computer in an OU that you do not have permissions on.  Have your Admins grant you access.

    This is the correct code for your task:

    $wdsserver = Read-Host 'Enter the name of WDS Server'
    $requestid = Read-Host 'Enter RequestID Provided'
    Invoke-Command -ScriptBlock { Approve-WdsClient -RequestId $using:requestid } -ContainerName $wdsserver
    



    \_(ツ)_/


    • Edited by jrv Friday, May 19, 2017 3:20 PM
    • Proposed as answer by Hello_2018 Monday, May 22, 2017 5:38 AM
    Friday, May 19, 2017 3:16 PM
  • Hi,
    Was your issue resolved? 
    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.
    Best Regards,
    Andy

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, June 7, 2017 2:41 AM