Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Create Directory on a UNC Path

646 views
Skip to first unread message

Paul Bergson [MVP-DS]

unread,
Mar 10, 2009, 12:07:29 PM3/10/09
to
Hello,
I'm having trouble creating a folder on my SAN. I would prefer to use a unc
path as opposed to using net use and mapping a drive (This works).

The command I am using is:
new-item -path \\$SAN\share -name george -itemType Directory

The error I am receiving is:
New-Item : The path is not of a legal form.
At line:1 char:9
+ new-item <<<< -path \\$SAN\share -name george -itemType Directory

If I replace the unc with a drive letter it works. Sadly I'm afraid I won't
be able to use UNC.

Any ideas?

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.


Vadims Podans

unread,
Mar 10, 2009, 1:02:50 PM3/10/09
to
looks like you have not appropriate rights on remote share or $san cotains
invalid server name.

--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv

"Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> rakstīja ziņojumā
"news:9A59E5E5-D2E6-4BB0...@microsoft.com"...

Paul Bergson [MVP-DS]

unread,
Mar 10, 2009, 1:56:07 PM3/10/09
to
It is neither of these.

I am admin on this command shell and I have placed the actual name of my
computer/san, but replaced it on this posting.

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.


"Vadims Podans" <vpodans> wrote in message
news:%23%23F9PIao...@TK2MSFTNGP06.phx.gbl...

Vadims Podans

unread,
Mar 10, 2009, 2:05:13 PM3/10/09
to
I've tested this on both PS versions - works fine.

--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv

"Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> rakstīja ziņojumā

"news:3C5C0BE5-0EE1-4902...@microsoft.com"...

Paul Bergson [MVP-DS]

unread,
Mar 10, 2009, 2:11:57 PM3/10/09
to
Turns out it doesn't like the netbios name, it wanted the fqdn.

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.


"Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> wrote in message
news:9A59E5E5-D2E6-4BB0...@microsoft.com...

Vadims Podans

unread,
Mar 10, 2009, 2:53:27 PM3/10/09
to
for me NetBIOS names works too.

--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv

"Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> rakstīja ziņojumā

"news:0DF6B55D-A11B-4609...@microsoft.com"...

Paul Bergson [MVP-DS]

unread,
Mar 11, 2009, 8:23:25 AM3/11/09
to
Don't know why. Thanks for the follow ups.

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.

"Vadims Podans" <vpodans> wrote in message

news:%23pc8CGb...@TK2MSFTNGP03.phx.gbl...

0 new messages