@Michael,
Yeah it's just not very sexy, but it's seriously the easier way to do it...

@Webster,
Yeah, try entering a username/password, that was a mindfsck when I needed it 
while remoting in once...

Thanks guys,
jlc

-----Original Message-----
From: Webster [mailto:[email protected]] 
Sent: Thursday, July 07, 2011 7:22 PM
To: NT System Admin Issues
Subject: RE: powershell dns lookup

At a PowerShell session with Don Jones (PowerShell MVP) he asked how we
would map a network drive using PowerShell.  My head started spinning trying
to think of what I needed in PS to get the task done.  The answer?

Net use x:  \server\sharename

DOH!

KISS


Webster

> -----Original Message-----
> From: Michael B. Smith [mailto:[email protected]]
> Subject: RE: powershell dns lookup
> 
> Don't use PowerShell. Seriously.
> 
> Use nslookup.exe. Wrap it in PowerShell if you want to - but use nslookup
> instead of the various DNS helper libraries.
> 
> Regards,
> 
> Michael B. Smith
> Consultant and Exchange MVP
> http://TheEssentialExchange.com
> 
> 
> -----Original Message-----
> From: Joseph L. Casale [mailto:[email protected]]
> Subject: powershell dns lookup
> 
> I need to look up a hostname through one specific server. Looking for a
> native way shows that specifying the server is not trivial.
> 
> I found this snippet from
> http://thepowershellguy.com/blogs/posh/archive/2007/04/10/add-
> extended-dns-support-to-powershell-in-5-minutes.aspx :
> 
> [System.Reflection.Assembly]::LoadFile( 'D:\Bdev.Net.Dns.dll') $r = new-
> Object Bdev.Net.Dns.Request $q = new-Object
> Bdev.Net.Dns.Question("foo.example.com",'ANAME','in')
> $r.AddQuestion($q)
> [Bdev.Net.Dns.Resolver]::Lookup($r,'10.0.0.4') |% {$_.answers}
> 
> So what exactly is being output such that every attempt to filter/regex on
> just the record and return only the ip address is failing?
> Anyone know a simpler built in way in ps2?
> 
> I came across Michaels dns.ps1 from 2007 which is much the same really.


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to