Search found 193 matches

by ITEngineer
Wed Apr 29, 2020 7:45 pm
Forum: PowerShell
Topic: Need some help in modifying the Powershell Calculated Property with If Else statement for SMTPAddresses?
Replies: 4
Views: 684

Re: Need some help in modifying the Powershell Calculated Property with If Else statement for SMTPAddresses?

Mr. Vierra, I finally got it working by using: @{Label = 'SMTP Address(es)'; Expression = { If (( $_.UserPrincipalName -match 'onmicrosoft.com$')) { ($_.proxyAddresses | Where-Object { ($_ -like 'SMTP*') -and ($_ -like '*onmicrosoft.com') }) -replace 'smtp:' -join ';' } Else { ($_.proxyAddresses | W...
by ITEngineer
Wed Apr 29, 2020 6:01 am
Forum: PowerShell
Topic: Need some help in modifying the Powershell Calculated Property with If Else statement for SMTPAddresses?
Replies: 4
Views: 684

Need some help in modifying the Powershell Calculated Property with If Else statement for SMTPAddresses?

Hi People, I need some help in modifying the Powershell to list users from Azure AD to display the information correctly in the SMTP Address Column. The below script is correct, I just need to make some changes like below if possible: If the UserPrincipalName value contains Company1.onmicrosoft.com ...
by ITEngineer
Fri Apr 17, 2020 1:05 am
Forum: PowerShell
Topic: Powershell assistance in setting the DNS SOA record and TTL help?
Replies: 4
Views: 673

Re: Powershell assistance in setting the DNS SOA record and TTL help?

OK, how about making it work first before splitting it. hence using the below one lines: Get-DnsServerResourceRecord -ComputerName $PrimaryDNSServer -ZoneName $DomainNames -RRType Soa | Format-List How can I incorporate the below lines: $old = $new = "" $old = Get-DnsServerResourceRecord -ComputerNa...
by ITEngineer
Fri Apr 17, 2020 12:28 am
Forum: PowerShell
Topic: Powershell assistance in setting the DNS SOA record and TTL help?
Replies: 4
Views: 673

Powershell assistance in setting the DNS SOA record and TTL help?

Hi All, I need some help in modifying this below Powershell to add DNS server entry from a list of domains and setup the SOA TTL into 15 minutes. So far I cannot figure it out how to: 1. Set the SOA TTL to just 15 minutes. 2. set the SOA number to be YYYYMMddd01 $DomainNames = 'CorporateProduct1.com...
by ITEngineer
Wed Apr 08, 2020 1:19 am
Forum: PowerShell
Topic: Using the latest Powershell v7.0 with Office 365 / Exchange Online MFA/2FA module?
Replies: 2
Views: 695

Using the latest Powershell v7.0 with Office 365 / Exchange Online MFA/2FA module?

What is the latest version of full Powershell module (not the Core edition) ? How to safely upgrade to that version. $PSVersionTable result Name Value ---- ----- PSVersion 5.1.18362.752 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.18362.752 CLRVersion 4.0.30319.42...
by ITEngineer
Tue Feb 18, 2020 2:22 am
Forum: PowerShell
Topic: Calling Powershell Function inside the Add-Member -InputObject ForEach loop?
Replies: 3
Views: 1460

Re: Calling Powershell Function inside the Add-Member -InputObject ForEach loop?

Ah, I see,

Because I have already installed this to play and learn around date-time formatting

https://www.powershellgallery.com/packa ... anizer/3.2
by ITEngineer
Mon Feb 17, 2020 9:21 pm
Forum: PowerShell
Topic: Calling Powershell Function inside the Add-Member -InputObject ForEach loop?
Replies: 3
Views: 1460

Calling Powershell Function inside the Add-Member -InputObject ForEach loop?

People, I wonder if anyone here can assist in integrating the below function to Get Last Logon Time in Exchange Online mailbox with the simple script I have put together? The main script that is already working to collect mailbox size statistics then output to Out-Gridview: Write-Host "Gathering Sta...
by ITEngineer
Mon Feb 17, 2020 9:15 pm
Forum: PowerShell
Topic: Need some help in Try Catch error handling inside calculated properties?
Replies: 4
Views: 1413

Re: Need some help in Try Catch error handling inside calculated properties?

jvierra wrote:
Mon Feb 17, 2020 8:47 pm
The @ is only for splats. Remove it.
LOL, yes, that was great finding :-)
:D

Thanks Mr. Vierra.
by ITEngineer
Mon Feb 17, 2020 6:42 pm
Forum: PowerShell
Topic: Need some help in Try Catch error handling inside calculated properties?
Replies: 4
Views: 1413

Re: Need some help in Try Catch error handling inside calculated properties?

Yes, you are right, so how to fix that issue?

If the Department has some values in it, then it will not returns error.
But if it is empty, just skip it and move on to the next Attributes / properties.