Search found 148 matches

by ITEngineer
Mon Oct 14, 2019 11:35 pm
Forum: Windows PowerShell
Topic: Export list of AD Users account NOT in certain OU with specific criteria?
Replies: 5
Views: 196

Re: Export list of AD Users account NOT in certain OU with specific criteria?

Here is the best way to get users and exclude OUs. Get-AdOrganizationalUnit -Filter * -pipeline OU| Where-Object{$_.Distinguishedname -notin $excludeOUs } | ForEach-Object{ Get-ChildItem -Path ('AD:\' + $_.DistinguishedName) -Filter '(&(objectClass=User)(!objectClass=computer))' } | Select-Object n...
by ITEngineer
Mon Oct 14, 2019 10:09 pm
Forum: Windows PowerShell
Topic: Export list of AD Users account NOT in certain OU with specific criteria?
Replies: 5
Views: 196

Re: Export list of AD Users account NOT in certain OU with specific criteria?

Thanks for the suggestion Mr Vierra, Each smaller sub-company has its own Service Account, meeting rooms, SharedMailboxes. 'OU=GlobalCorp Testing,DC=GlobalCorp,DC=com', 'OU=HeadOffice,OU=Shared Mailboxes,DC=GlobalCorp,DC=com', 'OU=Branch1,OU=Shared Mailboxes,DC=GlobalCorp,DC=com', 'OU=Branch2,OU=Sha...
by ITEngineer
Sun Oct 13, 2019 11:42 pm
Forum: Windows PowerShell
Topic: Export list of AD Users account NOT in certain OU with specific criteria?
Replies: 5
Views: 196

Export list of AD Users account NOT in certain OU with specific criteria?

Hi All, I need some help in modifying the AD OU filter belowto exclude the AD User accounts that are located in those OU in the lists. This is the script that I have tried with, but the result is always containing User accounts in those OU. $filter = "(Enabled -eq 'true') -and ((mail -notlike '*') -...
by ITEngineer
Thu Jul 04, 2019 9:25 pm
Forum: Windows PowerShell
Topic: Download file using Powershell script no working anymore due to URL change?
Replies: 4
Views: 2136

Re: Download file using Powershell script no working anymore due to URL change?

jvierra wrote:
Thu Jul 04, 2019 1:20 pm
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
Nice, thank you for the pointer :-)
by ITEngineer
Wed Jul 03, 2019 11:10 pm
Forum: Windows PowerShell
Topic: Download file using Powershell script no working anymore due to URL change?
Replies: 4
Views: 2136

Re: Download file using Powershell script no working anymore due to URL change?

jvierra wrote:
Wed Jul 03, 2019 9:36 pm
You are likely not using TLS 1.2 as a protocol. Most web sites have disable SSL and TLS 1. Try using TLS 1.2.
OK, so how do I implement that in the script above?
by ITEngineer
Wed Jul 03, 2019 9:01 pm
Forum: Windows PowerShell
Topic: Download file using Powershell script no working anymore due to URL change?
Replies: 4
Views: 2136

Download file using Powershell script no working anymore due to URL change?

Hi, Can anyone here please assist me what's wrong with the lines of code below? $Time = Get-Date -format 'F' $DownloadDirectory = "C:\TEMP\JAVA" $DownloadedFiles = Get-ChildItem -Path "$DownloadDirectory\*jre*.exe" -Force | Where-Object {!$_.PSIsContainer} $DownloadedFiles | Remove-Item -Force Try {...
by ITEngineer
Thu Jun 27, 2019 9:11 pm
Forum: Windows PowerShell
Topic: Combine the Get-ADUser Powershell script to produce single result
Replies: 8
Views: 2762

Re: Combine the Get-ADUser Powershell script to produce single result

I did find one error in the code you copied and pasted. Also there is an issue with HomeDB property which the following will overcome. $properties = 'homeMDB,msExchRemoteRecipientType,msExchRecipientDisplayType,msExchRecipientTypeDetails,proxyAddresses' -split ',' $CSVPath = 'C:\Results.CSV' Get-AD...
by ITEngineer
Thu Jun 27, 2019 6:37 pm
Forum: Windows PowerShell
Topic: Combine the Get-ADUser Powershell script to produce single result
Replies: 8
Views: 2762

Re: Combine the Get-ADUser Powershell script to produce single result

Just make sure all properties are included in the query and that all conditions are in the "where" filter. When I modify the script into below, it does not give the result in .CSV file? $properties = 'homeMDB,msExchRemoteRecipientType,msExchRecipientDisplayType,msExchRecipientTypeDetails,proxyAddre...
by ITEngineer
Wed Jun 19, 2019 4:59 am
Forum: Windows PowerShell
Topic: Combine the Get-ADUser Powershell script to produce single result
Replies: 8
Views: 2762

Re: Combine the Get-ADUser Powershell script to produce single result

Hi Mr. Vierra,

Can you show me an example of what you mean?
by ITEngineer
Tue Jun 18, 2019 8:04 pm
Forum: Windows PowerShell
Topic: Combine the Get-ADUser Powershell script to produce single result
Replies: 8
Views: 2762

Combine the Get-ADUser Powershell script to produce single result

Hi People, I need some help in combining the two Power-Shell command to generate the CSV result with the column as follows: Mailbox Location, Name, PrimarySmtpAddress, OU OnPremise, OnPremise User1, OnPremise.User1@domain.com, domain.com/Users/Exchange 2013 OnPremise, OnPremise User2, OnPremise.User...