Script for Move Users in Skype

Welcome Forums General PowerShell Q&A Script for Move Users in Skype

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

 
Participant
1 month ago.

  • Author
    Posts
  • #111928

    Inactive
    Points: 0
    Rank: Member

    Hi All,

    I´m trying to create a script that

    1. Look in an user list if the user has a other conferancing policy than AllowAnonymousParticipantsInMeetings
    2. And if user have not same conferancing policy should it check if the fullname will start with S0 to S4 then should it move to Target xxx01.yyy.se other wise should the be moved to xxx02.yyy.se

    You will see down about the script I tried to write... anyone who has idea how I should do this or has a link to great page there I can find more information so I can come further...

    I can add... I´m new to script...
    ForEach ($User in $UserCSV -NE (ConferancingPolicy -eq AllowAnonymousParticipantsInMeetings) {
    if ($UserCSV -eq $Fullname start with S0-S4) | Move-CsUser -Identity $Fullname -Target xxx01.yyy.se -Confirm:$false
    else Move-CsUser -Identity $Fullname -Target xxx02.yyy.se -Confirm:$false

    }

     

     

    Best regards

    Conny Isaksson

  • #111994

    Participant
    Points: 2
    Rank: Member

    Conny,

    sorry – the following will not solve your current task but I think it will help you in the future:

    Please do a little step back and take a your time to start to learn the very basics of Ppowershell. You cannot learn a complex technology by guessing or copying together some code snippets you've found on the internet and you don't fully understand.
    An easy and slightly entertaining way of learning Powershell is watching the free video course at the Microsoft Virtual Acadmey – Getting Started with Powershell.
    Have a lot of fun and good luck.

    • #112001

      Inactive
      Points: 0
      Rank: Member

      Olaf,

       

      First, yes I´m new at this, but this text was a part of the full script, I have created... I did only "mask" some...

       

      Did think this was a forum you could ask questions... so I say I´m sorry I´m not good as you and that I did ask... I will of course delete my account here and learn more about PS...

      So again Olof I´m sorry... for asking...

    • #112003

      Participant
      Points: 2
      Rank: Member

      You don't have to sorry for asking at all – that's what this forum is all about. But the code snippet you showed seemed not functional so I suspected you copied somewhere and actually did not understand what you copied. 😉
      You might show the rest of the code or at least that much to show where the variables you use come from and make it at least working when we copy it to try.
      And could you please format your code as code here in the forum. Use the "pre" button located in the edit bar above the text you enter when you post. Thanks.

You must be logged in to reply to this topic.