Hi,
Hope you can help.
I want to get the IP address of a SVM's cifs lif into a variable and use this variable in Test-Path, but I can't work out what's happening:
$newshare = share_test
$activevserverip = Get-NcNetInterface -Vserver $activevserver -DataProtocols cifs | Select-Object Address
PS C:\Windows\system32> $activevserverip
Address
-------
xxx.xxx.21.10
Test-Path "\\$activevserverip\$newshare" -verbose
False
I receive a 'false' even though I know the path is up and accessible. What am I doing wrong please? Is it something like the data type of the IP address? If I create a path variable the IP address details are enclosed in a hash table (?). How can I reduce it to just the IP address?
PS C:\Windows\system32> $path = "\\$activevserverip\$newshare"
PS C:\Windows\system32> $path
\\@{Address=xxx.xxx.21.10}\share_testSorry if this is basic
Thanks