Tag Info

New answers tagged


You need to initialize $objRecord as an Array: $objRecord = @() Then you can += it. Also, you should just do: $objRecord += New-Object PSObject -property $Record $Table instead of: $objRecord = New-Object PSObject -property $Record $Table += $objrecord I.e.: you're doing 2 assignments. You either do a=a+1 or a+=1. I'd go with Steve's answer, ...


Your issue (as the errors state) is this line: $objRecord = New-Object PSObject -property $Record $Table += $objrecord You needed a new line between $Record and $Table: $objRecord = New-Object PSObject -property $Record $Table += $objrecord However, you can simplify and remove it. Here's my amended version of your script: Import-Module ...


Get-AdGroup -filter * | ForEach-Object{ $groupname=$_.Name Get-ADGroupMember $_ | ForEach-Object{ [pscustomobject]@{ GroupName=$groupname Name=$_.name SamAccountNamename=$_.samaccountname } } }


In the my.cnf you need to add the socket path in two places: In the [mysql] and in the ->[client]<- section. Here is a typical global option file: [client] port=3306 socket=/tmp/mysql.sock [mysqld] port=3306 socket=/tmp/mysql.sock

Top 50 recent answers are included