Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Function from cmd line – specify diff creds?

$
0
0

I am trying to use a function and I’m running it from a command line. I want to have the option to enter different credentials as I have to run it against domain and non-domain systems, as well as systems in other domains.

The function doesn’t have anything in place to prompt, is it possible to add something easily that would do this either on the command line or in the function?

The function command line I’m using is:

gc = c:\temp\computers.txt | get-stuff | export-csv c:\temp\test.csv


Viewing all articles
Browse latest Browse all 13067

Trending Articles