Howdy All!
How can I add something to function to get prompted for credentials?
Here's what I've started, the function works but I don't know where to put the credentials part. I did add in the .pscredential part.
[CmdletBinding()]
PARAM(
[Parameter(ValueFromPipeline=$true)]
[String[]]$ComputerName = $Computers,
[System.Management.Automation.PSCredential]$credential = get-credential)
[String]$ErrorLog = ".\Errors.log"
)
BEGIN {}#PROCESS BEGIN
PROCESS{
FOREACH ($Computer in $ComputerName) {