Move-ADObject returns error

Welcome Forums General PowerShell Q&A Move-ADObject returns error

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
3 weeks, 3 days ago.

  • Author
    Posts
  • #179466

    Participant
    Topics: 1
    Replies: 1
    Points: 16
    Rank: Member

    Hi all,

    I'm new to PowerShell and trying to move a retired computer into our graveyard. My boss set me a puzzle to try and figure out why  I can move computers out but not in. I'm sure it's a permissions issue. I have changed the names to protect the innocent.

    Get-ADComputer Sojourner | Move-ADObject -TargetPath "OU=Graveyard,DC=Mars,DC=com"

    I received an Access-Denied error and I ran

    Get-Acl -Path "AD:\OU=Graveyard,DC=Mars,DC=com"

    and I don't really understand the output. Is there a way in PowerShell to see if I have the correct Permissions? Thank you for any help.

    Don't Nuke Mars!

  • #179541

    Participant
    Topics: 4
    Replies: 76
    Points: 91
    Helping Hand
    Rank: Member

    Would it make more sense if you expand the access and choose only few values to look at?

    get-acl "AD:\OU=GraveYard,DC=mars,DC=com" | select -expand access | select IdentityReference, AccessControlType, ActiveDirectoryRights
  • #179883

    Participant
    Topics: 1
    Replies: 1
    Points: 16
    Rank: Member

    Thank you for your help Aapeli. The WriteProperty is not assigned to my access for the group and it's keeping me from moving objects in.

You must be logged in to reply to this topic.