powershell - Start-BitsTransfer's Destination field is not mandatory -
i had bug in script i'd specified -description $dest
instead of -destination $dest
on call start-bitstransfer
. didn't error / ran small file , took while large one. such think file copied machine; can't find copied to...
question
- why isn't destination mandatory field?
- where files go default / when destination isn't specified?
the snarky answer first part of question "because microsoft said so". since wasn't involved in decision making can't give definitive answer, example 7 of cmdlet documentation mentions
the destination path cannot use wildcard characters. destination path supports relative directory, rooted path, or implicit directory (the current directory).
so suspect parameter made optional allow transferring files "here" (to current working directory) without having explicitly specify destination, i.e. simplicity of use.
Comments
Post a Comment