-
-
Save bielawb/262b209d1a410686ce0f9252088dcc0d to your computer and use it in GitHub Desktop.
Wspólne parametry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sesja = New-CimSession -ComputerName test -Credential $mojePoświadczenia | |
$wspólne = @{ | |
CimSession = $sesja | |
ErrorAction = 'Stop' | |
} | |
try { | |
$os = Get-CimInstance @wspólne -ClassName Win32_OperatingSystem | |
$cs = Get-CimInstance @wspólne -ClassName Win32_ComputerSystem | |
} catch { | |
# obsługa błędów... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment