Search found 208 matches

by ITEngineer
Tue Jul 28, 2020 2:46 am
Forum: PowerShell
Topic: Calling hash Table inside Calculated property issue?
Replies: 0
Views: 440

Calling hash Table inside Calculated property issue?

Hi Folks, I need some help to fix the one line which maps the values of a number to a string in this Hashtable. $mailboxType = @{ "0" = "UserMailbox" "1073741824" = "Shared Mailbox" "6" = "MailUser" "7" = "Room" "8" = "Equipment" "-2147483642" = "RemoteUserMailbox" "-1073741818 " = "RemoteUserMailbo...
by ITEngineer
Sat Jul 18, 2020 1:26 am
Forum: PowerShell
Topic: Updating specific registry entry using Powershell and Try/Catch?
Replies: 6
Views: 625

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

weslein wrote:
Fri Jul 17, 2020 7:04 pm
jvierra wrote:
Fri Jul 17, 2020 5:01 am
Which line is causing the error?
Pretty cool and awesome.
yes, it is :-)
Powershell is interesting.
by ITEngineer
Fri Jul 17, 2020 5:10 am
Forum: PowerShell
Topic: Updating specific registry entry using Powershell and Try/Catch?
Replies: 6
Views: 625

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

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

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

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

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

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

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