Search found 262 matches

by sekou2331
Thu Jan 25, 2018 2:59 pm
Forum: Windows PowerShell
Topic: Running .ps1 script remotely
Replies: 8
Views: 2142

Re: Running .ps1 script remotely

Ok I see what the issue is I think. In the .ps1 file I have a function that is calling a DB and it doesn't seem to like the call. I added the login creds as below and it still doesn't like it. Are there limitation to running scripts remotely when call a DB? function Get-DBData{ [CmdletBinding()] par...
by sekou2331
Thu Jan 25, 2018 1:20 pm
Forum: Windows PowerShell
Topic: Running .ps1 script remotely
Replies: 8
Views: 2142

Re: Running .ps1 script remotely

Ok I see but why is still trying to access via "NT AUTHORITY\ANONYMOUS LOGON" instead of my user login? Exception calling "Open" with "0" argument(s): "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'." + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : Sq...
by sekou2331
Thu Jan 25, 2018 12:43 pm
Forum: Windows PowerShell
Topic: Running .ps1 script remotely
Replies: 8
Views: 2142

Running .ps1 script remotely

I am running the below script and I keep getting the same error. I have full permissions to the server. I also can use use Enter-PSSession to access the server. But I cant seem to run the below script. Also I have access to the path that it is writing to. Basically I can run this script on the serve...
by sekou2331
Wed Jan 17, 2018 2:05 pm
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 1492

Re: Combing 2 objects

I think I figured this out. I don't know if this is the powershell way but what I used was a nested foreach on each object. foreach($objA in $objAs){ foreach($objB in $objBs){ if($objA.ComputerName -contains $objB.ComputerName){ [pscustomobject]@{ ComputerName = $objA.ComputerName Soruce = $objA.Sor...
by sekou2331
Wed Jan 17, 2018 8:41 am
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 1492

Re: Combing 2 objects

So would I use GetEnumerator() to go though each?
by sekou2331
Tue Jan 16, 2018 5:47 pm
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 1492

Re: Combing 2 objects

I see the problem. There is multiple of ObjA. So it is putting everything in one object. instead of separating and adding the one member. ComputerName : {Computername1, ComputerName2,} name : {A, b, } numbers : {1000, 100,} File2 : {Path2, Path4} File3 : {Path3,Path5} File1 : {Path1 ,Path1 } ObjA: C...
by sekou2331
Tue Jan 16, 2018 12:58 pm
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 1492

Re: Combing 2 objects

:( This adding everything into one memeber. I just need to take what is ever matching by computer name between ObjA and ObjB and add the missing member to ObjA from ObjB. ObjA: ComputerName : computer1 name : A numbers : 1000 File2 : Path2 File3 : Path3 ObjB: ComputerName : computer1 Letter : b Soru...
by sekou2331
Tue Jan 16, 2018 11:54 am
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 1492

Combing 2 objects

Hi I have 2 custom PS objects let’s say objA and objB with multiple members in each custom object. The only thing the same about each object is the computer name. Foreach computer name match I want to take one member from objB and add it to objA. The only issue is it is adding everything into that o...
by sekou2331
Tue Jan 09, 2018 9:58 am
Forum: Windows PowerShell
Topic: Multicast Listner error
Replies: 7
Views: 897

Re: Multicast Listner error

I am sorry are you saying the way I am using the ReiceveTimeout is wrong? Or are you saying the way I am approaching my whole code is incorrect? function Multicast-Listen([int]$Port, [string]$IPMCastAddress, [string]$IPLocalAddress){ #First create the multicast socket. $mCastSocket = New-Object Syst...
by sekou2331
Mon Jan 08, 2018 3:57 pm
Forum: Windows PowerShell
Topic: Multicast Listner error
Replies: 7
Views: 897

Re: Multicast Listner error

So this is my last question. I am noticing it sticking. I think it is because of it some sources not having multicast data. There is a ReceiveTimeout. Can you give me an example on how this would work. I never could get it to work properly. Or is there another way to time out and move to the next mu...