Skip to content

Instantly share code, notes, and snippets.

@bielawb
Created April 10, 2022 19:39
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/48a3da827858b50fd6f22705ac37af9f to your computer and use it in GitHub Desktop.
Save bielawb/48a3da827858b50fd6f22705ac37af9f to your computer and use it in GitHub Desktop.
Wykorzystanie PSBound
function Export-CimInfo {
param (
[String]$Path,
[pscredential]$Credential,
[String]$ComputerName
)
$PSBoundParameters.Remove('Path')
# Przekazujemy tylko ComputerName/ Credential
$sesja = New-CimSession @PSBoundParameters
# ...
$info | Export-Clixml -Path $Path
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment