Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I saw this in some scripts and could not get my head around it:
$filers += "filer1"
$filers += "filer2"
Can you please explain that?
Cheers
Joel
Solved! See The Solution
1 ACCEPTED SOLUTION
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's done to add individual elements to an array.
$filers Is a array and individual filer names are added to the array.
8 REPLIES 8
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's done to add individual elements to an array.
$filers Is a array and individual filer names are added to the array.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so it is the same as:
$filers = "filer1","filer2"
?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
great, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Joel -
Don't take this the wrong way, but I would suggest grabbing a powershell book from amazon and flipping through it
Also, for general powershell questions, I would use a forum site @ powershell.com or powershell.org.
Even though i'm just a customer, this community is for Powershell for Netapp mainly
But to answer your questions += usually when you stuff an array of custom objects, and $filers = "1","2" - creates an array so you can do something like $filerrs | % { }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm already reading a book by Dr. Tobias Weltner called "Matering PowerShell" but that issue wasn't mentioned there
Don't take this the wrong way but the way I see it, you can either answer my questions or not. If you think this is not the right question for you then don't answer and BTW, I really appreciate the help so far..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Joel - also check out http://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617291080 its an awesome book.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks good - I'll check it out
Thanks
