powell honed those skills as the top military aide to one-time pentagon chief caspar weinberger , and during his white house years as the deputy national security adviser to frank carlucci , whose post he later held .