tag:blogger.com,1999:blog-4687813131860472363.post6487621726485031524..comments2022-06-06T10:58:31.230-07:00Comments on Powershell Masters: NSLOOKUP and POWERSHELLUnknownnoreply@blogger.comBlogger9125tag:blogger.com,1999:blog-4687813131860472363.post-1694852950532946452013-05-30T10:41:39.406-07:002013-05-30T10:41:39.406-07:00Get-Content "textfile"
This will return...Get-Content "textfile"<br /><br />This will return an array of strings with each line as a entry in the arrayAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-37704092096083672822012-09-10T01:24:40.089-07:002012-09-10T01:24:40.089-07:00Because the .Net class doesn't allow specifyin...Because the .Net class doesn't allow specifying the DNS server. You may be interested in testing a specific server and the above scripts allow this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-76568165941768828452012-08-31T17:55:28.073-07:002012-08-31T17:55:28.073-07:00what if i want to use a list of servers in a txt f...what if i want to use a list of servers in a txt fileAnonymoushttps://www.blogger.com/profile/15077148610440606729noreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-92005560461370619972012-08-14T20:54:52.140-07:002012-08-14T20:54:52.140-07:00Any idea why this happens:
PS C:\Users\Administra...Any idea why this happens:<br /><br />PS C:\Users\Administrator> forward_dns $comp<br />nslookup : Non-authoritative answer:<br />At line:1 char:1<br />+ nslookup -type=any microsoft.com 192.168.1.1<br />+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br /> + CategoryInfo : NotSpecified: (Non-authoritative answer::String) [], RemoteException<br /> + FullyQualifiedErrorId : NativeCommandError<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-86869714600240699902012-07-20T02:41:43.018-07:002012-07-20T02:41:43.018-07:00why not just use?
[System.Net.Dns]::GetHostEntry(...why not just use?<br /><br />[System.Net.Dns]::GetHostEntry($IP)<br />[System.Net.Dns]::GetHostAddresses($ServerName)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-35502390041667253062012-06-27T05:39:07.377-07:002012-06-27T05:39:07.377-07:00Re: forward_dns
Thanks for the code, worked a trea...Re: forward_dns<br />Thanks for the code, worked a treat until I found it resolving IPV6 addresses where I was expecting (and wanting!) IPV4. <br />Tested against both Active Directory and BIND DNS and the following worked for me.<br />I added in type=a to solve my issue. Just sharing incase other have the same problem :)<br /><br />$cmd = "nslookup " + "-type=a " + $args[0] + " " + $nsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-21097161149811001172011-10-20T02:54:04.581-07:002011-10-20T02:54:04.581-07:00thanks, solve the Problem with output redirection ...thanks, solve the Problem with output redirection of nslookup <br /><br />regardsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-57108879888476841892011-05-25T01:49:19.983-07:002011-05-25T01:49:19.983-07:00Thanks, it works like a charm :)
Regards from Ser...Thanks, it works like a charm :)<br /><br />Regards from SerbiaAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4687813131860472363.post-9408693980213784582010-12-08T15:35:42.076-08:002010-12-08T15:35:42.076-08:00LEARN TO <pre>!!LEARN TO <pre>!!Anonymousnoreply@blogger.com