Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

You can create an alias for a cmdlet, but not for a cmdlet with parameters.

Why don't you define a function in your profile instead?

function allvc {

    $credential = import-clixml -path 'C:\documents\PowerCLI\My-credfile.xml'

    $vCenterServers = @("vcsa1","vcsa2","vcsa3","vcsa4","vcsa5")


    connect-viserver $vCenterServers -Credential $credential

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos