Search found 216 matches

by ITEngineer
Fri Jul 17, 2020 5:10 am
Forum: PowerShell
Topic: Updating specific registry entry using Powershell and Try/Catch?
Replies: 6
Views: 2704

Re: Updating specific registry entry using Powershell and Try/Catch?

jvierra wrote: Fri Jul 17, 2020 5:01 am Which line is causing the error?
Somehow it doesn't mention specifically.

Do you mean in this line where the action is?
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\DNS\Parameters" -Name "TcpReceivePacketSize" -Type DWord -Value 255
by ITEngineer
Fri Jul 17, 2020 4:56 am
Forum: PowerShell
Topic: Updating specific registry entry using Powershell and Try/Catch?
Replies: 6
Views: 2704

Re: Updating specific registry entry using Powershell and Try/Catch?

jvierra wrote: Fri Jul 17, 2020 4:27 am Add "-ErrorAction SilentlyContinue"
On which line?
by ITEngineer
Fri Jul 17, 2020 3:38 am
Forum: PowerShell
Topic: Updating specific registry entry using Powershell and Try/Catch?
Replies: 6
Views: 2704

Updating specific registry entry using Powershell and Try/Catch?

Hi People, I need some assistance to modify the rough script below to: Check the registry value exist or not before changing. update specific Registry key. Restart DNS service only. Test DNS functionality using builtin Powershell and then exit script when all is good no error. Import-Module DnsServe...
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: 2732

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

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

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 -...
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: 4108

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

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 1:22 am
Forum: PowerShell
Topic: Calling Powershell Function inside the Add-Member -InputObject ForEach loop?
Replies: 3
Views: 3086

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