This seems like a simple problem but I am unable to fix it
Running dfsutil 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> dfsutil link $path DFS Utility Version 5.2 (built on 5.2.3790.3959) Copyright (c) Microsoft Corporation. All rights reserved. Unrecognized option "ink"
Same with using Invoke-Expression
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"
The following syntax works for me on PS v2/v3. I'm preceding the command with a
&
the Call Operator:Seems like installation problem with my Windows 7 PS3 install. Command works fine on Windows 2008 R2 host with PS2