Search found 210 matches

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: 1013

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: 1013

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: 881

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: 1680

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: 1680

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: 1622

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: 1622

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.
by ITEngineer
Mon Feb 17, 2020 5:30 pm
Forum: PowerShell
Topic: Need some help in Try Catch error handling inside calculated properties?
Replies: 4
Views: 1622

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

Hi Folks, I need some help in creating the Try Catch Block inside the Calculated properties. The below code to show the duplicated AD attributes working fine: Get-ADUser -Filter { (Enabled -eq $True) -and (extensionAttribute1 -like "*") -and (extensionAttribute2 -like "*") } -SearchBase "DC=domain,D...
by ITEngineer
Thu Feb 06, 2020 2:24 am
Forum: PowerShell
Topic: Displaying AD groups where a user account is member of?
Replies: 7
Views: 2370

Re: Displaying AD groups where a user account is member of?

OK, what I wanted to achieve is the script to display the AD group, where:
$users = Get-ADUser -Filter {(Name -like "*Administrator*")}

is member of, from these list of AD groups:
$groups = 'IT Team', 'Production Access', 'Global DL', 'Local Admins'
by ITEngineer
Thu Feb 06, 2020 2:13 am
Forum: PowerShell
Topic: Displaying AD groups where a user account is member of?
Replies: 7
Views: 2370

Re: Displaying AD groups where a user account is member of?

To get a canonical name just reference it in your Get". Get-ADUser -Filter "Name -like '*Administrator*'" -Property CanonicalName OK, that does make sense. @{n = 'MemberOf'; e = { $_.SideIndicator -eq '==' } } | Format-Table -AutoSize Is there any reason why that section above always displaying fal...