Search found 208 matches

by ITEngineer
Tue Sep 15, 2020 8:19 pm
Forum: PowerShell
Topic: Resolve Unique IP and Send Email?
Replies: 4
Views: 117

Re: Resolve Unique IP and Send Email?

jvierra wrote:
Tue Sep 15, 2020 5:43 pm
Don't make the body HTML and the line breaks will persist.
Yes, that does make sense.

Thank you Mr, Vierra.
by ITEngineer
Tue Sep 15, 2020 4:42 pm
Forum: PowerShell
Topic: How to gather unique directory name and then export as CSV or Out-GridView?
Replies: 3
Views: 100

Re: How to gather unique directory name and then export as CSV or Out-GridView?

jvierra wrote:
Tue Sep 15, 2020 3:46 pm
Sorry but it is not possible to understand what you are trying to do.

ACEs do not have file names or paths. You would have to create custom objects for that.
Hi Mr. Vierra,

What I'm trying to do is to gather the lists of broken ACL directories name (unique) into .CSV or OGV when possible.
by ITEngineer
Tue Sep 15, 2020 4:40 pm
Forum: PowerShell
Topic: Resolve Unique IP and Send Email?
Replies: 4
Views: 117

Re: Resolve Unique IP and Send Email?

To send an object collection as HTML you would use "ConvertTo-Html" . $body = $results | ConvertTo-Html | Out-String Hi Mr. Vierra, Yes, that works partially on the email body to show the $Results content. However, how to allow the output to be like: Unique IP address: 192.168.1.66 - LAPTOP66 192.1...
by ITEngineer
Tue Sep 15, 2020 6:03 am
Forum: PowerShell
Topic: How to gather unique directory name and then export as CSV or Out-GridView?
Replies: 3
Views: 100

How to gather unique directory name and then export as CSV or Out-GridView?

Hi Everyone, The below script is working fine to list all explicitly defined ACL in my file server directories with the below specific exclusion pattern. 'NT AUTHORITY\SYSTEM', 'BUILTIN\Administrators', 'CREATOR OWNER', 'Everyone', 'DOMAIN\SERVICE-AVScan, 'S-1-5-21' However, I need some help in the ...
by ITEngineer
Tue Sep 15, 2020 6:01 am
Forum: PowerShell
Topic: Resolve Unique IP and Send Email?
Replies: 4
Views: 117

Resolve Unique IP and Send Email?

Hi All, The below contents are from the $Results variable I got from my larger script. MachineName : PRDDC03.domain.com Id : 4624 TimeCreated : 4/09/2020 12:12:12 PM Account : DOMAIN\SVC-SQL LogonType : 3 LogonTypeString : Network WorkstationName : SourceIP : 172.16.32.99 SourceName : MachineName : ...
by ITEngineer
Wed Aug 19, 2020 8:18 pm
Forum: PowerShell
Topic: Filtering Enabled only Get-ADObject to with specific patterns and OU?
Replies: 13
Views: 743

Re: Filtering Enabled only Get-ADObject to with specific patterns and OU?

I think the issue is that the Get-AdUser and Get-AdComputer commands add the "Enabled" property by converting the flags but Get-AdObject does not do this. You will have to extract the attribute and test the bit after extracting the objects. Yes, that's too complex for me to do :-o hence I was just ...
by ITEngineer
Wed Aug 19, 2020 7:53 pm
Forum: PowerShell
Topic: Filtering Enabled only Get-ADObject to with specific patterns and OU?
Replies: 13
Views: 743

Re: Filtering Enabled only Get-ADObject to with specific patterns and OU?

jvierra wrote:
Wed Aug 19, 2020 7:32 pm
All objects do not support the "Enabled" attribute. If the attribute is missing then it will not be true.
That makes sense.

Thank you Mr. Vierra :-)
by ITEngineer
Wed Aug 19, 2020 7:02 pm
Forum: PowerShell
Topic: Filtering Enabled only Get-ADObject to with specific patterns and OU?
Replies: 13
Views: 743

Re: Filtering Enabled only Get-ADObject to with specific patterns and OU?

Yes, already did. $filter = ' ( ObjectClass -eq "user" -or ObjectClass -eq "computer" ) -and Enabled -eq $true ' Get-ADObject -Filter $filter The script above returns all Users and Computers object. but when I add Enabled -eq $true , it does not returns anything at all?
by ITEngineer
Wed Aug 19, 2020 6:44 pm
Forum: PowerShell
Topic: Filtering Enabled only Get-ADObject to with specific patterns and OU?
Replies: 13
Views: 743

Re: Filtering Enabled only Get-ADObject to with specific patterns and OU?

Thank you Mr. Vierra,

Somehow it does not return any result?
even after removing the Enabled -eq $true

I've also changed it into Where-Object{$_.Name -notcontains $Exclusions}
by ITEngineer
Wed Aug 19, 2020 6:07 pm
Forum: PowerShell
Topic: Filtering Enabled only Get-ADObject to with specific patterns and OU?
Replies: 13
Views: 743

Filtering Enabled only Get-ADObject to with specific patterns and OU?

Hi All, I need to get the Enabled AD Objects (Users & Computer) that does not include the specific name patterns. How can I filter out or exclude some of the results using the Get-ADObject with the below Query? Script: $Exclusions = @( 'SystemMailbox', 'HealthMailbox', 'Migration' 'Delete' 'Disabled...