Search found 4 matches

by TSMike
Tue Mar 12, 2019 10:08 am
Forum: Windows PowerShell
Topic: Update Computer Description
Replies: 15
Views: 2064

Re: Update Computer Description

Sorry jvierra, I do believe that the code you have provided has been solid and it is very much appreciated. I didn't mean to infer otherwise and I truly appreciate the help you have provided to me. That being said, I did try your latest adsisearcher code. When I ran this: $c = ([adsisearcher]"(samac...
by TSMike
Tue Mar 12, 2019 5:10 am
Forum: Windows PowerShell
Topic: Update Computer Description
Replies: 15
Views: 2064

Re: Update Computer Description

I tried to test the code in the PowerShell console and when trying to set $c to the adsi computer, it doesn't get the computer as intended. When I try to display what $c is set to I get an error. I attached the error message.
by TSMike
Mon Mar 11, 2019 1:50 pm
Forum: Windows PowerShell
Topic: Update Computer Description
Replies: 15
Views: 2064

Re: Update Computer Description

I understand how it returns the DistinguishedName of the computer (CN=<computername>,OU=<ou1>,OU=<ou2>,DC=contoso,DC=com), and the next line gives me the parent OU in which the computer lives (OU=<ou1>,OU=<ou2>,DC=contoso,DC=com). But now I need to connect to the computer object to update any fields...
by TSMike
Mon Mar 11, 2019 1:20 pm
Forum: Windows PowerShell
Topic: Update Computer Description
Replies: 15
Views: 2064

Update Computer Description

I am trying to update the Description field of a computer while running a script during a Task Sequence in SCCM. I have been searching and testing code and so far I cannot find anything that works. I do not want to use any snap-ins so I am trying to use OTB PowerShell. I found using ADSI to be a com...