Given our environment, I am forced to join CIFS servers to the domain from across a VPN tunnel. I am attempting to use the "Add-NcCIFSServer" cmdlet in a try/catch statement in the event that the user fat fingers a usernamd or password and they can attempt to join the server three times. I have found out that this cmdlet seems to timeout though before the CIFS server is joined to the domain and falls into the catch. When I review the SVM, i see it is actually joined to the domain though. Does anyone have a clever way to pause or wait the the result of the Add-NcCIFSServer cmdlet? I see there is an option for numer of tries, but is that a number of pure attempts before moving on and does it initialize the request all over again?
I thought about using InVoke-NcSsh to attempt a command line creation of the CIFS server, but was wondering if I am missing somethign obvious.
Bottom line, cmdlet times out, but the operation completes successfully.