View Single Post
Old 01-17-2008   #1 (permalink)
jer


 
 

Is ADSI encrypted?

Hi!

I`m planning to use this script to reset local administrator-passwords on
remote computers:

$erroractionpreference = "SilentlyContinue"

$date = Get-Date

foreach ( $strComputer in get-content C:\ps-scripts\logs\servers.txt)
{

$ping = new-object System.Net.NetworkInformation.Ping

$Reply = $null
$Reply = $ping .send( $strComputer )

if ( $Reply .status -like 'Success' )
{

$admin =[ adsi ]( "WinNT://" + $strComputer + "/administrator, user" )

$admin .psbase.invoke( "SetPassword" , "newpassword" )

Add-Content -path C:\ps-scripts\logs\servers-reset.txt -Value
"Administrator-password on $strComputer reset $date"

}

}



Are the ADSI-connection encrypted or do I need additional parameters for
this?

I tried resetting a password on a remote machine using this script while
running Wireshark. I didn`t find anything in the capture-log when searching
for "newpassword"...

--JER--

My System SpecsSystem Spec