Skip to content

Commit 65836f3

Browse files
authored
Merge pull request MicrosoftDocs#2792 from ajansveld/patch-1
Fix Set-DnsServerResourceRecord help for PS 7
2 parents 84ccd18 + 57ae056 commit 65836f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docset/winserver2019-ps/dnsserver/Set-DnsServerResourceRecord.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This cmdlet cannot change the Name or Type of a DNS server resource record objec
3232
### Example 1: Change the timespan of a resource record
3333
```
3434
PS C:\> $OldObj = Get-DnsServerResourceRecord -Name "Host01" -ZoneName "contoso.com" -RRType "A"
35-
PS C:\> $NewObj = $OldObj.Clone()
35+
PS C:\> $NewObj = [ciminstance]::new($OldObj)
3636
PS C:\> $NewObj.TimeToLive = [System.TimeSpan]::FromHours(2)
3737
PS C:\> Set-DnsServerResourceRecord -NewInputObject $NewObj -OldInputObject $OldObj -ZoneName "contoso.com" -PassThru
3838
@@ -45,7 +45,7 @@ In this example, the time to live (TTL) value of the resource record named Host0
4545

4646
The first command assigns a resource record named Host01 in the zone named contoso.com to the variable **$OldObj**.
4747

48-
The second command copies the variable **$OldObj** to a new variable **$NewObj** using the .Clone() method.
48+
The second command copies the variable **$OldObj** to a new variable **$NewObj** using the [ciminstance]::new() constructor.
4949

5050
The third command sets the TTL time span for **$NewObj** to 2 hours.
5151

0 commit comments

Comments
 (0)