• Hi Jako,

    Your third line has a typo - $smo.datases instead of $smo.databases which probably doesn't help.

    Try calling the Alter method at the database level rather than the file level:

    $smo.databases["TempDB"].Alter()

    Remember you'll need to stop & start the SQL service for the change to tempdb to take effect.

    Cheers

    Gaz