none
Impossible de déplacer des ordinateurs d'une OU vers une autre RRS feed

  • General discussion

  • Bonjour,

    J'utilise le script suivant afin de déplacer une OU vers une autre mais cela ne fonctionne pas.

     Ci-dessous mon script:

    "

     # Written 08/08/15 Casey, Dedeal#Importing AD ModuleWrite-Host" Importing AD Module..... "import-moduleActiveDirectoryWrite-Host" Importing Move List..... "# Reading list of computers from csv and loading into variable$MoveList= Import-Csv -Path "C:\Temp\PC_Move_List.csv"# defining Target Path$TargetOU= ' ou=Windows 10 - Durcissement - Desktop,ou=Windows 10 - Durcissement,ou=Windows10,ou=Windows10,dc=S4P,dc=net' $countPC    = ($movelist).countWrite-Host" Starting import computers ..."foreach ($Computer in $MoveList){        Write-Host " Moving Computer Accounts..."    Get-ADComputer $Computer.CN | Move-ADObject -TargetPath $TargetOU}Write-Host"Write-Host" $countPC  Computers has been moved " 

    J'obtiens le message ci-dessous dans l'ISE:

    Je souhaite faire un script PowerShell déplaçant des PCS d'une OU vers une autre.Etant junior en Powershell je vous remercie d'avancepour votre aide.

    Cordialement,

    Balbo

    • Changed type Bill_Stewart Thursday, March 14, 2019 11:30 PM
    • Moved by Bill_Stewart Thursday, March 14, 2019 11:30 PM This is not "scripts on demand"
    Wednesday, November 21, 2018 4:22 PM

All replies

  • This forum is in English.

    -- Bill Stewart [Bill_Stewart]

    Wednesday, November 21, 2018 4:42 PM
  • Votre code est complètement inutile. Vous devez le poster correctement et demander l'aide de l'auteur. Ce forum est en anglais.

    Ha 😃


    \_(ツ)_/

    Wednesday, November 21, 2018 5:43 PM
  • Oooh sorry,i really don't know because the last time i posted a question here in English someone ask me to wrtie in french...

    Anyways i'm looking for a powershell script that help me to move a workstation from one OU to another in Active Directory.

    can anyone give me a script that could do the job please?I used the script above by modifying some line but it doesn't work.

    Thank you for your help.
    Regards,

    LeBalbo

    Wednesday, November 21, 2018 8:43 PM
  • help Move-AdObject -ShowWindow

    \_(ツ)_/

    Wednesday, November 21, 2018 8:45 PM
  • The forums you posted in before were French forums.  THis time you posted in and English forum.


    \_(ツ)_/

    Wednesday, November 21, 2018 8:47 PM
  • Thank you,

    Can i have more details please?With an example?

    Thank you.

    Wednesday, November 21, 2018 8:47 PM
  • The help ahs many examples.  Start there.

    C'mon.  It's one CmdLet and a single page of instructions.


    \_(ツ)_/

    Wednesday, November 21, 2018 8:48 PM
  • Ok,

    Maybe it was a mistake but i have no problems with English language.My english is not fluently but it is enough to get by..

    Wednesday, November 21, 2018 8:49 PM
  • Ok,

    Maybe it was a mistake but i have no problems with English language.My english is not fluently but it is enough to get by..


    Definitely better than my French. 

    \_(ツ)_/

    Wednesday, November 21, 2018 8:50 PM
  • Aha ahaha ,but by looking at your marks,i would prefer to have your level in IT instead having a good french level...
    Wednesday, November 21, 2018 8:52 PM
  • When you have been doing this as long as I have you will have just as good marks or better if you study hard,


    \_(ツ)_/

    Wednesday, November 21, 2018 9:00 PM