Search found 24 matches

by notarat
Fri Feb 09, 2018 7:52 am
Forum: PowerShell
Topic: Need some assistance formatting output
Replies: 11
Views: 5090

Re: Need some assistance formatting output

The code you posted lists only group membership and has nothing to do with applications. This is the code you posted: foreach ($computer in $computers) { $strCMP=GET-ADComputer $computer –Properties cn,MemberOf $strGRP=($strCMP.MemberOf | Sort Name | foreach {($_.Split(','))[0].Substring(3)}) -Join...
by notarat
Thu Feb 08, 2018 1:26 pm
Forum: PowerShell
Topic: Need some assistance formatting output
Replies: 11
Views: 5090

Re: Need some assistance formatting output

jvierra wrote: Thu Feb 08, 2018 1:20 pm Get-AdGroupMember "group" -recurse

https://docs.microsoft.com/en-us/powers ... w=win10-ps
Doesn't work when there are over 1000 computers in a group IIRC
by notarat
Thu Feb 08, 2018 1:25 pm
Forum: PowerShell
Topic: Need some assistance formatting output
Replies: 11
Views: 5090

Re: Need some assistance formatting output

The code you posted and your requested output are not in any way related. What are "App1", "App2", etc? The code seems to want to get the groups a computer belongs to. Some of the lines in the script do absolutely nothing. THe line producing output gets the computer name in two ...
by notarat
Thu Feb 08, 2018 1:12 pm
Forum: PowerShell
Topic: Need some assistance formatting output
Replies: 11
Views: 5090

Re: Need some assistance formatting output

I've managed to get to this point but, from what I am hearing from the person requesting the data, the script looks like it's pulling only Group Membership, not "nested" group membership $CMPS = @() $dt = @() $dt=(get-date -UFormat "%Y%m%d") $computers = (Get-Content c:\inputfile...
by notarat
Thu Feb 08, 2018 10:55 am
Forum: PowerShell
Topic: Need some assistance formatting output
Replies: 11
Views: 5090

Re: Need some assistance formatting output

Cody,

Thanks for the response.

I think there may be a hiccup in your pasted example. It produces the following output:

comp1,comp1
comp2,comp2
comp3,comp3
comp4,comp4
.
.
.
.
comp100,comp100

I'm still plugging away
by notarat
Thu Feb 08, 2018 7:22 am
Forum: PowerShell
Topic: Need some assistance formatting output
Replies: 11
Views: 5090

Need some assistance formatting output

Can't seem to locate the information I'm looking for that explains how to do what I want, and I could use some assistance if you don't mind. I can generally muddle my way through PowerShell but I've run up against a problem for which I can't seem to find an answer. I have a PowerShell script that pu...
by notarat
Wed May 03, 2017 11:28 am
Forum: PowerShell
Topic: Looking for a more efficient way to pull information
Replies: 3
Views: 2378

Re: Looking for a more efficient way to pull information

Thanks for the response.

Dang...I was hoping there was a faster way :(
by notarat
Wed May 03, 2017 6:12 am
Forum: PowerShell
Topic: Looking for a more efficient way to pull information
Replies: 3
Views: 2378

Looking for a more efficient way to pull information

I have a power shell script I use to scan my office's network drives for instances where my permissions have been removed, or where someone has saved a file, created a folder (or a combination of the two) where the length exceeds the 255 character limit. (Please keep in mind I'm not a system admin s...
by notarat
Wed Jul 08, 2015 8:57 am
Forum: PowerShell
Topic: Capturing Access Denied Errors
Replies: 7
Views: 6436

Re: Capturing Access Denied Errors

I am writing a script to review files on our servers that have been archived. The files in question have the Offline Attribute. The command I am running is; Get-Childitem \\Server\Share -recurse | Where-Object { $_.Attributes -like '*offline*' } | Select DirectoryName, Name | Export-CSV C:\Output.c...
by notarat
Fri Feb 13, 2015 6:36 am
Forum: PowerShell
Topic: Export unreachable folder names into a text file
Replies: 6
Views: 3856

Re: Export unreachable folder names into a text file

You are trying too hard. The custom error variable is deleted and created automatically. We do not manage it. Just name it and use it. Like this: gci C:\users -recurse -errorvariable OOPS $OOPS | select TargetObject jvierra, I kind of got the feeling the original poster didn't have any experience u...