Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Array query

$
0
0

I feel this should be simple:

Script I’m trying to call:

Add-PublicFolderClientPermission -identity $var1 -User $var2 -AccessRights NonEditingAuthor

2 Text files – Var1.txt and Var2.txt

“Var1.txt” with:

“Copy MailboxesCopy of User1”

“Copy MailboxesCopy of User2”

“Copy MailboxesCopy of User3”

Var2.txt with:

User1

User2

User 3

Get-Content reading all data not one line at a time.

$var1 = Get-Content “C:tempeggvar1.txt” and

$var2 = Get-Content “C:tempeggvar2.txt”

Attempts to put all the text into the variables rather than one line at a time. How do I do this?

Cheers!

submitted by /u/cdmisp
[link] [comments]

The post Array query appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles