Move-CSLegacyUser Confirm
-
Thursday, May 05, 2011 4:07 PM
Hello All,
I have written a short PS script which reads a list of users from a CSV file and then migrates them from an OCS environment to Lync. However, when the script runs, I get asked to confirm each move in turn. How can I switch off the confirmation that is required for each user move?
There is a parameter -confirm but looking at the help file, this is to swich a confirmation on. It seems to me that the confirmation is on by default. Has anyone else come accross this? Anyone know a way around it?
Cheers,
Bri
All Replies
-
Friday, May 06, 2011 8:19 AM
OK, it seems that this is just standard Powershell.
By default, PowerShell automatically applies the Confirm switch to cmdlets that have the following verbs:
- Clear
- Disable
- Dismount
- Move
- Remove
- Stop
- Suspend
- Uninstall
When a cmdlet runs that has any of these verbs, the Shell automatically stops the command and waits for your acknowledgement before it continues to process.
In order to override the confirm switch, I added -confirm:$False to my script. I don't get asked to confirm the action any more.
More details are at: http://technet.microsoft.com/en-us/library/bb124088.aspx
Bri.
-
Friday, December 02, 2011 7:18 PMWhen I run the confirm parameter with move-cslegacyuser -I "user" -target "someserver" -confirm:$false, I get an error "Failed while updating destination pool." Line 1 char 18. Category info invalid operation. If I remove the confirm parameter the command executes successfully. Any information you can share on that? Any help would be grately appreciated.
-
Thursday, April 12, 2012 2:02 AMWorked for me, thanks.
-
Thursday, April 12, 2012 2:03 AMWorked for me - just append it to the end of the command
-
Thursday, April 12, 2012 7:30 AM
Examle:
Move-CsLegacyUser -Identity "sip:user1@XXX.ru" -Target "lync.XXX.ru" -Confirm:$False
If answer is helpful, please mark as answer or hit the green arrow on the left.
-
Tuesday, August 07, 2012 2:54 PM
Hey clubberUK or others
Can you share your script and the csv file? just a portion of the csv file to get an idea what its supposed to look like?
Cheers

