Skip to content

Instantly share code, notes, and snippets.

@bielawb
Created March 27, 2022 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bielawb/db5e8dd11343bd88f1d07b121321c9f9 to your computer and use it in GitHub Desktop.
Save bielawb/db5e8dd11343bd88f1d07b121321c9f9 to your computer and use it in GitHub Desktop.
Tworzymy i usuwamy wpis w DNS za pomocą końcówki REST.
Invoke-RestMethod -Uri http://psu.contoso.com/dns/cname -Method Post -Body @{
nazwa = 'test'
cel = 'host.contoso.com.'
} -UseDefaultCredentials
Invoke-RestMethod -Uri http://psu.contoso.com/dns/cname -Method Delete -Body @{
nazwa = 'test'
cel = 'host.contoso.com.'
} -UseDefaultCredentials
# Invoke-RestMethod: Cannot process command because of one or more missing mandatory parameters: Nazwa Cel.
# at , : line 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment