This seems like a simple problem but I am unable to fix it: Running command in shell returns result
C:\Windows\system32>dfsutil link "\\server.domain.com\DFSRootname\Sharename" Link Name="Sharename" State="OK" Timeout="1800" Target="\\server1\sharename" State="ONLINE" [Site: site1] Target="\\server2\sharename" State="OFFLINE" [Site: site2] Done processing this command.
Trying to do the same in powershell
PS> $path = "\\server.domain.com\DFSRootname\Sharename" $dfsutil = "dfsutil" $option = "link" PS C:\Windows\system32> Invoke-Expression "$dfsutil $option $path" DFS Utility Version 5.2 (built on 5.2.3790.3959) Copyright (c) Microsoft Corporation. All rights reserved. Unrecognized option "ink"
Why does it complain about link option?