Search found 15 matches

by dwight.brookland
Mon Aug 27, 2018 12:07 pm
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

That worked. adding the -arglist $var1,$var2,$var3 to the invoke-command and then using the $using:var1, etc worked like a charm.

Thanks again.
Dwight
by dwight.brookland
Mon Aug 27, 2018 9:07 am
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

Before you ask, I wanted to provide the code. $sasURL = Read-Host "Please enter the SAS URL:" $pstServer = Read-Host "Please enter server PSTs reside on. " $sasURL = $sasURL.Replace("ingestiondata", "ingestiondata/$pstServer") Write-Host $sasURL Pause Invoke-Command -ComputerName $pstServer -ScriptB...
by dwight.brookland
Mon Aug 27, 2018 8:48 am
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

Okay here is I hope to be my last question. How do you wrap a variable in quotes. I am trying to have an input requirement of the SAS URL for pst upload and then kick off an AzCopy command but the command requires that the SAS URL be wrapped in quotes. I get various errors relating to that variable ...
by dwight.brookland
Thu Aug 23, 2018 1:11 pm
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

Okay that is what I wanted to know. Now they want me to add a self comparison to it. I am not sure how to accomplish this. I have done some reading but not sure how to do it. They would like to compare the source files that were added to the $pstData array with the capture of the $destData array and...
by dwight.brookland
Thu Aug 23, 2018 12:41 pm
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

jvierra, This is what I was referring to. I added line 25 to initiate the array and then line 51 to add the current file being processed to the array and then lines 62-68 to produce a way of visually verifying that the files that were supposed to be copied are what was copied. That both source files...
by dwight.brookland
Thu Aug 23, 2018 11:07 am
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

I will sort it out myself.
by dwight.brookland
Thu Aug 23, 2018 7:39 am
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

So I have added a Try Catch to help with error handling on AD user find Its not 100% clean but its working as intended. What I am also needing is during the steps to output each pst file with the user it belongs to as well as some user information to a global variable that is a sum of all the pst's ...
by dwight.brookland
Wed Aug 22, 2018 12:21 pm
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

I have updated this code a little but it does now work. I had to move the $fullName=$fullname.Replace("... ") line up to right under the first rename.
by dwight.brookland
Wed Aug 22, 2018 9:16 am
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 21
Views: 2435

Re: PST Find,Rename and Move

<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2018 v5.5.153 Created on: 8/15/2018 3:12 PM Created by: Organization: Filename: ==========================================================================...
by dwight.brookland
Wed Aug 22, 2018 9:13 am
Forum: Windows PowerShell
Topic: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?
Replies: 6
Views: 1037

Re: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?

Why not pull a list of DL's from Exchange and then push that through an Get-ADGroupMember cmdlet using the ().count and assigning to variable. Then pushing that out to an out-gridview of those that are empty. So something like $emptDLs = @() $DLs = Get-DistributionGroup $DLs | Foreach { $count = (Ge...