VMware Cloud Community
baber
Expert
Expert
Jump to solution

How can get parameter from user in powershell script

I want get contentlibrary name from user in my PowerShell script. I know the command is Get-ContentLibraryItem -ContentLibrary 'content2' but want get content library name "which here is content2" by user how can write it ?

 

 

Please mark helpful or correct if my answer resolved your issue.
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You mean like this?

$clName = Read-Host -Prompt "Name of the content library"
Get-ContentLibraryItem -ContentLibrary $clName


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

View solution in original post

3 Replies
baber
Expert
Expert
Jump to solution

Can anyone help me about this?

Please mark helpful or correct if my answer resolved your issue.
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Moderator: Moved to VMware PowerCLI Discussions

0 Kudos
LucD
Leadership
Leadership
Jump to solution

You mean like this?

$clName = Read-Host -Prompt "Name of the content library"
Get-ContentLibraryItem -ContentLibrary $clName


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