locked
Trying to delete a dns entry RRS feed

  • Question

  • I am trying to delete a dns entry called - first line of script to show enty exist. What am I doing wrong ??

    get-dnsserverresourcerecord -computername cbsdcs221 internal.bloodservices.ca -name TomTerrific

    HostName                  RecordType Type       Timestamp            TimeToLive      RecordData
    --------                  ---------- ----       ---------            ----------      ----------
    TomTerrific               A          1          0                    01:00:00        10.100.26.100

    remove-dnsserverresourcerecord -computername cbsdcs221 internal.bloodservices.ca -name TomTerrific

    Remove-DnsServerResourceRecord : Parameter set cannot be resolved using the specified named parameters.
    At line:1 char:1
    + remove-dnsserverresourcerecord -computername cbsdcs221 internal.blood ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Remove-DnsServerResourceRecord], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameterSet,Remove-DnsServerResourceRecord

    Wednesday, March 21, 2018 12:34 PM

All replies

  • get-dnsserverresourcerecord -computername cbsdcs221 internal.bloodservices.ca -name TomTerrific |
         remove-dnsserverresourcerecord

    \_(ツ)_/


    • Edited by jrv Wednesday, March 21, 2018 12:46 PM
    Wednesday, March 21, 2018 12:46 PM
  • I am still getting the error - what is zonename referring to?

    get-dnsserverresourcerecord -computername cbsdcs221 internal.bloodservices.ca -name TomTerrific | remove-dnsserverresourcerecord

    remove-dnsserverresourcerecord : The input object cannot be bound because it did not contain the information required to bind all
    mandatory parameters:  ZoneName
    At line:1 char:99
    + ... l.bloodservices.ca -name TomTerrific | remove-dnsserverresourcerecord
    +                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (DnsServerResourceRecord:PSObject) [Remove-DnsServerResourceRecord], ParameterBindingExcept
       ion
        + FullyQualifiedErrorId : InputObjectMissingMandatory,Remove-DnsServerResourceRecord

    Wednesday, March 21, 2018 1:15 PM
  • Remove-DnsServerResourceRecord -ZoneName "internal.bloodservices.ca" -RRType "A" -Name "cbsdcs221" -RecordData "10.100.26.100"

    Remove-DnsServerResourceRecord : Failed to get the zone information for internal.bloodservices.ca on server SSMLXP600.  (it appears to be querying my workstation not the dns server)
    At line:1 char:1
    + Remove-DnsServerResourceRecord -ZoneName "internal.bloodservices.ca"  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (cbsdcs221:root/Microsoft/...rResourceRecord) [Remove-DnsServerResourceRecord], CimException
        + FullyQualifiedErrorId : WIN32 1722,Remove-DnsServerResourceRecord

    Wednesday, March 21, 2018 1:40 PM
  • No -ComputerName parameter set in second reply.

    Learn PowerShell

    Script Requests

    -Remember to mark the correct response as the answer-



    Wednesday, March 21, 2018 1:56 PM
  • You need to use the ComputerName and ZoneName each time:

    Get-DnsServerResourceRecord -ComputerName cbsdcs221 -ZoneName internal.bloodservices.ca -RRType A -Name TomTerrific | Remove-DnsServerResourceRecord -ComputerName cbsdcs221 -ZoneName internal.bloodservices.ca


    Wednesday, March 21, 2018 4:35 PM
  • thanks for your help ! !! ! ! !
    Wednesday, March 21, 2018 4:38 PM
  • Hi,

    I'm checking how the issue is going, was your issue resolved?

    And if the replies as above are helpful, we would appreciate you to mark them as answers, and if you resolve it using your own solution, please share your experience and solution here. It will be greatly helpful to others who have the same question.

    Appreciate for your feedback.

    Best Regards,
    Albert

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, March 22, 2018 2:09 AM