View Single Post
Old 01-17-2008   #2 (permalink)
Brandon Shell [MVP]


 
 

Re: Is ADSI encrypted?

It is encrypted via RPC.

The Server wouldn't allow you to reset it if it were from an unsecure connection.

Brandon Shell
---------------
Blog: http://www.bsonposh.com/
PSH Scripts Project: www.codeplex.com/psobject

j> Hi!
j>
j> I`m planning to use this script to reset local
j> administrator-passwords on remote computers:
j>
j> $erroractionpreference = "SilentlyContinue"
j>
j> $date = Get-Date
j>
j> foreach ( $strComputer in get-content C:\ps-scripts\logs\servers.txt)
j> {
j>
j> $ping = new-object System.Net.NetworkInformation.Ping
j>
j> $Reply = $null
j> $Reply = $ping .send( $strComputer )
j> if ( $Reply .status -like 'Success' )
j> {
j> $admin =[ adsi ]( "WinNT://" + $strComputer + "/administrator, user"
j> )
j>
j> $admin .psbase.invoke( "SetPassword" , "newpassword" )
j>
j> Add-Content -path C:\ps-scripts\logs\servers-reset.txt -Value
j> "Administrator-password on $strComputer reset $date"
j>
j> }
j>
j> }
j>
j> Are the ADSI-connection encrypted or do I need additional parameters
j> for this?
j>
j> I tried resetting a password on a remote machine using this script
j> while running Wireshark. I didn`t find anything in the capture-log
j> when searching for "newpassword"...
j>
j> --JER--
j>


My System SpecsSystem Spec