You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, PowerShell performs shallow copies (simple references)
372
-
when assigning objects from one variable to another. This will
373
-
create full exact copies of the provided object so that they
374
-
can be manipulated independently of each other, provided that the
375
-
object being copied is serializable.
376
-
377
-
The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub
378
-
379
-
.PARAMETERInputObject
380
-
The object that is to be copied. This must be serializable or this will fail.
381
-
382
-
.EXAMPLE
383
-
$bar = DeepCopy-Object -InputObject $foo
384
-
Assuming that $foo is serializable, $bar will now be an exact copy of $foo, but
385
-
any changes that you make to one will not affect the other.
386
-
387
-
.RETURNS
388
-
An exact copy of the PSObject that was just deep copied.
389
-
#>
390
-
[CmdletBinding()]
391
-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseApprovedVerbs","", Justification="Intentional. This isn't exported, and needed to be explicit relative to Copy-Object.")]
0 commit comments