PS C:\> $cred = Get-Credentialあらかじめコーディング
PS C:\> $user = "HOST\username" PS C:\> $pass = ConvertTo-SecureString "P@ssw-rd!" -AsPlainText -Force PS C:\> $cred = New-Object System.Management.Automation.PSCredential $user,$pass
PS C:\> $cred = Get-Credentialあらかじめコーディング
PS C:\> $user = "HOST\username" PS C:\> $pass = ConvertTo-SecureString "P@ssw-rd!" -AsPlainText -Force PS C:\> $cred = New-Object System.Management.Automation.PSCredential $user,$pass